aboutsummaryrefslogtreecommitdiffstats
path: root/libavcodec/vaapi_encode_av1.c
diff options
context:
space:
mode:
authorMark Thompson <sw@jkqxz.net>2023-09-25 12:44:58 +0100
committerMark Thompson <sw@jkqxz.net>2023-10-02 20:32:03 +0100
commit014c13863327519418ca8bd15d21c4e8a58d9227 (patch)
treeb89e0f2858d632284ff55fe07c80083f64872690 /libavcodec/vaapi_encode_av1.c
parent1a4bd76ea5493954806607b015546206ff854f48 (diff)
downloadffmpeg-014c13863327519418ca8bd15d21c4e8a58d9227.tar.gz
cbs_av1: Make fake OBU size length field a write option
This is an option to modify the behaviour of the writer, not a syntax field.
Diffstat (limited to 'libavcodec/vaapi_encode_av1.c')
-rw-r--r--libavcodec/vaapi_encode_av1.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/libavcodec/vaapi_encode_av1.c b/libavcodec/vaapi_encode_av1.c
index 3ff1c47b53..5a9ff0f798 100644
--- a/libavcodec/vaapi_encode_av1.c
+++ b/libavcodec/vaapi_encode_av1.c
@@ -634,7 +634,6 @@ static int vaapi_encode_av1_init_picture_params(AVCodecContext *avctx,
}
}
- fh_obu->obu_size_byte_len = priv->attr_ext2.bits.obu_size_bytes_minus1 + 1;
ret = vaapi_encode_av1_add_obu(avctx, obu, AV1_OBU_FRAME_HEADER, &priv->fh);
if (ret < 0)
goto end;
@@ -839,6 +838,9 @@ static av_cold int vaapi_encode_av1_init(AVCodecContext *avctx)
priv->attr_ext2.value = attr.value;
}
+ av_opt_set_int(priv->cbc->priv_data, "fixed_obu_size_length",
+ priv->attr_ext2.bits.obu_size_bytes_minus1 + 1, 0);
+
ret = vaapi_encode_av1_set_tile(avctx);
if (ret < 0)
return ret;