diff mbox series

[FFmpeg-devel] lavc/qsvenc_hevc: restore the default gop size

Message ID 20230811063541.536421-1-haihao.xiang@intel.com
State Accepted
Commit a7f24d79b8eeb4f4ab78916ef08cc997f2381cc9
Headers show
Series [FFmpeg-devel] lavc/qsvenc_hevc: restore the default gop size | expand

Checks

Context Check Description
yinshiyou/make_loongarch64 success Make finished
yinshiyou/make_fate_loongarch64 success Make fate finished
andriy/make_x86 success Make finished
andriy/make_fate_x86 success Make fate finished

Commit Message

Xiang, Haihao Aug. 11, 2023, 6:35 a.m. UTC
From: Haihao Xiang <haihao.xiang@intel.com>

commit a3c0a3e changed the default settings and expected the runtime can
choose a best value. However the runtime doesn't set a valid gop size
for hevc encoder, hence the output steam is non-seekable, which is
inconvenient to user [1][2]

[1] https://github.com/intel/media-driver/issues/1576
[2] https://ffmpeg.org/pipermail/ffmpeg-user/2023-August/056716.html

Signed-off-by: Haihao Xiang <haihao.xiang@intel.com>
---
 libavcodec/qsvenc_hevc.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

Xiang, Haihao Aug. 15, 2023, 8:15 a.m. UTC | #1
On Vr, 2023-08-11 at 14:35 +0800, Xiang, Haihao wrote:
> From: Haihao Xiang <haihao.xiang@intel.com>
> 
> commit a3c0a3e changed the default settings and expected the runtime can
> choose a best value. However the runtime doesn't set a valid gop size
> for hevc encoder, hence the output steam is non-seekable, which is
> inconvenient to user [1][2]
> 
> [1] https://github.com/intel/media-driver/issues/1576
> [2] https://ffmpeg.org/pipermail/ffmpeg-user/2023-August/056716.html
> 
> Signed-off-by: Haihao Xiang <haihao.xiang@intel.com>
> ---
>  libavcodec/qsvenc_hevc.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/libavcodec/qsvenc_hevc.c b/libavcodec/qsvenc_hevc.c
> index 5e23ca9647..c5b7ac7cc4 100644
> --- a/libavcodec/qsvenc_hevc.c
> +++ b/libavcodec/qsvenc_hevc.c
> @@ -376,7 +376,7 @@ static const AVClass class = {
>  static const FFCodecDefault qsv_enc_defaults[] = {
>      { "b",         "1M"    },
>      { "refs",      "0"     },
> -    { "g",         "-1"    },
> +    { "g",         "248"   },
>      { "bf",        "-1"    },
>      { "qmin",      "-1"    },
>      { "qmax",      "-1"    },

Will apply,

- Haihao
diff mbox series

Patch

diff --git a/libavcodec/qsvenc_hevc.c b/libavcodec/qsvenc_hevc.c
index 5e23ca9647..c5b7ac7cc4 100644
--- a/libavcodec/qsvenc_hevc.c
+++ b/libavcodec/qsvenc_hevc.c
@@ -376,7 +376,7 @@  static const AVClass class = {
 static const FFCodecDefault qsv_enc_defaults[] = {
     { "b",         "1M"    },
     { "refs",      "0"     },
-    { "g",         "-1"    },
+    { "g",         "248"   },
     { "bf",        "-1"    },
     { "qmin",      "-1"    },
     { "qmax",      "-1"    },