Reorder code to avoid reading uninitialized data

If the current slice isn't BSLICE, u1_weighted_bipred_idc is
uninitialized, which valgrind can complain about (mostly in uninitialized
builds). By reordering the conditions, we avoid doing conditional
jumps based on uninitialized data.

Change-Id: I4d601fd1a4e34d85fe5992ecb934ac3747953960
diff --git a/encoder/ih264e_encode_header.c b/encoder/ih264e_encode_header.c
index 6c96e63..cc81e1b 100644
--- a/encoder/ih264e_encode_header.c
+++ b/encoder/ih264e_encode_header.c
@@ -560,7 +560,7 @@
 
     if ((ps_pps->i1_weighted_pred_flag &&
                     (ps_slice_hdr->u1_slice_type == PSLICE || ps_slice_hdr->u1_slice_type == SPSLICE)) ||
-                    (ps_pps->i1_weighted_bipred_idc == 1 && ps_slice_hdr->u1_slice_type == BSLICE))
+                    (ps_slice_hdr->u1_slice_type == BSLICE && ps_pps->i1_weighted_bipred_idc == 1))
     {
         /* TODO_LATER: Currently there is no support for weighted prediction.
          This needs to be updated when the support is added */
@@ -1065,7 +1065,7 @@
 
     if ((ps_pps->i1_weighted_pred_flag &&
                     (ps_proc->i4_slice_type == PSLICE || ps_proc->i4_slice_type == SPSLICE)) ||
-                    (ps_pps->i1_weighted_bipred_idc == 1 && ps_proc->i4_slice_type == BSLICE))
+                    (ps_proc->i4_slice_type == BSLICE && ps_pps->i1_weighted_bipred_idc == 1))
     {
         /* TODO_LATER: Currently there is no support for weighted prediction.
              This needs to be updated when the support is added */