[FFmpeg-devel] [PATCH] hevc: Fix scaling list prediction delta for the 32x32 inter matrix

Mark Thompson sw at jkqxz.net
Thu Jun 15 01:10:46 EEST 2017


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


More information about the ffmpeg-devel mailing list