Changeset 1432 in SHVCSoftware for branches/SHM-dev/source/Lib/TLibDecoder
- Timestamp:
- 10 Aug 2015, 23:04:12 (10 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/SHM-dev/source/Lib/TLibDecoder/TDecCAVLC.cpp
r1425 r1432 3556 3556 { 3557 3557 UInt uiNumRefLayersM1; 3558 READ_UVLC( uiNumRefLayersM1 3558 READ_UVLC( uiNumRefLayersM1, "num_cm_ref_layers_minus1" ); 3559 3559 assert( uiNumRefLayersM1 <= 61 ); 3560 3560 for( UInt i = 0 ; i <= uiNumRefLayersM1 ; i++ ) 3561 3561 { 3562 3562 UInt uiRefLayerId; 3563 READ_CODE( 6 , uiRefLayerId, "cm_ref_layer_id" );3563 READ_CODE( 6, uiRefLayerId, "cm_ref_layer_id" ); 3564 3564 pc3DAsymLUT->addRefLayerId( uiRefLayerId ); 3565 3565 } … … 3567 3567 UInt uiCurOctantDepth, uiCurPartNumLog2, uiInputBitDepthM8, uiOutputBitDepthM8, uiResQaunBit, uiDeltaBits;; 3568 3568 3569 READ_CODE( 2 , uiCurOctantDepth, "cm_octant_depth" );3570 READ_CODE( 2 , uiCurPartNumLog2, "cm_y_part_num_log2" );3571 3572 UInt uiChromaInputBitDepthM8 3573 3574 READ_UVLC( uiInputBitDepthM8 3569 READ_CODE( 2, uiCurOctantDepth, "cm_octant_depth" ); 3570 READ_CODE( 2, uiCurPartNumLog2, "cm_y_part_num_log2" ); 3571 3572 UInt uiChromaInputBitDepthM8, uiChromaOutputBitDepthM8; 3573 3574 READ_UVLC( uiInputBitDepthM8, "cm_input_luma_bit_depth_minus8" ); 3575 3575 READ_UVLC( uiChromaInputBitDepthM8 , "cm_input_chroma_bit_depth_minus8" ); 3576 READ_UVLC( uiOutputBitDepthM8 3577 READ_UVLC( uiChromaOutputBitDepthM8 ,"cm_output_chroma_bit_depth_minus8" );3578 READ_CODE( 2 , uiResQaunBit, "cm_res_quant_bit" );3579 3580 READ_CODE( 2 , uiDeltaBits, "cm_flc_bits" );3576 READ_UVLC( uiOutputBitDepthM8, "cm_output_luma_bit_depth_minus8" ); 3577 READ_UVLC( uiChromaOutputBitDepthM8 "cm_output_chroma_bit_depth_minus8" ); 3578 READ_CODE( 2, uiResQaunBit, "cm_res_quant_bit" ); 3579 3580 READ_CODE( 2, uiDeltaBits, "cm_flc_bits" ); 3581 3581 pc3DAsymLUT->setDeltaBits(uiDeltaBits + 1); 3582 3582 … … 3587 3587 { 3588 3588 Int delta = 0; 3589 READ_SVLC( delta 3589 READ_SVLC( delta, "cm_adapt_threshold_u_delta" ); 3590 3590 nAdaptCThresholdU += delta; 3591 READ_SVLC( delta 3591 READ_SVLC( delta, "cm_adapt_threshold_v_delta" ); 3592 3592 nAdaptCThresholdV += delta; 3593 3593 } … … 3600 3600 pc3DAsymLUT->xInitCuboids(); 3601 3601 #endif 3602 xParse3DAsymLUTOctant( pc3DAsymLUT , 0 , 0 , 0 , 0, 1 << pc3DAsymLUT->getCurOctantDepth() );3602 xParse3DAsymLUTOctant( pc3DAsymLUT, 0, 0, 0, 0, 1 << pc3DAsymLUT->getCurOctantDepth() ); 3603 3603 #if R0164_CGS_LUT_BUGFIX_CHECK 3604 3604 printf("============= Before 'xCuboidsFilledCheck()': ================\n"); … … 3610 3610 } 3611 3611 3612 Void TDecCavlc::xParse3DAsymLUTOctant( TCom3DAsymLUT * pc3DAsymLUT , Int nDepth , Int yIdx , Int uIdx , Int vIdx, Int nLength )3612 Void TDecCavlc::xParse3DAsymLUTOctant( TCom3DAsymLUT * pc3DAsymLUT, Int nDepth, Int yIdx, Int uIdx, Int vIdx, Int nLength ) 3613 3613 { 3614 3614 UInt uiOctantSplit = nDepth < pc3DAsymLUT->getCurOctantDepth(); 3615 3615 if( nDepth < pc3DAsymLUT->getCurOctantDepth() ) 3616 READ_FLAG( uiOctantSplit , "split_octant_flag" ); 3616 { 3617 READ_FLAG( uiOctantSplit, "split_octant_flag" ); 3618 } 3617 3619 Int nYPartNum = 1 << pc3DAsymLUT->getCurYPartNumLog2(); 3620 3618 3621 if( uiOctantSplit ) 3619 3622 { … … 3625 3628 for( Int n = 0 ; n < 2 ; n++ ) 3626 3629 { 3627 xParse3DAsymLUTOctant( pc3DAsymLUT , nDepth + 1 , yIdx + l * nHalfLength * nYPartNum , uIdx + m * nHalfLength , vIdx + n * nHalfLength, nHalfLength );3630 xParse3DAsymLUTOctant( pc3DAsymLUT, nDepth + 1, yIdx + l * nHalfLength * nYPartNum, uIdx + m * nHalfLength, vIdx + n * nHalfLength, nHalfLength ); 3628 3631 } 3629 3632 } … … 3635 3638 nFLCbits = nFLCbits >= 0 ? nFLCbits:0; 3636 3639 3637 for( Int l = 0 ; l < nYPartNum; l++ )3640 for( Int l = 0; l < nYPartNum; l++ ) 3638 3641 { 3639 3642 Int shift = pc3DAsymLUT->getCurOctantDepth() - nDepth; 3640 3643 3641 for( Int nVertexIdx = 0 ; nVertexIdx < 4; nVertexIdx++ )3644 for( Int nVertexIdx = 0; nVertexIdx < 4; nVertexIdx++ ) 3642 3645 { 3643 3646 UInt uiCodeVertex = 0; 3644 Int deltaY = 0 , deltaU = 0 , deltaV = 0; 3645 READ_FLAG( uiCodeVertex , "coded_vertex_flag" ); 3647 Int deltaY = 0, deltaU = 0, deltaV = 0; 3648 3649 READ_FLAG( uiCodeVertex, "coded_vertex_flag" ); 3650 3646 3651 if( uiCodeVertex ) 3647 3652 { … … 3651 3656 } 3652 3657 3653 pc3DAsymLUT->setCuboidVertexResTree( yIdx + (l<<shift) , uIdx , vIdx , nVertexIdx , deltaY , deltaU, deltaV );3658 pc3DAsymLUT->setCuboidVertexResTree( yIdx + (l<<shift), uIdx, vIdx, nVertexIdx, deltaY, deltaU, deltaV ); 3654 3659 3655 3660 for( Int m = 1; m < (1<<shift); m++ ) 3656 3661 { 3657 pc3DAsymLUT->setCuboidVertexResTree( yIdx + (l<<shift) + m , uIdx , vIdx , nVertexIdx , 0 , 0, 0 );3662 pc3DAsymLUT->setCuboidVertexResTree( yIdx + (l<<shift) + m, uIdx, vIdx, nVertexIdx, 0, 0, 0 ); 3658 3663 #if R0164_CGS_LUT_BUGFIX_CHECK 3659 3664 pc3DAsymLUT->xSetFilled( yIdx + (l<<shift) + m , uIdx , vIdx ); … … 3672 3677 if( u!=0 || v!=0 ) 3673 3678 { 3674 for( Int y=0 ; y<nLength*nYPartNum; y++ )3679 for( Int y=0; y<nLength*nYPartNum; y++ ) 3675 3680 { 3676 for( Int nVertexIdx = 0 ; nVertexIdx < 4; nVertexIdx++ )3681 for( Int nVertexIdx = 0; nVertexIdx < 4; nVertexIdx++ ) 3677 3682 { 3678 pc3DAsymLUT->setCuboidVertexResTree( yIdx + y , uIdx + u , vIdx + v , nVertexIdx , 0 , 0, 0 );3683 pc3DAsymLUT->setCuboidVertexResTree( yIdx + y, uIdx + , vIdx + v, nVertexIdx, 0, 0, 0 ); 3679 3684 #if R0164_CGS_LUT_BUGFIX_CHECK 3680 pc3DAsymLUT->xSetFilled( yIdx + y , uIdx + u, vIdx + v );3685 pc3DAsymLUT->xSetFilled( yIdx + y, uIdx + u, vIdx + v ); 3681 3686 #endif 3682 3687 }
Note: See TracChangeset for help on using the changeset viewer.