[FFmpeg-devel] [PATCH v2] cbs_av1: Make fake OBU size length field a write option

Mark Thompson sw at jkqxz.net
Mon Oct 2 22:42:43 EEST 2023


On 27/09/2023 03:16, Wang, Fei W wrote:
> On Tue, 2023-09-26 at 21:30 +0100, Mark Thompson wrote:
>> This is an option to modify the behaviour of the writer, not a syntax
>> field.
>> ---
>> On 26/09/2023 03:34, Wang, Fei W wrote:
>>> On Mon, 2023-09-25 at 14:53 +0100, Mark Thompson wrote:
>>>> ...
>>>> diff --git a/libavcodec/vaapi_encode_av1.c
>>>> b/libavcodec/vaapi_encode_av1.c
>>>> index 3ff1c47b53..861bf4a13b 100644
>>>> --- a/libavcodec/vaapi_encode_av1.c
>>>> +++ b/libavcodec/vaapi_encode_av1.c
>>>> @@ -133,6 +133,9 @@ static av_cold int
>>>> vaapi_encode_av1_configure(AVCodecContext *avctx)
>>>>         priv->cbc->trace_context = ctx;
>>>>         priv->cbc->trace_write_callback =
>>>> vaapi_encode_av1_trace_write_log;
>>>>
>>>> +    av_opt_set_int(priv->cbc->priv_data,
>>>> "fixed_obu_size_length",
>>>> +                   priv->attr_ext2.bits.obu_size_bytes_minus1 +
>>>> 1,
>>>> 0);
>>>> +
>>>
>>> This should be put after querying priv.attr_ext2 in
>>> vaapi_encode_av1_init().
>>
>> Ah, true - I got my init and configure mixed up, but don't have
>> convenient hardware to test.  Fixed in this version.
> 
> LGTM for this version.

Applied.  Thank you for the review!

- Mark


More information about the ffmpeg-devel mailing list