Don't use side effects in the macro PUT_BITS_SEV parameters
If ENTROPY_TRACE is defined, the value parameter gets evaluated twice. Since this parameter includes ++, the pointer gets incremented twice. This fixes encoding with trace enabled. Bug: 22860270 Change-Id: I3d71ac33d007301e488d264a33c7b5c4d4ff2b56
This commit is contained in:
parent
dbe9ac8936
commit
bbc83b16b9
1 changed files with 8 additions and 4 deletions
|
|
@ -1718,13 +1718,17 @@ IH264E_ERROR_T ih264e_write_bslice_mb_cavlc(entropy_ctxt_t *ps_ent_ctxt)
|
|||
{
|
||||
if (i4_mb_part_pred_mode != PRED_L1)/* || PRED_BI */
|
||||
{
|
||||
PUT_BITS_SEV(ps_bitstream, *pi2_mvd_ptr++, error_status, "mv l0 x");
|
||||
PUT_BITS_SEV(ps_bitstream, *pi2_mvd_ptr++, error_status, "mv l0 y");
|
||||
PUT_BITS_SEV(ps_bitstream, *pi2_mvd_ptr, error_status, "mv l0 x");
|
||||
pi2_mvd_ptr++;
|
||||
PUT_BITS_SEV(ps_bitstream, *pi2_mvd_ptr, error_status, "mv l0 y");
|
||||
pi2_mvd_ptr++;
|
||||
}
|
||||
if (i4_mb_part_pred_mode != PRED_L0)/* || PRED_BI */
|
||||
{
|
||||
PUT_BITS_SEV(ps_bitstream, *pi2_mvd_ptr++, error_status, "mv l1 x");
|
||||
PUT_BITS_SEV(ps_bitstream, *pi2_mvd_ptr++, error_status, "mv l1 y");
|
||||
PUT_BITS_SEV(ps_bitstream, *pi2_mvd_ptr, error_status, "mv l1 x");
|
||||
pi2_mvd_ptr++;
|
||||
PUT_BITS_SEV(ps_bitstream, *pi2_mvd_ptr, error_status, "mv l1 y");
|
||||
pi2_mvd_ptr++;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue