diff options
author | Michael Niedermayer <michaelni@gmx.at> | 2011-07-07 01:57:11 +0400 |
---|---|---|
committer | Michael Niedermayer <michaelni@gmx.at> | 2011-07-07 01:57:11 +0400 |
commit | c3b6cc61e502b8df0d5bc6b9058dfc482a08d42a (patch) | |
tree | a03500dd560ac0aceadc3dbb485631a315ad89bf /ffmpeg.c | |
parent | 4e59c8ecf1433b85b539c5e89bb68cfe8b839866 (diff) | |
parent | f02f745e4aa070e5fabf1156b75c340171304933 (diff) |
Merge remote-tracking branch 'qatar/master'
* qatar/master:
ffserver: remove unused variable.
Remove unused and outdated TODO file.
gitignore: Drop individual .d ignore; it is already covered by a wildcard.
lavf: deprecate AVStream.quality.
bink: pass Bink version to audio decoder through extradata instead of codec_tag.
libpostproc: Remove disabled code.
flashsv: improve some comments and fix some wrong ones
flashsv: Eliminate redundant variable indirection.
flashsv: set reference frame type to full frame
flashsv: replace bitstream description by a link to the specification
flashsv: convert a debug av_log into av_dlog
flashsv: simplify condition
flashsv: return more meaningful error values
flashsv: cosmetics: break some overly long lines
flashsv: cosmetics: drop some unnecessary parentheses
swscale: amend documentation to mention use of native depth for scaling.
eval: add missing comma to tests.
eval: fix memleak.
H.264: make loopfilter bS const where applicable
Conflicts:
libavcodec/binkaudio.c
libavformat/bink.c
Merged-by: Michael Niedermayer <michaelni@gmx.at>
Diffstat (limited to 'ffmpeg.c')
-rw-r--r-- | ffmpeg.c | 15 |
1 files changed, 8 insertions, 7 deletions
@@ -1155,7 +1155,7 @@ static void do_video_out(AVFormatContext *s, AVOutputStream *ost, AVInputStream *ist, AVFrame *in_picture, - int *frame_size) + int *frame_size, float quality) { int nb_frames, i, ret, av_unused resample_changed; AVFrame *final_picture, *formatted_picture; @@ -1286,7 +1286,7 @@ static void do_video_out(AVFormatContext *s, /* handles sameq here. This is not correct because it may not be a global option */ - big_picture.quality = same_quality ? ist->st->quality : ost->st->quality; + big_picture.quality = quality; if(!me_threshold) big_picture.pict_type = 0; // big_picture.pts = AV_NOPTS_VALUE; @@ -1530,6 +1530,7 @@ static int output_packet(AVInputStream *ist, int ist_index, #if CONFIG_AVFILTER int frame_available; #endif + float quality; AVPacket avpkt; int bps = av_get_bytes_per_sample(ist->st->codec->sample_fmt); @@ -1610,7 +1611,7 @@ static int output_packet(AVInputStream *ist, int ist_index, ret = avcodec_decode_video2(ist->st->codec, &picture, &got_output, &avpkt); - ist->st->quality= picture.quality; + quality = same_quality ? picture.quality : 0; if (ret < 0) goto fail_decode; if (!got_output) { @@ -1736,7 +1737,8 @@ static int output_packet(AVInputStream *ist, int ist_index, if (ost->picref->video && !ost->frame_aspect_ratio) ost->st->codec->sample_aspect_ratio = ost->picref->video->sample_aspect_ratio; #endif - do_video_out(os, ost, ist, &picture, &frame_size); + do_video_out(os, ost, ist, &picture, &frame_size, + same_quality ? quality : ost->st->codec->global_quality); if (vstats_filename && frame_size) do_video_stats(os, ost, frame_size); break; @@ -3602,8 +3604,7 @@ static void new_video_stream(AVFormatContext *oc, int file_idx) video_enc->gop_size = 0; if (video_qscale || same_quality) { video_enc->flags |= CODEC_FLAG_QSCALE; - video_enc->global_quality= - st->quality = FF_QP2LAMBDA * video_qscale; + video_enc->global_quality = FF_QP2LAMBDA * video_qscale; } if(intra_matrix) @@ -3721,7 +3722,7 @@ static void new_audio_stream(AVFormatContext *oc, int file_idx) if (audio_qscale > QSCALE_NONE) { audio_enc->flags |= CODEC_FLAG_QSCALE; - audio_enc->global_quality = st->quality = FF_QP2LAMBDA * audio_qscale; + audio_enc->global_quality = FF_QP2LAMBDA * audio_qscale; } if (audio_channels) audio_enc->channels = audio_channels; |