[FFmpeg-cvslog] libavcodec/hevc: indention related cosmetics to reduce diff to 064698d381e1e7790f21b0199a8930ea04e2e942

Michael Niedermayer git at videolan.org
Sat Nov 2 14:51:00 CET 2013


ffmpeg | branch: master | Michael Niedermayer <michaelni at gmx.at> | Sat Nov  2 11:59:02 2013 +0100| [69b3668b83eb6a69d90b65e33067019023d94104] | committer: Michael Niedermayer

libavcodec/hevc: indention related cosmetics to reduce diff to 064698d381e1e7790f21b0199a8930ea04e2e942

Signed-off-by: Michael Niedermayer <michaelni at gmx.at>

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

 libavcodec/hevc_filter.c      |    5 ++++-
 libavcodec/hevc_mvs.c         |    6 ++++--
 libavcodec/hevcdsp.c          |    2 +-
 libavcodec/hevcdsp_template.c |   47 +++++++++++++++++++++++++++++------------
 4 files changed, 43 insertions(+), 17 deletions(-)

diff --git a/libavcodec/hevc_filter.c b/libavcodec/hevc_filter.c
index c45e9f9..6de9011 100644
--- a/libavcodec/hevc_filter.c
+++ b/libavcodec/hevc_filter.c
@@ -333,7 +333,10 @@ static int get_pcm(HEVCContext *s, int x, int y)
     return s->is_pcm[y_pu * s->sps->min_pu_width + x_pu];
 }
 
-#define TC_CALC(qp, bs) tctable[av_clip((qp) + DEFAULT_INTRA_TC_OFFSET * ((bs) - 1) + (tc_offset >> 1 << 1), 0, MAX_QP + DEFAULT_INTRA_TC_OFFSET)]
+#define TC_CALC(qp, bs)                                                 \
+    tctable[av_clip((qp) + DEFAULT_INTRA_TC_OFFSET * ((bs) - 1) +       \
+                    (tc_offset >> 1 << 1),                              \
+                    0, MAX_QP + DEFAULT_INTRA_TC_OFFSET)]
 
 static void deblocking_filter_CTB(HEVCContext *s, int x0, int y0)
 {
diff --git a/libavcodec/hevc_mvs.c b/libavcodec/hevc_mvs.c
index d2a6169..a25f7ab 100644
--- a/libavcodec/hevc_mvs.c
+++ b/libavcodec/hevc_mvs.c
@@ -614,10 +614,12 @@ static int mv_mp_mode_mx_lt(HEVCContext *s, int x, int y, int pred_flag_index,
 }
 
 #define MP_MX(v, pred, mx)                                      \
-    mv_mp_mode_mx(s, x ## v ## _pu, y ## v ## _pu, pred, &mx, ref_idx_curr, ref_idx)
+    mv_mp_mode_mx(s, x ## v ## _pu, y ## v ## _pu, pred,        \
+                  &mx, ref_idx_curr, ref_idx)
 
 #define MP_MX_LT(v, pred, mx)                                   \
-    mv_mp_mode_mx_lt(s, x ## v ## _pu, y ## v ## _pu, pred, &mx, ref_idx_curr, ref_idx)
+    mv_mp_mode_mx_lt(s, x ## v ## _pu, y ## v ## _pu, pred,     \
+                     &mx, ref_idx_curr, ref_idx)
 
 void ff_hevc_luma_mv_mvp_mode(HEVCContext *s, int x0, int y0, int nPbW,
                               int nPbH, int log2_cb_size, int part_idx,
diff --git a/libavcodec/hevcdsp.c b/libavcodec/hevcdsp.c
index d6fafdc..6fb8669 100644
--- a/libavcodec/hevcdsp.c
+++ b/libavcodec/hevcdsp.c
@@ -162,12 +162,12 @@ void ff_hevc_dsp_init(HEVCDSPContext *hevcdsp, int bit_depth)
     hevcdsp->put_hevc_epel[1][0] = FUNC(put_hevc_epel_v, depth);            \
     hevcdsp->put_hevc_epel[1][1] = FUNC(put_hevc_epel_hv, depth);           \
                                                                             \
-                                                                                   \
     hevcdsp->put_unweighted_pred   = FUNC(put_unweighted_pred, depth);      \
     hevcdsp->put_weighted_pred_avg = FUNC(put_weighted_pred_avg, depth);    \
                                                                             \
     hevcdsp->weighted_pred         = FUNC(weighted_pred, depth);            \
     hevcdsp->weighted_pred_avg     = FUNC(weighted_pred_avg, depth);        \
+                                                                            \
     hevcdsp->hevc_h_loop_filter_luma     = FUNC(hevc_h_loop_filter_luma, depth);   \
     hevcdsp->hevc_v_loop_filter_luma     = FUNC(hevc_v_loop_filter_luma, depth);   \
     hevcdsp->hevc_h_loop_filter_chroma   = FUNC(hevc_h_loop_filter_chroma, depth); \
diff --git a/libavcodec/hevcdsp_template.c b/libavcodec/hevcdsp_template.c
index ff691e4..5b3e619 100644
--- a/libavcodec/hevcdsp_template.c
+++ b/libavcodec/hevcdsp_template.c
@@ -845,16 +845,32 @@ static void FUNC(put_hevc_qpel_pixels)(int16_t *dst, ptrdiff_t dststride,
 }
 
 #define QPEL_FILTER_1(src, stride)      \
-    (-src[x - 3 * stride] + 4 *  src[x - 2 * stride] - 10 *  src[x -     stride] + 58 *  src[x]              +         \
-    17 *  src[x +     stride] - 5 *  src[x + 2 * stride] + 1 *  src[x + 3 * stride])
+    (1 * -src[x - 3 * stride] +         \
+     4 *  src[x - 2 * stride] -         \
+    10 *  src[x -     stride] +         \
+    58 *  src[x]              +         \
+    17 *  src[x +     stride] -         \
+     5 *  src[x + 2 * stride] +         \
+     1 *  src[x + 3 * stride])
 
 #define QPEL_FILTER_2(src, stride)      \
-    (-src[x - 3 * stride] + 4  *  src[x - 2 * stride] - 11  *  src[x -     stride] + 40  *  src[x]              +        \
-    40  *  src[x +     stride] - 11  *  src[x + 2 * stride] + 4  *  src[x + 3 * stride] - src[x + 4 * stride])
+    (1  * -src[x - 3 * stride] +        \
+     4  *  src[x - 2 * stride] -        \
+    11  *  src[x -     stride] +        \
+    40  *  src[x]              +        \
+    40  *  src[x +     stride] -        \
+    11  *  src[x + 2 * stride] +        \
+     4  *  src[x + 3 * stride] -        \
+     1  *  src[x + 4 * stride])
 
 #define QPEL_FILTER_3(src, stride)      \
-    (src[x - 2 * stride] - 5  * src[x -     stride] + 17  * src[x] + 58  * src[x + stride]           \
-     - 10  * src[x + 2 * stride] + 4  * src[x + 3 * stride] - src[x + 4 * stride])
+    (1  * src[x - 2 * stride] -         \
+     5  * src[x -     stride] +         \
+    17  * src[x]              +         \
+    58  * src[x + stride]     -         \
+    10  * src[x + 2 * stride] +         \
+     4  * src[x + 3 * stride] -         \
+     1  * src[x + 4 * stride])
 
 
 #define PUT_HEVC_QPEL_H(H)                                                     \
@@ -894,8 +910,10 @@ static void FUNC(put_hevc_qpel_v ## V)(int16_t *dst,  ptrdiff_t dststride,     \
 }
 
 #define PUT_HEVC_QPEL_HV(H, V)                                                 \
-static void FUNC(put_hevc_qpel_h ## H ## v ## V)(int16_t *dst,  ptrdiff_t dststride, \
-                                                 uint8_t *_src, ptrdiff_t _srcstride,\
+static void FUNC(put_hevc_qpel_h ## H ## v ## V)(int16_t *dst,                 \
+                                                 ptrdiff_t dststride,          \
+                                                 uint8_t *_src,                \
+                                                 ptrdiff_t _srcstride,         \
                                                  int width, int height,        \
                                                  int16_t* mcbuffer)            \
 {                                                                              \
@@ -959,7 +977,10 @@ static void FUNC(put_hevc_epel_pixels)(int16_t *dst, ptrdiff_t dststride,
 }
 
 #define EPEL_FILTER(src, stride)                \
-    (filter_0 * src[x - stride] + filter_1 * src[x] + filter_2 * src[x + stride] + filter_3 * src[x + 2 * stride])
+    (filter_0 * src[x - stride] +               \
+     filter_1 * src[x]          +               \
+     filter_2 * src[x + stride] +               \
+     filter_3 * src[x + 2 * stride])
 
 static void FUNC(put_hevc_epel_h)(int16_t *dst, ptrdiff_t dststride,
                                   uint8_t *_src, ptrdiff_t _srcstride,
@@ -1162,9 +1183,9 @@ static void FUNC(weighted_pred_avg)(uint8_t denom,
 #define P3 pix[-4 * xstride]
 #define P2 pix[-3 * xstride]
 #define P1 pix[-2 * xstride]
-#define P0 pix[-xstride]
+#define P0 pix[-1 * xstride]
 #define Q0 pix[0]
-#define Q1 pix[xstride]
+#define Q1 pix[1 * xstride]
 #define Q2 pix[2 * xstride]
 #define Q3 pix[3 * xstride]
 
@@ -1172,9 +1193,9 @@ static void FUNC(weighted_pred_avg)(uint8_t denom,
 #define TP3 pix[-4 * xstride + 3 * ystride]
 #define TP2 pix[-3 * xstride + 3 * ystride]
 #define TP1 pix[-2 * xstride + 3 * ystride]
-#define TP0 pix[-xstride + 3 * ystride]
+#define TP0 pix[-1 * xstride + 3 * ystride]
 #define TQ0 pix[3 * ystride]
-#define TQ1 pix[xstride + 3 * ystride]
+#define TQ1 pix[1  * xstride + 3 * ystride]
 #define TQ2 pix[2  * xstride + 3 * ystride]
 #define TQ3 pix[3  * xstride + 3 * ystride]
 



More information about the ffmpeg-cvslog mailing list