[FFmpeg-devel] [PATCH 1/2] avcodec/cbs_av1: fix reading reference order hint in skip_mode_params()

James Almer jamrial at gmail.com
Sat Nov 16 20:57:22 EET 2019


On 11/16/2019 11:56 AM, Ronald S. Bultje wrote:
> Hi,
> 
> On Fri, Nov 15, 2019 at 1:44 PM James Almer <jamrial at gmail.com> wrote:
> 
>> Signed-off-by: James Almer <jamrial at gmail.com>
>> ---
>>  libavcodec/cbs_av1_syntax_template.c | 4 ++--
>>  1 file changed, 2 insertions(+), 2 deletions(-)
>>
>> diff --git a/libavcodec/cbs_av1_syntax_template.c
>> b/libavcodec/cbs_av1_syntax_template.c
>> index 806b302de6..c843cfa02b 100644
>> --- a/libavcodec/cbs_av1_syntax_template.c
>> +++ b/libavcodec/cbs_av1_syntax_template.c
>> @@ -882,7 +882,7 @@ static int
>> FUNC(skip_mode_params)(CodedBitstreamContext *ctx, RWContext *rw,
>>          forward_idx  = -1;
>>          backward_idx = -1;
>>          for (i = 0; i < AV1_REFS_PER_FRAME; i++) {
>> -            ref_hint = priv->ref[i].order_hint;
>> +            ref_hint = priv->ref[current->ref_frame_idx[i]].order_hint;
>>              dist = cbs_av1_get_relative_dist(seq, ref_hint,
>>                                               current->order_hint);
>>              if (dist < 0) {
>> @@ -913,7 +913,7 @@ static int
>> FUNC(skip_mode_params)(CodedBitstreamContext *ctx, RWContext *rw,
>>
>>              second_forward_idx = -1;
>>              for (i = 0; i < AV1_REFS_PER_FRAME; i++) {
>> -                ref_hint = priv->ref[i].order_hint;
>> +                ref_hint =
>> priv->ref[current->ref_frame_idx[i]].order_hint;
>>                  if (cbs_av1_get_relative_dist(seq, ref_hint,
>>                                                forward_hint) < 0) {
>>                      if (second_forward_idx < 0 ||
> 
> 
> LGTM, thanks.
> 
> Ronald

Applied.


More information about the ffmpeg-devel mailing list