Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/FFmpeg/FFmpeg.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichael Niedermayer <michaelni@gmx.at>2015-03-06 13:31:19 +0300
committerMichael Niedermayer <michaelni@gmx.at>2015-03-06 13:31:29 +0300
commit39becc949c04033e3377e7f5f7dbecbbb0824b23 (patch)
treefd9d2e079b0cf2709f46a7c033bf4ed66fed7357 /libavcodec/libopenh264enc.c
parentdbd6ba24a870c65dcd8fd3e4bfe5a311cebd71cd (diff)
parent25c29d32835f38cdc5f0c84fa27dfc489a228770 (diff)
Merge commit '25c29d32835f38cdc5f0c84fa27dfc489a228770'
* commit '25c29d32835f38cdc5f0c84fa27dfc489a228770': libopenh264enc: Add support for building with OpenH264 1.4 Merged-by: Michael Niedermayer <michaelni@gmx.at>
Diffstat (limited to 'libavcodec/libopenh264enc.c')
-rw-r--r--libavcodec/libopenh264enc.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/libavcodec/libopenh264enc.c b/libavcodec/libopenh264enc.c
index 9be3a97d78..00fd9df00d 100644
--- a/libavcodec/libopenh264enc.c
+++ b/libavcodec/libopenh264enc.c
@@ -39,6 +39,10 @@ typedef struct SVCContext {
char *profile;
} SVCContext;
+#define OPENH264_VER_AT_LEAST(maj, min) \
+ ((OPENH264_MAJOR > (maj)) || \
+ (OPENH264_MAJOR == (maj) && OPENH264_MINOR >= (min)))
+
#define OFFSET(x) offsetof(SVCContext, x)
#define VE AV_OPT_FLAG_VIDEO_PARAM | AV_OPT_FLAG_ENCODING_PARAM
static const AVOption options[] = {
@@ -103,7 +107,11 @@ static av_cold int svc_encode_init(AVCodecContext *avctx)
param.bEnableLongTermReference = 0;
param.iLtrMarkPeriod = 30;
param.uiIntraPeriod = avctx->gop_size;
+#if OPENH264_VER_AT_LEAST(1, 4)
+ param.eSpsPpsIdStrategy = CONSTANT_ID;
+#else
param.bEnableSpsPpsIdAddition = 0;
+#endif
param.bPrefixNalAddingCtrl = 0;
param.iLoopFilterDisableIdc = !s->loopfilter;
param.iEntropyCodingModeFlag = 0;