diff options
author | Hendrik Leppkes <h.leppkes@gmail.com> | 2015-12-18 14:27:41 +0100 |
---|---|---|
committer | Hendrik Leppkes <h.leppkes@gmail.com> | 2015-12-18 14:27:41 +0100 |
commit | 2630f7f709049113dc03d6b999efad6acc423d67 (patch) | |
tree | d7a217a844f6b7939d3f08da45c027caa9e6761c /libavcodec/libopenh264enc.c | |
parent | ec1b95dda4a856ae532a0a27aa6213040e712d68 (diff) | |
parent | be00ec832c519427cd92218abac77dafdc1d5487 (diff) | |
download | ffmpeg-2630f7f709049113dc03d6b999efad6acc423d67.tar.gz |
Merge commit 'be00ec832c519427cd92218abac77dafdc1d5487'
* commit 'be00ec832c519427cd92218abac77dafdc1d5487':
lavc: Deprecate coder_type and its symbols
Merged-by: Hendrik Leppkes <h.leppkes@gmail.com>
Diffstat (limited to 'libavcodec/libopenh264enc.c')
-rw-r--r-- | libavcodec/libopenh264enc.c | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/libavcodec/libopenh264enc.c b/libavcodec/libopenh264enc.c index 8f87645a67..4e8fe78540 100644 --- a/libavcodec/libopenh264enc.c +++ b/libavcodec/libopenh264enc.c @@ -40,6 +40,7 @@ typedef struct SVCContext { int max_nal_size; int skip_frames; int skipped; + int cabac; } SVCContext; #define OPENH264_VER_AT_LEAST(maj, min) \ @@ -58,6 +59,7 @@ static const AVOption options[] = { { "profile", "set profile restrictions", OFFSET(profile), AV_OPT_TYPE_STRING, { .str = NULL }, 0, 0, VE }, { "max_nal_size", "set maximum NAL size in bytes", OFFSET(max_nal_size), AV_OPT_TYPE_INT, { .i64 = 0 }, 0, INT_MAX, VE }, { "allow_skip_frames", "allow skipping frames to hit the target bitrate", OFFSET(skip_frames), AV_OPT_TYPE_BOOL, { .i64 = 0 }, 0, 1, VE }, + { "cabac", "Enable cabac", OFFSET(cabac), AV_OPT_TYPE_INT, { .i64 = 0 }, 0, 1, VE }, { NULL } }; @@ -139,6 +141,13 @@ static av_cold int svc_encode_init(AVCodecContext *avctx) (*s->encoder)->GetDefaultParams(s->encoder, ¶m); +#if FF_API_CODER_TYPE +FF_DISABLE_DEPRECATION_WARNINGS + if (!s->cabac) + s->cabac = avctx->coder_type == FF_CODER_TYPE_AC; +FF_ENABLE_DEPRECATION_WARNINGS +#endif + param.fMaxFrameRate = 1/av_q2d(avctx->time_base); param.iPicWidth = avctx->width; param.iPicHeight = avctx->height; @@ -165,7 +174,7 @@ static av_cold int svc_encode_init(AVCodecContext *avctx) param.iMultipleThreadIdc = avctx->thread_count; if (s->profile && !strcmp(s->profile, "main")) param.iEntropyCodingModeFlag = 1; - else if (!s->profile && avctx->coder_type == FF_CODER_TYPE_AC) + else if (!s->profile && s->cabac) param.iEntropyCodingModeFlag = 1; param.sSpatialLayers[0].iVideoWidth = param.iPicWidth; |