It doesn't contain the decomposed struct, but the raw bitstream. This is in preparation for the following patch.
Signed-off-by: James Almer <jamr...@gmail.com> --- libavcodec/cbs_av1.c | 6 +++--- libavcodec/cbs_av1.h | 6 +++--- libavcodec/cbs_av1_syntax_template.c | 28 ++++++++++++++-------------- 3 files changed, 20 insertions(+), 20 deletions(-) diff --git a/libavcodec/cbs_av1.c b/libavcodec/cbs_av1.c index 1229480567..ecd775ea2a 100644 --- a/libavcodec/cbs_av1.c +++ b/libavcodec/cbs_av1.c @@ -1249,9 +1249,9 @@ static void cbs_av1_flush(CodedBitstreamContext *ctx) { CodedBitstreamAV1Context *priv = ctx->priv_data; - av_buffer_unref(&priv->frame_header_ref); + av_buffer_unref(&priv->frame_header_data_ref); priv->sequence_header = NULL; - priv->frame_header = NULL; + priv->frame_header_data = NULL; memset(priv->ref, 0, sizeof(priv->ref)); priv->operating_point_idc = 0; @@ -1264,7 +1264,7 @@ static void cbs_av1_close(CodedBitstreamContext *ctx) CodedBitstreamAV1Context *priv = ctx->priv_data; av_buffer_unref(&priv->sequence_header_ref); - av_buffer_unref(&priv->frame_header_ref); + av_buffer_unref(&priv->frame_header_data_ref); } static void cbs_av1_free_metadata(void *unit, uint8_t *content) diff --git a/libavcodec/cbs_av1.h b/libavcodec/cbs_av1.h index 1fc80dcfa0..d4776b7a30 100644 --- a/libavcodec/cbs_av1.h +++ b/libavcodec/cbs_av1.h @@ -431,9 +431,9 @@ typedef struct CodedBitstreamAV1Context { AVBufferRef *sequence_header_ref; int seen_frame_header; - AVBufferRef *frame_header_ref; - uint8_t *frame_header; - size_t frame_header_size; + AVBufferRef *frame_header_data_ref; + uint8_t *frame_header_data; + size_t frame_header_data_size; int temporal_id; int spatial_id; diff --git a/libavcodec/cbs_av1_syntax_template.c b/libavcodec/cbs_av1_syntax_template.c index d98d3d42de..bd50cfbe38 100644 --- a/libavcodec/cbs_av1_syntax_template.c +++ b/libavcodec/cbs_av1_syntax_template.c @@ -1698,12 +1698,12 @@ static int FUNC(frame_header_obu)(CodedBitstreamContext *ctx, RWContext *rw, HEADER("Redundant Frame Header"); - av_assert0(priv->frame_header_ref && priv->frame_header); + av_assert0(priv->frame_header_data_ref && priv->frame_header_data); - init_get_bits(&fh, priv->frame_header, - priv->frame_header_size); - for (i = 0; i < priv->frame_header_size; i += 8) { - b = FFMIN(priv->frame_header_size - i, 8); + init_get_bits(&fh, priv->frame_header_data, + priv->frame_header_data_size); + for (i = 0; i < priv->frame_header_data_size; i += 8) { + b = FFMIN(priv->frame_header_data_size - i, 8); val = get_bits(&fh, b); xf(b, frame_header_copy[i], val, val, val, 1, i / 8); @@ -1730,7 +1730,7 @@ static int FUNC(frame_header_obu)(CodedBitstreamContext *ctx, RWContext *rw, } else { priv->seen_frame_header = 1; - av_buffer_unref(&priv->frame_header_ref); + av_buffer_unref(&priv->frame_header_data_ref); #ifdef READ fh_bits = get_bits_count(rw) - start_pos; @@ -1748,20 +1748,20 @@ static int FUNC(frame_header_obu)(CodedBitstreamContext *ctx, RWContext *rw, #endif fh_bytes = (fh_bits + 7) / 8; - priv->frame_header_size = fh_bits; + priv->frame_header_data_size = fh_bits; if (rw_buffer_ref) { - priv->frame_header_ref = av_buffer_ref(rw_buffer_ref); - if (!priv->frame_header_ref) + priv->frame_header_data_ref = av_buffer_ref(rw_buffer_ref); + if (!priv->frame_header_data_ref) return AVERROR(ENOMEM); - priv->frame_header = fh_start; + priv->frame_header_data = fh_start; } else { - priv->frame_header_ref = + priv->frame_header_data_ref = av_buffer_alloc(fh_bytes + AV_INPUT_BUFFER_PADDING_SIZE); - if (!priv->frame_header_ref) + if (!priv->frame_header_data_ref) return AVERROR(ENOMEM); - priv->frame_header = priv->frame_header_ref->data; - memcpy(priv->frame_header, fh_start, fh_bytes); + priv->frame_header_data = priv->frame_header_data_ref->data; + memcpy(priv->frame_header_data, fh_start, fh_bytes); } } } -- 2.35.1 _______________________________________________ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org https://ffmpeg.org/mailman/listinfo/ffmpeg-devel To unsubscribe, visit link above, or email ffmpeg-devel-requ...@ffmpeg.org with subject "unsubscribe".