[FFmpeg-devel] [PATCH v2 02/18] cbs_h264: Add support for frame packing arrangement SEI messages
James Almer
jamrial at gmail.com
Sat Apr 3 17:10:56 EEST 2021
On 3/12/2021 7:56 PM, Mark Thompson wrote:
> On 23/02/2021 16:39, James Almer wrote:
>> On 2/21/2021 4:51 PM, Mark Thompson wrote:
>>> ---
>>>  libavcodec/cbs_h264.h                | 23 ++++++++++++++++
>>>  libavcodec/cbs_h2645.c               | 6 +++++
>>> Â libavcodec/cbs_h264_syntax_template.c | 39 +++++++++++++++++++++++++++
>>> Â 3 files changed, 68 insertions(+)
>>>
>>> ...
>>> diff --git a/libavcodec/cbs_h264_syntax_template.c
>>> b/libavcodec/cbs_h264_syntax_template.c
>>> index 9587f33985..e03d41e47a 100644
>>> --- a/libavcodec/cbs_h264_syntax_template.c
>>> +++ b/libavcodec/cbs_h264_syntax_template.c
>>> @@ -719,6 +719,45 @@ static int
>>> FUNC(sei_recovery_point)(CodedBitstreamContext *ctx, RWContext *rw,
>>> Â Â Â Â Â return 0;
>>> Â }
>>> +
>>> +
>>> +static int FUNC(sei_frame_packing_arrangement)
>>> +Â Â Â (CodedBitstreamContext *ctx, RWContext *rw,
>>> +Â Â Â Â H264RawSEIFramePackingArrangement *current, SEIMessageState *sei)
>>> +{
>>> +Â Â Â int err;
>>> +
>>> +Â Â Â HEADER("Frame Packing Arrangement");
>>> +
>>> +Â Â Â ue(frame_packing_arrangement_id, 0, UINT32_MAX - 1);
>>> +Â Â Â flag(frame_packing_arrangement_cancel_flag);
>>> +
>>> +Â Â Â if (!current->frame_packing_arrangement_cancel_flag) {
>>> +Â Â Â Â Â Â Â u(7, frame_packing_arrangement_type, 0, 7);
>>> +Â Â Â Â Â Â Â flag(quincunx_sampling_flag);
>>> +Â Â Â Â Â Â Â u(6, content_interpretation_type, 0, 2);
>>> +Â Â Â Â Â Â Â flag(spatial_flipping_flag);
>>> +Â Â Â Â Â Â Â flag(frame0_flipped_flag);
>>> +Â Â Â Â Â Â Â flag(field_views_flag);
>>> +Â Â Â Â Â Â Â flag(current_frame_is_frame0_flag);
>>> +Â Â Â Â Â Â Â flag(frame0_self_contained_flag);
>>> +Â Â Â Â Â Â Â flag(frame1_self_contained_flag);
>>> +Â Â Â Â Â Â Â if (!current->quincunx_sampling_flag &&
>>> +Â Â Â Â Â Â Â Â Â Â Â current->frame_packing_arrangement_type != 5) {
>>
>> nit: maybe H264_SEI_FPA_TYPE_INTERLEAVE_TEMPORAL instead of 5.
>
> The standard does say exactly "!= 5", so I prefer to keep to that. (It
> would be nice if the H.2(6[456]|74) specs made better use of enum
> constants, but we are stuck with what they actually do.)
Ok, LGTM then.
>
> - Mark
> _______________________________________________
> ffmpeg-devel mailing list
> ffmpeg-devel at ffmpeg.org
> https://ffmpeg.org/mailman/listinfo/ffmpeg-devel
>
> To unsubscribe, visit link above, or email
> ffmpeg-devel-request at ffmpeg.org with subject "unsubscribe".
More information about the ffmpeg-devel
mailing list