aboutsummaryrefslogtreecommitdiffstats
path: root/libavcodec/flacenc.c
diff options
context:
space:
mode:
authorMichael Niedermayer <michaelni@gmx.at>2012-01-28 04:23:26 +0100
committerMichael Niedermayer <michaelni@gmx.at>2012-01-28 07:53:34 +0100
commite37f161e66e042d6c2c7470c4d9881df9427fc4a (patch)
tree6400fd6453f0525a65724937532d5baa33deead3 /libavcodec/flacenc.c
parentf21b6159cf3110a5f018d6addf7382840d427199 (diff)
parente771e6dd63e837220aa5d959486546d2be972e83 (diff)
downloadffmpeg-e37f161e66e042d6c2c7470c4d9881df9427fc4a.tar.gz
Merge remote-tracking branch 'qatar/master'
* qatar/master: (71 commits) movenc: Allow writing to a non-seekable output if using empty moov movenc: Support adding isml (smooth streaming live) metadata libavcodec: Don't crash in avcodec_encode_audio if time_base isn't set sunrast: Document the different Sun Raster file format types. sunrast: Add a check for experimental type. libspeexenc: use AVSampleFormat instead of deprecated/removed SampleFormat lavf: remove disabled FF_API_SET_PTS_INFO cruft lavf: remove disabled FF_API_OLD_INTERRUPT_CB cruft lavf: remove disabled FF_API_REORDER_PRIVATE cruft lavf: remove disabled FF_API_SEEK_PUBLIC cruft lavf: remove disabled FF_API_STREAM_COPY cruft lavf: remove disabled FF_API_PRELOAD cruft lavf: remove disabled FF_API_NEW_STREAM cruft lavf: remove disabled FF_API_RTSP_URL_OPTIONS cruft lavf: remove disabled FF_API_MUXRATE cruft lavf: remove disabled FF_API_FILESIZE cruft lavf: remove disabled FF_API_TIMESTAMP cruft lavf: remove disabled FF_API_LOOP_OUTPUT cruft lavf: remove disabled FF_API_LOOP_INPUT cruft lavf: remove disabled FF_API_AVSTREAM_QUALITY cruft ... Conflicts: doc/APIchanges libavcodec/8bps.c libavcodec/avcodec.h libavcodec/libx264.c libavcodec/mjpegbdec.c libavcodec/options.c libavcodec/sunrast.c libavcodec/utils.c libavcodec/version.h libavcodec/x86/h264_deblock.asm libavdevice/libdc1394.c libavdevice/v4l2.c libavformat/avformat.h libavformat/avio.c libavformat/avio.h libavformat/aviobuf.c libavformat/dv.c libavformat/mov.c libavformat/utils.c libavformat/version.h libavformat/wtv.c libavutil/Makefile libavutil/file.c libswscale/x86/input.asm libswscale/x86/swscale_mmx.c libswscale/x86/swscale_template.c tests/ref/lavf/ffm Merged-by: Michael Niedermayer <michaelni@gmx.at>
Diffstat (limited to 'libavcodec/flacenc.c')
-rw-r--r--libavcodec/flacenc.c68
1 files changed, 0 insertions, 68 deletions
diff --git a/libavcodec/flacenc.c b/libavcodec/flacenc.c
index 7345a7eef0..a1c3bca2dd 100644
--- a/libavcodec/flacenc.c
+++ b/libavcodec/flacenc.c
@@ -295,29 +295,6 @@ static av_cold int flac_encode_init(AVCodecContext *avctx)
if (s->options.max_partition_order < 0)
s->options.max_partition_order = ((int[]){ 2, 2, 3, 3, 3, 8, 8, 8, 8, 8, 8, 8, 8})[level];
- /* set compression option overrides from AVCodecContext */
-#if FF_API_FLAC_GLOBAL_OPTS
- if (avctx->lpc_type > FF_LPC_TYPE_DEFAULT) {
- if (avctx->lpc_type > FF_LPC_TYPE_CHOLESKY) {
- av_log(avctx, AV_LOG_ERROR, "unknown lpc type: %d\n", avctx->lpc_type);
- return -1;
- }
- s->options.lpc_type = avctx->lpc_type;
- if (s->options.lpc_type == FF_LPC_TYPE_CHOLESKY) {
- if (avctx->lpc_passes < 0) {
- // default number of passes for Cholesky
- s->options.lpc_passes = 2;
- } else if (avctx->lpc_passes == 0) {
- av_log(avctx, AV_LOG_ERROR, "invalid number of lpc passes: %d\n",
- avctx->lpc_passes);
- return -1;
- } else {
- s->options.lpc_passes = avctx->lpc_passes;
- }
- }
- }
-#endif
-
if (s->options.lpc_type == FF_LPC_TYPE_NONE) {
s->options.min_prediction_order = 0;
} else if (avctx->min_prediction_order >= 0) {
@@ -358,39 +335,6 @@ static av_cold int flac_encode_init(AVCodecContext *avctx)
return -1;
}
-#if FF_API_FLAC_GLOBAL_OPTS
- if (avctx->prediction_order_method >= 0) {
- if (avctx->prediction_order_method > ORDER_METHOD_LOG) {
- av_log(avctx, AV_LOG_ERROR, "invalid prediction order method: %d\n",
- avctx->prediction_order_method);
- return -1;
- }
- s->options.prediction_order_method = avctx->prediction_order_method;
- }
-
- if (avctx->min_partition_order >= 0) {
- if (avctx->min_partition_order > MAX_PARTITION_ORDER) {
- av_log(avctx, AV_LOG_ERROR, "invalid min partition order: %d\n",
- avctx->min_partition_order);
- return -1;
- }
- s->options.min_partition_order = avctx->min_partition_order;
- }
- if (avctx->max_partition_order >= 0) {
- if (avctx->max_partition_order > MAX_PARTITION_ORDER) {
- av_log(avctx, AV_LOG_ERROR, "invalid max partition order: %d\n",
- avctx->max_partition_order);
- return -1;
- }
- s->options.max_partition_order = avctx->max_partition_order;
- }
- if (s->options.max_partition_order < s->options.min_partition_order) {
- av_log(avctx, AV_LOG_ERROR, "invalid partition orders: min=%d max=%d\n",
- s->options.min_partition_order, s->options.max_partition_order);
- return -1;
- }
-#endif
-
if (avctx->frame_size > 0) {
if (avctx->frame_size < FLAC_MIN_BLOCKSIZE ||
avctx->frame_size > FLAC_MAX_BLOCKSIZE) {
@@ -403,18 +347,6 @@ static av_cold int flac_encode_init(AVCodecContext *avctx)
}
s->max_blocksize = s->avctx->frame_size;
-#if FF_API_FLAC_GLOBAL_OPTS
- /* set LPC precision */
- if (avctx->lpc_coeff_precision > 0) {
- if (avctx->lpc_coeff_precision > MAX_LPC_PRECISION) {
- av_log(avctx, AV_LOG_ERROR, "invalid lpc coeff precision: %d\n",
- avctx->lpc_coeff_precision);
- return -1;
- }
- s->options.lpc_coeff_precision = avctx->lpc_coeff_precision;
- }
-#endif
-
/* set maximum encoded frame size in verbatim mode */
s->max_framesize = ff_flac_get_max_frame_size(s->avctx->frame_size,
s->channels, 16);