Message ID | 595f926a-c283-5b52-d98f-ba38da16ec15@jkqxz.net |
---|---|
State | Accepted |
Commit | 88a2e4504d1820e717730ff5f5dc0cf4d90cdd6e |
Headers | show |
On 30/04/17 13:34, Mark Thompson wrote: > Fixes ticket #6356. > --- > This was broken in 627c044f50da3046809314f7cc742b8a10cf26a1, which changed the array index of the 32x32 inter matrix but missed this case. > > Sample at <https://trac.ffmpeg.org/ticket/6356> - with this change the output for that sample matches the reference decoder. > > > libavcodec/hevc_ps.c | 1 + > 1 file changed, 1 insertion(+) > > diff --git a/libavcodec/hevc_ps.c b/libavcodec/hevc_ps.c > index 6d67dd9c69..3e00e4b3f3 100644 > --- a/libavcodec/hevc_ps.c > +++ b/libavcodec/hevc_ps.c > @@ -719,6 +719,7 @@ static int scaling_list_data(GetBitContext *gb, AVCodecContext *avctx, ScalingLi > * which should already be in the arrays. */ > if (delta) { > // Copy from previous array. > + delta *= (size_id == 3) ? 3 : 1; > if (matrix_id < delta) { > av_log(avctx, AV_LOG_ERROR, > "Invalid delta in scaling list data: %d.\n", delta); > Ping.
On 5/15/2017 5:29 PM, Mark Thompson wrote: > On 30/04/17 13:34, Mark Thompson wrote: >> Fixes ticket #6356. >> --- >> This was broken in 627c044f50da3046809314f7cc742b8a10cf26a1, which changed the array index of the 32x32 inter matrix but missed this case. >> >> Sample at <https://trac.ffmpeg.org/ticket/6356> - with this change the output for that sample matches the reference decoder. >> >> >> libavcodec/hevc_ps.c | 1 + >> 1 file changed, 1 insertion(+) >> >> diff --git a/libavcodec/hevc_ps.c b/libavcodec/hevc_ps.c >> index 6d67dd9c69..3e00e4b3f3 100644 >> --- a/libavcodec/hevc_ps.c >> +++ b/libavcodec/hevc_ps.c >> @@ -719,6 +719,7 @@ static int scaling_list_data(GetBitContext *gb, AVCodecContext *avctx, ScalingLi >> * which should already be in the arrays. */ >> if (delta) { >> // Copy from previous array. >> + delta *= (size_id == 3) ? 3 : 1; >> if (matrix_id < delta) { >> av_log(avctx, AV_LOG_ERROR, >> "Invalid delta in scaling list data: %d.\n", delta); >> > > Ping. Should be ok. Can you add a fate test with this sample as well?
On 15/05/17 22:46, James Almer wrote: > On 5/15/2017 5:29 PM, Mark Thompson wrote: >> On 30/04/17 13:34, Mark Thompson wrote: >>> Fixes ticket #6356. >>> --- >>> This was broken in 627c044f50da3046809314f7cc742b8a10cf26a1, which changed the array index of the 32x32 inter matrix but missed this case. >>> >>> Sample at <https://trac.ffmpeg.org/ticket/6356> - with this change the output for that sample matches the reference decoder. >>> >>> >>> libavcodec/hevc_ps.c | 1 + >>> 1 file changed, 1 insertion(+) >>> >>> diff --git a/libavcodec/hevc_ps.c b/libavcodec/hevc_ps.c >>> index 6d67dd9c69..3e00e4b3f3 100644 >>> --- a/libavcodec/hevc_ps.c >>> +++ b/libavcodec/hevc_ps.c >>> @@ -719,6 +719,7 @@ static int scaling_list_data(GetBitContext *gb, AVCodecContext *avctx, ScalingLi >>> * which should already be in the arrays. */ >>> if (delta) { >>> // Copy from previous array. >>> + delta *= (size_id == 3) ? 3 : 1; >>> if (matrix_id < delta) { >>> av_log(avctx, AV_LOG_ERROR, >>> "Invalid delta in scaling list data: %d.\n", delta); >>> >> >> Ping. > > Should be ok. > > Can you add a fate test with this sample as well? Sure. I've asked the reporter whether their file can be used for this. Thanks, - Mark
On 15/05/17 23:44, Mark Thompson wrote: > On 15/05/17 22:46, James Almer wrote: >> On 5/15/2017 5:29 PM, Mark Thompson wrote: >>> On 30/04/17 13:34, Mark Thompson wrote: >>>> Fixes ticket #6356. >>>> --- >>>> This was broken in 627c044f50da3046809314f7cc742b8a10cf26a1, which changed the array index of the 32x32 inter matrix but missed this case. >>>> >>>> Sample at <https://trac.ffmpeg.org/ticket/6356> - with this change the output for that sample matches the reference decoder. >>>> >>>> >>>> libavcodec/hevc_ps.c | 1 + >>>> 1 file changed, 1 insertion(+) >>>> >>>> diff --git a/libavcodec/hevc_ps.c b/libavcodec/hevc_ps.c >>>> index 6d67dd9c69..3e00e4b3f3 100644 >>>> --- a/libavcodec/hevc_ps.c >>>> +++ b/libavcodec/hevc_ps.c >>>> @@ -719,6 +719,7 @@ static int scaling_list_data(GetBitContext *gb, AVCodecContext *avctx, ScalingLi >>>> * which should already be in the arrays. */ >>>> if (delta) { >>>> // Copy from previous array. >>>> + delta *= (size_id == 3) ? 3 : 1; >>>> if (matrix_id < delta) { >>>> av_log(avctx, AV_LOG_ERROR, >>>> "Invalid delta in scaling list data: %d.\n", delta); >>>> >>> >>> Ping. >> >> Should be ok. >> >> Can you add a fate test with this sample as well? > > Sure. I've asked the reporter whether their file can be used for this. Reporter didn't reply, so applied with no test. Thanks, - Mark
diff --git a/libavcodec/hevc_ps.c b/libavcodec/hevc_ps.c index 6d67dd9c69..3e00e4b3f3 100644 --- a/libavcodec/hevc_ps.c +++ b/libavcodec/hevc_ps.c @@ -719,6 +719,7 @@ static int scaling_list_data(GetBitContext *gb, AVCodecContext *avctx, ScalingLi * which should already be in the arrays. */ if (delta) { // Copy from previous array. + delta *= (size_id == 3) ? 3 : 1; if (matrix_id < delta) { av_log(avctx, AV_LOG_ERROR, "Invalid delta in scaling list data: %d.\n", delta);