[Ffmpeg-cvslog] CVS: ffmpeg ffmpeg.c,1.342,1.343
Michael Niedermayer CVS
michael
Sun Aug 21 22:27:02 CEST 2005
Update of /cvsroot/ffmpeg/ffmpeg
In directory mail:/var2/tmp/cvs-serv14929
Modified Files:
ffmpeg.c
Log Message:
vbr audio encode patch by (Justin Ruggles: jruggle, earthlink net)
with changes by me
int->float as video uses float too
remove silent cliping to some per codec range, this should result in an error instead
remove change to utils.c as its inconsistant with video
Index: ffmpeg.c
===================================================================
RCS file: /cvsroot/ffmpeg/ffmpeg/ffmpeg.c,v
retrieving revision 1.342
retrieving revision 1.343
diff -u -d -r1.342 -r1.343
--- ffmpeg.c 15 Aug 2005 14:22:42 -0000 1.342
+++ ffmpeg.c 21 Aug 2005 20:27:00 -0000 1.343
@@ -217,6 +217,8 @@
static int intra_only = 0;
static int audio_sample_rate = 44100;
static int audio_bit_rate = 64000;
+#define QSCALE_NONE -99999
+static float audio_qscale = QSCALE_NONE;
static int audio_disable = 0;
static int audio_channels = 1;
static int audio_codec_id = CODEC_ID_NONE;
@@ -3501,6 +3503,10 @@
audio_enc->codec_id = codec_id;
audio_enc->bit_rate = audio_bit_rate;
+ if (audio_qscale > QSCALE_NONE) {
+ audio_enc->flags |= CODEC_FLAG_QSCALE;
+ audio_enc->global_quality = st->quality = FF_QP2LAMBDA * audio_qscale;
+ }
audio_enc->strict_std_compliance = strict;
audio_enc->thread_count = thread_count;
/* For audio codecs other than AC3 or DTS we limit */
@@ -4348,6 +4354,7 @@
/* audio options */
{ "ab", HAS_ARG | OPT_AUDIO, {(void*)opt_audio_bitrate}, "set audio bitrate (in kbit/s)", "bitrate", },
+ { "aq", OPT_FLOAT | HAS_ARG | OPT_AUDIO, {(void*)&audio_qscale}, "set audio quality (codec-specific)", "quality", },
{ "ar", HAS_ARG | OPT_AUDIO, {(void*)opt_audio_rate}, "set audio sampling rate (in Hz)", "rate" },
{ "ac", HAS_ARG | OPT_AUDIO, {(void*)opt_audio_channels}, "set number of audio channels", "channels" },
{ "an", OPT_BOOL | OPT_AUDIO, {(void*)&audio_disable}, "disable audio" },
More information about the ffmpeg-cvslog
mailing list