Browse Source

lavc/qsvenc: add an option to set h264 pps for every frame

RepeatPPS is enabled by default in mfx. It is not necessary mostly and
wasting encoding bits.
Add an option to control it and disable it by default.

Reviewed-by: Mark Thompson <sw@jkqxz.net>
Signed-off-by: Zhong Li <zhong.li@intel.com>
tags/n4.2
Zhong Li 7 years ago
parent
commit
c9f0cff5ef
4 changed files with 6 additions and 1 deletions
  1. +1
    -0
      libavcodec/qsvenc.c
  2. +2
    -0
      libavcodec/qsvenc.h
  3. +2
    -0
      libavcodec/qsvenc_h264.c
  4. +1
    -1
      libavcodec/version.h

+ 1
- 0
libavcodec/qsvenc.c View File

@@ -654,6 +654,7 @@ FF_ENABLE_DEPRECATION_WARNINGS

#if QSV_VERSION_ATLEAST(1, 8)
q->extco2.LookAheadDS = q->look_ahead_downsampling;
q->extco2.RepeatPPS = q->repeat_pps ? MFX_CODINGOPTION_ON : MFX_CODINGOPTION_OFF;

#if FF_API_PRIVATE_OPT
FF_DISABLE_DEPRECATION_WARNINGS


+ 2
- 0
libavcodec/qsvenc.h View File

@@ -162,6 +162,8 @@ typedef struct QSVEncContext {
int int_ref_qp_delta;
int recovery_point_sei;

int repeat_pps;

int a53_cc;

#if QSV_HAVE_MF


+ 2
- 0
libavcodec/qsvenc_h264.c View File

@@ -154,6 +154,8 @@ static const AVOption options[] = {
{ "auto" , NULL, 0, AV_OPT_TYPE_CONST, { .i64 = MFX_MF_AUTO }, INT_MIN, INT_MAX, VE, "mfmode" },
#endif

{ "repeat_pps", "repeat pps for every frame", OFFSET(qsv.repeat_pps), AV_OPT_TYPE_BOOL, { .i64 = 0 }, 0, 1, VE },

{ NULL },
};



+ 1
- 1
libavcodec/version.h View File

@@ -29,7 +29,7 @@

#define LIBAVCODEC_VERSION_MAJOR 58
#define LIBAVCODEC_VERSION_MINOR 41
#define LIBAVCODEC_VERSION_MICRO 101
#define LIBAVCODEC_VERSION_MICRO 102

#define LIBAVCODEC_VERSION_INT AV_VERSION_INT(LIBAVCODEC_VERSION_MAJOR, \
LIBAVCODEC_VERSION_MINOR, \


Loading…
Cancel
Save