]> git.sesse.net Git - ffmpeg/commitdiff
avcodec/amfenc_hevc: set default gops_per_idr 1
authorLu Jiao <sourpotato@live.com>
Tue, 16 Jun 2020 14:10:10 +0000 (22:10 +0800)
committerMarton Balint <cus@passwd.hu>
Thu, 2 Jul 2020 22:54:20 +0000 (00:54 +0200)
Previously gops_per_idr default 60 would make amd gpu encoding hevc
has erratic seek bar behaviour as descripted in this ticket:
https://trac.ffmpeg.org/ticket/7272

This bad default is already fixed in newer AMF headers:
https://github.com/GPUOpen-LibrariesAndSDKs/AMF/blob/master/amf/public/include/components/VideoEncoderHEVC.h

Fixes ticket #7272.

Signed-off-by: Marton Balint <cus@passwd.hu>
libavcodec/amfenc_hevc.c

index 8b2302f2af37e3ca2707ad249e071f508fe8f165..fa12a3a3f6bfd9b469b7892e35c52973d2b1ef90 100644 (file)
@@ -69,7 +69,7 @@ static const AVOption options[] = {
     { "gop",            "", 0, AV_OPT_TYPE_CONST, { .i64 = AMF_VIDEO_ENCODER_HEVC_HEADER_INSERTION_MODE_GOP_ALIGNED }, 0, 0, VE, "hdrmode" },
     { "idr",            "", 0, AV_OPT_TYPE_CONST, { .i64 = AMF_VIDEO_ENCODER_HEVC_HEADER_INSERTION_MODE_IDR_ALIGNED }, 0, 0, VE, "hdrmode" },
 
-    { "gops_per_idr",    "GOPs per IDR 0-no IDR will be inserted",  OFFSET(gops_per_idr),  AV_OPT_TYPE_INT,  { .i64 = 60 },  0, INT_MAX, VE },
+    { "gops_per_idr",    "GOPs per IDR 0-no IDR will be inserted",  OFFSET(gops_per_idr),  AV_OPT_TYPE_INT,  { .i64 =  },  0, INT_MAX, VE },
     { "preanalysis",    "Enable preanalysis",                       OFFSET(preanalysis),   AV_OPT_TYPE_BOOL, { .i64 = 0  },  0, 1, VE},
     { "vbaq",           "Enable VBAQ",                              OFFSET(enable_vbaq),   AV_OPT_TYPE_BOOL, { .i64 = 0  },  0, 1, VE},
     { "enforce_hrd",    "Enforce HRD",                              OFFSET(enforce_hrd),   AV_OPT_TYPE_BOOL, { .i64 = 0  },  0, 1, VE},