diff options
author | James Almer <jamrial@gmail.com> | 2019-11-18 03:08:56 +0300 |
---|---|---|
committer | James Almer <jamrial@gmail.com> | 2019-11-19 03:30:05 +0300 |
commit | 4e2bef6a82b356772a5919c51c9be1530268bd79 (patch) | |
tree | 9e5c4243000a4b83f1a968a55631685b56f3b8d7 /libavcodec/cbs_av1.h | |
parent | 6c2f8663090cde1a0085e2ffdf444ce50a27a1a4 (diff) |
avcodec/cbs_av1: keep separate reference frame state for reading and writing
In scearios where a Temporal Unit is written right after reading it using the same
CBS context (av1_metadata, av1_frame_merge, etc), the reference frame state used
by the writer must not be the state that's the result of the reader having already
parsed the current frame in question.
This fixes writing Switch frames, and frames using short ref signaling.
Signed-off-by: James Almer <jamrial@gmail.com>
Diffstat (limited to 'libavcodec/cbs_av1.h')
-rw-r--r-- | libavcodec/cbs_av1.h | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/libavcodec/cbs_av1.h b/libavcodec/cbs_av1.h index c85f58f764..9eaf5c4de6 100644 --- a/libavcodec/cbs_av1.h +++ b/libavcodec/cbs_av1.h @@ -441,7 +441,9 @@ typedef struct CodedBitstreamAV1Context { int tile_cols; int tile_rows; - AV1ReferenceFrameState ref[AV1_NUM_REF_FRAMES]; + AV1ReferenceFrameState *ref; + AV1ReferenceFrameState read_ref[AV1_NUM_REF_FRAMES]; + AV1ReferenceFrameState write_ref[AV1_NUM_REF_FRAMES]; } CodedBitstreamAV1Context; |