summaryrefslogtreecommitdiff
path: root/libavcodec/libopenh264enc.c
diff options
context:
space:
mode:
authorHendrik Leppkes <h.leppkes@gmail.com>2015-10-29 14:26:07 +0100
committerHendrik Leppkes <h.leppkes@gmail.com>2015-10-29 14:26:07 +0100
commitf79bb118f58988059768140e517b67a6fb2c07c7 (patch)
treeb1bec7ebd178b767c79feeeb26d18fcc392da291 /libavcodec/libopenh264enc.c
parent313f53824ef4d868a61f7f1886dde7b61cde5388 (diff)
parent9e14a992409348630ea96521411127418a92e8a3 (diff)
Merge commit '9e14a992409348630ea96521411127418a92e8a3'
* commit '9e14a992409348630ea96521411127418a92e8a3': libopenh264enc: Add an option for controlling the frame skipping Merged-by: Hendrik Leppkes <h.leppkes@gmail.com>
Diffstat (limited to 'libavcodec/libopenh264enc.c')
-rw-r--r--libavcodec/libopenh264enc.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/libavcodec/libopenh264enc.c b/libavcodec/libopenh264enc.c
index 01cf2522e4..8ff85b5070 100644
--- a/libavcodec/libopenh264enc.c
+++ b/libavcodec/libopenh264enc.c
@@ -38,6 +38,7 @@ typedef struct SVCContext {
int loopfilter;
char *profile;
int max_nal_size;
+ int skip_frames;
} SVCContext;
#define OPENH264_VER_AT_LEAST(maj, min) \
@@ -55,6 +56,7 @@ static const AVOption options[] = {
{ "loopfilter", "enable loop filter", OFFSET(loopfilter), AV_OPT_TYPE_INT, { .i64 = 1 }, 0, 1, VE },
{ "profile", "set profile restrictions", OFFSET(profile), AV_OPT_TYPE_STRING, { 0 }, 0, 0, VE },
{ "max_nal_size", "Set maximum NAL size in bytes", OFFSET(max_nal_size), AV_OPT_TYPE_INT, { 0 }, 0, INT_MAX, VE },
+ { "allow_skip_frames", "Allow skipping frames to hit the target bitrate", OFFSET(skip_frames), AV_OPT_TYPE_INT, { 0 }, 0, 1, VE },
{ NULL }
};
@@ -144,7 +146,7 @@ static av_cold int svc_encode_init(AVCodecContext *avctx)
param.bEnableDenoise = 0;
param.bEnableBackgroundDetection = 1;
param.bEnableAdaptiveQuant = 1;
- param.bEnableFrameSkip = 0;
+ param.bEnableFrameSkip = s->skip_frames;
param.bEnableLongTermReference = 0;
param.iLtrMarkPeriod = 30;
param.uiIntraPeriod = avctx->gop_size;