[FFmpeg-cvslog] Give IDCT matrix transpose macro a more descriptive name

Diego Biurrun git at videolan.org
Fri Feb 28 02:13:41 CET 2014


ffmpeg | branch: master | Diego Biurrun <diego at biurrun.de> | Tue Feb 18 09:57:45 2014 -0800| [f2408ec9d752aa6ceb7eb9edb2771eafba437c1b] | committer: Diego Biurrun

Give IDCT matrix transpose macro a more descriptive name

This also avoids a macro name clash and related warning on ARM.

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=f2408ec9d752aa6ceb7eb9edb2771eafba437c1b
---

 libavcodec/h264.c |   20 ++++++++++----------
 libavcodec/vp3.c  |    8 ++++----
 libavcodec/vp56.c |    6 +++---
 3 files changed, 17 insertions(+), 17 deletions(-)

diff --git a/libavcodec/h264.c b/libavcodec/h264.c
index 7f9683e..c76abf7 100644
--- a/libavcodec/h264.c
+++ b/libavcodec/h264.c
@@ -2904,18 +2904,18 @@ static void init_scan_tables(H264Context *h)
 {
     int i;
     for (i = 0; i < 16; i++) {
-#define T(x) (x >> 2) | ((x << 2) & 0xF)
-        h->zigzag_scan[i] = T(zigzag_scan[i]);
-        h->field_scan[i]  = T(field_scan[i]);
-#undef T
+#define TRANSPOSE(x) (x >> 2) | ((x << 2) & 0xF)
+        h->zigzag_scan[i] = TRANSPOSE(zigzag_scan[i]);
+        h->field_scan[i]  = TRANSPOSE(field_scan[i]);
+#undef TRANSPOSE
     }
     for (i = 0; i < 64; i++) {
-#define T(x) (x >> 3) | ((x & 7) << 3)
-        h->zigzag_scan8x8[i]       = T(ff_zigzag_direct[i]);
-        h->zigzag_scan8x8_cavlc[i] = T(zigzag_scan8x8_cavlc[i]);
-        h->field_scan8x8[i]        = T(field_scan8x8[i]);
-        h->field_scan8x8_cavlc[i]  = T(field_scan8x8_cavlc[i]);
-#undef T
+#define TRANSPOSE(x) (x >> 3) | ((x & 7) << 3)
+        h->zigzag_scan8x8[i]       = TRANSPOSE(ff_zigzag_direct[i]);
+        h->zigzag_scan8x8_cavlc[i] = TRANSPOSE(zigzag_scan8x8_cavlc[i]);
+        h->field_scan8x8[i]        = TRANSPOSE(field_scan8x8[i]);
+        h->field_scan8x8_cavlc[i]  = TRANSPOSE(field_scan8x8_cavlc[i]);
+#undef TRANSPOSE
     }
     if (h->sps.transform_bypass) { // FIXME same ugly
         h->zigzag_scan_q0          = zigzag_scan;
diff --git a/libavcodec/vp3.c b/libavcodec/vp3.c
index adcecbc..a45f2db 100644
--- a/libavcodec/vp3.c
+++ b/libavcodec/vp3.c
@@ -1705,10 +1705,10 @@ static av_cold int vp3_decode_init(AVCodecContext *avctx)
     ff_vp3dsp_init(&s->vp3dsp, avctx->flags);
 
     for (i = 0; i < 64; i++) {
-#define T(x) (x >> 3) | ((x & 7) << 3)
-        s->idct_permutation[i] = T(i);
-        s->idct_scantable[i] = T(ff_zigzag_direct[i]);
-#undef T
+#define TRANSPOSE(x) (x >> 3) | ((x & 7) << 3)
+        s->idct_permutation[i] = TRANSPOSE(i);
+        s->idct_scantable[i]   = TRANSPOSE(ff_zigzag_direct[i]);
+#undef TRANSPOSE
     }
 
     /* initialize to an impossible value which will force a recalculation
diff --git a/libavcodec/vp56.c b/libavcodec/vp56.c
index 7fbf9a0..b9d3c87 100644
--- a/libavcodec/vp56.c
+++ b/libavcodec/vp56.c
@@ -664,9 +664,9 @@ av_cold int ff_vp56_init(AVCodecContext *avctx, int flip, int has_alpha)
     ff_vp3dsp_init(&s->vp3dsp, avctx->flags);
     ff_vp56dsp_init(&s->vp56dsp, avctx->codec->id);
     for (i = 0; i < 64; i++) {
-#define T(x) (x >> 3) | ((x & 7) << 3)
-        s->idct_scantable[i] = T(ff_zigzag_direct[i]);
-#undef T
+#define TRANSPOSE(x) (x >> 3) | ((x & 7) << 3)
+        s->idct_scantable[i] = TRANSPOSE(ff_zigzag_direct[i]);
+#undef TRANSPOSE
     }
 
     for (i = 0; i < FF_ARRAY_ELEMS(s->frames); i++) {



More information about the ffmpeg-cvslog mailing list