On 4/14/2019 2:22 PM, Mark Thompson wrote:
> On 13/04/2019 20:25, James Almer wrote:
>> Based on itut_t35 Matadata OBU parsing code.
>>
>> Signed-off-by: James Almer <jamr...@gmail.com>
>> ---
>>  libavcodec/cbs_av1.c                 | 20 ++++++++++++++++++++
>>  libavcodec/cbs_av1.h                 |  7 +++++++
>>  libavcodec/cbs_av1_syntax_template.c | 24 ++++++++++++++++++++++++
>>  3 files changed, 51 insertions(+)
>>
>> ...
>> diff --git a/libavcodec/cbs_av1_syntax_template.c 
>> b/libavcodec/cbs_av1_syntax_template.c
>> index 56009145e8..675bfe5bb4 100644
>> --- a/libavcodec/cbs_av1_syntax_template.c
>> +++ b/libavcodec/cbs_av1_syntax_template.c
>> @@ -1755,3 +1755,27 @@ static int FUNC(metadata_obu)(CodedBitstreamContext 
>> *ctx, RWContext *rw,
>>  
>>      return 0;
>>  }
>> +
>> +static int FUNC(padding)(CodedBitstreamContext *ctx, RWContext *rw,
> 
> The standard calls this function "padding_obu".
> 
>> +                         AV1RawPadding *current)
>> +{
>> +    int i, err;
>> +
>> +    HEADER("Padding");
>> +
>> +#ifdef READ
>> +    // The payload runs up to the start of the trailing bits, but there 
>> might
>> +    // be arbitrarily many trailing zeroes so we need to read through twice.
>> +    current->payload_size = cbs_av1_get_payload_bytes_left(rw);
>> +
>> +    current->payload_ref = av_buffer_alloc(current->payload_size);
>> +    if (!current->payload_ref)
>> +        return AVERROR(ENOMEM);
>> +    current->payload = current->payload_ref->data;
>> +#endif
>> +
>> +    for (i = 0; i < current->payload_size; i++)
>> +        xf(8, obu_padding_byte[i], current->payload[i], 0x00, 0xff, 1, i);
>> +
>> +    return 0;
>> +}
>>
> 
> LGTM with that.
> 
> Thanks,

Changed and pushed. Thanks!
_______________________________________________
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".

Reply via email to