diff mbox series

[FFmpeg-devel,4/4] Revert "avcodec/cbs_av1: keep separate reference frame state for reading and writing"

Message ID 20200708012949.13522-4-jamrial@gmail.com
State Accepted
Commit d11cc743c8e5a60b196d7ec514fb31d558c933ef
Headers show
Series [FFmpeg-devel,1/4] avcodec/av1_metadata_bsf: Use separate contexts for reading/writing
Related show

Checks

Context Check Description
andriy/default pending
andriy/make success Make finished
andriy/make_fate success Make fate finished

Commit Message

James Almer July 8, 2020, 1:29 a.m. UTC
This reverts commit 4e2bef6a82b356772a5919c51c9be1530268bd79.
It's no longer needed now that all the bsfs use separate contexts
for reading and writing.
---
 libavcodec/cbs_av1.c | 4 ----
 libavcodec/cbs_av1.h | 4 +---
 2 files changed, 1 insertion(+), 7 deletions(-)
diff mbox series

Patch

diff --git a/libavcodec/cbs_av1.c b/libavcodec/cbs_av1.c
index b2a1d2ded1..75e9cb78df 100644
--- a/libavcodec/cbs_av1.c
+++ b/libavcodec/cbs_av1.c
@@ -939,8 +939,6 @@  static int cbs_av1_read_unit(CodedBitstreamContext *ctx,
         priv->spatial_id  = 0;
     }
 
-    priv->ref = (AV1ReferenceFrameState *)&priv->read_ref;
-
     switch (obu->header.obu_type) {
     case AV1_OBU_SEQUENCE_HEADER:
         {
@@ -1084,8 +1082,6 @@  static int cbs_av1_write_obu(CodedBitstreamContext *ctx,
     td = NULL;
     start_pos = put_bits_count(pbc);
 
-    priv->ref = (AV1ReferenceFrameState *)&priv->write_ref;
-
     switch (obu->header.obu_type) {
     case AV1_OBU_SEQUENCE_HEADER:
         {
diff --git a/libavcodec/cbs_av1.h b/libavcodec/cbs_av1.h
index fdc629b00c..f5fed220a5 100644
--- a/libavcodec/cbs_av1.h
+++ b/libavcodec/cbs_av1.h
@@ -441,9 +441,7 @@  typedef struct CodedBitstreamAV1Context {
     int tile_cols;
     int tile_rows;
 
-    AV1ReferenceFrameState *ref;
-    AV1ReferenceFrameState read_ref[AV1_NUM_REF_FRAMES];
-    AV1ReferenceFrameState write_ref[AV1_NUM_REF_FRAMES];
+    AV1ReferenceFrameState ref[AV1_NUM_REF_FRAMES];
 } CodedBitstreamAV1Context;