Changeset 971 in SHVCSoftware


Ignore:
Timestamp:
8 Jan 2015, 02:55:21 (10 years ago)
Author:
seregin
Message:

fix for the ticket #45

Location:
branches/SHM-dev/source/Lib
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • branches/SHM-dev/source/Lib/TLibDecoder/TDecCAVLC.cpp

    r966 r971  
    42194219
    42204220#if MULTIPLE_PTL_SUPPORT
    4221   READ_FLAG(    uiCode, "general_max_12bit_constraint_flag" ); assert (uiCode == 1);
    4222   READ_FLAG(    uiCode, "general_max_10bit_constraint_flag" ); assert (uiCode == 1);
    4223   READ_FLAG(    uiCode, "general_max_8bit_constraint_flag"  ); ptl->setProfileIdc  ((uiCode) ? Profile::SCALABLEMAIN : Profile::SCALABLEMAIN10);
    4224   READ_FLAG(    uiCode, "general_max_422chroma_constraint_flag"  ); assert (uiCode == 1);
    4225   READ_FLAG(    uiCode, "general_max_420chroma_constraint_flag"  ); assert (uiCode == 1);
    4226   READ_FLAG(    uiCode, "general_max_monochrome_constraint_flag" ); assert (uiCode == 0);
    4227   READ_FLAG(    uiCode, "general_intra_constraint_flag"); assert (uiCode == 0);
    4228   READ_FLAG(    uiCode, "general_one_picture_only_constraint_flag"); assert (uiCode == 0);
    4229   READ_FLAG(    uiCode, "general_lower_bit_rate_constraint_flag"); assert (uiCode == 1);
    4230   READ_CODE(16, uiCode, "XXX_reserved_zero_35bits[0..15]");
    4231   READ_CODE(16, uiCode, "XXX_reserved_zero_35bits[16..31]");
    4232   READ_CODE(3,  uiCode, "XXX_reserved_zero_35bits[32..34]");
     4221  if( ptl->getProfileIdc() == 4 || ptl->getProfileCompatibilityFlag(4) ||
     4222      ptl->getProfileIdc() == 5 || ptl->getProfileCompatibilityFlag(5) ||
     4223      ptl->getProfileIdc() == 6 || ptl->getProfileCompatibilityFlag(6) ||
     4224      ptl->getProfileIdc() == 7 || ptl->getProfileCompatibilityFlag(7)    )
     4225  {
     4226    READ_FLAG(    uiCode, "general_max_12bit_constraint_flag" ); assert (uiCode == 1);
     4227    READ_FLAG(    uiCode, "general_max_10bit_constraint_flag" ); assert (uiCode == 1);
     4228    READ_FLAG(    uiCode, "general_max_8bit_constraint_flag"  ); ptl->setProfileIdc  ((uiCode) ? Profile::SCALABLEMAIN : Profile::SCALABLEMAIN10);
     4229    READ_FLAG(    uiCode, "general_max_422chroma_constraint_flag"  ); assert (uiCode == 1);
     4230    READ_FLAG(    uiCode, "general_max_420chroma_constraint_flag"  ); assert (uiCode == 1);
     4231    READ_FLAG(    uiCode, "general_max_monochrome_constraint_flag" ); assert (uiCode == 0);
     4232    READ_FLAG(    uiCode, "general_intra_constraint_flag"); assert (uiCode == 0);
     4233    READ_FLAG(    uiCode, "general_one_picture_only_constraint_flag"); assert (uiCode == 0);
     4234    READ_FLAG(    uiCode, "general_lower_bit_rate_constraint_flag"); assert (uiCode == 1);
     4235    READ_CODE(32, uiCode, "general_reserved_zero_34bits");  READ_CODE(2, uiCode, "general_reserved_zero_34bits");
     4236  }
     4237  else
     4238  {
     4239    READ_CODE(32,  uiCode, "general_reserved_zero_43bits");  READ_CODE(11,  uiCode, "general_reserved_zero_43bits");
     4240  }
     4241
     4242  if( ( ptl->getProfileIdc() >= 1 && ptl->getProfileIdc() <= 5 ) ||
     4243      ptl->getProfileCompatibilityFlag(1) || ptl->getProfileCompatibilityFlag(2) ||
     4244      ptl->getProfileCompatibilityFlag(3) || ptl->getProfileCompatibilityFlag(4) ||
     4245      ptl->getProfileCompatibilityFlag(5)                                           )
     4246  {
     4247    READ_FLAG(uiCode, "general_inbld_flag");
     4248  }
     4249  else
     4250  {
     4251    READ_FLAG(uiCode, "general_reserved_zero_bit");
     4252  }
    42334253#else
    42344254  READ_CODE(16, uiCode, "XXX_reserved_zero_44bits[0..15]");
  • branches/SHM-dev/source/Lib/TLibEncoder/TEncCavlc.cpp

    r964 r971  
    26432643
    26442644#if MULTIPLE_PTL_SUPPORT
    2645   WRITE_FLAG(true, "general_max_12bit_constraint_flag");
    2646   WRITE_FLAG(true, "general_max_10bit_constraint_flag");
    2647   WRITE_FLAG((ptl->getProfileIdc() == Profile::SCALABLEMAIN) ? true : false, "general_max_8bit_constraint_flag");
    2648   WRITE_FLAG(true, "general_max_422chroma_constraint_flag");
    2649   WRITE_FLAG(true, "general_max_420chroma_constraint_flag");
    2650   WRITE_FLAG(false, "general_max_monochrome_constraint_flag");
    2651   WRITE_FLAG(false, "general_intra_constraint_flag");
    2652   WRITE_FLAG(false, "general_one_picture_only_constraint_flag");
    2653   WRITE_FLAG(true, "general_lower_bit_rate_constraint_flag");
    2654   WRITE_CODE(0 , 16, "XXX_reserved_zero_35bits[0..15]");
    2655   WRITE_CODE(0 , 16, "XXX_reserved_zero_35bits[16..31]");
    2656   WRITE_CODE(0 ,  3, "XXX_reserved_zero_35bits[32..34]");
     2645  if( ptl->getProfileIdc() == 4 || ptl->getProfileCompatibilityFlag(4) ||
     2646      ptl->getProfileIdc() == 5 || ptl->getProfileCompatibilityFlag(5) ||
     2647      ptl->getProfileIdc() == 6 || ptl->getProfileCompatibilityFlag(6) ||
     2648      ptl->getProfileIdc() == 7 || ptl->getProfileCompatibilityFlag(7)
     2649      // at encoder side, scalable-main10 profile has a profile idc equal to 8, which is converted to 7 during signalling
     2650      || ptl->getProfileIdc() == 8  )
     2651  {
     2652    WRITE_FLAG(true,  "general_max_12bit_constraint_flag");
     2653    WRITE_FLAG(true,  "general_max_10bit_constraint_flag");
     2654    WRITE_FLAG((ptl->getProfileIdc() == Profile::SCALABLEMAIN) ? true : false, "general_max_8bit_constraint_flag");
     2655    WRITE_FLAG(true,  "general_max_422chroma_constraint_flag");
     2656    WRITE_FLAG(true,  "general_max_420chroma_constraint_flag");
     2657    WRITE_FLAG(false, "general_max_monochrome_constraint_flag");
     2658    WRITE_FLAG(false, "general_intra_constraint_flag");
     2659    WRITE_FLAG(false, "general_one_picture_only_constraint_flag");
     2660    WRITE_FLAG(true,  "general_lower_bit_rate_constraint_flag");
     2661    WRITE_CODE(0, 32, "general_reserved_zero_34bits");  WRITE_CODE(0, 2, "general_reserved_zero_34bits");
     2662  }
     2663  else
     2664  {
     2665    WRITE_CODE(0, 32, "general_reserved_zero_43bits");  WRITE_CODE(0, 11, "general_reserved_zero_43bits");
     2666  }
     2667
     2668  if( ( ptl->getProfileIdc() >= 1 && ptl->getProfileIdc() <= 5 ) ||
     2669      ptl->getProfileCompatibilityFlag(1) || ptl->getProfileCompatibilityFlag(2) ||
     2670      ptl->getProfileCompatibilityFlag(3) || ptl->getProfileCompatibilityFlag(4) ||
     2671      ptl->getProfileCompatibilityFlag(5)                                           )
     2672  {
     2673    WRITE_FLAG(false, "general_inbld_flag");
     2674  }
     2675  else
     2676  {
     2677    WRITE_FLAG(false, "general_reserved_zero_bit");
     2678  }
     2679     
    26572680#else
    26582681  WRITE_CODE(0 , 16, "XXX_reserved_zero_44bits[0..15]");
Note: See TracChangeset for help on using the changeset viewer.