On 6 Feb 2012 15:06, "Diego Biurrun" <[email protected]> wrote: > > On Mon, Feb 06, 2012 at 12:24:58PM +0530, Aneesh Dogra wrote: > > The DEBUG macro (and some similar ones) has no significance in the code and thus > > can be removed we dont need the comment either. > > Its of no use unless we actually use that macro for good. > > I like the patch in general, but a few more details and the log message > need some changes. Please use proper spelling and avoid contractions, > this is not IRC. The subject line should be more precise. There are > tons of other types of useless comments that we could and probably > should remove, like > > /* Decode a foo frame. */ > static int decode_foo_frame(... > > Remove pointless commented-out DEBUG #defines. > > should do the trick. > > > --- > > libavcodec/dnxhddec.c | 3 --- > > libavcodec/dnxhdenc.c | 1 - > > libavcodec/dsputil.h | 2 -- > > libavcodec/gifdec.c | 1 - > > libavcodec/h263.c | 4 ---- > > libavcodec/h263dec.c | 1 - > > libavcodec/ituh263dec.c | 4 ---- > > libavcodec/ituh263enc.c | 4 ---- > > libavcodec/mjpegenc.c | 1 - > > libavcodec/mpeg12.c | 5 ----- > > libavcodec/mpegvideo.c | 10 ---------- > > libavcodec/mpegvideo_enc.c | 8 -------- > > libavcodec/msmpeg4.c | 1 - > > libavcodec/pngdec.c | 2 -- > > libavcodec/pngenc.c | 2 -- > > libavcodec/rv10.c | 2 -- > > libavcodec/rv34.c | 2 -- > > libavcodec/tta.c | 2 +- > > libavformat/isom.c | 2 -- > > libavformat/mov.c | 1 - > > libavformat/mxfdec.c | 2 -- > > libavformat/mxfenc.c | 2 -- > > libavformat/r3d.c | 2 -- > > libavformat/rtp.c | 2 -- > > libavformat/rtpdec.c | 2 -- > > libavformat/rtpenc.c | 2 -- > > libavformat/rtsp.c | 2 -- > > libpostproc/postprocess.c | 1 - > > 28 files changed, 1 insertions(+), 72 deletions(-) > > git-grep shows me instances you have missed, try > > git grep 'define DEBUG' >
The other debugs you see is actually being used in the code. I mean there are some #ifdef DEBUG blocks if you scroll down the file. The commented macros i deleted were actually not even used in the code below. > Also look out for commented-out instances of NDEBUG. > > > --- a/libavcodec/gifdec.c > > +++ b/libavcodec/gifdec.c > > @@ -20,7 +20,6 @@ > > * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA > > */ > > > > -//#define DEBUG > > > > #include "libavutil/imgutils.h" > > #include "avcodec.h" > > Remove one of the empty lines as well. > > > --- a/libavcodec/h263dec.c > > +++ b/libavcodec/h263dec.c > > @@ -39,7 +39,6 @@ > > #include "flv.h" > > #include "mpeg4video.h" > > > > -//#define DEBUG > > //#define PRINT_FRAME_TIME > > > > av_cold int ff_h263_decode_init(AVCodecContext *avctx) > > --- a/libavcodec/mpegvideo.c > > +++ b/libavcodec/mpegvideo.c > > @@ -59,13 +56,6 @@ static void dct_unquantize_h263_intra_c(MpegEncContext *s, > > - > > -/* enable all paranoid tests for rounding, overflows, etc... */ > > -//#define PARANOID > > - > > -//#define DEBUG > > - > > --- a/libavcodec/mpegvideo_enc.c > > +++ b/libavcodec/mpegvideo_enc.c > > @@ -45,20 +45,12 @@ > > > > -/* enable all paranoid tests for rounding, overflows, etc... */ > > -//#define PARANOID > > - > > -//#define DEBUG > > - > > --- a/libavformat/mov.c > > +++ b/libavformat/mov.c > > @@ -22,7 +22,6 @@ > > > > #include <limits.h> > > > > -//#define DEBUG > > //#define MOV_EXPORT_ALL_METADATA > > > > --- a/libpostproc/postprocess.c > > +++ b/libpostproc/postprocess.c > > @@ -83,7 +83,6 @@ try to unroll inner for(x=0 ... loop to avoid these damn if(x ... checks > > //#define HAVE_AMD3DNOW > > //#undef HAVE_MMX > > //#undef ARCH_X86 > > -//#define DEBUG_BRIGHTNESS > > #include "postprocess.h" > > #include "postprocess_internal.h" > > I haven't made up my mind wrt these other debug #defines yet, but you > should not just remove some of them and leave others behind. > > Diego > _______________________________________________ > libav-devel mailing list > [email protected] > https://lists.libav.org/mailman/listinfo/libav-devel
_______________________________________________ libav-devel mailing list [email protected] https://lists.libav.org/mailman/listinfo/libav-devel
