diff --git a/source/Lib/TLibEncoder/TEncCavlc.cpp b/source/Lib/TLibEncoder/TEncCavlc.cpp
index 1bb6679..a459a81 100644
a
|
b
|
|
230 | 230 | WRITE_FLAG( pcPPS->getSliceHeaderExtensionPresentFlag() ? 1 : 0, "slice_segment_header_extension_present_flag"); |
231 | 231 | |
232 | 232 | Bool pps_extension_present_flag=false; |
233 | | Bool pps_extension_flags[NUM_PPS_EXTENSION_FLAGS]={false}; |
| 233 | Bool pps_extension_Xbits[NUM_PPS_EXTENSION_FLAGS]={false}; |
234 | 234 | |
235 | | pps_extension_flags[PPS_EXT__REXT] = ( |
| 235 | pps_extension_Xbits[PPS_EXT__REXT] = ( |
236 | 236 | ( pcPPS->getUseTransformSkip() && (pcPPS->getTransformSkipLog2MaxSize() != 2)) |
237 | 237 | || pcPPS->getUseCrossComponentPrediction() |
238 | 238 | || ( pcPPS->getChromaQpAdjTableSize() > 0 ) |
… |
… |
|
244 | 244 | |
245 | 245 | for(Int i=0; i<NUM_PPS_EXTENSION_FLAGS; i++) |
246 | 246 | { |
247 | | pps_extension_present_flag|=pps_extension_flags[i]; |
| 247 | pps_extension_present_flag|=pps_extension_Xbits[i]; |
248 | 248 | } |
249 | 249 | |
250 | 250 | WRITE_FLAG( (pps_extension_present_flag?1:0), "pps_extension_present_flag" ); |
251 | 251 | |
252 | 252 | if (pps_extension_present_flag) |
253 | 253 | { |
254 | | for(Int i=0; i<NUM_PPS_EXTENSION_FLAGS; i++) |
| 254 | |
| 255 | WRITE_FLAG( pps_extension_Xbits[0] ? 1:0, "pps_range_extensions_flag" ); |
| 256 | |
| 257 | for(Int i=1; i<NUM_PPS_EXTENSION_FLAGS; i++) |
255 | 258 | { |
256 | | WRITE_FLAG( pps_extension_flags[i]?1:0, "pps_extension_flag[]" ); |
| 259 | WRITE_FLAG( pps_extension_Xbits[i] ? 1:0, "pps_extension_7bits" ); |
257 | 260 | } |
258 | 261 | |
259 | 262 | for(Int i=0; i<NUM_PPS_EXTENSION_FLAGS; i++) // loop used so that the order is determined by the enum. |
260 | 263 | { |
261 | | if (pps_extension_flags[i]) |
| 264 | if (pps_extension_Xbits[i]) |
262 | 265 | { |
263 | 266 | switch (PPSExtensionFlagIndex(i)) |
264 | 267 | { |
… |
… |
|
565 | 568 | } |
566 | 569 | |
567 | 570 | Bool sps_extension_present_flag=false; |
568 | | Bool sps_extension_flags[NUM_SPS_EXTENSION_FLAGS]={false}; |
| 571 | Bool sps_extension_Xbits[NUM_SPS_EXTENSION_FLAGS]={false}; |
569 | 572 | |
570 | | sps_extension_flags[SPS_EXT__REXT] = ( |
| 573 | sps_extension_Xbits[SPS_EXT__REXT] = ( |
571 | 574 | pcSPS->getUseResidualRotation() |
572 | 575 | || pcSPS->getUseSingleSignificanceMapContext() |
573 | 576 | || pcSPS->getUseResidualDPCM(RDPCM_SIGNAL_IMPLICIT) |
… |
… |
|
583 | 586 | |
584 | 587 | for(Int i=0; i<NUM_SPS_EXTENSION_FLAGS; i++) |
585 | 588 | { |
586 | | sps_extension_present_flag|=sps_extension_flags[i]; |
| 589 | sps_extension_present_flag|=sps_extension_Xbits[i]; |
587 | 590 | } |
588 | 591 | |
589 | 592 | WRITE_FLAG( (sps_extension_present_flag?1:0), "sps_extension_present_flag" ); |
590 | 593 | |
591 | 594 | if (sps_extension_present_flag) |
592 | 595 | { |
593 | | for(Int i=0; i<NUM_SPS_EXTENSION_FLAGS; i++) |
| 596 | WRITE_FLAG( sps_extension_Xbits[0]?1:0, "sps_range_extensions_flag" ); |
| 597 | |
| 598 | for(Int i=1; i<NUM_SPS_EXTENSION_FLAGS; i++) |
594 | 599 | { |
595 | | WRITE_FLAG( sps_extension_flags[i]?1:0, "sps_extension_flag[]" ); |
| 600 | WRITE_FLAG( sps_extension_Xbits[i]?1:0, "sps_extension_flag[]" ); |
596 | 601 | } |
597 | 602 | |
598 | 603 | for(Int i=0; i<NUM_SPS_EXTENSION_FLAGS; i++) // loop used so that the order is determined by the enum. |
599 | 604 | { |
600 | | if (sps_extension_flags[i]) |
| 605 | if (sps_extension_Xbits[i]) |
601 | 606 | { |
602 | 607 | switch (SPSExtensionFlagIndex(i)) |
603 | 608 | { |