* 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>
... | ... |
@@ -297,7 +297,7 @@ mkfifo intermediate2.mpg |
297 | 297 |
ffmpeg -i input1.avi -qscale:v 1 -y intermediate1.mpg < /dev/null & |
298 | 298 |
ffmpeg -i input2.avi -qscale:v 1 -y intermediate2.mpg < /dev/null & |
299 | 299 |
cat intermediate1.mpg intermediate2.mpg |\ |
300 |
-ffmpeg -f mpeg -i - -qscale:v 2 -c:v mpeg4 -acodec libmp3lame -q:a 4 output.avi |
|
300 |
+ffmpeg -f mpeg -i - -c:v mpeg4 -acodec libmp3lame output.avi |
|
301 | 301 |
@end example |
302 | 302 |
|
303 | 303 |
@subsection Concatenating using raw audio and video |
... | ... |
@@ -327,7 +327,7 @@ cat temp1.a temp2.a > all.a & |
327 | 327 |
cat temp1.v temp2.v > all.v & |
328 | 328 |
ffmpeg -f u16le -acodec pcm_s16le -ac 2 -ar 44100 -i all.a \ |
329 | 329 |
-f yuv4mpegpipe -i all.v \ |
330 |
- -qscale:v 2 -y output.flv |
|
330 |
+ -y output.flv |
|
331 | 331 |
rm temp[12].[av] all.[av] |
332 | 332 |
@end example |
333 | 333 |
|
... | ... |
@@ -470,11 +470,6 @@ Disable video recording. |
470 | 470 |
|
471 | 471 |
@item -vcodec @var{codec} (@emph{output}) |
472 | 472 |
Set the video codec. This is an alias for @code{-codec:v}. |
473 |
-@item -same_quant |
|
474 |
-Use same quantizer as source (implies VBR). |
|
475 |
- |
|
476 |
-Note that this is NOT SAME QUALITY. Do not use this option unless you know you |
|
477 |
-need it. |
|
478 | 473 |
|
479 | 474 |
@item -pass[:@var{stream_specifier}] @var{n} (@emph{output,per-stream}) |
480 | 475 |
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, |
773 | 773 |
|
774 | 774 |
static void do_video_out(AVFormatContext *s, |
775 | 775 |
OutputStream *ost, |
776 |
- AVFrame *in_picture, |
|
777 |
- float quality) |
|
776 |
+ AVFrame *in_picture) |
|
778 | 777 |
{ |
779 | 778 |
int ret, format_video_sync; |
780 | 779 |
AVPacket pkt; |
... | ... |
@@ -878,9 +877,7 @@ static void do_video_out(AVFormatContext *s, |
878 | 878 |
big_picture.top_field_first = !!ost->top_field_first; |
879 | 879 |
} |
880 | 880 |
|
881 |
- /* handles same_quant here. This is not correct because it may |
|
882 |
- not be a global option */ |
|
883 |
- big_picture.quality = quality; |
|
881 |
+ big_picture.quality = ost->st->codec->global_quality; |
|
884 | 882 |
if (!enc->me_threshold) |
885 | 883 |
big_picture.pict_type = 0; |
886 | 884 |
if (ost->forced_kf_index < ost->forced_kf_count && |
... | ... |
@@ -1043,9 +1040,7 @@ static int reap_filters(void) |
1043 | 1043 |
if (!ost->frame_aspect_ratio) |
1044 | 1044 |
ost->st->codec->sample_aspect_ratio = picref->video->sample_aspect_ratio; |
1045 | 1045 |
|
1046 |
- do_video_out(of->ctx, ost, filtered_frame, |
|
1047 |
- same_quant ? ost->last_quality : |
|
1048 |
- ost->st->codec->global_quality); |
|
1046 |
+ do_video_out(of->ctx, ost, filtered_frame); |
|
1049 | 1047 |
break; |
1050 | 1048 |
case AVMEDIA_TYPE_AUDIO: |
1051 | 1049 |
avfilter_copy_buf_props(filtered_frame, picref); |
... | ... |
@@ -1556,7 +1551,6 @@ static int decode_video(InputStream *ist, AVPacket *pkt, int *got_output) |
1556 | 1556 |
int i, ret = 0, resample_changed; |
1557 | 1557 |
int64_t best_effort_timestamp; |
1558 | 1558 |
AVRational *frame_sample_aspect; |
1559 |
- float quality; |
|
1560 | 1559 |
|
1561 | 1560 |
if (!ist->decoded_frame && !(ist->decoded_frame = avcodec_alloc_frame())) |
1562 | 1561 |
return AVERROR(ENOMEM); |
... | ... |
@@ -1577,8 +1571,6 @@ static int decode_video(InputStream *ist, AVPacket *pkt, int *got_output) |
1577 | 1577 |
return ret; |
1578 | 1578 |
} |
1579 | 1579 |
|
1580 |
- quality = same_quant ? decoded_frame->quality : 0; |
|
1581 |
- |
|
1582 | 1580 |
if(ist->top_field_first>=0) |
1583 | 1581 |
decoded_frame->top_field_first = ist->top_field_first; |
1584 | 1582 |
|
... | ... |
@@ -1631,9 +1623,6 @@ static int decode_video(InputStream *ist, AVPacket *pkt, int *got_output) |
1631 | 1631 |
int changed = ist->st->codec->width != ist->filters[i]->filter->outputs[0]->w |
1632 | 1632 |
|| ist->st->codec->height != ist->filters[i]->filter->outputs[0]->h |
1633 | 1633 |
|| ist->st->codec->pix_fmt != ist->filters[i]->filter->outputs[0]->format; |
1634 |
- // XXX what an ugly hack |
|
1635 |
- if (ist->filters[i]->graph->nb_outputs == 1) |
|
1636 |
- ist->filters[i]->graph->outputs[0]->ost->last_quality = quality; |
|
1637 | 1634 |
|
1638 | 1635 |
if (!frame_sample_aspect->num) |
1639 | 1636 |
*frame_sample_aspect = ist->st->sample_aspect_ratio; |
... | ... |
@@ -301,7 +301,6 @@ typedef struct OutputStream { |
301 | 301 |
int top_field_first; |
302 | 302 |
|
303 | 303 |
float frame_aspect_ratio; |
304 |
- float last_quality; |
|
305 | 304 |
|
306 | 305 |
/* forced key frames */ |
307 | 306 |
int64_t *forced_kf_pts; |
... | ... |
@@ -377,7 +376,6 @@ extern int debug_ts; |
377 | 377 |
extern int exit_on_error; |
378 | 378 |
extern int print_stats; |
379 | 379 |
extern int qp_hist; |
380 |
-extern int same_quant; |
|
381 | 380 |
extern int stdin_interaction; |
382 | 381 |
extern int frame_bits_per_raw_sample; |
383 | 382 |
extern AVIOContext *progress_avio; |
... | ... |
@@ -83,7 +83,6 @@ int debug_ts = 0; |
83 | 83 |
int exit_on_error = 0; |
84 | 84 |
int print_stats = 1; |
85 | 85 |
int qp_hist = 0; |
86 |
-int same_quant = 0; |
|
87 | 86 |
int stdin_interaction = 1; |
88 | 87 |
int frame_bits_per_raw_sample = 0; |
89 | 88 |
|
... | ... |
@@ -989,7 +988,7 @@ static OutputStream *new_output_stream(OptionsContext *o, AVFormatContext *oc, e |
989 | 989 |
} |
990 | 990 |
|
991 | 991 |
MATCH_PER_STREAM_OPT(qscale, dbl, qscale, oc, st); |
992 |
- if (qscale >= 0 || same_quant) { |
|
992 |
+ if (qscale >= 0) { |
|
993 | 993 |
st->codec->flags |= CODEC_FLAG_QSCALE; |
994 | 994 |
st->codec->global_quality = FF_QP2LAMBDA * qscale; |
995 | 995 |
} |
... | ... |
@@ -2390,10 +2389,6 @@ const OptionDef options[] = { |
2390 | 2390 |
"rate control override for specific intervals", "override" }, |
2391 | 2391 |
{ "vcodec", OPT_VIDEO | HAS_ARG | OPT_PERFILE, { .func_arg = opt_video_codec }, |
2392 | 2392 |
"force video codec ('copy' to copy stream)", "codec" }, |
2393 |
- { "sameq", OPT_VIDEO | OPT_BOOL | OPT_EXPERT , { &same_quant }, |
|
2394 |
- "use same quantizer as source (implies VBR)" }, |
|
2395 |
- { "same_quant", OPT_VIDEO | OPT_BOOL | OPT_EXPERT, { &same_quant }, |
|
2396 |
- "use same quantizer as source (implies VBR)" }, |
|
2397 | 2393 |
{ "timecode", OPT_VIDEO | HAS_ARG | OPT_PERFILE, { .func_arg = opt_timecode }, |
2398 | 2394 |
"set initial TimeCode value.", "hh:mm:ss[:;.]ff" }, |
2399 | 2395 |
{ "pass", OPT_VIDEO | HAS_ARG | OPT_SPEC | OPT_INT, { .off = OFFSET(pass) }, |