[FFmpeg-cvslog] avcodec/av1dec: remove order_hint from AV1Frame

James Almer git at videolan.org
Fri Nov 13 15:40:54 EET 2020


ffmpeg | branch: master | James Almer <jamrial at gmail.com> | Thu Nov 12 17:06:05 2020 -0300| [5d4a6bbd4b011b49b60563a1bc390d8d04fe1e17] | committer: James Almer

avcodec/av1dec: remove order_hint from AV1Frame

We now have access to the raw frame header, so use that

Signed-off-by: James Almer <jamrial at gmail.com>

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=5d4a6bbd4b011b49b60563a1bc390d8d04fe1e17
---

 libavcodec/av1dec.c | 8 ++------
 libavcodec/av1dec.h | 1 -
 2 files changed, 2 insertions(+), 7 deletions(-)

diff --git a/libavcodec/av1dec.c b/libavcodec/av1dec.c
index 84c9ca93d5..c1967f03bd 100644
--- a/libavcodec/av1dec.c
+++ b/libavcodec/av1dec.c
@@ -169,7 +169,7 @@ static void skip_mode_params(AV1DecContext *s)
     forward_idx  = -1;
     backward_idx = -1;
     for (i = 0; i < AV1_REFS_PER_FRAME; i++) {
-        ref_hint = s->ref[header->ref_frame_idx[i]].order_hint;
+        ref_hint = s->ref[header->ref_frame_idx[i]].raw_frame_header->order_hint;
         dist = get_relative_dist(seq, ref_hint, header->order_hint);
         if (dist < 0) {
             if (forward_idx < 0 ||
@@ -198,7 +198,7 @@ static void skip_mode_params(AV1DecContext *s)
 
     second_forward_idx = -1;
     for (i = 0; i < AV1_REFS_PER_FRAME; i++) {
-        ref_hint = s->ref[header->ref_frame_idx[i]].order_hint;
+        ref_hint = s->ref[header->ref_frame_idx[i]].raw_frame_header->order_hint;
         if (get_relative_dist(seq, ref_hint, forward_hint) < 0) {
             if (second_forward_idx < 0 ||
                 get_relative_dist(seq, ref_hint, second_forward_hint) > 0) {
@@ -445,7 +445,6 @@ static void av1_frame_unref(AVCodecContext *avctx, AV1Frame *f)
     av_buffer_unref(&f->header_ref);
     f->raw_frame_header = NULL;
     f->spatial_id = f->temporal_id = 0;
-    f->order_hint = 0;
     memset(f->skip_mode_frame_idx, 0,
            2 * sizeof(uint8_t));
     f->coded_lossless = 0;
@@ -480,7 +479,6 @@ static int av1_frame_ref(AVCodecContext *avctx, AV1Frame *dst, const AV1Frame *s
     memcpy(dst->gm_params,
            src->gm_params,
            AV1_NUM_REF_FRAMES * 6 * sizeof(int32_t));
-    dst->order_hint = src->order_hint;
     memcpy(dst->skip_mode_frame_idx,
            src->skip_mode_frame_idx,
            2 * sizeof(uint8_t));
@@ -890,8 +888,6 @@ static int av1_decode_frame(AVCodecContext *avctx, void *frame,
             s->cur_frame.spatial_id  = header->spatial_id;
             s->cur_frame.temporal_id = header->temporal_id;
 
-            s->cur_frame.order_hint = s->raw_frame_header->order_hint;
-
             if (avctx->hwaccel) {
                 ret = avctx->hwaccel->start_frame(avctx, unit->data,
                                                   unit->data_size);
diff --git a/libavcodec/av1dec.h b/libavcodec/av1dec.h
index 533ca2b30f..4b218f64bb 100644
--- a/libavcodec/av1dec.h
+++ b/libavcodec/av1dec.h
@@ -45,7 +45,6 @@ typedef struct AV1Frame {
     uint8_t gm_type[AV1_NUM_REF_FRAMES];
     int32_t gm_params[AV1_NUM_REF_FRAMES][6];
 
-    uint8_t order_hint;
     uint8_t skip_mode_frame_idx[2];
 
     uint8_t coded_lossless;



More information about the ffmpeg-cvslog mailing list