From b0696e947f6dda017b0913a642a682b839dfd79c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Martin=20Storsj=C3=B6?= Date: Wed, 15 May 2013 11:56:04 +0300 Subject: [PATCH 1/3] vc1: Reindent INIT_LUT(), align backslashes MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Martin Storsjö --- libavcodec/vc1.c | 36 ++++++++++++++++++------------------ 1 file changed, 18 insertions(+), 18 deletions(-) diff --git a/libavcodec/vc1.c b/libavcodec/vc1.c index df8f30afbf..23012cdc63 100644 --- a/libavcodec/vc1.c +++ b/libavcodec/vc1.c @@ -571,24 +571,24 @@ int ff_vc1_decode_entry_point(AVCodecContext *avctx, VC1Context *v, GetBitContex } /* fill lookup tables for intensity compensation */ -#define INIT_LUT(lumscale, lumshift, luty, lutuv) do { \ - int scale, shift, i; \ - if (!lumscale) { \ - scale = -64; \ - shift = (255 - lumshift * 2) << 6; \ - if (lumshift > 31) \ - shift += 128 << 6; \ - } else { \ - scale = lumscale + 32; \ - if (lumshift > 31) \ - shift = (lumshift - 64) << 6; \ - else \ - shift = lumshift << 6; \ - } \ - for (i = 0; i < 256; i++) { \ - luty[i] = av_clip_uint8((scale * i + shift + 32) >> 6); \ - lutuv[i] = av_clip_uint8((scale * (i - 128) + 128*64 + 32) >> 6); \ - } \ +#define INIT_LUT(lumscale, lumshift, luty, lutuv) do { \ + int scale, shift, i; \ + if (!lumscale) { \ + scale = -64; \ + shift = (255 - lumshift * 2) << 6; \ + if (lumshift > 31) \ + shift += 128 << 6; \ + } else { \ + scale = lumscale + 32; \ + if (lumshift > 31) \ + shift = (lumshift - 64) << 6; \ + else \ + shift = lumshift << 6; \ + } \ + for (i = 0; i < 256; i++) { \ + luty[i] = av_clip_uint8((scale * i + shift + 32) >> 6); \ + lutuv[i] = av_clip_uint8((scale * (i - 128) + 128*64 + 32) >> 6); \ + } \ } while(0) int ff_vc1_parse_frame_header(VC1Context *v, GetBitContext* gb) From bfd00cc4c2f4c1d6671e8a0060008b10336481f4 Mon Sep 17 00:00:00 2001 From: Diego Biurrun Date: Wed, 15 May 2013 14:49:31 +0200 Subject: [PATCH 2/3] h263dec: Remove broken and disabled debug cruft --- libavcodec/h263dec.c | 8 -------- 1 file changed, 8 deletions(-) diff --git a/libavcodec/h263dec.c b/libavcodec/h263dec.c index e8edad7ab6..014033fe1d 100644 --- a/libavcodec/h263dec.c +++ b/libavcodec/h263dec.c @@ -40,7 +40,6 @@ #include "mpeg4video.h" //#define DEBUG -//#define PRINT_FRAME_TIME av_cold int ff_h263_decode_init(AVCodecContext *avctx) { @@ -349,9 +348,6 @@ int ff_h263_decode_frame(AVCodecContext *avctx, int ret; AVFrame *pict = data; -#ifdef PRINT_FRAME_TIME -uint64_t time= rdtsc(); -#endif s->flags= avctx->flags; s->flags2= avctx->flags2; @@ -740,10 +736,6 @@ intrax8_decoded: *got_frame = 1; } -#ifdef PRINT_FRAME_TIME -av_log(avctx, AV_LOG_DEBUG, "%"PRId64"\n", rdtsc()-time); -#endif - return (ret && (avctx->err_recognition & AV_EF_EXPLODE))?ret:get_consumed_bytes(s, buf_size); } From d46c588f3cb1963a00e990ceaf4ba9ffa05a716d Mon Sep 17 00:00:00 2001 From: Diego Biurrun Date: Wed, 15 May 2013 15:09:20 +0200 Subject: [PATCH 3/3] Remove commented-out #includes --- libavformat/nut.h | 3 --- libavutil/rational.c | 1 - 2 files changed, 4 deletions(-) diff --git a/libavformat/nut.h b/libavformat/nut.h index 8e5767d97d..6eddc96840 100644 --- a/libavformat/nut.h +++ b/libavformat/nut.h @@ -22,9 +22,6 @@ #ifndef AVFORMAT_NUT_H #define AVFORMAT_NUT_H -//#include -//#include "libavutil/adler32.h" -//#include "libavcodec/mpegaudio.h" #include "avformat.h" #include "internal.h" #include "metadata.h" diff --git a/libavutil/rational.c b/libavutil/rational.c index 4770c54f8b..4053936194 100644 --- a/libavutil/rational.c +++ b/libavutil/rational.c @@ -26,7 +26,6 @@ */ #include "avassert.h" -//#include #include #include "common.h"