[FFmpeg-devel,v2] lavc/qsvenc_hevc: add -pic_timing_sei option

Message ID 20220112045031.8996-1-haihao.xiang@intel.com
State Accepted
Commit 641c4346b3d7fa1c023792a260ed0165c6d4a2a4
Headers
Series [FFmpeg-devel,v2] lavc/qsvenc_hevc: add -pic_timing_sei option |

Checks

Context Check Description
andriy/make_x86 success Make finished
andriy/make_fate_x86 success Make fate finished
andriy/make_ppc success Make finished
andriy/make_fate_ppc success Make fate finished
andriy/make_aarch64_jetson success Make finished
andriy/make_fate_aarch64_jetson success Make fate finished
andriy/make_armv7_RPi4 success Make finished
andriy/make_fate_armv7_RPi4 success Make fate finished

Commit Message

Xiang, Haihao Jan. 12, 2022, 4:50 a.m. UTC
The SDK may insert picture timing SEI for hevc and the code to set mfx
parameter has been added in qsvenc, however the corresponding option is
missing in the hevc option array

Reviewed-by: Limin Wang <lance.lmwang@gmail.com>
Signed-off-by: Haihao Xiang <haihao.xiang@intel.com>
---
v2: added option description in the doc

 doc/encoders.texi        | 3 +++
 libavcodec/qsvenc_hevc.c | 1 +
 2 files changed, 4 insertions(+)
  

Comments

Xiang, Haihao Jan. 17, 2022, 8:28 a.m. UTC | #1
On Wed, 2022-01-12 at 12:50 +0800, Haihao Xiang wrote:
> The SDK may insert picture timing SEI for hevc and the code to set mfx
> parameter has been added in qsvenc, however the corresponding option is
> missing in the hevc option array
> 
> Reviewed-by: Limin Wang <lance.lmwang@gmail.com>
> Signed-off-by: Haihao Xiang <haihao.xiang@intel.com>
> ---
> v2: added option description in the doc
> 
>  doc/encoders.texi        | 3 +++
>  libavcodec/qsvenc_hevc.c | 1 +
>  2 files changed, 4 insertions(+)
> 
> diff --git a/doc/encoders.texi b/doc/encoders.texi
> index 7cc8be1209..1679f389d7 100644
> --- a/doc/encoders.texi
> +++ b/doc/encoders.texi
> @@ -3432,6 +3432,9 @@ Number of rows for tiled encoding.
>  
>  @item @var{aud}
>  Insert the Access Unit Delimiter NAL.
> +
> +@item @var{pic_timing_sei}
> +Insert picture timing SEI with pic_struct_syntax element.
>  @end table
>  
>  @subsection MPEG2 Options
> diff --git a/libavcodec/qsvenc_hevc.c b/libavcodec/qsvenc_hevc.c
> index 08aba3011d..342b6bdea7 100644
> --- a/libavcodec/qsvenc_hevc.c
> +++ b/libavcodec/qsvenc_hevc.c
> @@ -251,6 +251,7 @@ static const AVOption options[] = {
>      { "tile_rows",  "Number of rows for tiled
> encoding",      OFFSET(qsv.tile_rows),    AV_OPT_TYPE_INT, { .i64 = 0 }, 0,
> UINT16_MAX, VE },
>      { "recovery_point_sei", "Insert recovery point SEI
> messages",       OFFSET(qsv.recovery_point_sei),      AV_OPT_TYPE_INT, { .i64
> = -1 },               -1,          1, VE },
>      { "aud", "Insert the Access Unit Delimiter NAL", OFFSET(qsv.aud),
> AV_OPT_TYPE_BOOL, { .i64 = 0 }, 0, 1, VE},
> +    { "pic_timing_sei",    "Insert picture timing SEI with pic_struct_syntax
> element", OFFSET(qsv.pic_timing_sei), AV_OPT_TYPE_BOOL, { .i64 = 1 }, 0, 1, VE
> },
>  
>      { NULL },
>  };

Will apply

-Haihao
  

Patch

diff --git a/doc/encoders.texi b/doc/encoders.texi
index 7cc8be1209..1679f389d7 100644
--- a/doc/encoders.texi
+++ b/doc/encoders.texi
@@ -3432,6 +3432,9 @@  Number of rows for tiled encoding.
 
 @item @var{aud}
 Insert the Access Unit Delimiter NAL.
+
+@item @var{pic_timing_sei}
+Insert picture timing SEI with pic_struct_syntax element.
 @end table
 
 @subsection MPEG2 Options
diff --git a/libavcodec/qsvenc_hevc.c b/libavcodec/qsvenc_hevc.c
index 08aba3011d..342b6bdea7 100644
--- a/libavcodec/qsvenc_hevc.c
+++ b/libavcodec/qsvenc_hevc.c
@@ -251,6 +251,7 @@  static const AVOption options[] = {
     { "tile_rows",  "Number of rows for tiled encoding",      OFFSET(qsv.tile_rows),    AV_OPT_TYPE_INT, { .i64 = 0 }, 0, UINT16_MAX, VE },
     { "recovery_point_sei", "Insert recovery point SEI messages",       OFFSET(qsv.recovery_point_sei),      AV_OPT_TYPE_INT, { .i64 = -1 },               -1,          1, VE },
     { "aud", "Insert the Access Unit Delimiter NAL", OFFSET(qsv.aud), AV_OPT_TYPE_BOOL, { .i64 = 0 }, 0, 1, VE},
+    { "pic_timing_sei",    "Insert picture timing SEI with pic_struct_syntax element", OFFSET(qsv.pic_timing_sei), AV_OPT_TYPE_BOOL, { .i64 = 1 }, 0, 1, VE },
 
     { NULL },
 };