diff options
author | Michael Niedermayer <michaelni@gmx.at> | 2012-09-26 13:45:47 +0200 |
---|---|---|
committer | Michael Niedermayer <michaelni@gmx.at> | 2012-09-26 13:51:39 +0200 |
commit | ae0449314ca61e84c64568546922e91f5d81d500 (patch) | |
tree | fed1676cf7c8c756bf396c099eaa28abcb3398d8 /libavcodec | |
parent | 4552e9b56c8e1a90251a34d0e1f916feb508dd28 (diff) | |
parent | 92d2b909a0de6e2f77a98405280c78052b35b421 (diff) | |
download | ffmpeg-streaming-ae0449314ca61e84c64568546922e91f5d81d500.zip ffmpeg-streaming-ae0449314ca61e84c64568546922e91f5d81d500.tar.gz |
Merge remote-tracking branch 'qatar/master'
* qatar/master:
xsub: feed init_get_bits the whole buffer
libfdk-aac: Allow setting VBR modes via a private option
libfdk-aac: Warn the user that the VBR modes are unsupported
Revert "cbrt_tablegen: Include libm.h"
Conflicts:
libavcodec/xsubdec.c
Merged-by: Michael Niedermayer <michaelni@gmx.at>
Diffstat (limited to 'libavcodec')
-rw-r--r-- | libavcodec/cbrt_tablegen.c | 1 | ||||
-rw-r--r-- | libavcodec/libfdk-aacenc.c | 9 | ||||
-rw-r--r-- | libavcodec/xsubdec.c | 2 |
3 files changed, 8 insertions, 4 deletions
diff --git a/libavcodec/cbrt_tablegen.c b/libavcodec/cbrt_tablegen.c index babb85a..e0a8e63 100644 --- a/libavcodec/cbrt_tablegen.c +++ b/libavcodec/cbrt_tablegen.c @@ -21,7 +21,6 @@ */ #include <stdlib.h> -#include "libavutil/libm.h" #define CONFIG_HARDCODED_TABLES 0 #include "cbrt_tablegen.h" #include "tableprint.h" diff --git a/libavcodec/libfdk-aacenc.c b/libavcodec/libfdk-aacenc.c index 36df84f..2874e37 100644 --- a/libavcodec/libfdk-aacenc.c +++ b/libavcodec/libfdk-aacenc.c @@ -36,6 +36,7 @@ typedef struct AACContext { int signaling; int latm; int header_period; + int vbr; AudioFrameQueue afq; } AACContext; @@ -50,6 +51,7 @@ static const AVOption aac_enc_options[] = { { "explicit_hierarchical", "Explicit hierarchical signaling", 0, AV_OPT_TYPE_CONST, { .i64 = 2 }, 0, 0, AV_OPT_FLAG_AUDIO_PARAM | AV_OPT_FLAG_ENCODING_PARAM, "signaling" }, { "latm", "Output LATM/LOAS encapsulated data", offsetof(AACContext, latm), AV_OPT_TYPE_INT, { .i64 = 0 }, 0, 1, AV_OPT_FLAG_AUDIO_PARAM | AV_OPT_FLAG_ENCODING_PARAM }, { "header_period", "StreamMuxConfig and PCE repetition period (in frames)", offsetof(AACContext, header_period), AV_OPT_TYPE_INT, { .i64 = 0 }, 0, 0xffff, AV_OPT_FLAG_AUDIO_PARAM | AV_OPT_FLAG_ENCODING_PARAM }, + { "vbr", "VBR mode (1-5)", offsetof(AACContext, vbr), AV_OPT_TYPE_INT, { .i64 = 0 }, 0, 5, AV_OPT_FLAG_AUDIO_PARAM | AV_OPT_FLAG_ENCODING_PARAM }, { NULL } }; @@ -173,13 +175,16 @@ static av_cold int aac_encode_init(AVCodecContext *avctx) goto error; } - if (avctx->flags & CODEC_FLAG_QSCALE) { - int mode = avctx->global_quality; + if (avctx->flags & CODEC_FLAG_QSCALE || s->vbr) { + int mode = s->vbr ? s->vbr : avctx->global_quality; if (mode < 1 || mode > 5) { av_log(avctx, AV_LOG_WARNING, "VBR quality %d out of range, should be 1-5\n", mode); mode = av_clip(mode, 1, 5); } + av_log(avctx, AV_LOG_WARNING, + "Note, the VBR setting is unsupported and only works with " + "some parameter combinations\n"); if ((err = aacEncoder_SetParam(s->handle, AACENC_BITRATEMODE, mode)) != AACENC_OK) { av_log(avctx, AV_LOG_ERROR, "Unable to set the VBR bitrate mode %d: %s\n", diff --git a/libavcodec/xsubdec.c b/libavcodec/xsubdec.c index 903cf12..bef4838 100644 --- a/libavcodec/xsubdec.c +++ b/libavcodec/xsubdec.c @@ -87,7 +87,7 @@ static int decode_frame(AVCodecContext *avctx, void *data, int *data_size, bytestream_get_le16(&buf); // The following value is supposed to indicate the start offset // (relative to the palette) of the data for the second field, - // however there are files where it has a bogus value and thus + // however there are files in which it has a bogus value and thus // we just ignore it bytestream_get_le16(&buf); |