diff options
author | Emeric Grange <emeric.grange@gmail.com> | 2011-11-14 18:47:30 +0100 |
---|---|---|
committer | Emeric Grange <emeric.grange@gmail.com> | 2012-06-24 16:57:31 +0200 |
commit | 25fe06ff40e2e741e4a669efa563caa8d4d39c61 (patch) | |
tree | b91e29924bac44038efaf8f4bcaac3eb3a4367d9 | |
parent | c5ced1b56f6a0521c229d17b7706fadbb8a3d520 (diff) |
g3dvl: Another round of cosmetic cleanups
Signed-off-by: Emeric Grange <emeric.grange@gmail.com>
-rw-r--r-- | src/gallium/auxiliary/vl/vp8/common/entropymode.c | 6 | ||||
-rw-r--r-- | src/gallium/auxiliary/vl/vp8/common/findnearmv.c | 20 | ||||
-rw-r--r-- | src/gallium/auxiliary/vl/vp8/common/idctllm.c | 4 | ||||
-rw-r--r-- | src/gallium/auxiliary/vl/vp8/common/invtrans.c | 1 | ||||
-rw-r--r-- | src/gallium/auxiliary/vl/vp8/common/reconinter.c | 29 | ||||
-rw-r--r-- | src/gallium/auxiliary/vl/vp8/common/reconintra4x4.c | 4 | ||||
-rw-r--r-- | src/gallium/auxiliary/vl/vp8/common/yv12utils.c | 10 | ||||
-rw-r--r-- | src/gallium/auxiliary/vl/vp8/decoder/idct_blk.c | 16 |
8 files changed, 36 insertions, 54 deletions
diff --git a/src/gallium/auxiliary/vl/vp8/common/entropymode.c b/src/gallium/auxiliary/vl/vp8/common/entropymode.c index 309eb565c8..009cfe84eb 100644 --- a/src/gallium/auxiliary/vl/vp8/common/entropymode.c +++ b/src/gallium/auxiliary/vl/vp8/common/entropymode.c @@ -230,9 +230,9 @@ void vp8_kf_default_bmode_probs(vp8_prob p [VP8_BINTRAMODES] [VP8_BINTRAMODES] [ j = 0; do { - intra_bmode_probs_from_distribution( - p[i][j], branch_ct, vp8_kf_default_bmode_counts[i][j]); - + intra_bmode_probs_from_distribution(p[i][j], + branch_ct, + vp8_kf_default_bmode_counts[i][j]); } while (++j < VP8_BINTRAMODES); } diff --git a/src/gallium/auxiliary/vl/vp8/common/findnearmv.c b/src/gallium/auxiliary/vl/vp8/common/findnearmv.c index c66d2c284f..8c8a33b2e8 100644 --- a/src/gallium/auxiliary/vl/vp8/common/findnearmv.c +++ b/src/gallium/auxiliary/vl/vp8/common/findnearmv.c @@ -12,15 +12,17 @@ #include "findnearmv.h" const unsigned char vp8_mbsplit_offset[4][16] = { - { 0, 8, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}, - { 0, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}, - { 0, 2, 8, 10, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}, - { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15} + { 0, 8, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}, + { 0, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}, + { 0, 2, 8, 10, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}, + { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15} }; -/* Predict motion vectors using those from already-decoded nearby blocks. - Note that we only consider one 4x4 subblock from each candidate 16x16 - macroblock. */ +/** + * Predict motion vectors using those from already-decoded nearby blocks. + * Note that we only consider one 4x4 subblock from each candidate 16x16 + * macroblock. + */ void vp8_find_near_mvs(MACROBLOCKD *xd, const MODE_INFO *here, int_mv *nearest, @@ -138,9 +140,7 @@ void vp8_find_near_mvs(MACROBLOCKD *xd, vp8_clamp_mv2(best_mv, xd); } -vp8_prob *vp8_mv_ref_probs( - vp8_prob p[VP8_MVREFS-1], const int near_mv_ref_ct[4] -) +vp8_prob *vp8_mv_ref_probs(vp8_prob p[VP8_MVREFS-1], const int near_mv_ref_ct[4]) { p[0] = vp8_mode_contexts [near_mv_ref_ct[0]] [0]; p[1] = vp8_mode_contexts [near_mv_ref_ct[1]] [1]; diff --git a/src/gallium/auxiliary/vl/vp8/common/idctllm.c b/src/gallium/auxiliary/vl/vp8/common/idctllm.c index b21a03ded0..f155ee2e09 100644 --- a/src/gallium/auxiliary/vl/vp8/common/idctllm.c +++ b/src/gallium/auxiliary/vl/vp8/common/idctllm.c @@ -76,7 +76,6 @@ void vp8_short_idct4x4llm_c(short *input, short *output, int pitch) temp2 = (ip[3] * sinpi8sqrt2 + rounding) >> 16; d1 = temp1 + temp2; - op[0] = (a1 + d1 + 4) >> 3; op[3] = (a1 - d1 + 4) >> 3; @@ -106,7 +105,8 @@ void vp8_short_idct4x4llm_1_c(short *input, short *output, int pitch) } } -void vp8_dc_only_idct_add_c(short input_dc, unsigned char *pred_ptr, unsigned char *dst_ptr, int pitch, int stride) +void vp8_dc_only_idct_add_c(short input_dc, unsigned char *pred_ptr, + unsigned char *dst_ptr, int pitch, int stride) { int a1 = ((input_dc + 4) >> 3); int r, c; diff --git a/src/gallium/auxiliary/vl/vp8/common/invtrans.c b/src/gallium/auxiliary/vl/vp8/common/invtrans.c index 61c12ef527..8538126945 100644 --- a/src/gallium/auxiliary/vl/vp8/common/invtrans.c +++ b/src/gallium/auxiliary/vl/vp8/common/invtrans.c @@ -63,7 +63,6 @@ void vp8_inverse_transform_mb(const vp8_idct_rtcd_vtable_t *rtcd, MACROBLOCKD *x x->mode_info_context->mbmi.mode != SPLITMV) { /* do 2nd order transform on the dc block */ - IDCT_INVOKE(rtcd, iwalsh16)(&x->block[24].dqcoeff[0], x->block[24].diff); recon_dcblock(x); } diff --git a/src/gallium/auxiliary/vl/vp8/common/reconinter.c b/src/gallium/auxiliary/vl/vp8/common/reconinter.c index 8ba9d53cea..190c0203ed 100644 --- a/src/gallium/auxiliary/vl/vp8/common/reconinter.c +++ b/src/gallium/auxiliary/vl/vp8/common/reconinter.c @@ -14,17 +14,15 @@ #include "blockd.h" #include "reconinter.h" -/* use this define on systems where unaligned int reads and writes are - * not allowed, i.e. ARM architectures +/* Use this define on systems where unaligned int reads and writes are + * not allowed, i.e. ARM architectures. */ /*#define MUST_BE_ALIGNED*/ static const int bbb[4] = {0, 2, 8, 10}; -void vp8_copy_mem16x16_c(unsigned char *src, - int src_stride, - unsigned char *dst, - int dst_stride) +void vp8_copy_mem16x16_c(unsigned char *src, int src_stride, + unsigned char *dst, int dst_stride) { int r; @@ -47,7 +45,6 @@ void vp8_copy_mem16x16_c(unsigned char *src, dst[13] = src[13]; dst[14] = src[14]; dst[15] = src[15]; - #else ((int *)dst)[0] = ((int *)src)[0] ; ((int *)dst)[1] = ((int *)src)[1] ; @@ -59,10 +56,8 @@ void vp8_copy_mem16x16_c(unsigned char *src, } } -void vp8_copy_mem8x8_c(unsigned char *src, - int src_stride, - unsigned char *dst, - int dst_stride) +void vp8_copy_mem8x8_c(unsigned char *src, int src_stride, + unsigned char *dst, int dst_stride) { int r; @@ -86,10 +81,8 @@ void vp8_copy_mem8x8_c(unsigned char *src, } } -void vp8_copy_mem8x4_c(unsigned char *src, - int src_stride, - unsigned char *dst, - int dst_stride) +void vp8_copy_mem8x4_c(unsigned char *src, int src_stride, + unsigned char *dst, int dst_stride) { int r; @@ -186,7 +179,6 @@ static void build_inter_predictors2b(MACROBLOCKD *x, BLOCKD *d, int pitch) } } - void vp8_build_inter16x16_predictors_mb(MACROBLOCKD *x, unsigned char *dst_y, unsigned char *dst_u, @@ -232,7 +224,6 @@ void vp8_build_inter16x16_predictors_mb(MACROBLOCKD *x, RECON_INVOKE(&x->rtcd->recon, copy8x8)(uptr, pre_stride, dst_u, dst_uvstride); RECON_INVOKE(&x->rtcd->recon, copy8x8)(vptr, pre_stride, dst_v, dst_uvstride); } - } void vp8_build_inter4x4_predictors_mb(MACROBLOCKD *x) @@ -261,9 +252,7 @@ void vp8_build_inter4x4_predictors_mb(MACROBLOCKD *x) vp8_build_inter_predictors_b(d0, 16, x->subpixel_predict); vp8_build_inter_predictors_b(d1, 16, x->subpixel_predict); } - } - } for (i = 16; i < 24; i += 2) @@ -281,7 +270,6 @@ void vp8_build_inter4x4_predictors_mb(MACROBLOCKD *x) } } - void vp8_build_inter_predictors_mb(MACROBLOCKD *x) { if (x->mode_info_context->mbmi.mode != SPLITMV) @@ -295,7 +283,6 @@ void vp8_build_inter_predictors_mb(MACROBLOCKD *x) } } - void vp8_build_uvmvs(MACROBLOCKD *x, int fullpixel) { int i, j; diff --git a/src/gallium/auxiliary/vl/vp8/common/reconintra4x4.c b/src/gallium/auxiliary/vl/vp8/common/reconintra4x4.c index 2416ff5e6d..fbdbdaf623 100644 --- a/src/gallium/auxiliary/vl/vp8/common/reconintra4x4.c +++ b/src/gallium/auxiliary/vl/vp8/common/reconintra4x4.c @@ -78,7 +78,7 @@ void vp8_intra4x4_predict(BLOCKD *x, int b_mode, unsigned char *predictor) case B_VE_PRED: { unsigned int ap[4]; - ap[0] = (top_left + 2 * Above[0] + Above[1] + 2) >> 2; + ap[0] = (top_left + 2 * Above[0] + Above[1] + 2) >> 2; ap[1] = (Above[0] + 2 * Above[1] + Above[2] + 2) >> 2; ap[2] = (Above[1] + 2 * Above[2] + Above[3] + 2) >> 2; ap[3] = (Above[2] + 2 * Above[3] + Above[4] + 2) >> 2; @@ -93,7 +93,6 @@ void vp8_intra4x4_predict(BLOCKD *x, int b_mode, unsigned char *predictor) predictor += 16; } - } break; @@ -283,7 +282,6 @@ void vp8_intra4x4_predict(BLOCKD *x, int b_mode, unsigned char *predictor) predictor[3 * 16 + 3] = pp[3]; } break; - } } diff --git a/src/gallium/auxiliary/vl/vp8/common/yv12utils.c b/src/gallium/auxiliary/vl/vp8/common/yv12utils.c index 345189169a..8132d92107 100644 --- a/src/gallium/auxiliary/vl/vp8/common/yv12utils.c +++ b/src/gallium/auxiliary/vl/vp8/common/yv12utils.c @@ -12,8 +12,7 @@ #include "../vp8_mem.h" #include "yv12utils.h" -int -vp8_yv12_de_alloc_frame_buffer(YV12_BUFFER_CONFIG *ybf) +int vp8_yv12_de_alloc_frame_buffer(YV12_BUFFER_CONFIG *ybf) { if (ybf) { @@ -32,8 +31,8 @@ vp8_yv12_de_alloc_frame_buffer(YV12_BUFFER_CONFIG *ybf) return 0; } -int -vp8_yv12_alloc_frame_buffer(YV12_BUFFER_CONFIG *ybf, int width, int height, int border) +int vp8_yv12_alloc_frame_buffer(YV12_BUFFER_CONFIG *ybf, + int width, int height, int border) { if (ybf) { @@ -86,8 +85,7 @@ vp8_yv12_alloc_frame_buffer(YV12_BUFFER_CONFIG *ybf, int width, int height, int return 0; } -void -vp8_yv12_extend_frame_borders(YV12_BUFFER_CONFIG *ybf) +void vp8_yv12_extend_frame_borders(YV12_BUFFER_CONFIG *ybf) { int i; unsigned char *src_ptr1, *src_ptr2; diff --git a/src/gallium/auxiliary/vl/vp8/decoder/idct_blk.c b/src/gallium/auxiliary/vl/vp8/decoder/idct_blk.c index 6219277e7e..ef67757b6a 100644 --- a/src/gallium/auxiliary/vl/vp8/decoder/idct_blk.c +++ b/src/gallium/auxiliary/vl/vp8/decoder/idct_blk.c @@ -32,9 +32,9 @@ void vp8_dequant_dc_idct_add_y_block_c(short *q, short *dq, unsigned char *pre, for (j = 0; j < 4; j++) { if (*eobs++ > 1) - vp8_dequant_dc_idct_add_c (q, dq, pre, dst, 16, stride, dc[0]); + vp8_dequant_dc_idct_add_c(q, dq, pre, dst, 16, stride, dc[0]); else - vp8_dc_only_idct_add_c (dc[0], pre, dst, 16, stride); + vp8_dc_only_idct_add_c(dc[0], pre, dst, 16, stride); q += 16; pre += 4; @@ -57,10 +57,10 @@ void vp8_dequant_idct_add_y_block_c(short *q, short *dq, unsigned char *pre, for (j = 0; j < 4; j++) { if (*eobs++ > 1) - vp8_dequant_idct_add_c (q, dq, pre, dst, 16, stride); + vp8_dequant_idct_add_c(q, dq, pre, dst, 16, stride); else { - vp8_dc_only_idct_add_c (q[0]*dq[0], pre, dst, 16, stride); + vp8_dc_only_idct_add_c(q[0]*dq[0], pre, dst, 16, stride); ((int *)q)[0] = 0; } @@ -85,10 +85,10 @@ void vp8_dequant_idct_add_uv_block_c(short *q, short *dq, unsigned char *pre, for (j = 0; j < 2; j++) { if (*eobs++ > 1) - vp8_dequant_idct_add_c (q, dq, pre, dstu, 8, stride); + vp8_dequant_idct_add_c(q, dq, pre, dstu, 8, stride); else { - vp8_dc_only_idct_add_c (q[0]*dq[0], pre, dstu, 8, stride); + vp8_dc_only_idct_add_c(q[0]*dq[0], pre, dstu, 8, stride); ((int *)q)[0] = 0; } @@ -106,10 +106,10 @@ void vp8_dequant_idct_add_uv_block_c(short *q, short *dq, unsigned char *pre, for (j = 0; j < 2; j++) { if (*eobs++ > 1) - vp8_dequant_idct_add_c (q, dq, pre, dstv, 8, stride); + vp8_dequant_idct_add_c(q, dq, pre, dstv, 8, stride); else { - vp8_dc_only_idct_add_c (q[0]*dq[0], pre, dstv, 8, stride); + vp8_dc_only_idct_add_c(q[0]*dq[0], pre, dstv, 8, stride); ((int *)q)[0] = 0; } |