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.
(The previous version of this commit was originally made before
the commit adding support for main profile, which added a bunch
more similar issues.)
Change-Id: I0a927deb2ef4125f79429d108439e249fa531607
diff --git a/encoder/ih264e_me.c b/encoder/ih264e_me.c
index 12a6f55..a97df3d 100644
--- a/encoder/ih264e_me.c
+++ b/encoder/ih264e_me.c
@@ -241,6 +241,9 @@
WORD32 i4_srch_range_e = ps_me_ctxt->i4_srch_range_e;
WORD32 i4_srch_range_w = ps_me_ctxt->i4_srch_range_w;
+ /* num of candidate search candidates */
+ UWORD32 u4_num_candidates = 0;
+
ps_left_mv = &ps_proc->s_left_mb_pu_ME.s_me_info[i4_reflist].s_mv;
ps_top_mv = &(ps_proc->ps_top_row_pu_ME + i4_mb_x)->s_me_info[i4_reflist].s_mv;
ps_top_left_mv = &ps_proc->s_top_left_mb_pu_ME.s_me_info[i4_reflist].s_mv;
@@ -251,9 +254,6 @@
i4_top_left_mode = ps_proc->s_top_left_mb_pu_ME.b2_pred_mode != i4_cmpl_predmode;
i4_top_right_mode = (ps_proc->ps_top_row_pu_ME + i4_mb_x + 1)->b2_pred_mode != i4_cmpl_predmode;
- /* num of candidate search candidates */
- UWORD32 u4_num_candidates =0 ;
-
/* Taking the Zero motion vector as one of the candidates */
ps_me_ctxt->as_mv_init_search[i4_reflist][u4_num_candidates].i2_mvx = 0;
ps_me_ctxt->as_mv_init_search[i4_reflist][u4_num_candidates].i2_mvy = 0;
@@ -893,12 +893,12 @@
/* quantization parameters */
quant_params_t *ps_qp_params = ps_proc->ps_qp_params[0];
- /* Sad therholds */
- ps_me_ctxt->pu2_sad_thrsh = ps_qp_params->pu2_sad_thrsh;
-
/* Mb part ctxts for SKIP */
mb_part_ctxt s_skip_mbpart;
+ /* Sad therholds */
+ ps_me_ctxt->pu2_sad_thrsh = ps_qp_params->pu2_sad_thrsh;
+
{
WORD32 rows_above, rows_below, columns_left, columns_right;
@@ -1800,12 +1800,12 @@
/* quantization parameters */
quant_params_t *ps_qp_params = ps_proc->ps_qp_params[0];
- /* Sad therholds */
- ps_me_ctxt->pu2_sad_thrsh = ps_qp_params->pu2_sad_thrsh;
-
/* Mb part ctxts for SKIP */
mb_part_ctxt as_skip_mbpart[2];
+ /* Sad therholds */
+ ps_me_ctxt->pu2_sad_thrsh = ps_qp_params->pu2_sad_thrsh;
+
{
WORD32 rows_above, rows_below, columns_left, columns_right;