View Issue Details
ID | Project | Category | View Status | Date Submitted | Last Update |
---|---|---|---|---|---|
0000247 | JVT JM H.264/AVC reference software | encoder | public | 2011-03-10 12:04 | 2011-03-10 12:04 |
Reporter | Diego F. de Souza | Assigned To | |||
Priority | normal | Severity | minor | Reproducibility | always |
Status | new | Resolution | open | ||
Product Version | JM 17.2 | ||||
Summary | 0000247: Setting a wrong coding state in submacroblock_mode_decision_p(b)_slice function in mode_decision_P8x8.c | ||||
Description | I believe there is a mistake in mode_decision_P8x8.c in the last part of submacroblock_mode_decision_p_slice and submacroblock_mode_decision_b_slice functions, which is shown below: //===== set the coding state after current block ===== //if (transform8x8 == 0 || block < 3) if (stored_state_8x8 == TRUE) currSlice->reset_coding_state (currMB, currSlice->p_RDO->cs_b8); else { currSlice->reset_coding_state (currMB, currSlice->p_RDO->cs_cm); update_adaptive_rounding_8x8(p_Vid, p_Inp, dataTr, fadjust); } I think currSlice->p_RDO->cs_b8 is only used when SubMBCodingState is set to 2 (highest complexity). However, when the JM17.2 is running on medium complexity (in other words, SubMBCodingState is set to 1) the submacroblok coding state should be reset to master coding state at the end of each block. So, I think the code should be changed to this: //===== set the coding state after current block ===== //if (transform8x8 == 0 || block < 3) if ((stored_state_8x8 == TRUE) && (p_Inp->subMBCodingState == 2)) currSlice->reset_coding_state (currMB, currSlice->p_RDO->cs_b8); else { currSlice->reset_coding_state (currMB, currSlice->p_RDO->cs_cm); update_adaptive_rounding_8x8(p_Vid, p_Inp, dataTr, fadjust); } | ||||
Additional Information | Without the suggested change and SubMBCodingState=1, the rate of the first mode in the next block will be calculated using the submacroblock coding state set to the best 8x8 coding state of the last 8x8 block (p_RDO->cs_tmp), and the rate of the next mode will be calculated using with the submacroblock coding state set to the master coding state (p_RDO->cs_cm), due to following lines: //--- re-set coding state as it was before coding with current mode was performed --- if (index != maxindex - 1) { if(p_Inp->subMBCodingState == 1) currSlice->reset_coding_state (currMB, currSlice->p_RDO->cs_cm); else if(p_Inp->subMBCodingState == 2) currSlice->reset_coding_state (currMB, currSlice->p_RDO->cs_tmp); | ||||
Tags | No tags attached. | ||||
Date Modified | Username | Field | Change |
---|---|---|---|
2011-03-10 12:04 | Diego F. de Souza | New Issue |