[FFmpeg-devel] [PATCH] Remove unused code

Michael Niedermayer michaelni
Sat May 2 00:42:01 CEST 2009


On Fri, May 01, 2009 at 11:50:55PM +0200, Benjamin Larsson wrote:
> Dead assignments found by CSA.
> 
> MvH
> Benjamin Larsson

>  libavcodec/h263.c          |    3 ---
>  libavcodec/lcldec.c        |    1 -
>  libavcodec/mpegvideo_enc.c |    3 ---
>  libavcodec/qtrleenc.c      |    1 -
>  libavcodec/ratecontrol.c   |    1 -
>  libavcodec/sp5xdec.c       |    3 +--
>  libavcodec/vc1.c           |   11 +++--------
>  libavcodec/vp3.c           |    2 --
>  libavcodec/wavpack.c       |    1 -
>  libavformat/matroskadec.c  |    1 -
>  libavformat/mtv.c          |    2 --
>  libavformat/nutdec.c       |    1 -
>  12 files changed, 4 insertions(+), 26 deletions(-)
> 7f18a1dd86549d31555c69334d6c128f3ee9ad5c  CSA_Dead_assignment.diff
> Index: libavcodec/h263.c
> ===================================================================
> --- libavcodec/h263.c	(revision 18726)
> +++ libavcodec/h263.c	(working copy)
[...]
> Index: libavcodec/mpegvideo_enc.c
> ===================================================================
> --- libavcodec/mpegvideo_enc.c	(revision 18726)
> +++ libavcodec/mpegvideo_enc.c	(working copy)

i guess above 2 could be comited


[...]
> 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 ...


> Index: libavcodec/vp3.c
> ===================================================================
> --- libavcodec/vp3.c	(revision 18726)
> +++ libavcodec/vp3.c	(working copy)

ok

[...]


> Index: libavformat/nutdec.c
> ===================================================================
> --- libavformat/nutdec.c	(revision 18726)
> +++ libavformat/nutdec.c	(working copy)
> @@ -215,7 +215,6 @@
>      tmp_pts=0;
>      tmp_mul=1;
>      tmp_stream=0;
> -    tmp_match= 1-(1LL<<62);
>      tmp_head_idx= 0;
>      for(i=0; i<256;){
>          int tmp_flags = ff_get_v(bc);

the variable is correct, it will be used in the future

the rest does not look like its maintained by me, though i could help
with review if needed ...

[...]
-- 
Michael     GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB

Freedom in capitalist society always remains about the same as it was in
ancient Greek republics: Freedom for slave owners. -- Vladimir Lenin
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: Digital signature
URL: <http://lists.mplayerhq.hu/pipermail/ffmpeg-devel/attachments/20090502/c70292bd/attachment.pgp>



More information about the ffmpeg-devel mailing list