View Issue Details
ID | Project | Category | View Status | Date Submitted | Last Update |
---|---|---|---|---|---|
0000298 | JVT JM H.264/AVC reference software | decoder | public | 2012-04-16 12:15 | 2013-03-28 19:49 |
Reporter | Jianjun | Assigned To | Karsten Suehring | ||
Priority | normal | Severity | minor | Reproducibility | always |
Status | feedback | Resolution | reopened | ||
Fixed in Version | JM 18.4 | ||||
Summary | 0000298: YUV420 Lossless CAVLC decoding has problem | ||||
Description | In JM18.3 read_comp_cavlc.c read_CBP_and_coeffs_from_NAL_CAVLC_420(): if (smb || (currMB->is_lossless == TRUE)) // check to see if MB type is SPred or SIntra4x4 { currSlice->cof[PLANE_U + uv][0][0] = currSlice->cofu[0]; currSlice->cof[PLANE_U + uv][4][0] = currSlice->cofu[1]; currSlice->cof[PLANE_U + uv][0][4] = currSlice->cofu[2]; currSlice->cof[PLANE_U + uv][4][4] = currSlice->cofu[3]; //currSlice->fcf[PLANE_U + uv][0][0] = currSlice->cofu[0]; //currSlice->fcf[PLANE_U + uv][4][0] = currSlice->cofu[1]; //currSlice->fcf[PLANE_U + uv][0][4] = currSlice->cofu[2]; //currSlice->fcf[PLANE_U + uv][4][4] = currSlice->cofu[3]; } It has a index typo, it should be: if (smb || (currMB->is_lossless == TRUE)) // check to see if MB type is SPred or SIntra4x4 { currSlice->cof[PLANE_U + uv][0][0] = currSlice->cofu[0]; currSlice->cof[PLANE_U + uv][0][4] = currSlice->cofu[1]; currSlice->cof[PLANE_U + uv][4][0] = currSlice->cofu[2]; currSlice->cof[PLANE_U + uv][4][4] = currSlice->cofu[3]; //currSlice->fcf[PLANE_U + uv][0][0] = currSlice->cofu[0]; //currSlice->fcf[PLANE_U + uv][4][0] = currSlice->cofu[1]; //currSlice->fcf[PLANE_U + uv][0][4] = currSlice->cofu[2]; //currSlice->fcf[PLANE_U + uv][4][4] = currSlice->cofu[3]; } It is correct in JM17.0, should be wrongly updated in later version, and CABAC path is correct. | ||||
Tags | No tags attached. | ||||
|
|
|
Have attached the bitstream, the decoded uv plane is in mess. |
|
Add another two issues: 1) In block.c iTransform(...), it will call itrans4x4_ls(...), there is no valid data in currSlice->mb_rres[ ]. 2) In read_comp_cavlc.c read_CBP_and_coeffs_from_NAL_CAVLC_420(...), read_comp_coeff_4x4_CAVLC/read_comp_coeff_8x8_CAVLC fuction pointer is not updated by mb level, this means it can not handle Lossless/Lossy mb switch. Adding set_read_comp_coeff_cavlc(currMB) before read_comp_coeff_xxx_CAVLC() can solve this issue. |
|
I applied the suggested fix to the current dev branch |
|
while fixing the first issue, I did not see the addtional issues in the comments. these should be filed a singe bugs. trying to reopen the issue |
|
On the second error rerported, the observation is correct. It seems that the easiest place where to add the set functions (both for CAVLC and CABAC) are in void update_qp(Macroblock *currMB, int qp). Basically the function would look like this: void update_qp(Macroblock *currMB, int qp) { VideoParameters *p_Vid = currMB->p_Vid; currMB->qp = qp; currMB->qp_scaled[0] = qp + p_Vid->bitdepth_luma_qp_scale; set_chroma_qp(currMB); currMB->is_lossless = (Boolean) ((currMB->qp_scaled[0] == 0) && (p_Vid->lossless_qpprime_flag == 1)); set_read_comp_coeff_cavlc(currMB); set_read_comp_coeff_cabac(currMB); } |
Date Modified | Username | Field | Change |
---|---|---|---|
2012-04-16 12:15 | Jianjun | New Issue | |
2012-04-20 09:00 | Jianjun | File Added: test.264 | |
2012-04-20 09:14 | Jianjun | Note Added: 0000529 | |
2012-05-11 03:49 | Jianjun | Note Added: 0000530 | |
2012-07-19 18:08 | Karsten Suehring | Note Added: 0000555 | |
2012-07-19 18:08 | Karsten Suehring | Status | new => resolved |
2012-07-19 18:08 | Karsten Suehring | Fixed in Version | => JM 18.4 |
2012-07-19 18:08 | Karsten Suehring | Resolution | open => fixed |
2012-07-19 18:08 | Karsten Suehring | Assigned To | => Karsten Suehring |
2012-07-19 18:12 | Karsten Suehring | Note Added: 0000556 | |
2012-07-19 18:12 | Karsten Suehring | Status | resolved => feedback |
2012-07-19 18:12 | Karsten Suehring | Resolution | fixed => reopened |
2013-03-28 19:49 | Alexis Michael Tourapis | Note Added: 0000564 |