[FFmpeg-devel] [PATCH] Remove unused code
Sat May 2 00:58:36 CEST 2009
On Fri, May 01, 2009 at 11:54:11PM +0100, M?ns Rullg?rd wrote:
> Michael Niedermayer <michaelni at gmx.at> writes:
> > On Fri, May 01, 2009 at 11:50:55PM +0200, Benjamin Larsson wrote:
> >> Dead assignments found by CSA.
> >> Index: libavcodec/ratecontrol.c
> >> ===================================================================
> >> --- libavcodec/ratecontrol.c (revision 18726)
> >> +++ libavcodec/ratecontrol.c (working copy)
> >> @@ -754,7 +754,6 @@
> >> rcc->mv_bits_sum[pict_type] += rce->mv_bits;
> >> rcc->frame_count[pict_type] ++;
> >> - bits= rce->i_tex_bits + rce->p_tex_bits;
> >> rate_factor= rcc->pass1_wanted_bits/rcc->pass1_rc_eq_output_sum * br_compensation;
> >> q= get_qscale(s, rce, rate_factor, picture_number);
> > i think, i didnt apply this because this makes bits more correct even
> > if unused.
> > not a big issue though ...
> If it is not used, how can you say anything about its correctness?
theres the quantizer and the bits of a frame (both guessed of course in the
we change the quantizer (q), it seems logic to also keep the bits reasonable
close to reality
It doesnt take much to add code that uses the bits variable and the
author likely would miss that they are a little off ...
Now i must admit i did not verify that the bits variable really is correctly
set there, i just assumed that. If its wrong it of course should be removed
Michael GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB
Why not whip the teacher when the pupil misbehaves? -- Diogenes of Sinope
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Size: 189 bytes
Desc: Digital signature
More information about the ffmpeg-devel