diff mbox series

[FFmpeg-devel,v2,15/18] vaapi_encode: Unify SEI option mask enum

Message ID 20210221195125.1901683-15-sw@jkqxz.net
State New
Headers show
Series [FFmpeg-devel,v2,01/18] cbs_sei: Delete SEI NAL units containing no messages
Related show

Checks

Context Check Description
andriy/x86_make success Make finished
andriy/x86_make_fate success Make fate finished
andriy/PPC64_make success Make finished
andriy/PPC64_make_fate success Make fate finished

Commit Message

Mark Thompson Feb. 21, 2021, 7:51 p.m. UTC
This was in two disjoint parts in the H.264 and H.265 files.  Unify
them in the header to avoid any confusion, because they are really the
same enum.
---
 libavcodec/vaapi_encode.h      | 8 ++++++++
 libavcodec/vaapi_encode_h264.c | 6 ------
 libavcodec/vaapi_encode_h265.c | 5 -----
 3 files changed, 8 insertions(+), 11 deletions(-)
diff mbox series

Patch

diff --git a/libavcodec/vaapi_encode.h b/libavcodec/vaapi_encode.h
index b41604a883..980bbb1b7a 100644
--- a/libavcodec/vaapi_encode.h
+++ b/libavcodec/vaapi_encode.h
@@ -474,5 +474,13 @@  int ff_vaapi_encode_close(AVCodecContext *avctx);
     VAAPI_ENCODE_RC_MODE(QVBR, "Quality-defined variable-bitrate"), \
     VAAPI_ENCODE_RC_MODE(AVBR, "Average variable-bitrate")
 
+// SEI type mask used in options for H.264 and H.265.
+enum {
+    SEI_TIMING              = 0x01,
+    SEI_IDENTIFIER          = 0x02,
+    SEI_RECOVERY_POINT      = 0x04,
+    SEI_MASTERING_DISPLAY   = 0x08,
+    SEI_CONTENT_LIGHT_LEVEL = 0x10,
+};
 
 #endif /* AVCODEC_VAAPI_ENCODE_H */
diff --git a/libavcodec/vaapi_encode_h264.c b/libavcodec/vaapi_encode_h264.c
index ce73e269f9..b546ddec08 100644
--- a/libavcodec/vaapi_encode_h264.c
+++ b/libavcodec/vaapi_encode_h264.c
@@ -35,12 +35,6 @@ 
 #include "internal.h"
 #include "vaapi_encode.h"
 
-enum {
-    SEI_TIMING         = 0x01,
-    SEI_IDENTIFIER     = 0x02,
-    SEI_RECOVERY_POINT = 0x04,
-};
-
 // Random (version 4) ISO 11578 UUID.
 static const uint8_t vaapi_encode_h264_sei_identifier_uuid[16] = {
     0x59, 0x94, 0x8b, 0x28, 0x11, 0xec, 0x45, 0xaf,
diff --git a/libavcodec/vaapi_encode_h265.c b/libavcodec/vaapi_encode_h265.c
index 2c356fbd38..33acbf23f2 100644
--- a/libavcodec/vaapi_encode_h265.c
+++ b/libavcodec/vaapi_encode_h265.c
@@ -37,11 +37,6 @@ 
 #include "put_bits.h"
 #include "vaapi_encode.h"
 
-enum {
-    SEI_MASTERING_DISPLAY       = 0x08,
-    SEI_CONTENT_LIGHT_LEVEL     = 0x10,
-};
-
 typedef struct VAAPIEncodeH265Picture {
     int pic_order_cnt;