Skip to content
Snippets Groups Projects

Compare revisions

Changes are shown as if the source revision was being merged into the target revision. Learn more about comparing revisions.

Source

Select target project
No results found

Target

Select target project
  • jvet/VVCSoftware_VTM
  • chenhuanbang/VVCSoftware_VTM
  • ezhizng/VVCSoftware_VTM
  • XZheng/VVCSoftware_VTM
  • YanZhang/VVCSoftware_VTM
  • xiaozhongxu/VVCSoftware_VTM
  • bossen/VVCSoftware_VTM
  • XiangLi/VVCSoftware_VTM
  • s.iwamura/VVCSoftware_VTM
  • yuling.hsiao/VVCSoftware_VTM
  • ccc2384823/VVCSoftware_VTM
  • yuchisu/VVCSoftware_VTM
  • schwarz/VVCSoftware_VTM
  • philippe.hanhart/VVCSoftware_VTM
  • nanh/VVCSoftware_VTM
  • guillaume.laroche/VVCSoftware_VTM
  • Kenneth/VVCSoftware_VTM
  • jonatan/VVCSoftware_VTM
  • Alexey/VVCSoftware_VTM
  • saintspear/VVCSoftware_VTM
  • xinzhao/VVCSoftware_VTM
  • Seungsoo/VVCSoftware_VTM
  • jamesxxiu/VVCSoftware_VTM
  • leolzhao/VVCSoftware_VTM
  • ywchen/VVCSoftware_VTM
  • kevin625/VVCSoftware_VTM
  • Zhang/VVCSoftware_VTM
  • zhangkai/VVCSoftware_VTM
  • YCSun/VVCSoftware_VTM
  • ksuehring/VVCSoftware_VTM
  • AbeKiyo/VVCSoftware_VTM
  • naeri.park/VVCSoftware_VTM
  • ling/VVCSoftware_VTM
  • aikiho/VVCSoftware_VTM
  • JangwonChoi/VVCSoftware_VTM
  • Shelly/VVCSoftware_VTM
  • blaeser/VVCSoftware_VTM
  • crhelmrich/VVCSoftware_VTM
  • keydel/VVCSoftware_VTM
  • adam_wieckowski/VVCSoftware_VTM
  • hashimry/VVCSoftware_VTM
  • yimingli/VVCSoftware_VTM
  • zhipin/VVCSoftware_VTM
  • chernyak/VVCSoftware_VTM
  • jvet-l-ahg-14/VVCSoftware_VTM
  • sauer/VVCSoftware_VTM
  • fbarbier/VVCSoftware_VTM
  • misrak/VVCSoftware_VTM
  • ikai/VVCSoftware_VTM
  • tlu/VVCSoftware_VTM
  • Yasugi/VVCSoftware_VTM
  • peterchuang/VVCSoftware_VTM
  • wanght99/VVCSoftware_VTM
  • yuhan/VVCSoftware_VTM
  • hongbin/VVCSoftware_VTM
  • jiahaoli/VVCSoftware_VTM
  • cfd/VVCSoftware_VTM
  • ruoyangyu/VVCSoftware_VTM
  • chujoh/VVCSoftware_VTM
  • lijingya/VVCSoftware_VTM
  • hinz/VVCSoftware_VTM
  • tamse.anish/VVCSoftware_VTM
  • mcoban/VVCSoftware_VTM
  • george/VVCSoftware_VTM
  • jeeva.raj/VVCSoftware_VTM
  • antoine/VVCSoftware_VTM
  • moonmo.koo/VVCSoftware_VTM
  • deluxan/VVCSoftware_VTM
  • bheng/VVCSoftware_VTM
  • lzz8246/VVCSoftware_VTM
  • delagrangep/VVCSoftware_VTM
  • jiechen/VVCSoftware_VTM
  • hendry197/VVCSoftware_VTM
  • LGE_VCC/VVCSoftware_VTM
  • asegall/VVCSoftware_VTM
  • pbcowan/VVCSoftware_VTM
  • forayr/VVCSoftware_VTM
  • JT/VVCSoftware_VTM
  • Zhou/VVCSoftware_VTM
  • yjpiao/VVCSoftware_VTM
  • fabrice.leleannec/VVCSoftware_VTM
  • tpoirier/VVCSoftware_VTM
  • PoHan.Lin/VVCSoftware_VTM
  • jzxu/VVCSoftware_VTM
  • junghak.nam/VVCSoftware_VTM
  • guichunli/VVCSoftware_VTM
  • xianglinwang/VVCSoftware_VTM
  • chunchic/VVCSoftware_VTM
  • chrisr12/VVCSoftware_VTM
  • ks_kashyap/VVCSoftware_VTM
  • minhua/VVCSoftware_VTM
  • Sheng-Yen.Lin/VVCSoftware_VTM
  • hegilmez/VVCSoftware_VTM
  • swongah/VVCSoftware_VTM
  • merkle/VVCSoftware_VTM
  • sunyucheng/VVCSoftware_VTM
  • kirchhoffer/VVCSoftware_VTM
  • vdrugeon/VVCSoftware_VTM
  • jennylai/VVCSoftware_VTM
  • rickxu/VVCSoftware_VTM
  • seuhong/VVCSoftware_VTM
  • chollmann/VVCSoftware_VTM
  • jvet-n-ce8-public/VVCSoftware_VTM
  • martin.m.pettersson/VVCSoftware_VTM
  • siekmann/VVCSoftware_VTM
  • aramasub/VVCSoftware_VTM
  • zhiyilin/VVCSoftware_VTM
  • EricLin/VVCSoftware_VTM
  • mengwang/VVCSoftware_VTM
  • m.sarwer/VVCSoftware_VTM
  • agnesedong/VVCSoftware_VTM
  • geonjungko/VVCSoftware_VTM
  • bray/VVCSoftware_VTM
  • yhchao/VVCSoftware_VTM
  • Zhu/VVCSoftware_VTM
  • ykato/VVCSoftware_VTM
  • ZhipinDeng/VVCSoftware_VTM
  • jasonjung/VVCSoftware_VTM
  • hanhuang/VVCSoftware_VTM
  • seregin/VVCSoftware_VTM
  • wchen1014/VVCSoftware_VTM
  • Auyeung/VVCSoftware_VTM
  • Morris/VVCSoftware_VTM
  • lphamvan/VVCSoftware_VTM
  • dmehlem/VVCSoftware_VTM
  • shih-ta.hsiang/VVCSoftware_VTM
  • ysanchez/VVCSoftware_VTM
  • baegn74/VVCSoftware_VTM
  • kazui/VVCSoftware_VTM
  • yuwenhe_vvc/VVCSoftware_VTM
  • rickard/VVCSoftware_VTM
  • wangyang.cs/VVCSoftware_VTM
  • xwmeng/VVCSoftware_VTM
  • takeshi.tsukuba/VVCSoftware_VTM
  • yixindu/VVCSoftware_VTM
  • baixiu.wz/VVCSoftware_VTM
  • hm.jang/VVCSoftware_VTM
  • Ted/VVCSoftware_VTM
  • nguyen/VVCSoftware_VTM
  • chaohsiu/VVCSoftware_VTM
  • francoise/VVCSoftware_VTM
  • Yin/VVCSoftware_VTM
  • Morigami/VVCSoftware_VTM
  • sagar.kotecha/VVCSoftware_VTM
  • hwsun/VVCSoftware_VTM
  • pierrick.bouvier/VVCSoftware_VTM
  • XiangMa/VVCSoftware_VTM
  • LouiseLee/VVCSoftware_VTM
  • chenps/VVCSoftware_VTM
  • karls/VVCSoftware_VTM
  • biaowang/VVCSoftware_VTM
  • hangao/VVCSoftware_VTM
  • Jin/VVCSoftware_VTM
  • analci/VVCSoftware_VTM
  • KuiFan/VVCSoftware_VTM
  • hobingzhang/VVCSoftware_VTM
  • audrey.turquin/VVCSoftware_VTM
  • rlliao/VVCSoftware_VTM
  • winken/VVCSoftware_VTM
  • hallapur/VVCSoftware_VTM
  • T.Hashimoto/VVCSoftware_VTM
  • AnandMeher/VVCSoftware_VTM
  • semihese/VVCSoftware_VTM
  • ouedraogo/VVCSoftware_VTM
  • arthurcerveira/VVCSoftware_VTM
  • sunmi.yoo/VVCSoftware_VTM
  • Cynthia/VVCSoftware_VTM
  • yang/VVCSoftware_VTM
  • yuyoon/VVCSoftware_VTM
  • jslee/VVCSoftware_VTM
  • weimin.zeng/VVCSoftware_VTM
  • edrthomas/VVCSoftware_VTM
  • Mitsuru.Katsumata/VVCSoftware_VTM
  • adybrowne/VVCSoftware_VTM
  • jack.enhorn/VVCSoftware_VTM
  • Palanivel/VVCSoftware_VTM
  • olena.chubach/VVCSoftware_VTM
  • juvenalluo/VVCSoftware_VTM
  • yylee/VVCSoftware_VTM
  • bross/VVCSoftware_VTM
  • jvet-ahg-nnvc/VVCSoftware_VTM
  • jacob/VVCSoftware_VTM
  • dmytro.rusanovskyy/VVCSoftware_VTM
  • karamnaser/VVCSoftware_VTM
  • milos.radosavljevic/VVCSoftware_VTM
  • Keming/VVCSoftware_VTM
  • pj/VVCSoftware_VTM
  • cwkuo/VVCSoftware_VTM
  • BD/VVCSoftware_VTM
  • bartnik/VVCSoftware_VTM
  • Fangjun.Pu/VVCSoftware_VTM
  • nikolay.shostak/VVCSoftware_VTM
  • kirill.suverov/VVCSoftware_VTM
  • Xile_Zhou/VVCSoftware_VTM
  • ksuehring/vvc-software-vtm-nnvc
  • guether/VVCSoftware_VTM
  • salmonc/VVCSoftware_VTM
  • eeehey/VVCSoftware_VTM
  • marie-pierre.gallasso/VVCSoftware_VTM
  • jvet-ahg-fgt/VTM
  • liaojq/VVCSoftware_VTM
  • axel.ricard/VVCSoftware_VTM
  • XiangLi/nnvc
  • sw.xie/VVCSoftware_VTM
  • jeeva.raj/vvc-software-vtm-tu-c
  • XiangLi/tu-c
  • msantamaria/nnvc
  • cjj490168650/VVCSoftware_VTM
  • Yun_li/VVCSoftware_VTM
  • Zhengang/vvc-software-vtm
  • lvzhuoyi/vvc-software-vtm-nnvc
  • Kenneth/vvc-software-vtm-nn
  • biatekt/vvc-software-vtm
  • jvet-ahg-gcc/VVCSoftware_VTM
  • JINGYING/VVCSoftware_VTM
  • furban/VVCSoftware_VTM
  • yanning/VVCSoftware_VTM
  • zhuochen/VVCSoftware_VTM
  • Kaifa/VVCSoftware_VTM_AJ0048
  • yueli/VVCSoftware_VTM
  • tokumo/VVCSoftware_VTM
221 results
Show changes
Commits on Source (34)
Showing
with 328 additions and 18 deletions
BDPCM: 2
...@@ -13,15 +13,19 @@ MaxPartitionDepth : 4 # Maximum coding unit depth ...@@ -13,15 +13,19 @@ MaxPartitionDepth : 4 # Maximum coding unit depth
#======== Coding Structure ============= #======== Coding Structure =============
IntraPeriod : -1 # Period of I-Frame ( -1 = only first) IntraPeriod : -1 # Period of I-Frame ( -1 = only first)
DecodingRefreshType : 0 # Random Accesss 0:none, 1:CRA, 2:IDR, 3:Recovery Point SEI DecodingRefreshType : 0 # Random Accesss 0:none, 1:CRA, 2:IDR, 3:Recovery Point SEI
GOPSize : 4 # GOP Size (number of B slice = GOPSize-1) GOPSize : 8 # GOP Size (number of B slice = GOPSize-1)
IntraQPOffset : -1 IntraQPOffset : -1
LambdaFromQpEnable : 1 # see JCTVC-X0038 for suitable parameters for IntraQPOffset, QPoffset, QPOffsetModelOff, QPOffsetModelScale when enabled LambdaFromQpEnable : 1 # see JCTVC-X0038 for suitable parameters for IntraQPOffset, QPoffset, QPOffsetModelOff, QPOffsetModelScale when enabled
# Type POC QPoffset QPOffsetModelOff QPOffsetModelScale CbQPoffset CrQPoffset QPfactor tcOffsetDiv2 betaOffsetDiv2 temporal_id #ref_pics_active_L0 #ref_pics_L0 reference_pictures_L0 #ref_pics_active_L1 #ref_pics_L1 reference_pictures_L1 # Type POC QPoffset QPOffsetModelOff QPOffsetModelScale CbQPoffset CrQPoffset QPfactor tcOffsetDiv2 betaOffsetDiv2 temporal_id #ref_pics_active_L0 #ref_pics_L0 reference_pictures_L0 #ref_pics_active_L1 #ref_pics_L1 reference_pictures_L1
Frame1: P 1 5 -6.5 0.2590 0 0 1.0 0 0 0 4 4 1 5 9 13 0 0 Frame1: P 1 5 -6.5 0.2590 0 0 1.0 0 0 0 4 4 1 9 17 25 0 0
Frame2: P 2 4 -6.5 0.2590 0 0 1.0 0 0 0 4 4 1 2 6 10 0 0 Frame2: P 2 4 -6.5 0.2590 0 0 1.0 0 0 0 4 4 1 2 10 18 0 0
Frame3: P 3 5 -6.5 0.2590 0 0 1.0 0 0 0 4 4 1 3 7 11 0 0 Frame3: P 3 5 -6.5 0.2590 0 0 1.0 0 0 0 4 4 1 3 11 19 0 0
Frame4: P 4 1 0.0 0.0 0 0 1.0 0 0 0 4 4 1 4 8 12 0 0 Frame4: P 4 5 -6.5 0.2590 0 0 1.0 0 0 0 4 4 1 4 12 20 0 0
Frame5: P 5 4 -6.5 0.2590 0 0 1.0 0 0 0 4 4 1 5 13 21 0 0
Frame6: P 6 5 -6.5 0.2590 0 0 1.0 0 0 0 4 4 1 6 14 22 0 0
Frame7: P 7 5 -6.5 0.2590 0 0 1.0 0 0 0 4 4 1 7 15 23 0 0
Frame8: P 8 1 0.0 0.0 0 0 1.0 0 0 0 4 4 1 8 16 24 0 0
#=========== Motion Search ============= #=========== Motion Search =============
FastSearch : 1 # 0:Full search 1:TZ search FastSearch : 1 # 0:Full search 1:TZ search
...@@ -129,7 +133,7 @@ AffineAmvr : 0 ...@@ -129,7 +133,7 @@ AffineAmvr : 0
LMCSEnable : 1 # LMCS: 0: disable, 1:enable LMCSEnable : 1 # LMCS: 0: disable, 1:enable
LMCSSignalType : 0 # Input signal type: 0:SDR, 1:HDR-PQ, 2:HDR-HLG LMCSSignalType : 0 # Input signal type: 0:SDR, 1:HDR-PQ, 2:HDR-HLG
LMCSUpdateCtrl : 2 # LMCS model update control: 0:RA, 1:AI, 2:LDB/LDP LMCSUpdateCtrl : 2 # LMCS model update control: 0:RA, 1:AI, 2:LDB/LDP
MIP : 1 MIP : 0
JointCbCr : 1 # joint coding of chroma residuals (if available): 0: disable, 1: enable JointCbCr : 1 # joint coding of chroma residuals (if available): 0: disable, 1: enable
PROF : 1 PROF : 1
PPSorSliceMode : 3 PPSorSliceMode : 3
......
...@@ -13,15 +13,19 @@ MaxPartitionDepth : 4 # Maximum coding unit depth ...@@ -13,15 +13,19 @@ MaxPartitionDepth : 4 # Maximum coding unit depth
#======== Coding Structure ============= #======== Coding Structure =============
IntraPeriod : -1 # Period of I-Frame ( -1 = only first) IntraPeriod : -1 # Period of I-Frame ( -1 = only first)
DecodingRefreshType : 0 # Random Accesss 0:none, 1:CRA, 2:IDR, 3:Recovery Point SEI DecodingRefreshType : 0 # Random Accesss 0:none, 1:CRA, 2:IDR, 3:Recovery Point SEI
GOPSize : 4 # GOP Size (number of B slice = GOPSize-1) GOPSize : 8 # GOP Size (number of B slice = GOPSize-1)
IntraQPOffset : -1 IntraQPOffset : -1
LambdaFromQpEnable : 1 # see JCTVC-X0038 for suitable parameters for IntraQPOffset, QPoffset, QPOffsetModelOff, QPOffsetModelScale when enabled LambdaFromQpEnable : 1 # see JCTVC-X0038 for suitable parameters for IntraQPOffset, QPoffset, QPOffsetModelOff, QPOffsetModelScale when enabled
# Type POC QPoffset QPOffsetModelOff QPOffsetModelScale CbQPoffset CrQPoffset QPfactor tcOffsetDiv2 betaOffsetDiv2 temporal_id #ref_pics_active_L0 #ref_pics_L0 reference_pictures_L0 #ref_pics_active_L1 #ref_pics_L1 reference_pictures_L1 # Type POC QPoffset QPOffsetModelOff QPOffsetModelScale CbQPoffset CrQPoffset QPfactor tcOffsetDiv2 betaOffsetDiv2 temporal_id #ref_pics_active_L0 #ref_pics_L0 reference_pictures_L0 #ref_pics_active_L1 #ref_pics_L1 reference_pictures_L1
Frame1: B 1 5 -6.5 0.2590 0 0 1.0 0 0 0 4 4 1 5 9 13 4 4 1 5 9 13 Frame1: B 1 5 -6.5 0.2590 0 0 1.0 0 0 0 4 4 1 9 17 25 4 4 1 9 17 25
Frame2: B 2 4 -6.5 0.2590 0 0 1.0 0 0 0 4 4 1 2 6 10 4 4 1 2 6 10 Frame2: B 2 4 -6.5 0.2590 0 0 1.0 0 0 0 4 4 1 2 10 18 4 4 1 2 10 18
Frame3: B 3 5 -6.5 0.2590 0 0 1.0 0 0 0 4 4 1 3 7 11 4 4 1 3 7 11 Frame3: B 3 5 -6.5 0.2590 0 0 1.0 0 0 0 4 4 1 3 11 19 4 4 1 3 11 19
Frame4: B 4 1 0.0 0.0 0 0 1.0 0 0 0 4 4 1 4 8 12 4 4 1 4 8 12 Frame4: B 4 4 -6.5 0.2590 0 0 1.0 0 0 0 4 4 1 4 12 20 4 4 1 4 12 20
Frame5: B 5 5 -6.5 0.2590 0 0 1.0 0 0 0 4 4 1 5 13 21 4 4 1 5 13 21
Frame6: B 6 4 -6.5 0.2590 0 0 1.0 0 0 0 4 4 1 6 14 22 4 4 1 6 14 22
Frame7: B 7 5 -6.5 0.2590 0 0 1.0 0 0 0 4 4 1 7 15 23 4 4 1 7 15 23
Frame8: B 8 1 0.0 0.0 0 0 1.0 0 0 0 4 4 1 8 16 24 4 4 1 8 16 24
#=========== Motion Search ============= #=========== Motion Search =============
FastSearch : 1 # 0:Full search 1:TZ search FastSearch : 1 # 0:Full search 1:TZ search
...@@ -133,7 +137,7 @@ AffineAmvr : 0 ...@@ -133,7 +137,7 @@ AffineAmvr : 0
LMCSEnable : 1 # LMCS: 0: disable, 1:enable LMCSEnable : 1 # LMCS: 0: disable, 1:enable
LMCSSignalType : 0 # Input signal type: 0:SDR, 1:HDR-PQ, 2:HDR-HLG LMCSSignalType : 0 # Input signal type: 0:SDR, 1:HDR-PQ, 2:HDR-HLG
LMCSUpdateCtrl : 2 # LMCS model update control: 0:RA, 1:AI, 2:LDB/LDP LMCSUpdateCtrl : 2 # LMCS model update control: 0:RA, 1:AI, 2:LDB/LDP
MIP : 1 MIP : 0
JointCbCr : 1 # joint coding of chroma residuals (if available): 0: disable, 1: enable JointCbCr : 1 # joint coding of chroma residuals (if available): 0: disable, 1: enable
PROF : 1 PROF : 1
PPSorSliceMode : 2 PPSorSliceMode : 2
......
...@@ -150,6 +150,7 @@ AffineAmvr : 1 ...@@ -150,6 +150,7 @@ AffineAmvr : 1
LMCSEnable : 1 # LMCS: 0: disable, 1:enable LMCSEnable : 1 # LMCS: 0: disable, 1:enable
LMCSSignalType : 0 # Input signal type: 0:SDR, 1:HDR-PQ, 2:HDR-HLG LMCSSignalType : 0 # Input signal type: 0:SDR, 1:HDR-PQ, 2:HDR-HLG
LMCSUpdateCtrl : 0 # LMCS model update control: 0:RA, 1:AI, 2:LDB/LDP LMCSUpdateCtrl : 0 # LMCS model update control: 0:RA, 1:AI, 2:LDB/LDP
LMCSOffset : 6 # chroma residual scaling offset
MIP : 1 MIP : 1
DMVR : 1 DMVR : 1
SMVD : 1 SMVD : 1
......
...@@ -5,6 +5,7 @@ isSDR : 0 # 1: SDR in PQ container, 0: HDR ...@@ -5,6 +5,7 @@ isSDR : 0 # 1: SDR in PQ container, 0: HDR
# ======= LMCS ======================= # ======= LMCS =======================
LMCSEnable : 1 # turned on in HDR CTC LMCSEnable : 1 # turned on in HDR CTC
LMCSSignalType : 1 # Input signal type: 0:SDR, 1:HDR-PQ, 2:HDR-HLG LMCSSignalType : 1 # Input signal type: 0:SDR, 1:HDR-PQ, 2:HDR-HLG
LMCSOffset : 1 # chroma residual scaling offset
#======== Chroma QP scale ============ #======== Chroma QP scale ============
WCGPPSEnable : 0 # enable WCG Chroma scale WCGPPSEnable : 0 # enable WCG Chroma scale
...@@ -23,4 +24,4 @@ QpOutValCbCr : 12 22 30 32 37 ...@@ -23,4 +24,4 @@ QpOutValCbCr : 12 22 30 32 37
CclmCollocatedChroma : 1 CclmCollocatedChroma : 1
#======== HDR Metrics ============ #======== HDR Metrics ============
CalculateHdrMetrics : 1 # Calculate HDR metrics for Class H1 (PQ) content CalculateHdrMetrics : 1 # Calculate HDR metrics for Class H1 (PQ) content
\ No newline at end of file
...@@ -4,6 +4,7 @@ LumaLevelToDeltaQPMode : 0 # Change luma delta QP based on aver ...@@ -4,6 +4,7 @@ LumaLevelToDeltaQPMode : 0 # Change luma delta QP based on aver
# ======= LMCS ======================= # ======= LMCS =======================
LMCSEnable : 1 # turned on in HLG CTC LMCSEnable : 1 # turned on in HLG CTC
LMCSSignalType : 2 # Input signal type: 0:SDR, 1:HDR-PQ, 2:HDR-HLG LMCSSignalType : 2 # Input signal type: 0:SDR, 1:HDR-PQ, 2:HDR-HLG
LMCSOffset : 0 # chroma residual scaling offset
#======== Chroma QP scale ============ #======== Chroma QP scale ============
WCGPPSEnable : 0 # enable WCG Chroma scale WCGPPSEnable : 0 # enable WCG Chroma scale
......
...@@ -2256,8 +2256,14 @@ Enables or disables symmetric MVD mode. ...@@ -2256,8 +2256,14 @@ Enables or disables symmetric MVD mode.
\Option{BDPCM} & \Option{BDPCM} &
%\ShortOption{\None} & %\ShortOption{\None} &
\Default{false} & \Default{0} &
Enables or disables the use of intra block differential pulse code modulation mode. Enables or disables the use of intra block differential pulse code modulation mode.
\par
\begin{tabular}{cp{0.45\textwidth}}
0 & Disable BDPCM for luma and chroma.\\
1 & Enable BDPCM for luma.\\
2 & Enable BDPCM for luma and chroma. BDPCM for chroma is avaialble for 444. \\
\end{tabular}
\\ \\
\Option{LFNST} & \Option{LFNST} &
......
...@@ -147,7 +147,11 @@ void EncApp::xInitLibCfg() ...@@ -147,7 +147,11 @@ void EncApp::xInitLibCfg()
m_cEncLib.setNoTriangleConstraintFlag ( !m_Triangle ); m_cEncLib.setNoTriangleConstraintFlag ( !m_Triangle );
m_cEncLib.setNoLadfConstraintFlag ( !m_LadfEnabed ); m_cEncLib.setNoLadfConstraintFlag ( !m_LadfEnabed );
m_cEncLib.setNoTransformSkipConstraintFlag ( !m_useTransformSkip ); m_cEncLib.setNoTransformSkipConstraintFlag ( !m_useTransformSkip );
#if JVET_P0059_CHROMA_BDPCM
m_cEncLib.setNoBDPCMConstraintFlag ( m_useBDPCM == 0 );
#else
m_cEncLib.setNoBDPCMConstraintFlag ( !m_useBDPCM ); m_cEncLib.setNoBDPCMConstraintFlag ( !m_useBDPCM );
#endif
m_cEncLib.setNoJointCbCrConstraintFlag (!m_JointCbCrMode); m_cEncLib.setNoJointCbCrConstraintFlag (!m_JointCbCrMode);
m_cEncLib.setNoQpDeltaConstraintFlag ( m_bNoQpDeltaConstraintFlag ); m_cEncLib.setNoQpDeltaConstraintFlag ( m_bNoQpDeltaConstraintFlag );
m_cEncLib.setNoDepQuantConstraintFlag ( !m_depQuantEnabledFlag); m_cEncLib.setNoDepQuantConstraintFlag ( !m_depQuantEnabledFlag);
...@@ -561,7 +565,9 @@ void EncApp::xInitLibCfg() ...@@ -561,7 +565,9 @@ void EncApp::xInitLibCfg()
m_cEncLib.setPPSMvdL1ZeroIdc ( m_PPSMvdL1ZeroIdc ); m_cEncLib.setPPSMvdL1ZeroIdc ( m_PPSMvdL1ZeroIdc );
m_cEncLib.setPPSCollocatedFromL0Idc ( m_PPSCollocatedFromL0Idc ); m_cEncLib.setPPSCollocatedFromL0Idc ( m_PPSCollocatedFromL0Idc );
m_cEncLib.setPPSSixMinusMaxNumMergeCandPlus1 ( m_PPSSixMinusMaxNumMergeCandPlus1 ); m_cEncLib.setPPSSixMinusMaxNumMergeCandPlus1 ( m_PPSSixMinusMaxNumMergeCandPlus1 );
#if !JVET_P0152_REMOVE_PPS_NUM_SUBBLOCK_MERGE_CAND
m_cEncLib.setPPSFiveMinusMaxNumSubblockMergeCandPlus1 ( m_PPSFiveMinusMaxNumSubblockMergeCandPlus1 ); m_cEncLib.setPPSFiveMinusMaxNumSubblockMergeCandPlus1 ( m_PPSFiveMinusMaxNumSubblockMergeCandPlus1 );
#endif
m_cEncLib.setPPSMaxNumMergeCandMinusMaxNumTriangleCandPlus1 ( m_PPSMaxNumMergeCandMinusMaxNumTriangleCandPlus1 ); m_cEncLib.setPPSMaxNumMergeCandMinusMaxNumTriangleCandPlus1 ( m_PPSMaxNumMergeCandMinusMaxNumTriangleCandPlus1 );
m_cEncLib.setUseScalingListId ( m_useScalingListId ); m_cEncLib.setUseScalingListId ( m_useScalingListId );
m_cEncLib.setScalingListFileName ( m_scalingListFileName ); m_cEncLib.setScalingListFileName ( m_scalingListFileName );
...@@ -635,6 +641,9 @@ void EncApp::xInitLibCfg() ...@@ -635,6 +641,9 @@ void EncApp::xInitLibCfg()
m_cEncLib.setReshapeSignalType ( m_reshapeSignalType ); m_cEncLib.setReshapeSignalType ( m_reshapeSignalType );
m_cEncLib.setReshapeIntraCMD ( m_intraCMD ); m_cEncLib.setReshapeIntraCMD ( m_intraCMD );
m_cEncLib.setReshapeCW ( m_reshapeCW ); m_cEncLib.setReshapeCW ( m_reshapeCW );
#if JVET_P0371_CHROMA_SCALING_OFFSET
m_cEncLib.setReshapeCSoffset ( m_CSoffset );
#endif
#if JVET_O0756_CALCULATE_HDRMETRICS #if JVET_O0756_CALCULATE_HDRMETRICS
for (int i=0; i<hdrtoolslib::NB_REF_WHITE; i++) for (int i=0; i<hdrtoolslib::NB_REF_WHITE; i++)
......
...@@ -944,7 +944,7 @@ bool EncAppCfg::parseCfg( int argc, char* argv[] ) ...@@ -944,7 +944,7 @@ bool EncAppCfg::parseCfg( int argc, char* argv[] )
("MTSImplicit", m_MTSImplicit, 0, "Enable implicit MTS (when explicit MTS is off)\n") ("MTSImplicit", m_MTSImplicit, 0, "Enable implicit MTS (when explicit MTS is off)\n")
( "SBT", m_SBT, false, "Enable Sub-Block Transform for inter blocks\n" ) ( "SBT", m_SBT, false, "Enable Sub-Block Transform for inter blocks\n" )
#if JVET_P0983_REMOVE_SPS_SBT_MAX_SIZE_FLAG #if JVET_P0983_REMOVE_SPS_SBT_MAX_SIZE_FLAG
("SBT64RDO", m_SBT64RDOCheck, (m_iSourceWidth >= 1920 ? true : false ), "Enable more than 32 SBT in encoder RDO check \n") ("SBT64RDO", m_SBT64RDOCheck, true, "Enable more than 32 SBT in encoder RDO check \n")
#endif #endif
( "ISP", m_ISP, false, "Enable Intra Sub-Partitions\n" ) ( "ISP", m_ISP, false, "Enable Intra Sub-Partitions\n" )
("SMVD", m_SMVD, false, "Enable Symmetric MVD\n") ("SMVD", m_SMVD, false, "Enable Symmetric MVD\n")
...@@ -993,6 +993,9 @@ bool EncAppCfg::parseCfg( int argc, char* argv[] ) ...@@ -993,6 +993,9 @@ bool EncAppCfg::parseCfg( int argc, char* argv[] )
"1: rsp both (CW66 for QP<=22), 2: rsp TID0 (for all QP)," "1: rsp both (CW66 for QP<=22), 2: rsp TID0 (for all QP),"
"3: rsp inter(CW66 for QP<=22), 4: rsp inter(for all QP).") "3: rsp inter(CW66 for QP<=22), 4: rsp inter(for all QP).")
("LMCSInitialCW", m_initialCW, 0u, "LMCS initial total codeword (0~1023) when LMCSAdpOption > 0") ("LMCSInitialCW", m_initialCW, 0u, "LMCS initial total codeword (0~1023) when LMCSAdpOption > 0")
#if JVET_P0371_CHROMA_SCALING_OFFSET
("LMCSOffset", m_CSoffset, 0, "LMCS chroma residual scaling offset")
#endif
("IntraCMD", m_intraCMD, 0u, "IntraChroma MD: 0: none, 1:fixed to default wPSNR weight") ("IntraCMD", m_intraCMD, 0u, "IntraChroma MD: 0: none, 1:fixed to default wPSNR weight")
("LCTUFast", m_useFastLCTU, false, "Fast methods for large CTU") ("LCTUFast", m_useFastLCTU, false, "Fast methods for large CTU")
("FastMrg", m_useFastMrg, false, "Fast methods for inter merge") ("FastMrg", m_useFastMrg, false, "Fast methods for inter merge")
...@@ -1137,7 +1140,11 @@ bool EncAppCfg::parseCfg( int argc, char* argv[] ) ...@@ -1137,7 +1140,11 @@ bool EncAppCfg::parseCfg( int argc, char* argv[] )
#if JVET_P0058_CHROMA_TS #if JVET_P0058_CHROMA_TS
("ChromaTS", m_useChromaTS, false, "Enable encoder search of chromaTS") ("ChromaTS", m_useChromaTS, false, "Enable encoder search of chromaTS")
#endif #endif
#if JVET_P0059_CHROMA_BDPCM
("BDPCM", m_useBDPCM, 0, "BDPCM (0:off, 1:lumaonly, 2:lumachroma")
#else
("BDPCM", m_useBDPCM, false, "BDPCM") ("BDPCM", m_useBDPCM, false, "BDPCM")
#endif
("ISPFast", m_useFastISP, false, "Fast encoder search for ISP") ("ISPFast", m_useFastISP, false, "Fast encoder search for ISP")
("ImplicitResidualDPCM", m_rdpcmEnabledFlag[RDPCM_SIGNAL_IMPLICIT], false, "Enable implicitly signalled residual DPCM for intra (also known as sample-adaptive intra predict) (not valid in V1 profiles)") ("ImplicitResidualDPCM", m_rdpcmEnabledFlag[RDPCM_SIGNAL_IMPLICIT], false, "Enable implicitly signalled residual DPCM for intra (also known as sample-adaptive intra predict) (not valid in V1 profiles)")
("ExplicitResidualDPCM", m_rdpcmEnabledFlag[RDPCM_SIGNAL_EXPLICIT], false, "Enable explicitly signalled residual DPCM for inter (not valid in V1 profiles)") ("ExplicitResidualDPCM", m_rdpcmEnabledFlag[RDPCM_SIGNAL_EXPLICIT], false, "Enable explicitly signalled residual DPCM for inter (not valid in V1 profiles)")
...@@ -2709,6 +2716,10 @@ bool EncAppCfg::xCheckParameter() ...@@ -2709,6 +2716,10 @@ bool EncAppCfg::xCheckParameter()
xConfirmPara(m_adpOption > 4, "Max. LMCS Adaptation Option is 4"); xConfirmPara(m_adpOption > 4, "Max. LMCS Adaptation Option is 4");
xConfirmPara(m_initialCW < 0, "Min. Initial Total Codeword is 0"); xConfirmPara(m_initialCW < 0, "Min. Initial Total Codeword is 0");
xConfirmPara(m_initialCW > 1023, "Max. Initial Total Codeword is 1023"); xConfirmPara(m_initialCW > 1023, "Max. Initial Total Codeword is 1023");
#if JVET_P0371_CHROMA_SCALING_OFFSET
xConfirmPara(m_CSoffset < -7, "Min. LMCS Offset value is -7");
xConfirmPara(m_CSoffset > 7, "Max. LMCS Offset value is 7");
#endif
if (m_updateCtrl > 0 && m_adpOption > 2) { m_adpOption -= 2; } if (m_updateCtrl > 0 && m_adpOption > 2) { m_adpOption -= 2; }
} }
...@@ -3267,7 +3278,9 @@ bool EncAppCfg::xCheckParameter() ...@@ -3267,7 +3278,9 @@ bool EncAppCfg::xCheckParameter()
m_PPSMvdL1ZeroIdc = 0; m_PPSMvdL1ZeroIdc = 0;
m_PPSCollocatedFromL0Idc = 0; m_PPSCollocatedFromL0Idc = 0;
m_PPSSixMinusMaxNumMergeCandPlus1 = 0; m_PPSSixMinusMaxNumMergeCandPlus1 = 0;
#if !JVET_P0152_REMOVE_PPS_NUM_SUBBLOCK_MERGE_CAND
m_PPSFiveMinusMaxNumSubblockMergeCandPlus1 = 0; m_PPSFiveMinusMaxNumSubblockMergeCandPlus1 = 0;
#endif
m_PPSMaxNumMergeCandMinusMaxNumTriangleCandPlus1 = 0; m_PPSMaxNumMergeCandMinusMaxNumTriangleCandPlus1 = 0;
break; break;
case 1: // RA setting case 1: // RA setting
...@@ -3281,7 +3294,9 @@ bool EncAppCfg::xCheckParameter() ...@@ -3281,7 +3294,9 @@ bool EncAppCfg::xCheckParameter()
m_PPSMvdL1ZeroIdc = 0; m_PPSMvdL1ZeroIdc = 0;
m_PPSCollocatedFromL0Idc = 0; m_PPSCollocatedFromL0Idc = 0;
m_PPSSixMinusMaxNumMergeCandPlus1 = 6 - m_maxNumMergeCand + 1; m_PPSSixMinusMaxNumMergeCandPlus1 = 6 - m_maxNumMergeCand + 1;
#if !JVET_P0152_REMOVE_PPS_NUM_SUBBLOCK_MERGE_CAND
m_PPSFiveMinusMaxNumSubblockMergeCandPlus1 = 5 - m_maxNumAffineMergeCand + 1; m_PPSFiveMinusMaxNumSubblockMergeCandPlus1 = 5 - m_maxNumAffineMergeCand + 1;
#endif
m_PPSMaxNumMergeCandMinusMaxNumTriangleCandPlus1 = m_maxNumMergeCand - m_maxNumTriangleCand + 1; m_PPSMaxNumMergeCandMinusMaxNumTriangleCandPlus1 = m_maxNumMergeCand - m_maxNumTriangleCand + 1;
break; break;
case 2: // LDB setting case 2: // LDB setting
...@@ -3295,7 +3310,9 @@ bool EncAppCfg::xCheckParameter() ...@@ -3295,7 +3310,9 @@ bool EncAppCfg::xCheckParameter()
m_PPSMvdL1ZeroIdc = 2; m_PPSMvdL1ZeroIdc = 2;
m_PPSCollocatedFromL0Idc = 1; m_PPSCollocatedFromL0Idc = 1;
m_PPSSixMinusMaxNumMergeCandPlus1 = 6 - m_maxNumMergeCand + 1; m_PPSSixMinusMaxNumMergeCandPlus1 = 6 - m_maxNumMergeCand + 1;
#if !JVET_P0152_REMOVE_PPS_NUM_SUBBLOCK_MERGE_CAND
m_PPSFiveMinusMaxNumSubblockMergeCandPlus1 = 5 - m_maxNumAffineMergeCand + 1; m_PPSFiveMinusMaxNumSubblockMergeCandPlus1 = 5 - m_maxNumAffineMergeCand + 1;
#endif
m_PPSMaxNumMergeCandMinusMaxNumTriangleCandPlus1 = m_maxNumMergeCand - m_maxNumTriangleCand + 1; m_PPSMaxNumMergeCandMinusMaxNumTriangleCandPlus1 = m_maxNumMergeCand - m_maxNumTriangleCand + 1;
break; break;
case 3: // LDP setting case 3: // LDP setting
...@@ -3309,7 +3326,9 @@ bool EncAppCfg::xCheckParameter() ...@@ -3309,7 +3326,9 @@ bool EncAppCfg::xCheckParameter()
m_PPSMvdL1ZeroIdc = 0; m_PPSMvdL1ZeroIdc = 0;
m_PPSCollocatedFromL0Idc = 0; m_PPSCollocatedFromL0Idc = 0;
m_PPSSixMinusMaxNumMergeCandPlus1 = 6 - m_maxNumMergeCand + 1; m_PPSSixMinusMaxNumMergeCandPlus1 = 6 - m_maxNumMergeCand + 1;
#if !JVET_P0152_REMOVE_PPS_NUM_SUBBLOCK_MERGE_CAND
m_PPSFiveMinusMaxNumSubblockMergeCandPlus1 = 5 - m_maxNumAffineMergeCand + 1; m_PPSFiveMinusMaxNumSubblockMergeCandPlus1 = 5 - m_maxNumAffineMergeCand + 1;
#endif
m_PPSMaxNumMergeCandMinusMaxNumTriangleCandPlus1 = 0; m_PPSMaxNumMergeCandMinusMaxNumTriangleCandPlus1 = 0;
break; break;
default: default:
...@@ -3426,6 +3445,10 @@ bool EncAppCfg::xCheckParameter() ...@@ -3426,6 +3445,10 @@ bool EncAppCfg::xCheckParameter()
check_failed |= m_ext360.verifyParameters(); check_failed |= m_ext360.verifyParameters();
#endif #endif
#if JVET_P0059_CHROMA_BDPCM
xConfirmPara(m_useBDPCM < 0 || m_useBDPCM > 2, "BDPCM must be in range 0..2");
#endif
#undef xConfirmPara #undef xConfirmPara
return check_failed; return check_failed;
} }
...@@ -3710,6 +3733,9 @@ void EncAppCfg::xPrintParameter() ...@@ -3710,6 +3733,9 @@ void EncAppCfg::xPrintParameter()
msg(VERBOSE, "(Signal:%s ", m_reshapeSignalType == 0 ? "SDR" : (m_reshapeSignalType == 2 ? "HDR-HLG" : "HDR-PQ")); msg(VERBOSE, "(Signal:%s ", m_reshapeSignalType == 0 ? "SDR" : (m_reshapeSignalType == 2 ? "HDR-HLG" : "HDR-PQ"));
msg(VERBOSE, "Opt:%d", m_adpOption); msg(VERBOSE, "Opt:%d", m_adpOption);
if (m_adpOption > 0) { msg(VERBOSE, " CW:%d", m_initialCW); } if (m_adpOption > 0) { msg(VERBOSE, " CW:%d", m_initialCW); }
#if JVET_P0371_CHROMA_SCALING_OFFSET
msg(VERBOSE, " CSoffset:%d", m_CSoffset);
#endif
msg(VERBOSE, ") "); msg(VERBOSE, ") ");
} }
msg(VERBOSE, "MIP:%d ", m_MIP); msg(VERBOSE, "MIP:%d ", m_MIP);
......
...@@ -199,7 +199,11 @@ protected: ...@@ -199,7 +199,11 @@ protected:
uint32_t m_log2SaoOffsetScale[MAX_NUM_CHANNEL_TYPE]; ///< number of bits for the upward bit shift operation on the decoded SAO offsets uint32_t m_log2SaoOffsetScale[MAX_NUM_CHANNEL_TYPE]; ///< number of bits for the upward bit shift operation on the decoded SAO offsets
bool m_useTransformSkip; ///< flag for enabling intra transform skipping bool m_useTransformSkip; ///< flag for enabling intra transform skipping
bool m_useTransformSkipFast; ///< flag for enabling fast intra transform skipping bool m_useTransformSkipFast; ///< flag for enabling fast intra transform skipping
#if JVET_P0059_CHROMA_BDPCM
int m_useBDPCM;
#else
bool m_useBDPCM; bool m_useBDPCM;
#endif
uint32_t m_log2MaxTransformSkipBlockSize; ///< transform-skip maximum size (minimum of 2) uint32_t m_log2MaxTransformSkipBlockSize; ///< transform-skip maximum size (minimum of 2)
bool m_transformSkipRotationEnabledFlag; ///< control flag for transform-skip/transquant-bypass residual rotation bool m_transformSkipRotationEnabledFlag; ///< control flag for transform-skip/transquant-bypass residual rotation
bool m_transformSkipContextEnabledFlag; ///< control flag for transform-skip/transquant-bypass single significance map context bool m_transformSkipContextEnabledFlag; ///< control flag for transform-skip/transquant-bypass single significance map context
...@@ -332,6 +336,9 @@ protected: ...@@ -332,6 +336,9 @@ protected:
int m_updateCtrl; int m_updateCtrl;
int m_adpOption; int m_adpOption;
uint32_t m_initialCW; uint32_t m_initialCW;
#if JVET_P0371_CHROMA_SCALING_OFFSET
int m_CSoffset;
#endif
bool m_encDbOpt; bool m_encDbOpt;
unsigned m_uiMaxCUWidth; ///< max. CU width in pixel unsigned m_uiMaxCUWidth; ///< max. CU width in pixel
unsigned m_uiMaxCUHeight; ///< max. CU height in pixel unsigned m_uiMaxCUHeight; ///< max. CU height in pixel
...@@ -547,7 +554,9 @@ protected: ...@@ -547,7 +554,9 @@ protected:
int m_PPSMvdL1ZeroIdc; int m_PPSMvdL1ZeroIdc;
int m_PPSCollocatedFromL0Idc; int m_PPSCollocatedFromL0Idc;
uint32_t m_PPSSixMinusMaxNumMergeCandPlus1; uint32_t m_PPSSixMinusMaxNumMergeCandPlus1;
#if !JVET_P0152_REMOVE_PPS_NUM_SUBBLOCK_MERGE_CAND
uint32_t m_PPSFiveMinusMaxNumSubblockMergeCandPlus1; uint32_t m_PPSFiveMinusMaxNumSubblockMergeCandPlus1;
#endif
uint32_t m_PPSMaxNumMergeCandMinusMaxNumTriangleCandPlus1; uint32_t m_PPSMaxNumMergeCandMinusMaxNumTriangleCandPlus1;
bool m_depQuantEnabledFlag; bool m_depQuantEnabledFlag;
bool m_signDataHidingEnabledFlag; bool m_signDataHidingEnabledFlag;
......
...@@ -476,6 +476,9 @@ static const double ENC_CHROMA_WEIGHTING = 0.8; ...@@ -476,6 +476,9 @@ static const double ENC_CHROMA_WEIGHTING = 0.8;
#endif #endif
static const int MAXPLTPREDSIZE = 63; static const int MAXPLTPREDSIZE = 63;
static const int MAXPLTSIZE = 31; static const int MAXPLTSIZE = 31;
#if JVET_P0526_PLT_ENCODER
static const double PLT_CHROMA_WEIGHTING = 0.8;
#endif
static const int PLT_ENCBITDEPTH = 8; static const int PLT_ENCBITDEPTH = 8;
#if !JVET_P0077_LINE_CG_PALETTE #if !JVET_P0077_LINE_CG_PALETTE
static const int PLT_RUN_MSB_IDX_CABAC_BYPASS_THRE = 4; static const int PLT_RUN_MSB_IDX_CABAC_BYPASS_THRE = 4;
......
...@@ -463,6 +463,22 @@ const CtxSet ContextSetCfg::QtCbf[] = ...@@ -463,6 +463,22 @@ const CtxSet ContextSetCfg::QtCbf[] =
{ 7, CNU, 5, 7, }, { 7, CNU, 5, 7, },
{ 5, DWS, 8, 8, }, { 5, DWS, 8, 8, },
}), }),
#if JVET_P0059_CHROMA_BDPCM
ContextSetCfg::addCtxSet
({
{ 25, CNU, },
{ 25, CNU, },
{ 12, CNU, },
{ 5, DWS, },
}),
ContextSetCfg::addCtxSet
({
{ 9, 44, CNU, },
{ 25, 29, CNU, },
{ 33, 21, CNU, },
{ 2, 1, DWS, },
})
#else
ContextSetCfg::addCtxSet ContextSetCfg::addCtxSet
({ ({
{ 25, }, { 25, },
...@@ -477,6 +493,7 @@ const CtxSet ContextSetCfg::QtCbf[] = ...@@ -477,6 +493,7 @@ const CtxSet ContextSetCfg::QtCbf[] =
{ 33, 21, }, { 33, 21, },
{ 2, 1, }, { 2, 1, },
}) })
#endif
}; };
const CtxSet ContextSetCfg::SigCoeffGroup[] = const CtxSet ContextSetCfg::SigCoeffGroup[] =
......
...@@ -669,9 +669,13 @@ namespace DQIntern ...@@ -669,9 +669,13 @@ namespace DQIntern
#if JVET_P0058_CHROMA_TS #if JVET_P0058_CHROMA_TS
const int qpDQ = cQP.Qp(tu.mtsIdx[compID] == MTS_SKIP) + 1; const int qpDQ = cQP.Qp(tu.mtsIdx[compID] == MTS_SKIP) + 1;
#else
#if JVET_P0059_CHROMA_BDPCM
const bool isTransformSkip = (tu.mtsIdx == MTS_SKIP && isLuma(compID)) || (tu.cu->bdpcmModeChroma && isChroma(compID) );
const int qpDQ = cQP.Qp(isTransformSkip) + 1;
#else #else
const int qpDQ = cQP.Qp(tu.mtsIdx==MTS_SKIP && isLuma(compID)) + 1; const int qpDQ = cQP.Qp(tu.mtsIdx==MTS_SKIP && isLuma(compID)) + 1;
#endif
#endif #endif
const int qpPer = qpDQ / 6; const int qpPer = qpDQ / 6;
const int qpRem = qpDQ - 6 * qpPer; const int qpRem = qpDQ - 6 * qpPer;
...@@ -743,8 +747,13 @@ namespace DQIntern ...@@ -743,8 +747,13 @@ namespace DQIntern
//----- set dequant parameters ----- //----- set dequant parameters -----
#if JVET_P0058_CHROMA_TS #if JVET_P0058_CHROMA_TS
const int qpDQ = cQP.Qp(tu.mtsIdx[compID] == MTS_SKIP) + 1; const int qpDQ = cQP.Qp(tu.mtsIdx[compID] == MTS_SKIP) + 1;
#else
#if JVET_P0059_CHROMA_BDPCM
const bool isTransformSkip = (tu.mtsIdx == MTS_SKIP && isLuma(compID)) || (tu.cu->bdpcmModeChroma && isChroma(compID));
const int qpDQ = cQP.Qp(isTransformSkip) + 1;
#else #else
const int qpDQ = cQP.Qp(tu.mtsIdx==MTS_SKIP && isLuma(compID)) + 1; const int qpDQ = cQP.Qp(tu.mtsIdx==MTS_SKIP && isLuma(compID)) + 1;
#endif
#endif #endif
const int qpPer = qpDQ / 6; const int qpPer = qpDQ / 6;
const int qpRem = qpDQ - 6 * qpPer; const int qpRem = qpDQ - 6 * qpPer;
...@@ -1610,15 +1619,25 @@ void DepQuant::quant( TransformUnit &tu, const ComponentID &compID, const CCoeff ...@@ -1610,15 +1619,25 @@ void DepQuant::quant( TransformUnit &tu, const ComponentID &compID, const CCoeff
{ {
#if JVET_P0058_CHROMA_TS #if JVET_P0058_CHROMA_TS
if ( tu.cs->slice->getDepQuantEnabledFlag() && (tu.mtsIdx[compID] != MTS_SKIP) ) if ( tu.cs->slice->getDepQuantEnabledFlag() && (tu.mtsIdx[compID] != MTS_SKIP) )
#else
#if JVET_P0059_CHROMA_BDPCM
if ((tu.cs->slice->getDepQuantEnabledFlag() && (tu.mtsIdx != MTS_SKIP || !isLuma(compID))) &&
!((tu.cu->bdpcmMode && isLuma(compID)) || (tu.cu->bdpcmModeChroma && !isLuma(compID))) )
#else #else
if ( tu.cs->slice->getDepQuantEnabledFlag() && (tu.mtsIdx != MTS_SKIP || !isLuma(compID)) ) if ( tu.cs->slice->getDepQuantEnabledFlag() && (tu.mtsIdx != MTS_SKIP || !isLuma(compID)) )
#endif
#endif #endif
{ {
//===== scaling matrix ==== //===== scaling matrix ====
#if JVET_P0058_CHROMA_TS #if JVET_P0058_CHROMA_TS
const int qpDQ = cQP.Qp(tu.mtsIdx[compID] == MTS_SKIP) + 1; const int qpDQ = cQP.Qp(tu.mtsIdx[compID] == MTS_SKIP) + 1;
#else
#if JVET_P0059_CHROMA_BDPCM
const bool isTransformSkip = (tu.mtsIdx == MTS_SKIP && isLuma(compID)) || (tu.cu->bdpcmModeChroma && isChroma(compID) );
const int qpDQ = cQP.Qp(isTransformSkip) + 1;
#else #else
const int qpDQ = cQP.Qp(tu.mtsIdx==MTS_SKIP && isLuma(compID)) + 1; const int qpDQ = cQP.Qp(tu.mtsIdx==MTS_SKIP && isLuma(compID)) + 1;
#endif
#endif #endif
const int qpPer = qpDQ / 6; const int qpPer = qpDQ / 6;
const int qpRem = qpDQ - 6 * qpPer; const int qpRem = qpDQ - 6 * qpPer;
...@@ -1646,14 +1665,24 @@ void DepQuant::dequant( const TransformUnit &tu, CoeffBuf &dstCoeff, const Compo ...@@ -1646,14 +1665,24 @@ void DepQuant::dequant( const TransformUnit &tu, CoeffBuf &dstCoeff, const Compo
{ {
#if JVET_P0058_CHROMA_TS #if JVET_P0058_CHROMA_TS
if( tu.cs->slice->getDepQuantEnabledFlag() && (tu.mtsIdx[compID] != MTS_SKIP)) if( tu.cs->slice->getDepQuantEnabledFlag() && (tu.mtsIdx[compID] != MTS_SKIP))
#else
#if JVET_P0059_CHROMA_BDPCM
if ((tu.cs->slice->getDepQuantEnabledFlag() && (tu.mtsIdx != MTS_SKIP || !isLuma(compID))) &&
!((tu.cu->bdpcmMode && isLuma(compID)) || (tu.cu->bdpcmModeChroma && !isLuma(compID))) )
#else #else
if( tu.cs->slice->getDepQuantEnabledFlag() && (tu.mtsIdx != MTS_SKIP || !isLuma(compID)) ) if( tu.cs->slice->getDepQuantEnabledFlag() && (tu.mtsIdx != MTS_SKIP || !isLuma(compID)) )
#endif
#endif #endif
{ {
#if JVET_P0058_CHROMA_TS #if JVET_P0058_CHROMA_TS
const int qpDQ = cQP.Qp(tu.mtsIdx[compID] == MTS_SKIP) + 1; const int qpDQ = cQP.Qp(tu.mtsIdx[compID] == MTS_SKIP) + 1;
#else
#if JVET_P0059_CHROMA_BDPCM
const bool isTransformSkip = (tu.mtsIdx == MTS_SKIP && isLuma(compID)) || (tu.cu->bdpcmModeChroma && isChroma(compID) );
const int qpDQ = cQP.Qp(isTransformSkip) + 1;
#else #else
const int qpDQ = cQP.Qp(tu.mtsIdx==MTS_SKIP && isLuma(compID)) + 1; const int qpDQ = cQP.Qp(tu.mtsIdx==MTS_SKIP && isLuma(compID)) + 1;
#endif
#endif #endif
const int qpPer = qpDQ / 6; const int qpPer = qpDQ / 6;
const int qpRem = qpDQ - 6 * qpPer; const int qpRem = qpDQ - 6 * qpPer;
......
...@@ -273,7 +273,11 @@ void IntraPrediction::predIntraAng( const ComponentID compId, PelBuf &piPred, co ...@@ -273,7 +273,11 @@ void IntraPrediction::predIntraAng( const ComponentID compId, PelBuf &piPred, co
#if JVET_P0641_REMOVE_2xN_CHROMA_INTRA #if JVET_P0641_REMOVE_2xN_CHROMA_INTRA
CHECK(iWidth == 2, "Width of 2 is not supported"); CHECK(iWidth == 2, "Width of 2 is not supported");
#endif #endif
#if JVET_P0059_CHROMA_BDPCM
const uint32_t uiDirMode = isLuma( compId ) && pu.cu->bdpcmMode ? BDPCM_IDX : !isLuma(compId) && pu.cu->bdpcmModeChroma ? BDPCM_IDX : PU::getFinalIntraMode(pu, channelType);
#else
const uint32_t uiDirMode = isLuma( compId ) && pu.cu->bdpcmMode ? BDPCM_IDX : PU::getFinalIntraMode( pu, channelType ); const uint32_t uiDirMode = isLuma( compId ) && pu.cu->bdpcmMode ? BDPCM_IDX : PU::getFinalIntraMode( pu, channelType );
#endif
CHECK( floorLog2(iWidth) < 2 && pu.cs->pcv->noChroma2x2, "Size not allowed" ); CHECK( floorLog2(iWidth) < 2 && pu.cs->pcv->noChroma2x2, "Size not allowed" );
CHECK( floorLog2(iWidth) > 7, "Size not allowed" ); CHECK( floorLog2(iWidth) > 7, "Size not allowed" );
...@@ -288,7 +292,11 @@ void IntraPrediction::predIntraAng( const ComponentID compId, PelBuf &piPred, co ...@@ -288,7 +292,11 @@ void IntraPrediction::predIntraAng( const ComponentID compId, PelBuf &piPred, co
{ {
case(PLANAR_IDX): xPredIntraPlanar(srcBuf, piPred); break; case(PLANAR_IDX): xPredIntraPlanar(srcBuf, piPred); break;
case(DC_IDX): xPredIntraDc(srcBuf, piPred, channelType, false); break; case(DC_IDX): xPredIntraDc(srcBuf, piPred, channelType, false); break;
#if JVET_P0059_CHROMA_BDPCM
case(BDPCM_IDX): xPredIntraBDPCM(srcBuf, piPred, isLuma(compID) ? pu.cu->bdpcmMode : pu.cu->bdpcmModeChroma, clpRng); break;
#else
case(BDPCM_IDX): xPredIntraBDPCM(srcBuf, piPred, pu.cu->bdpcmMode, clpRng); break; case(BDPCM_IDX): xPredIntraBDPCM(srcBuf, piPred, pu.cu->bdpcmMode, clpRng); break;
#endif
default: xPredIntraAng(srcBuf, piPred, channelType, clpRng); break; default: xPredIntraAng(srcBuf, piPred, channelType, clpRng); break;
} }
...@@ -470,7 +478,11 @@ void IntraPrediction::initPredIntraParams(const PredictionUnit & pu, const CompA ...@@ -470,7 +478,11 @@ void IntraPrediction::initPredIntraParams(const PredictionUnit & pu, const CompA
) )
{ {
} }
#if JVET_P0059_CHROMA_BDPCM
else if ((isLuma(chType) && pu.cu->bdpcmMode) || (!isLuma(chType) && pu.cu->bdpcmModeChroma)) // BDPCM
#else
else if (isLuma( chType ) && pu.cu->bdpcmMode) // BDPCM else if (isLuma( chType ) && pu.cu->bdpcmMode) // BDPCM
#endif
{ {
m_ipaParam.refFilterFlag = false; m_ipaParam.refFilterFlag = false;
} }
...@@ -566,7 +578,7 @@ void IntraPrediction::xPredIntraAng( const CPelBuf &pSrc, PelBuf &pDst, const Ch ...@@ -566,7 +578,7 @@ void IntraPrediction::xPredIntraAng( const CPelBuf &pSrc, PelBuf &pDst, const Ch
// Extend main reference to right using replication // Extend main reference to right using replication
const int log2Ratio = floorLog2(width) - floorLog2(height); const int log2Ratio = floorLog2(width) - floorLog2(height);
const int s = std::max<int>(0, bIsModeVer ? log2Ratio : -log2Ratio); const int s = std::max<int>(0, bIsModeVer ? log2Ratio : -log2Ratio);
const int maxIndex = (multiRefIdx << s) + 1; const int maxIndex = (multiRefIdx << s) + 2;
const int refLength = bIsModeVer ? m_topRefLength : m_leftRefLength; const int refLength = bIsModeVer ? m_topRefLength : m_leftRefLength;
const Pel val = refMain[refLength + multiRefIdx]; const Pel val = refMain[refLength + multiRefIdx];
for (int z = 1; z <= maxIndex; z++) for (int z = 1; z <= maxIndex; z++)
......
...@@ -701,7 +701,11 @@ unsigned LoopFilter::xGetBoundaryStrengthSingle ( const CodingUnit& cu, const De ...@@ -701,7 +701,11 @@ unsigned LoopFilter::xGetBoundaryStrengthSingle ( const CodingUnit& cu, const De
{ {
#if JVET_P0571_FIX_BS_BDPCM_CHROMA #if JVET_P0571_FIX_BS_BDPCM_CHROMA
int bsY = (MODE_INTRA == cuP.predMode && cuP.bdpcmMode) && (MODE_INTRA == cuQ.predMode && cuQ.bdpcmMode) ? 0 : 2; int bsY = (MODE_INTRA == cuP.predMode && cuP.bdpcmMode) && (MODE_INTRA == cuQ.predMode && cuQ.bdpcmMode) ? 0 : 2;
#if JVET_P0059_CHROMA_BDPCM
int bsC = (MODE_INTRA == cuP.predMode && cuP.bdpcmModeChroma) && (MODE_INTRA == cuQ.predMode && cuQ.bdpcmModeChroma) ? 0 : 2;
#else
int bsC = 2; int bsC = 2;
#endif
return (BsSet(bsY, COMPONENT_Y) + BsSet(bsC, COMPONENT_Cb) + BsSet(bsC, COMPONENT_Cr)); return (BsSet(bsY, COMPONENT_Y) + BsSet(bsC, COMPONENT_Cb) + BsSet(bsC, COMPONENT_Cr));
#else #else
return (BsSet(2, COMPONENT_Y) + BsSet(2, COMPONENT_Cb) + BsSet(2, COMPONENT_Cr)); return (BsSet(2, COMPONENT_Y) + BsSet(2, COMPONENT_Cb) + BsSet(2, COMPONENT_Cr));
......
...@@ -155,7 +155,11 @@ void invResDPCM( const TransformUnit &tu, const ComponentID &compID, CoeffBuf &d ...@@ -155,7 +155,11 @@ void invResDPCM( const TransformUnit &tu, const ComponentID &compID, CoeffBuf &d
const TCoeff* coef = &coeffs.buf[0]; const TCoeff* coef = &coeffs.buf[0];
TCoeff* dst = &dstBuf.buf[0]; TCoeff* dst = &dstBuf.buf[0];
#if JVET_P0059_CHROMA_BDPCM
if( isLuma(compID) ? tu.cu->bdpcmMode == 1 : tu.cu->bdpcmModeChroma == 1)
#else
if( tu.cu->bdpcmMode == 1 ) if( tu.cu->bdpcmMode == 1 )
#endif
{ {
for( int y = 0; y < hgt; y++ ) for( int y = 0; y < hgt; y++ )
{ {
...@@ -195,7 +199,11 @@ void fwdResDPCM( TransformUnit &tu, const ComponentID &compID ) ...@@ -195,7 +199,11 @@ void fwdResDPCM( TransformUnit &tu, const ComponentID &compID )
TCoeff* coef = &coeffs.buf[0]; TCoeff* coef = &coeffs.buf[0];
#if JVET_P0059_CHROMA_BDPCM
if( isLuma(compID) ? tu.cu->bdpcmMode == 1 : tu.cu->bdpcmModeChroma == 1)
#else
if( tu.cu->bdpcmMode == 1 ) if( tu.cu->bdpcmMode == 1 )
#endif
{ {
for( int y = 0; y < hgt; y++ ) for( int y = 0; y < hgt; y++ )
{ {
...@@ -379,7 +387,11 @@ void Quant::dequant(const TransformUnit &tu, ...@@ -379,7 +387,11 @@ void Quant::dequant(const TransformUnit &tu,
const int channelBitDepth = sps->getBitDepth(toChannelType(compID)); const int channelBitDepth = sps->getBitDepth(toChannelType(compID));
const TCoeff *coef; const TCoeff *coef;
#if JVET_P0059_CHROMA_BDPCM
if ((tu.cu->bdpcmMode && isLuma(compID)) || ( tu.cu->bdpcmModeChroma && isChroma(compID) ))
#else
if( tu.cu->bdpcmMode && isLuma(compID) ) if( tu.cu->bdpcmMode && isLuma(compID) )
#endif
{ {
invResDPCM( tu, compID, dstCoeff ); invResDPCM( tu, compID, dstCoeff );
coef = piCoef; coef = piCoef;
...@@ -529,17 +541,33 @@ void Quant::setScalingList(ScalingList *scalingList, const int maxLog2TrDynamicR ...@@ -529,17 +541,33 @@ void Quant::setScalingList(ScalingList *scalingList, const int maxLog2TrDynamicR
const int minimumQp = 0; const int minimumQp = 0;
const int maximumQp = SCALING_LIST_REM_NUM; const int maximumQp = SCALING_LIST_REM_NUM;
#if JVET_P01034_PRED_1D_SCALING_LIST
int scalingListId = 0;
int recScalingListId = 0;
#endif
for(uint32_t size = SCALING_LIST_FIRST_CODED; size <= SCALING_LIST_LAST_CODED; size++) //2x2->64x64 for(uint32_t size = SCALING_LIST_FIRST_CODED; size <= SCALING_LIST_LAST_CODED; size++) //2x2->64x64
{ {
for(uint32_t list = 0; list < SCALING_LIST_NUM; list++) for(uint32_t list = 0; list < SCALING_LIST_NUM; list++)
{ {
#if JVET_P01034_PRED_1D_SCALING_LIST
if ((size == SCALING_LIST_2x2 && list < 4) || (size == SCALING_LIST_64x64 && list % (SCALING_LIST_NUM / SCALING_LIST_PRED_MODES) != 0)) // skip 2x2 luma
#else
if (size == SCALING_LIST_2x2 && list % (SCALING_LIST_NUM / SCALING_LIST_PRED_MODES) == 0) // skip 2x2 luma if (size == SCALING_LIST_2x2 && list % (SCALING_LIST_NUM / SCALING_LIST_PRED_MODES) == 0) // skip 2x2 luma
#endif
continue; continue;
for(int qp = minimumQp; qp < maximumQp; qp++) for(int qp = minimumQp; qp < maximumQp; qp++)
{ {
#if JVET_P01034_PRED_1D_SCALING_LIST
xSetScalingListEnc(scalingList, list, size, qp, scalingListId);
xSetScalingListDec(*scalingList, list, size, qp, scalingListId);
#else
xSetScalingListEnc(scalingList,list,size,qp); xSetScalingListEnc(scalingList,list,size,qp);
xSetScalingListDec(*scalingList,list,size,qp); xSetScalingListDec(*scalingList,list,size,qp);
#endif
} }
#if JVET_P01034_PRED_1D_SCALING_LIST
scalingListId++;
#endif
} }
} }
//based on square result and apply downsample technology //based on square result and apply downsample technology
...@@ -550,10 +578,21 @@ void Quant::setScalingList(ScalingList *scalingList, const int maxLog2TrDynamicR ...@@ -550,10 +578,21 @@ void Quant::setScalingList(ScalingList *scalingList, const int maxLog2TrDynamicR
if (sizew == sizeh || (sizew == SCALING_LIST_1x1 && sizeh<SCALING_LIST_4x4) || (sizeh == SCALING_LIST_1x1 && sizew<SCALING_LIST_4x4)) continue; if (sizew == sizeh || (sizew == SCALING_LIST_1x1 && sizeh<SCALING_LIST_4x4) || (sizeh == SCALING_LIST_1x1 && sizew<SCALING_LIST_4x4)) continue;
for (uint32_t list = 0; list < SCALING_LIST_NUM; list++) //9 for (uint32_t list = 0; list < SCALING_LIST_NUM; list++) //9
{ {
#if JVET_P01034_PRED_1D_SCALING_LIST
int largerSide = (sizew > sizeh) ? sizew : sizeh;
if (largerSide == SCALING_LIST_64x64 && list % (SCALING_LIST_NUM / SCALING_LIST_PRED_MODES) != 0) continue;
if (largerSide < SCALING_LIST_4x4) printf("Rectangle Error !\n");
recScalingListId = SCALING_LIST_NUM * (largerSide - 2) + 2 + (list / ((largerSide == SCALING_LIST_64x64) ? 3 : 1));
#endif
for (int qp = minimumQp; qp < maximumQp; qp++) for (int qp = minimumQp; qp < maximumQp; qp++)
{ {
#if JVET_P01034_PRED_1D_SCALING_LIST
xSetRecScalingListEnc(scalingList, list, sizew, sizeh, qp, recScalingListId);
xSetRecScalingListDec(*scalingList, list, sizew, sizeh, qp, recScalingListId);
#else
xSetRecScalingListEnc(scalingList, list, sizew, sizeh, qp); xSetRecScalingListEnc(scalingList, list, sizew, sizeh, qp);
xSetRecScalingListDec(*scalingList, list, sizew, sizeh, qp); xSetRecScalingListDec(*scalingList, list, sizew, sizeh, qp);
#endif
} }
} }
} }
...@@ -568,16 +607,31 @@ void Quant::setScalingListDec(const ScalingList &scalingList) ...@@ -568,16 +607,31 @@ void Quant::setScalingListDec(const ScalingList &scalingList)
const int minimumQp = 0; const int minimumQp = 0;
const int maximumQp = SCALING_LIST_REM_NUM; const int maximumQp = SCALING_LIST_REM_NUM;
#if JVET_P01034_PRED_1D_SCALING_LIST
int scalingListId = 0;
int recScalingListId = 0;
#endif
for (uint32_t size = SCALING_LIST_FIRST_CODED; size <= SCALING_LIST_LAST_CODED; size++) for (uint32_t size = SCALING_LIST_FIRST_CODED; size <= SCALING_LIST_LAST_CODED; size++)
{ {
for(uint32_t list = 0; list < SCALING_LIST_NUM; list++) for(uint32_t list = 0; list < SCALING_LIST_NUM; list++)
{ {
#if JVET_P01034_PRED_1D_SCALING_LIST
if ((size == SCALING_LIST_2x2 && list < 4) || (size == SCALING_LIST_64x64 && list % (SCALING_LIST_NUM / SCALING_LIST_PRED_MODES) != 0)) // skip 2x2 luma
#else
if (size == SCALING_LIST_2x2 && list % (SCALING_LIST_NUM / SCALING_LIST_PRED_MODES) == 0) // skip 2x2 luma if (size == SCALING_LIST_2x2 && list % (SCALING_LIST_NUM / SCALING_LIST_PRED_MODES) == 0) // skip 2x2 luma
#endif
continue; continue;
for(int qp = minimumQp; qp < maximumQp; qp++) for(int qp = minimumQp; qp < maximumQp; qp++)
{ {
#if JVET_P01034_PRED_1D_SCALING_LIST
xSetScalingListDec(scalingList, list, size, qp, scalingListId);
#else
xSetScalingListDec(scalingList,list,size,qp); xSetScalingListDec(scalingList,list,size,qp);
#endif
} }
#if JVET_P01034_PRED_1D_SCALING_LIST
scalingListId++;
#endif
} }
} }
//based on square result and apply downsample technology //based on square result and apply downsample technology
...@@ -589,9 +643,19 @@ void Quant::setScalingListDec(const ScalingList &scalingList) ...@@ -589,9 +643,19 @@ void Quant::setScalingListDec(const ScalingList &scalingList)
if (sizew == sizeh || (sizew == SCALING_LIST_1x1 && sizeh<SCALING_LIST_4x4) || (sizeh == SCALING_LIST_1x1 && sizew<SCALING_LIST_4x4)) continue; if (sizew == sizeh || (sizew == SCALING_LIST_1x1 && sizeh<SCALING_LIST_4x4) || (sizeh == SCALING_LIST_1x1 && sizew<SCALING_LIST_4x4)) continue;
for (uint32_t list = 0; list < SCALING_LIST_NUM; list++) //9 for (uint32_t list = 0; list < SCALING_LIST_NUM; list++) //9
{ {
#if JVET_P01034_PRED_1D_SCALING_LIST
int largerSide = (sizew > sizeh) ? sizew : sizeh;
if (largerSide == SCALING_LIST_64x64 && list % (SCALING_LIST_NUM / SCALING_LIST_PRED_MODES) != 0) continue;
if (largerSide < SCALING_LIST_4x4) printf("Rectangle Error !\n");
recScalingListId = SCALING_LIST_NUM * (largerSide - 2) + 2 + (list / ((largerSide == SCALING_LIST_64x64) ? 3 : 1));
#endif
for (int qp = minimumQp; qp < maximumQp; qp++) for (int qp = minimumQp; qp < maximumQp; qp++)
{ {
#if JVET_P01034_PRED_1D_SCALING_LIST
xSetRecScalingListDec(scalingList, list, sizew, sizeh, qp, recScalingListId);
#else
xSetRecScalingListDec(scalingList, list, sizew, sizeh, qp); xSetRecScalingListDec(scalingList, list, sizew, sizeh, qp);
#endif
} }
} }
} }
...@@ -606,13 +670,21 @@ void Quant::setScalingListDec(const ScalingList &scalingList) ...@@ -606,13 +670,21 @@ void Quant::setScalingListDec(const ScalingList &scalingList)
* \param qp Quantization parameter * \param qp Quantization parameter
* \param format chroma format * \param format chroma format
*/ */
#if JVET_P01034_PRED_1D_SCALING_LIST
void Quant::xSetScalingListEnc(ScalingList *scalingList, uint32_t listId, uint32_t sizeId, int qp, uint32_t scalingListId)
#else
void Quant::xSetScalingListEnc(ScalingList *scalingList, uint32_t listId, uint32_t sizeId, int qp) void Quant::xSetScalingListEnc(ScalingList *scalingList, uint32_t listId, uint32_t sizeId, int qp)
#endif
{ {
uint32_t width = g_scalingListSizeX[sizeId]; uint32_t width = g_scalingListSizeX[sizeId];
uint32_t height = g_scalingListSizeX[sizeId]; uint32_t height = g_scalingListSizeX[sizeId];
uint32_t ratio = g_scalingListSizeX[sizeId]/std::min(MAX_MATRIX_SIZE_NUM,(int)g_scalingListSizeX[sizeId]); uint32_t ratio = g_scalingListSizeX[sizeId]/std::min(MAX_MATRIX_SIZE_NUM,(int)g_scalingListSizeX[sizeId]);
int *quantcoeff; int *quantcoeff;
#if JVET_P01034_PRED_1D_SCALING_LIST
int *coeff = scalingList->getScalingListAddress(scalingListId);
#else
int *coeff = scalingList->getScalingListAddress(sizeId,listId); int *coeff = scalingList->getScalingListAddress(sizeId,listId);
#endif
quantcoeff = getQuantCoeff(listId, qp, sizeId, sizeId); quantcoeff = getQuantCoeff(listId, qp, sizeId, sizeId);
const bool blockIsNotPowerOf4 = ((floorLog2(width) + floorLog2(height)) & 1) == 1; const bool blockIsNotPowerOf4 = ((floorLog2(width) + floorLog2(height)) & 1) == 1;
...@@ -623,7 +695,11 @@ void Quant::xSetScalingListEnc(ScalingList *scalingList, uint32_t listId, uint32 ...@@ -623,7 +695,11 @@ void Quant::xSetScalingListEnc(ScalingList *scalingList, uint32_t listId, uint32
(quantScales << LOG2_SCALING_LIST_NEUTRAL_VALUE), (quantScales << LOG2_SCALING_LIST_NEUTRAL_VALUE),
height, width, ratio, height, width, ratio,
std::min(MAX_MATRIX_SIZE_NUM, (int)g_scalingListSizeX[sizeId]), std::min(MAX_MATRIX_SIZE_NUM, (int)g_scalingListSizeX[sizeId]),
#if JVET_P01034_PRED_1D_SCALING_LIST
scalingList->getScalingListDC(scalingListId));
#else
scalingList->getScalingListDC(sizeId,listId)); scalingList->getScalingListDC(sizeId,listId));
#endif
} }
/** set quantized matrix coefficient for decode /** set quantized matrix coefficient for decode
...@@ -633,13 +709,21 @@ void Quant::xSetScalingListEnc(ScalingList *scalingList, uint32_t listId, uint32 ...@@ -633,13 +709,21 @@ void Quant::xSetScalingListEnc(ScalingList *scalingList, uint32_t listId, uint32
* \param qp Quantization parameter * \param qp Quantization parameter
* \param format chroma format * \param format chroma format
*/ */
#if JVET_P01034_PRED_1D_SCALING_LIST
void Quant::xSetScalingListDec(const ScalingList &scalingList, uint32_t listId, uint32_t sizeId, int qp, uint32_t scalingListId)
#else
void Quant::xSetScalingListDec(const ScalingList &scalingList, uint32_t listId, uint32_t sizeId, int qp) void Quant::xSetScalingListDec(const ScalingList &scalingList, uint32_t listId, uint32_t sizeId, int qp)
#endif
{ {
uint32_t width = g_scalingListSizeX[sizeId]; uint32_t width = g_scalingListSizeX[sizeId];
uint32_t height = g_scalingListSizeX[sizeId]; uint32_t height = g_scalingListSizeX[sizeId];
uint32_t ratio = g_scalingListSizeX[sizeId]/std::min(MAX_MATRIX_SIZE_NUM,(int)g_scalingListSizeX[sizeId]); uint32_t ratio = g_scalingListSizeX[sizeId]/std::min(MAX_MATRIX_SIZE_NUM,(int)g_scalingListSizeX[sizeId]);
int *dequantcoeff; int *dequantcoeff;
#if JVET_P01034_PRED_1D_SCALING_LIST
const int *coeff = scalingList.getScalingListAddress(scalingListId);
#else
const int *coeff = scalingList.getScalingListAddress(sizeId,listId); const int *coeff = scalingList.getScalingListAddress(sizeId,listId);
#endif
dequantcoeff = getDequantCoeff(listId, qp, sizeId, sizeId); dequantcoeff = getDequantCoeff(listId, qp, sizeId, sizeId);
...@@ -651,7 +735,11 @@ void Quant::xSetScalingListDec(const ScalingList &scalingList, uint32_t listId, ...@@ -651,7 +735,11 @@ void Quant::xSetScalingListDec(const ScalingList &scalingList, uint32_t listId,
invQuantScale, invQuantScale,
height, width, ratio, height, width, ratio,
std::min(MAX_MATRIX_SIZE_NUM, (int)g_scalingListSizeX[sizeId]), std::min(MAX_MATRIX_SIZE_NUM, (int)g_scalingListSizeX[sizeId]),
#if JVET_P01034_PRED_1D_SCALING_LIST
scalingList.getScalingListDC(scalingListId));
#else
scalingList.getScalingListDC(sizeId,listId)); scalingList.getScalingListDC(sizeId,listId));
#endif
} }
/** set quantized matrix coefficient for encode /** set quantized matrix coefficient for encode
...@@ -661,7 +749,11 @@ void Quant::xSetScalingListDec(const ScalingList &scalingList, uint32_t listId, ...@@ -661,7 +749,11 @@ void Quant::xSetScalingListDec(const ScalingList &scalingList, uint32_t listId,
* \param qp Quantization parameter * \param qp Quantization parameter
* \param format chroma format * \param format chroma format
*/ */
#if JVET_P01034_PRED_1D_SCALING_LIST
void Quant::xSetRecScalingListEnc(ScalingList *scalingList, uint32_t listId, uint32_t sizeIdw, uint32_t sizeIdh, int qp, uint32_t scalingListId)
#else
void Quant::xSetRecScalingListEnc(ScalingList *scalingList, uint32_t listId, uint32_t sizeIdw, uint32_t sizeIdh, int qp) void Quant::xSetRecScalingListEnc(ScalingList *scalingList, uint32_t listId, uint32_t sizeIdw, uint32_t sizeIdh, int qp)
#endif
{ {
if (sizeIdw == sizeIdh) return; if (sizeIdw == sizeIdh) return;
...@@ -669,7 +761,11 @@ void Quant::xSetRecScalingListEnc(ScalingList *scalingList, uint32_t listId, uin ...@@ -669,7 +761,11 @@ void Quant::xSetRecScalingListEnc(ScalingList *scalingList, uint32_t listId, uin
uint32_t height = g_scalingListSizeX[sizeIdh]; uint32_t height = g_scalingListSizeX[sizeIdh];
uint32_t largeSideId = (sizeIdw > sizeIdh) ? sizeIdw : sizeIdh; //16 uint32_t largeSideId = (sizeIdw > sizeIdh) ? sizeIdw : sizeIdh; //16
int *quantcoeff; int *quantcoeff;
#if JVET_P01034_PRED_1D_SCALING_LIST
int *coeff = scalingList->getScalingListAddress(scalingListId);//4x4, 8x8
#else
int *coeff = scalingList->getScalingListAddress(largeSideId, listId);//4x4, 8x8 int *coeff = scalingList->getScalingListAddress(largeSideId, listId);//4x4, 8x8
#endif
quantcoeff = getQuantCoeff(listId, qp, sizeIdw, sizeIdh);//final quantCoeff (downsample) quantcoeff = getQuantCoeff(listId, qp, sizeIdw, sizeIdh);//final quantCoeff (downsample)
const bool blockIsNotPowerOf4 = ((floorLog2(width) + floorLog2(height)) & 1) == 1; const bool blockIsNotPowerOf4 = ((floorLog2(width) + floorLog2(height)) & 1) == 1;
int quantScales = g_quantScales[blockIsNotPowerOf4?1:0][qp]; int quantScales = g_quantScales[blockIsNotPowerOf4?1:0][qp];
...@@ -680,7 +776,11 @@ void Quant::xSetRecScalingListEnc(ScalingList *scalingList, uint32_t listId, uin ...@@ -680,7 +776,11 @@ void Quant::xSetRecScalingListEnc(ScalingList *scalingList, uint32_t listId, uin
height, width, height, width,
((largeSideId>3) ? 2 : 1), ((largeSideId>3) ? 2 : 1),
((largeSideId >= 3) ? 8 : 4), ((largeSideId >= 3) ? 8 : 4),
#if JVET_P01034_PRED_1D_SCALING_LIST
scalingList->getScalingListDC(scalingListId));
#else
scalingList->getScalingListDC(largeSideId, listId)); scalingList->getScalingListDC(largeSideId, listId));
#endif
} }
/** set quantized matrix coefficient for decode /** set quantized matrix coefficient for decode
* \param scalingList quantaized matrix address * \param scalingList quantaized matrix address
...@@ -689,14 +789,22 @@ void Quant::xSetRecScalingListEnc(ScalingList *scalingList, uint32_t listId, uin ...@@ -689,14 +789,22 @@ void Quant::xSetRecScalingListEnc(ScalingList *scalingList, uint32_t listId, uin
* \param qp Quantization parameter * \param qp Quantization parameter
* \param format chroma format * \param format chroma format
*/ */
#if JVET_P01034_PRED_1D_SCALING_LIST
void Quant::xSetRecScalingListDec(const ScalingList &scalingList, uint32_t listId, uint32_t sizeIdw, uint32_t sizeIdh, int qp, uint32_t scalingListId)
#else
void Quant::xSetRecScalingListDec(const ScalingList &scalingList, uint32_t listId, uint32_t sizeIdw, uint32_t sizeIdh, int qp) void Quant::xSetRecScalingListDec(const ScalingList &scalingList, uint32_t listId, uint32_t sizeIdw, uint32_t sizeIdh, int qp)
#endif
{ {
if (sizeIdw == sizeIdh) return; if (sizeIdw == sizeIdh) return;
uint32_t width = g_scalingListSizeX[sizeIdw]; uint32_t width = g_scalingListSizeX[sizeIdw];
uint32_t height = g_scalingListSizeX[sizeIdh]; uint32_t height = g_scalingListSizeX[sizeIdh];
uint32_t largeSideId = (sizeIdw > sizeIdh) ? sizeIdw : sizeIdh; //16 uint32_t largeSideId = (sizeIdw > sizeIdh) ? sizeIdw : sizeIdh; //16
#if JVET_P01034_PRED_1D_SCALING_LIST
const int *coeff = scalingList.getScalingListAddress(scalingListId);
#else
const int *coeff = scalingList.getScalingListAddress(largeSideId, listId); const int *coeff = scalingList.getScalingListAddress(largeSideId, listId);
#endif
int *dequantcoeff; int *dequantcoeff;
dequantcoeff = getDequantCoeff(listId, qp, sizeIdw, sizeIdh); dequantcoeff = getDequantCoeff(listId, qp, sizeIdw, sizeIdh);
const bool blockIsNotPowerOf4 = ((floorLog2(width) + floorLog2(height)) & 1) == 1; const bool blockIsNotPowerOf4 = ((floorLog2(width) + floorLog2(height)) & 1) == 1;
...@@ -706,7 +814,11 @@ void Quant::xSetRecScalingListDec(const ScalingList &scalingList, uint32_t listI ...@@ -706,7 +814,11 @@ void Quant::xSetRecScalingListDec(const ScalingList &scalingList, uint32_t listI
invQuantScale, invQuantScale,
height, width, (largeSideId>3) ? 2 : 1, height, width, (largeSideId>3) ? 2 : 1,
(largeSideId >= 3 ? 8 : 4), (largeSideId >= 3 ? 8 : 4),
#if JVET_P01034_PRED_1D_SCALING_LIST
scalingList.getScalingListDC(scalingListId));
#else
scalingList.getScalingListDC(largeSideId, listId)); scalingList.getScalingListDC(largeSideId, listId));
#endif
} }
/** set flat matrix value to quantized coefficient /** set flat matrix value to quantized coefficient
*/ */
...@@ -946,8 +1058,12 @@ void Quant::quant(TransformUnit &tu, const ComponentID &compID, const CCoeffBuf ...@@ -946,8 +1058,12 @@ void Quant::quant(TransformUnit &tu, const ComponentID &compID, const CCoeffBuf
#if JVET_P0058_CHROMA_TS #if JVET_P0058_CHROMA_TS
const bool useTransformSkip = (tu.mtsIdx[compID] == MTS_SKIP); const bool useTransformSkip = (tu.mtsIdx[compID] == MTS_SKIP);
#else
#if JVET_P0059_CHROMA_BDPCM
const bool useTransformSkip = (tu.mtsIdx == MTS_SKIP && isLuma(compID)) || (tu.cu->bdpcmModeChroma && isChroma(compID) );
#else #else
const bool useTransformSkip = tu.mtsIdx==MTS_SKIP && isLuma(compID); const bool useTransformSkip = tu.mtsIdx==MTS_SKIP && isLuma(compID);
#endif
#endif #endif
const int maxLog2TrDynamicRange = sps.getMaxLog2TrDynamicRange(toChannelType(compID)); const int maxLog2TrDynamicRange = sps.getMaxLog2TrDynamicRange(toChannelType(compID));
...@@ -1006,7 +1122,11 @@ void Quant::quant(TransformUnit &tu, const ComponentID &compID, const CCoeffBuf ...@@ -1006,7 +1122,11 @@ void Quant::quant(TransformUnit &tu, const ComponentID &compID, const CCoeffBuf
piQCoef.buf[uiBlockPos] = Clip3<TCoeff>( entropyCodingMinimum, entropyCodingMaximum, quantisedCoefficient ); piQCoef.buf[uiBlockPos] = Clip3<TCoeff>( entropyCodingMinimum, entropyCodingMaximum, quantisedCoefficient );
} // for n } // for n
#if JVET_P0059_CHROMA_BDPCM
if ((tu.cu->bdpcmMode && isLuma(compID)) || (tu.cu->bdpcmModeChroma && isChroma(compID)) )
#else
if( tu.cu->bdpcmMode && isLuma(compID) ) if( tu.cu->bdpcmMode && isLuma(compID) )
#endif
{ {
fwdResDPCM( tu, compID ); fwdResDPCM( tu, compID );
} }
...@@ -1157,9 +1277,15 @@ void Quant::invTrSkipDeQuantOneSample(TransformUnit &tu, const ComponentID &comp ...@@ -1157,9 +1277,15 @@ void Quant::invTrSkipDeQuantOneSample(TransformUnit &tu, const ComponentID &comp
#if JVET_P0058_CHROMA_TS #if JVET_P0058_CHROMA_TS
const int QP_per = cQP.per(tu.mtsIdx[compID] == MTS_SKIP); const int QP_per = cQP.per(tu.mtsIdx[compID] == MTS_SKIP);
const int QP_rem = cQP.rem(tu.mtsIdx[compID] == MTS_SKIP); const int QP_rem = cQP.rem(tu.mtsIdx[compID] == MTS_SKIP);
#else
#if JVET_P0059_CHROMA_BDPCM
const bool isTransformSkip = (tu.mtsIdx == MTS_SKIP && isLuma(compID)) || (tu.cu->bdpcmModeChroma && isChroma(compID));
const int QP_per = cQP.per(isTransformSkip);
const int QP_rem = cQP.rem(isTransformSkip);
#else #else
const int QP_per = cQP.per(tu.mtsIdx==MTS_SKIP && isLuma(compID)); const int QP_per = cQP.per(tu.mtsIdx==MTS_SKIP && isLuma(compID));
const int QP_rem = cQP.rem(tu.mtsIdx==MTS_SKIP && isLuma(compID)); const int QP_rem = cQP.rem(tu.mtsIdx==MTS_SKIP && isLuma(compID));
#endif
#endif #endif
const int maxLog2TrDynamicRange = sps.getMaxLog2TrDynamicRange(toChannelType(compID)); const int maxLog2TrDynamicRange = sps.getMaxLog2TrDynamicRange(toChannelType(compID));
const int channelBitDepth = sps.getBitDepth(toChannelType(compID)); const int channelBitDepth = sps.getBitDepth(toChannelType(compID));
......
...@@ -160,10 +160,17 @@ private: ...@@ -160,10 +160,17 @@ private:
void xInitScalingList ( const Quant* other ); void xInitScalingList ( const Quant* other );
void xDestroyScalingList(); void xDestroyScalingList();
void xSetFlatScalingList( uint32_t list, uint32_t sizeX, uint32_t sizeY, int qp ); void xSetFlatScalingList( uint32_t list, uint32_t sizeX, uint32_t sizeY, int qp );
#if JVET_P01034_PRED_1D_SCALING_LIST
void xSetScalingListEnc(ScalingList *scalingList, uint32_t list, uint32_t size, int qp, uint32_t scalingListId);
void xSetScalingListDec(const ScalingList &scalingList, uint32_t list, uint32_t size, int qp, uint32_t scalingListId);
void xSetRecScalingListEnc(ScalingList *scalingList, uint32_t list, uint32_t sizew, uint32_t sizeh, int qp, uint32_t scalingListId);
void xSetRecScalingListDec(const ScalingList &scalingList, uint32_t list, uint32_t sizew, uint32_t sizeh, int qp, uint32_t scalingListId);
#else
void xSetScalingListEnc ( ScalingList *scalingList, uint32_t list, uint32_t size, int qp ); void xSetScalingListEnc ( ScalingList *scalingList, uint32_t list, uint32_t size, int qp );
void xSetScalingListDec ( const ScalingList &scalingList, uint32_t list, uint32_t size, int qp ); void xSetScalingListDec ( const ScalingList &scalingList, uint32_t list, uint32_t size, int qp );
void xSetRecScalingListEnc( ScalingList *scalingList, uint32_t list, uint32_t sizew, uint32_t sizeh, int qp ); void xSetRecScalingListEnc( ScalingList *scalingList, uint32_t list, uint32_t sizew, uint32_t sizeh, int qp );
void xSetRecScalingListDec( const ScalingList &scalingList, uint32_t list, uint32_t sizew, uint32_t sizeh, int qp ); void xSetRecScalingListDec( const ScalingList &scalingList, uint32_t list, uint32_t sizew, uint32_t sizeh, int qp );
#endif
private: private:
void xSignBitHidingHDQ (TCoeff* pQCoef, const TCoeff* pCoef, TCoeff* deltaU, const CoeffCodingContext& cctx, const int maxLog2TrDynamicRange); void xSignBitHidingHDQ (TCoeff* pQCoef, const TCoeff* pCoef, TCoeff* deltaU, const CoeffCodingContext& cctx, const int maxLog2TrDynamicRange);
......
...@@ -549,11 +549,19 @@ void QuantRDOQ::quant(TransformUnit &tu, const ComponentID &compID, const CCoeff ...@@ -549,11 +549,19 @@ void QuantRDOQ::quant(TransformUnit &tu, const ComponentID &compID, const CCoeff
#endif #endif
#if JVET_P0058_CHROMA_TS #if JVET_P0058_CHROMA_TS
if( useTransformSkip ) if( useTransformSkip )
#else
#if JVET_P0059_CHROMA_BDPCM
if((isLuma(compID) && useTransformSkip) || (isChroma(compID) && tu.cu->bdpcmModeChroma))
#else #else
if( isLuma( compID ) && useTransformSkip ) if( isLuma( compID ) && useTransformSkip )
#endif
#endif #endif
{ {
#if JVET_P0059_CHROMA_BDPCM
if( (tu.cu->bdpcmMode && isLuma(compID)) || (isChroma(compID) && tu.cu->bdpcmModeChroma ) )
#else
if( tu.cu->bdpcmMode && isLuma(compID) ) if( tu.cu->bdpcmMode && isLuma(compID) )
#endif
{ {
forwardRDPCM( tu, compID, pSrc, uiAbsSum, cQP, ctx ); forwardRDPCM( tu, compID, pSrc, uiAbsSum, cQP, ctx );
} }
...@@ -650,8 +658,12 @@ void QuantRDOQ::xRateDistOptQuant(TransformUnit &tu, const ComponentID &compID, ...@@ -650,8 +658,12 @@ void QuantRDOQ::xRateDistOptQuant(TransformUnit &tu, const ComponentID &compID,
const bool needSqrtAdjustment= TU::needsBlockSizeTrafoScale( tu, compID ); const bool needSqrtAdjustment= TU::needsBlockSizeTrafoScale( tu, compID );
#if JVET_P0058_CHROMA_TS #if JVET_P0058_CHROMA_TS
const bool isTransformSkip = (tu.mtsIdx[compID] == MTS_SKIP); const bool isTransformSkip = (tu.mtsIdx[compID] == MTS_SKIP);
#else
#if JVET_P0059_CHROMA_BDPCM
const bool isTransformSkip = (tu.mtsIdx == MTS_SKIP && isLuma(compID)) || (tu.cu->bdpcmModeChroma && isChroma(compID));
#else #else
const bool isTransformSkip = tu.mtsIdx==MTS_SKIP && isLuma(compID); const bool isTransformSkip = tu.mtsIdx==MTS_SKIP && isLuma(compID);
#endif
#endif #endif
const double *const pdErrScale = xGetErrScaleCoeffSL(scalingListType, uiLog2BlockWidth, uiLog2BlockHeight, cQP.rem(isTransformSkip)); const double *const pdErrScale = xGetErrScaleCoeffSL(scalingListType, uiLog2BlockWidth, uiLog2BlockHeight, cQP.rem(isTransformSkip));
const int *const piQCoef = getQuantCoeff(scalingListType, cQP.rem(isTransformSkip), uiLog2BlockWidth, uiLog2BlockHeight); const int *const piQCoef = getQuantCoeff(scalingListType, cQP.rem(isTransformSkip), uiLog2BlockWidth, uiLog2BlockHeight);
...@@ -1245,9 +1257,13 @@ void QuantRDOQ::xRateDistOptQuantTS( TransformUnit &tu, const ComponentID &compI ...@@ -1245,9 +1257,13 @@ void QuantRDOQ::xRateDistOptQuantTS( TransformUnit &tu, const ComponentID &compI
const bool needsSqrt2Scale = TU::needsSqrt2Scale( tu, compID ); // should always be false - transform-skipped blocks don't require sqrt(2) compensation. const bool needsSqrt2Scale = TU::needsSqrt2Scale( tu, compID ); // should always be false - transform-skipped blocks don't require sqrt(2) compensation.
#if JVET_P0058_CHROMA_TS #if JVET_P0058_CHROMA_TS
const bool isTransformSkip = (tu.mtsIdx[compID] == MTS_SKIP); const bool isTransformSkip = (tu.mtsIdx[compID] == MTS_SKIP);
#else
#if JVET_P0059_CHROMA_BDPCM
const bool isTransformSkip = (tu.mtsIdx == MTS_SKIP && isLuma(compID)) || ( tu.cu->bdpcmModeChroma && isChroma(compID) );
#else #else
const bool isTransformSkip = tu.mtsIdx==MTS_SKIP && isLuma(compID); const bool isTransformSkip = tu.mtsIdx==MTS_SKIP && isLuma(compID);
#endif #endif
#endif
#if JVET_P1000_REMOVE_TRANFORMSHIFT_IN_TS_MODE #if JVET_P1000_REMOVE_TRANFORMSHIFT_IN_TS_MODE
const int qBits = QUANT_SHIFT + qp.per(isTransformSkip) + (isTransformSkip ? 0 : transformShift) + (needsSqrt2Scale ? -1 : 0); // Right shift of non-RDOQ quantizer; level = (coeff*uiQ + offset)>>q_bits const int qBits = QUANT_SHIFT + qp.per(isTransformSkip) + (isTransformSkip ? 0 : transformShift) + (needsSqrt2Scale ? -1 : 0); // Right shift of non-RDOQ quantizer; level = (coeff*uiQ + offset)>>q_bits
#else #else
...@@ -1460,8 +1476,11 @@ void QuantRDOQ::forwardRDPCM( TransformUnit &tu, const ComponentID &compID, cons ...@@ -1460,8 +1476,11 @@ void QuantRDOQ::forwardRDPCM( TransformUnit &tu, const ComponentID &compID, cons
const bool extendedPrecision = sps.getSpsRangeExtension().getExtendedPrecisionProcessingFlag(); const bool extendedPrecision = sps.getSpsRangeExtension().getExtendedPrecisionProcessingFlag();
const int maxLog2TrDynamicRange = sps.getMaxLog2TrDynamicRange(chType); const int maxLog2TrDynamicRange = sps.getMaxLog2TrDynamicRange(chType);
#if JVET_P0059_CHROMA_BDPCM
const int dirMode = isLuma(compID) ? tu.cu->bdpcmMode : tu.cu->bdpcmModeChroma;
#else
const int dirMode = tu.cu->bdpcmMode; const int dirMode = tu.cu->bdpcmMode;
#endif
int transformShift = getTransformShift(channelBitDepth, rect.size(), maxLog2TrDynamicRange); int transformShift = getTransformShift(channelBitDepth, rect.size(), maxLog2TrDynamicRange);
if (extendedPrecision) if (extendedPrecision)
...@@ -1493,9 +1512,13 @@ void QuantRDOQ::forwardRDPCM( TransformUnit &tu, const ComponentID &compID, cons ...@@ -1493,9 +1512,13 @@ void QuantRDOQ::forwardRDPCM( TransformUnit &tu, const ComponentID &compID, cons
const bool needsSqrt2Scale = TU::needsSqrt2Scale(tu, compID); // should always be false - transform-skipped blocks don't require sqrt(2) compensation. const bool needsSqrt2Scale = TU::needsSqrt2Scale(tu, compID); // should always be false - transform-skipped blocks don't require sqrt(2) compensation.
#if JVET_P0058_CHROMA_TS #if JVET_P0058_CHROMA_TS
const bool isTransformSkip = (tu.mtsIdx[compID] == MTS_SKIP); const bool isTransformSkip = (tu.mtsIdx[compID] == MTS_SKIP);
#else
#if JVET_P0059_CHROMA_BDPCM
const bool isTransformSkip = (tu.mtsIdx == MTS_SKIP && isLuma(compID)) || (tu.cu->bdpcmModeChroma && isChroma(compID) );
#else #else
const bool isTransformSkip = tu.mtsIdx==MTS_SKIP && isLuma(compID); const bool isTransformSkip = tu.mtsIdx==MTS_SKIP && isLuma(compID);
#endif #endif
#endif
#if JVET_P1000_REMOVE_TRANFORMSHIFT_IN_TS_MODE #if JVET_P1000_REMOVE_TRANFORMSHIFT_IN_TS_MODE
const int qBits = QUANT_SHIFT + qp.per(isTransformSkip) + (isTransformSkip? 0 : transformShift) + ( needsSqrt2Scale ? -1 : 0); // Right shift of non-RDOQ quantizer; level = (coeff*uiQ + offset)>>q_bits const int qBits = QUANT_SHIFT + qp.per(isTransformSkip) + (isTransformSkip? 0 : transformShift) + ( needsSqrt2Scale ? -1 : 0); // Right shift of non-RDOQ quantizer; level = (coeff*uiQ + offset)>>q_bits
#else #else
......
...@@ -225,6 +225,9 @@ void Reshape::copySliceReshaperInfo(SliceReshapeInfo& tInfo, SliceReshapeInfo& s ...@@ -225,6 +225,9 @@ void Reshape::copySliceReshaperInfo(SliceReshapeInfo& tInfo, SliceReshapeInfo& s
tInfo.reshaperModelMinBinIdx = sInfo.reshaperModelMinBinIdx; tInfo.reshaperModelMinBinIdx = sInfo.reshaperModelMinBinIdx;
memcpy(tInfo.reshaperModelBinCWDelta, sInfo.reshaperModelBinCWDelta, sizeof(int)*(PIC_CODE_CW_BINS)); memcpy(tInfo.reshaperModelBinCWDelta, sInfo.reshaperModelBinCWDelta, sizeof(int)*(PIC_CODE_CW_BINS));
tInfo.maxNbitsNeededDeltaCW = sInfo.maxNbitsNeededDeltaCW; tInfo.maxNbitsNeededDeltaCW = sInfo.maxNbitsNeededDeltaCW;
#if JVET_P0371_CHROMA_SCALING_OFFSET
tInfo.chrResScalingOffset = sInfo.chrResScalingOffset;
#endif
} }
tInfo.sliceReshaperEnableFlag = sInfo.sliceReshaperEnableFlag; tInfo.sliceReshaperEnableFlag = sInfo.sliceReshaperEnableFlag;
if (sInfo.sliceReshaperEnableFlag) if (sInfo.sliceReshaperEnableFlag)
...@@ -262,7 +265,11 @@ void Reshape::constructReshaper() ...@@ -262,7 +265,11 @@ void Reshape::constructReshaper()
else else
{ {
m_invScaleCoef[i] = (int32_t)(m_initCW * (1 << FP_PREC) / m_binCW[i]); m_invScaleCoef[i] = (int32_t)(m_initCW * (1 << FP_PREC) / m_binCW[i]);
#if JVET_P0371_CHROMA_SCALING_OFFSET
m_chromaAdjHelpLUT[i] = (int32_t)(m_initCW * (1 << FP_PREC) / ( m_binCW[i] + m_sliceReshapeInfo.chrResScalingOffset ) );
#else
m_chromaAdjHelpLUT[i] = m_invScaleCoef[i]; m_chromaAdjHelpLUT[i] = m_invScaleCoef[i];
#endif
} }
} }
for (int lumaSample = 0; lumaSample < m_reshapeLUTSize; lumaSample++) for (int lumaSample = 0; lumaSample < m_reshapeLUTSize; lumaSample++)
......
...@@ -659,11 +659,21 @@ const char *MatrixType[SCALING_LIST_SIZE_NUM][SCALING_LIST_NUM] = ...@@ -659,11 +659,21 @@ const char *MatrixType[SCALING_LIST_SIZE_NUM][SCALING_LIST_NUM] =
}, },
{ {
"INTRA64X64_LUMA", "INTRA64X64_LUMA",
#if JVET_P01034_PRED_1D_SCALING_LIST
"INTRA64X64_CHROMAU",
"INTRA64X64_CHROMAV",
#else
"INTRA64X64_CHROMAU_FROM16x16_CHROMAU", "INTRA64X64_CHROMAU_FROM16x16_CHROMAU",
"INTRA64X64_CHROMAV_FROM16x16_CHROMAV", "INTRA64X64_CHROMAV_FROM16x16_CHROMAV",
#endif
"INTER64X64_LUMA", "INTER64X64_LUMA",
#if JVET_P01034_PRED_1D_SCALING_LIST
"INTER64X64_CHROMAU",
"INTER64X64_CHROMAV"
#else
"INTER64X64_CHROMAU_FROM16x16_CHROMAU", "INTER64X64_CHROMAU_FROM16x16_CHROMAU",
"INTER64X64_CHROMAV_FROM16x16_CHROMAV" "INTER64X64_CHROMAV_FROM16x16_CHROMAV"
#endif
}, },
{ {
}, },
...@@ -697,11 +707,21 @@ const char *MatrixType_DC[SCALING_LIST_SIZE_NUM][SCALING_LIST_NUM] = ...@@ -697,11 +707,21 @@ const char *MatrixType_DC[SCALING_LIST_SIZE_NUM][SCALING_LIST_NUM] =
}, },
{ {
"INTRA64X64_LUMA_DC", "INTRA64X64_LUMA_DC",
#if JVET_P01034_PRED_1D_SCALING_LIST
"INTRA64X64_CHROMAU_DC",
"INTRA64X64_CHROMAV_DC",
#else
"INTRA64X64_CHROMAU_DC_FROM16x16_CHROMAU", "INTRA64X64_CHROMAU_DC_FROM16x16_CHROMAU",
"INTRA64X64_CHROMAV_DC_FROM16x16_CHROMAV", "INTRA64X64_CHROMAV_DC_FROM16x16_CHROMAV",
#endif
"INTER64X64_LUMA_DC", "INTER64X64_LUMA_DC",
#if JVET_P01034_PRED_1D_SCALING_LIST
"INTER64X64_CHROMAU_DC",
"INTER64X64_CHROMAV_DC"
#else
"INTER64X64_CHROMAU_DC_FROM16x16_CHROMAU", "INTER64X64_CHROMAU_DC_FROM16x16_CHROMAU",
"INTER64X64_CHROMAV_DC_FROM16x16_CHROMAV" "INTER64X64_CHROMAV_DC_FROM16x16_CHROMAV"
#endif
}, },
{ {
}, },
......