Ticket #1193: bp_sei_fix.patch
File bp_sei_fix.patch, 2.4 KB (added by o.nakagami, 9 years ago) |
---|
-
source/Lib/TLibDecoder/SEIread.cpp
444 444 { 445 445 READ_FLAG( code, "rap_cpb_params_present_flag" ); sei.m_rapCpbParamsPresentFlag = code; 446 446 } 447 if( sei.m_rapCpbParamsPresentFlag ) 448 { 449 READ_CODE( pHRD->getCpbRemovalDelayLengthMinus1() + 1, code, "cpb_delay_offset" ); sei.m_cpbDelayOffset = code; 450 READ_CODE( pHRD->getDpbOutputDelayLengthMinus1() + 1, code, "dpb_delay_offset" ); sei.m_dpbDelayOffset = code; 451 } 447 452 //read splicing flag and cpb_removal_delay_delta 448 453 READ_FLAG( code, "concatenation_flag"); 449 454 sei.m_concatenationFlag = code; 450 455 READ_CODE( ( pHRD->getCpbRemovalDelayLengthMinus1() + 1 ), code, "au_cpb_removal_delay_delta_minus1" ); 451 456 sei.m_auCpbRemovalDelayDelta = code + 1; 452 if( sei.m_rapCpbParamsPresentFlag )453 {454 READ_CODE( pHRD->getCpbRemovalDelayLengthMinus1() + 1, code, "cpb_delay_offset" ); sei.m_cpbDelayOffset = code;455 READ_CODE( pHRD->getDpbOutputDelayLengthMinus1() + 1, code, "dpb_delay_offset" ); sei.m_dpbDelayOffset = code;456 }457 457 for( nalOrVcl = 0; nalOrVcl < 2; nalOrVcl ++ ) 458 458 { 459 459 if( ( ( nalOrVcl == 0 ) && ( pHRD->getNalHrdParametersPresentFlag() ) ) || -
source/Lib/TLibEncoder/SEIwrite.cpp
308 308 { 309 309 WRITE_FLAG( sei.m_rapCpbParamsPresentFlag, "rap_cpb_params_present_flag" ); 310 310 } 311 WRITE_FLAG( sei.m_concatenationFlag, "concatenation_flag");312 WRITE_CODE( sei.m_auCpbRemovalDelayDelta - 1, ( hrd->getCpbRemovalDelayLengthMinus1() + 1 ), "au_cpb_removal_delay_delta_minus1" );313 311 if( sei.m_rapCpbParamsPresentFlag ) 314 312 { 315 313 WRITE_CODE( sei.m_cpbDelayOffset, hrd->getCpbRemovalDelayLengthMinus1() + 1, "cpb_delay_offset" ); 316 314 WRITE_CODE( sei.m_dpbDelayOffset, hrd->getDpbOutputDelayLengthMinus1() + 1, "dpb_delay_offset" ); 317 315 } 316 WRITE_FLAG( sei.m_concatenationFlag, "concatenation_flag"); 317 WRITE_CODE( sei.m_auCpbRemovalDelayDelta - 1, ( hrd->getCpbRemovalDelayLengthMinus1() + 1 ), "au_cpb_removal_delay_delta_minus1" ); 318 318 for( nalOrVcl = 0; nalOrVcl < 2; nalOrVcl ++ ) 319 319 { 320 320 if( ( ( nalOrVcl == 0 ) && ( hrd->getNalHrdParametersPresentFlag() ) ) ||