diff options
author | Michael Niedermayer <michaelni@gmx.at> | 2012-10-10 13:51:07 +0200 |
---|---|---|
committer | Michael Niedermayer <michaelni@gmx.at> | 2012-10-10 13:51:07 +0200 |
commit | b7ebb49d035205bcfbcc4f1788df5ba1419fadc8 (patch) | |
tree | e4566b574da96ea49e59e3d5bc03ecbbde903f15 | |
parent | eb71f027f0581fd732fe33e559e38855f90da66f (diff) | |
parent | fb722a900fc5cc9e003b9fef25b27ed7fc5547a2 (diff) | |
download | ffmpeg-b7ebb49d035205bcfbcc4f1788df5ba1419fadc8.tar.gz |
Merge commit 'fb722a900fc5cc9e003b9fef25b27ed7fc5547a2'
* commit 'fb722a900fc5cc9e003b9fef25b27ed7fc5547a2':
avconv: remove -same_quant
Conflicts:
Changelog
doc/faq.texi
ffmpeg.c
ffmpeg.h
ffmpeg_opt.c
Merged-by: Michael Niedermayer <michaelni@gmx.at>
-rw-r--r-- | Changelog | 1 | ||||
-rw-r--r-- | doc/faq.texi | 4 | ||||
-rw-r--r-- | doc/ffmpeg.texi | 5 | ||||
-rw-r--r-- | ffmpeg.c | 17 | ||||
-rw-r--r-- | ffmpeg.h | 2 | ||||
-rw-r--r-- | ffmpeg_opt.c | 7 |
6 files changed, 7 insertions, 29 deletions
@@ -10,6 +10,7 @@ version next: - Pinnacle TARGA CineWave YUV16 decoder - TAK demuxer, decoder and parser - DTS-HD demuxer +- remove -same_quant, it hasn't worked for years version 1.0: diff --git a/doc/faq.texi b/doc/faq.texi index 30259dd401..5477faf219 100644 --- a/doc/faq.texi +++ b/doc/faq.texi @@ -297,7 +297,7 @@ mkfifo intermediate2.mpg ffmpeg -i input1.avi -qscale:v 1 -y intermediate1.mpg < /dev/null & ffmpeg -i input2.avi -qscale:v 1 -y intermediate2.mpg < /dev/null & cat intermediate1.mpg intermediate2.mpg |\ -ffmpeg -f mpeg -i - -qscale:v 2 -c:v mpeg4 -acodec libmp3lame -q:a 4 output.avi +ffmpeg -f mpeg -i - -c:v mpeg4 -acodec libmp3lame output.avi @end example @subsection Concatenating using raw audio and video @@ -327,7 +327,7 @@ cat temp1.a temp2.a > all.a & cat temp1.v temp2.v > all.v & ffmpeg -f u16le -acodec pcm_s16le -ac 2 -ar 44100 -i all.a \ -f yuv4mpegpipe -i all.v \ - -qscale:v 2 -y output.flv + -y output.flv rm temp[12].[av] all.[av] @end example diff --git a/doc/ffmpeg.texi b/doc/ffmpeg.texi index 121fbc10ae..767ce59a69 100644 --- a/doc/ffmpeg.texi +++ b/doc/ffmpeg.texi @@ -470,11 +470,6 @@ Disable video recording. @item -vcodec @var{codec} (@emph{output}) Set the video codec. This is an alias for @code{-codec:v}. -@item -same_quant -Use same quantizer as source (implies VBR). - -Note that this is NOT SAME QUALITY. Do not use this option unless you know you -need it. @item -pass[:@var{stream_specifier}] @var{n} (@emph{output,per-stream}) Select the pass number (1 or 2). It is used to do two-pass @@ -773,8 +773,7 @@ static void do_subtitle_out(AVFormatContext *s, static void do_video_out(AVFormatContext *s, OutputStream *ost, - AVFrame *in_picture, - float quality) + AVFrame *in_picture) { int ret, format_video_sync; AVPacket pkt; @@ -878,9 +877,7 @@ static void do_video_out(AVFormatContext *s, big_picture.top_field_first = !!ost->top_field_first; } - /* handles same_quant here. This is not correct because it may - not be a global option */ - big_picture.quality = quality; + big_picture.quality = ost->st->codec->global_quality; if (!enc->me_threshold) big_picture.pict_type = 0; if (ost->forced_kf_index < ost->forced_kf_count && @@ -1043,9 +1040,7 @@ static int reap_filters(void) if (!ost->frame_aspect_ratio) ost->st->codec->sample_aspect_ratio = picref->video->sample_aspect_ratio; - do_video_out(of->ctx, ost, filtered_frame, - same_quant ? ost->last_quality : - ost->st->codec->global_quality); + do_video_out(of->ctx, ost, filtered_frame); break; case AVMEDIA_TYPE_AUDIO: avfilter_copy_buf_props(filtered_frame, picref); @@ -1556,7 +1551,6 @@ static int decode_video(InputStream *ist, AVPacket *pkt, int *got_output) int i, ret = 0, resample_changed; int64_t best_effort_timestamp; AVRational *frame_sample_aspect; - float quality; if (!ist->decoded_frame && !(ist->decoded_frame = avcodec_alloc_frame())) return AVERROR(ENOMEM); @@ -1577,8 +1571,6 @@ static int decode_video(InputStream *ist, AVPacket *pkt, int *got_output) return ret; } - quality = same_quant ? decoded_frame->quality : 0; - if(ist->top_field_first>=0) decoded_frame->top_field_first = ist->top_field_first; @@ -1631,9 +1623,6 @@ static int decode_video(InputStream *ist, AVPacket *pkt, int *got_output) int changed = ist->st->codec->width != ist->filters[i]->filter->outputs[0]->w || ist->st->codec->height != ist->filters[i]->filter->outputs[0]->h || ist->st->codec->pix_fmt != ist->filters[i]->filter->outputs[0]->format; - // XXX what an ugly hack - if (ist->filters[i]->graph->nb_outputs == 1) - ist->filters[i]->graph->outputs[0]->ost->last_quality = quality; if (!frame_sample_aspect->num) *frame_sample_aspect = ist->st->sample_aspect_ratio; @@ -301,7 +301,6 @@ typedef struct OutputStream { int top_field_first; float frame_aspect_ratio; - float last_quality; /* forced key frames */ int64_t *forced_kf_pts; @@ -377,7 +376,6 @@ extern int debug_ts; extern int exit_on_error; extern int print_stats; extern int qp_hist; -extern int same_quant; extern int stdin_interaction; extern int frame_bits_per_raw_sample; extern AVIOContext *progress_avio; diff --git a/ffmpeg_opt.c b/ffmpeg_opt.c index 4db881b721..10c0d04c66 100644 --- a/ffmpeg_opt.c +++ b/ffmpeg_opt.c @@ -83,7 +83,6 @@ int debug_ts = 0; int exit_on_error = 0; int print_stats = 1; int qp_hist = 0; -int same_quant = 0; int stdin_interaction = 1; int frame_bits_per_raw_sample = 0; @@ -989,7 +988,7 @@ static OutputStream *new_output_stream(OptionsContext *o, AVFormatContext *oc, e } MATCH_PER_STREAM_OPT(qscale, dbl, qscale, oc, st); - if (qscale >= 0 || same_quant) { + if (qscale >= 0) { st->codec->flags |= CODEC_FLAG_QSCALE; st->codec->global_quality = FF_QP2LAMBDA * qscale; } @@ -2390,10 +2389,6 @@ const OptionDef options[] = { "rate control override for specific intervals", "override" }, { "vcodec", OPT_VIDEO | HAS_ARG | OPT_PERFILE, { .func_arg = opt_video_codec }, "force video codec ('copy' to copy stream)", "codec" }, - { "sameq", OPT_VIDEO | OPT_BOOL | OPT_EXPERT , { &same_quant }, - "use same quantizer as source (implies VBR)" }, - { "same_quant", OPT_VIDEO | OPT_BOOL | OPT_EXPERT, { &same_quant }, - "use same quantizer as source (implies VBR)" }, { "timecode", OPT_VIDEO | HAS_ARG | OPT_PERFILE, { .func_arg = opt_timecode }, "set initial TimeCode value.", "hh:mm:ss[:;.]ff" }, { "pass", OPT_VIDEO | HAS_ARG | OPT_SPEC | OPT_INT, { .off = OFFSET(pass) }, |