aboutsummaryrefslogtreecommitdiffstats
path: root/avconv.c
diff options
context:
space:
mode:
authorAnton Khirnov <anton@khirnov.net>2012-10-09 17:40:20 +0200
committerAnton Khirnov <anton@khirnov.net>2012-10-09 20:32:34 +0200
commitfb722a900fc5cc9e003b9fef25b27ed7fc5547a2 (patch)
tree1ae5f0795df363d8a48b7f5413578deb9dac27f8 /avconv.c
parentb94e4acb4874843e914fd3cb8e089aff0756bb4a (diff)
downloadffmpeg-fb722a900fc5cc9e003b9fef25b27ed7fc5547a2.tar.gz
avconv: remove -same_quant
It has not worked for anything other than fringe codecs (asv1/2, mdec, mjpeg[b]) since about 2003 and nobody ever noticed or complained. This sufficiently proves that there are no users of this option who have a clue of what they are doing, so it is completely useless.
Diffstat (limited to 'avconv.c')
-rw-r--r--avconv.c16
1 files changed, 3 insertions, 13 deletions
diff --git a/avconv.c b/avconv.c
index 9aaa4a8cc2..219e9e2370 100644
--- a/avconv.c
+++ b/avconv.c
@@ -514,7 +514,7 @@ static void do_subtitle_out(AVFormatContext *s,
static void do_video_out(AVFormatContext *s,
OutputStream *ost,
AVFrame *in_picture,
- int *frame_size, float quality)
+ int *frame_size)
{
int ret, format_video_sync;
AVPacket pkt;
@@ -579,9 +579,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 &&
@@ -708,9 +706,7 @@ static int poll_filter(OutputStream *ost)
if (!ost->frame_aspect_ratio)
ost->st->codec->sample_aspect_ratio = picref->video->pixel_aspect;
- do_video_out(of->ctx, ost, filtered_frame, &frame_size,
- same_quant ? ost->last_quality :
- ost->st->codec->global_quality);
+ do_video_out(of->ctx, ost, filtered_frame, &frame_size);
if (vstats_filename && frame_size)
do_video_stats(of->ctx, ost, frame_size);
break;
@@ -1223,7 +1219,6 @@ static int decode_video(InputStream *ist, AVPacket *pkt, int *got_output)
AVFrame *decoded_frame;
void *buffer_to_free = NULL;
int i, ret = 0, resample_changed;
- float quality;
if (!ist->decoded_frame && !(ist->decoded_frame = avcodec_alloc_frame()))
return AVERROR(ENOMEM);
@@ -1241,7 +1236,6 @@ static int decode_video(InputStream *ist, AVPacket *pkt, int *got_output)
return ret;
}
- quality = same_quant ? decoded_frame->quality : 0;
decoded_frame->pts = guess_correct_pts(&ist->pts_ctx, decoded_frame->pkt_pts,
decoded_frame->pkt_dts);
pkt->size = 0;
@@ -1279,10 +1273,6 @@ static int decode_video(InputStream *ist, AVPacket *pkt, int *got_output)
}
for (i = 0; i < ist->nb_filters; i++) {
- // XXX what an ugly hack
- if (ist->filters[i]->graph->nb_outputs == 1)
- ist->filters[i]->graph->outputs[0]->ost->last_quality = quality;
-
if (ist->st->codec->codec->capabilities & CODEC_CAP_DR1) {
FrameBuffer *buf = decoded_frame->opaque;
AVFilterBufferRef *fb = avfilter_get_video_buffer_ref_from_arrays(