mirror of
https://github.com/xenia-project/FFmpeg.git
synced 2025-01-22 20:05:05 +00:00
libopenh264enc: Add support for building with OpenH264 1.4
Signed-off-by: Martin Storsjö <martin@martin.st>
This commit is contained in:
parent
88b160a457
commit
25c29d3283
@ -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;
|
||||
|
Loading…
x
Reference in New Issue
Block a user