summaryrefslogtreecommitdiffstats
path: root/common
diff options
context:
space:
mode:
authorMartin Storsjo <martin@martin.st>2015-06-13 00:35:01 +0300
committerMarco Nelissen <marcone@google.com>2015-06-25 08:25:58 -0700
commit086dd8ea90eaf4ead8b4927e777b1c8a19bd23a9 (patch)
tree06f96f8afacd74f18093767da8e7e8ea5bf0ce00 /common
parent4adb9f492336cd3f6204201eac52b29166179cb4 (diff)
downloadandroid_external_libavc-086dd8ea90eaf4ead8b4927e777b1c8a19bd23a9.tar.gz
android_external_libavc-086dd8ea90eaf4ead8b4927e777b1c8a19bd23a9.tar.bz2
android_external_libavc-086dd8ea90eaf4ead8b4927e777b1c8a19bd23a9.zip
Don't declare variables after statements
This fixes building with compilers that are strict about the pre-C99 rule about having all variable declarations before statements. Change-Id: I06dd0cc42a6dbe90025c3c913a0c8d9ffb0acbcb
Diffstat (limited to 'common')
-rw-r--r--common/ih264_chroma_intra_pred_filters.c2
-rw-r--r--common/x86/ih264_inter_pred_filters_ssse3.c10
-rw-r--r--common/x86/ih264_iquant_itrans_recon_dc_ssse3.c26
3 files changed, 22 insertions, 16 deletions
diff --git a/common/ih264_chroma_intra_pred_filters.c b/common/ih264_chroma_intra_pred_filters.c
index ee145e5..1894bfc 100644
--- a/common/ih264_chroma_intra_pred_filters.c
+++ b/common/ih264_chroma_intra_pred_filters.c
@@ -117,7 +117,6 @@ void ih264_intra_pred_chroma_8x8_mode_dc(UWORD8 *pu1_src,
WORD32 top_avail; /* availability of top predictors (only for DC) */
UWORD8 *pu1_left = NULL; /* Pointer to start of left predictors */
UWORD8 *pu1_top = NULL; /* Pointer to start of top predictors */
- UNUSED(src_strd);
/* temporary variables to store accumulated first left half,second left half,
* first top half,second top half of U and V values*/
@@ -127,6 +126,7 @@ void ih264_intra_pred_chroma_8x8_mode_dc(UWORD8 *pu1_src,
WORD32 val_u1 = 0, val_u2 = 0, val_v1 = 0, val_v2 = 0;
WORD32 col, row; /*loop variables*/
+ UNUSED(src_strd);
left_avail = ngbr_avail & 0x11;
left_avail1 = ngbr_avail & 1;
diff --git a/common/x86/ih264_inter_pred_filters_ssse3.c b/common/x86/ih264_inter_pred_filters_ssse3.c
index c8537da..480a8c7 100644
--- a/common/x86/ih264_inter_pred_filters_ssse3.c
+++ b/common/x86/ih264_inter_pred_filters_ssse3.c
@@ -1171,8 +1171,6 @@ void ih264_inter_pred_luma_horz_hpel_vert_hpel_ssse3(UWORD8 *pu1_src,
// Horizontal 6-tap filtering
{
- ht_tmp = ht + 5;
-
__m128i src_r0_16x8b, src_r1_16x8b, src_r0_sht_16x8b, src_r1_sht_16x8b;
__m128i src_r0_t1_16x8b, src_r1_t1_16x8b;
@@ -1181,6 +1179,8 @@ void ih264_inter_pred_luma_horz_hpel_vert_hpel_ssse3(UWORD8 *pu1_src,
__m128i coeff0_1_16x8b, coeff2_3_16x8b, coeff4_5_16x8b;
+ ht_tmp = ht + 5;
+
coeff0_1_16x8b = _mm_set1_epi32(0xFB01FB01); //c0 c1 c0 c1 c0 c1 c0 c1 c0 c1 c0 c1 c0 c1 c0 c1
coeff2_3_16x8b = _mm_set1_epi32(0x14141414); //c2 c3 c2 c3 c2 c3 c2 c3 c2 c3 c2 c3 c2 c3 c2 c3
coeff4_5_16x8b = _mm_set1_epi32(0x01FB01FB); //c4 c5 c5 c5 c4 c5 c5 c5 c4 c5 c5 c5 c4 c5 c5 c5
@@ -2121,6 +2121,9 @@ void ih264_inter_pred_luma_horz_qpel_vert_qpel_ssse3(UWORD8 *pu1_src,
UWORD8 *pu1_tmp1, *pu1_tmp2;
WORD32 x_offset, y_offset;
+ __m128i coeff0_1_16x8b, coeff2_3_16x8b, coeff4_5_16x8b;
+ __m128i const_val16_8x16b;
+
pu1_tmp1 = pu1_tmp;
dydx &= 0xf;
@@ -2133,9 +2136,6 @@ void ih264_inter_pred_luma_horz_qpel_vert_qpel_ssse3(UWORD8 *pu1_src,
pu1_pred_horiz = pu1_src + (y_offset >> 1) * src_strd - 2;
//the filter input starts from x[-2] (till x[3])
- __m128i coeff0_1_16x8b, coeff2_3_16x8b, coeff4_5_16x8b;
- __m128i const_val16_8x16b;
-
coeff0_1_16x8b = _mm_set1_epi32(0xFB01FB01); //c0 c1 c0 c1 c0 c1 c0 c1 c0 c1 c0 c1 c0 c1 c0 c1
coeff2_3_16x8b = _mm_set1_epi32(0x14141414); //c2 c3 c2 c3 c2 c3 c2 c3 c2 c3 c2 c3 c2 c3 c2 c3
coeff4_5_16x8b = _mm_set1_epi32(0x01FB01FB); //c4 c5 c5 c5 c4 c5 c5 c5 c4 c5 c5 c5 c4 c5 c5 c5
diff --git a/common/x86/ih264_iquant_itrans_recon_dc_ssse3.c b/common/x86/ih264_iquant_itrans_recon_dc_ssse3.c
index 83a23ac..bcfe503 100644
--- a/common/x86/ih264_iquant_itrans_recon_dc_ssse3.c
+++ b/common/x86/ih264_iquant_itrans_recon_dc_ssse3.c
@@ -113,6 +113,13 @@ void ih264_iquant_itrans_recon_4x4_dc_ssse3(WORD16 *pi2_src,
UWORD32 *pu4_out = (UWORD32 *)pu1_out;
WORD32 q0 = pi2_src[0];
WORD16 i_macro, rnd_fact = (u4_qp_div_6 < 4) ? 1 << (3 - u4_qp_div_6) : 0;
+
+ __m128i predload_r,pred_r0, pred_r1, pred_r2, pred_r3;
+ __m128i sign_reg;
+ __m128i zero_8x16b = _mm_setzero_si128(); // all bits reset to zero
+ __m128i temp4, temp5, temp6, temp7;
+ __m128i value_add;
+
UNUSED (pi2_tmp);
INV_QUANT(q0, pu2_iscal_mat[0], pu2_weigh_mat[0], u4_qp_div_6, rnd_fact, 4);
@@ -122,11 +129,7 @@ void ih264_iquant_itrans_recon_4x4_dc_ssse3(WORD16 *pi2_src,
i_macro = ((q0 + 32) >> 6);
- __m128i predload_r,pred_r0, pred_r1, pred_r2, pred_r3;
- __m128i sign_reg;
- __m128i zero_8x16b = _mm_setzero_si128(); // all bits reset to zero
- __m128i temp4, temp5, temp6, temp7;
- __m128i value_add = _mm_set1_epi16(i_macro);
+ value_add = _mm_set1_epi16(i_macro);
zero_8x16b = _mm_setzero_si128(); // all bits reset to zero
//Load pred buffer
@@ -235,6 +238,13 @@ void ih264_iquant_itrans_recon_8x8_dc_ssse3 (WORD16 *pi2_src,
{
WORD32 q0 = pi2_src[0];
WORD16 i_macro, rnd_fact = (qp_div < 6) ? 1 << (5 - qp_div) : 0;
+
+ __m128i predload_r,pred_r0, pred_r1, pred_r2, pred_r3,pred_r4,pred_r5,pred_r6,pred_r7;
+ __m128i sign_reg;
+ __m128i zero_8x16b = _mm_setzero_si128(); // all bits reset to zero
+ __m128i temp1,temp2,temp3,temp4, temp5, temp6, temp7,temp8;
+ __m128i value_add;
+
UNUSED (pi2_tmp);
UNUSED (iq_start_idx);
UNUSED (pi2_dc_ld_addr);
@@ -242,11 +252,7 @@ void ih264_iquant_itrans_recon_8x8_dc_ssse3 (WORD16 *pi2_src,
INV_QUANT(q0, pu2_iscale_mat[0], pu2_weigh_mat[0], qp_div, rnd_fact, 6);
i_macro = ((q0 + 32) >> 6);
- __m128i predload_r,pred_r0, pred_r1, pred_r2, pred_r3,pred_r4,pred_r5,pred_r6,pred_r7;
- __m128i sign_reg;
- __m128i zero_8x16b = _mm_setzero_si128(); // all bits reset to zero
- __m128i temp1,temp2,temp3,temp4, temp5, temp6, temp7,temp8;
- __m128i value_add = _mm_set1_epi16(i_macro);
+ value_add = _mm_set1_epi16(i_macro);
//Load pred buffer row 0
predload_r = _mm_loadl_epi64((__m128i *)(&pu1_pred[0])); //p0 p1 p2 p3 p4 p5 p6 p7 0 0 0 0 0 0 0 0 -- all 8 bits