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@ffmpeg.org
https://ffmpeg.org/mailman/listinfo/ffmpeg-devel

To unsubscribe, visit link above, or email
ffmpeg-devel-requ...@ffmpeg.org with subject "unsubscribe".

_______________________________________________
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