[x265-commits] [x265] Backed out changeset: 35b2d9e774c8
Deepthi Nandakumar
deepthi at multicorewareinc.com
Thu Sep 4 18:45:45 CEST 2014
details: http://hg.videolan.org/x265/rev/dde992b96623
branches: stable
changeset: 7923:dde992b96623
user: Deepthi Nandakumar <deepthi at multicorewareinc.com>
date: Mon Sep 01 14:12:40 2014 +0530
description:
Backed out changeset: 35b2d9e774c8
This patch disrupted CBR runs where we were unable to
hit the target bitrate. It is logically correct, but likely
incomplete.
Subject: [x265] Merge with stable
details: http://hg.videolan.org/x265/rev/c5624effb73c
branches:
changeset: 7924:c5624effb73c
user: Deepthi Nandakumar <deepthi at multicorewareinc.com>
date: Mon Sep 01 14:13:37 2014 +0530
description:
Merge with stable
Subject: [x265] analysis: CU structure now holds CU-specific information,
details: http://hg.videolan.org/x265/rev/62c4779fb0bb
branches:
changeset: 7925:62c4779fb0bb
user: Ashok Kumar Mishra<ashok at multicorewareinc.com>
date: Thu Aug 28 13:14:34 2014 +0530
description:
analysis: CU structure now holds CU-specific information,
Member fields include location inside CTU, boundary flags, offsets from CTU
origin. This will help replace the soon-to-be-gone initCU and initSubCU functions.
Subject: [x265] fix: hash/binary mismatch for new CU structure holds CU-specific info
details: http://hg.videolan.org/x265/rev/00c381bf6158
branches:
changeset: 7926:00c381bf6158
user: Ashok Kumar Mishra<ashok at multicorewareinc.com>
date: Wed Sep 03 19:47:22 2014 +0530
description:
fix: hash/binary mismatch for new CU structure holds CU-specific info
Subject: [x265] Resolve gcc warnings
details: http://hg.videolan.org/x265/rev/0b13c852f029
branches:
changeset: 7927:0b13c852f029
user: David T Yuen <dtyx265 at gmail.com>
date: Wed Sep 03 15:35:16 2014 -0700
description:
Resolve gcc warnings
* more parenthesis for macro
* changed signed to unsigned int
Subject: [x265] testbench(nquant): the Round value must be less than (2 ^ qbits)
details: http://hg.videolan.org/x265/rev/cf9245ee6a72
branches:
changeset: 7928:cf9245ee6a72
user: Min Chen <chenm003 at 163.com>
date: Wed Sep 03 16:36:44 2014 -0700
description:
testbench(nquant): the Round value must be less than (2 ^ qbits)
Subject: [x265] asm: enable 16bpp primitives of cvt32to16 and cvt16to32 for all block sizes
details: http://hg.videolan.org/x265/rev/d122845b9cc8
branches:
changeset: 7929:d122845b9cc8
user: Murugan Vairavel <murugan at multicorewareinc.com>
date: Wed Sep 03 18:24:56 2014 +0530
description:
asm: enable 16bpp primitives of cvt32to16 and cvt16to32 for all block sizes
Subject: [x265] cmake: fix BSD link, only link with librt if it exists (closes #75)
details: http://hg.videolan.org/x265/rev/139d6b2a1b19
branches: stable
changeset: 7930:139d6b2a1b19
user: Steve Borho <steve at borho.org>
date: Thu Sep 04 13:07:06 2014 +0200
description:
cmake: fix BSD link, only link with librt if it exists (closes #75)
Subject: [x265] version: detect OpenBSD for version string (closes #76)
details: http://hg.videolan.org/x265/rev/821c2eef4d52
branches: stable
changeset: 7931:821c2eef4d52
user: Steve Borho <steve at borho.org>
date: Thu Sep 04 13:11:33 2014 +0200
description:
version: detect OpenBSD for version string (closes #76)
Fix from Brad Smith
Subject: [x265] Merge with stable
details: http://hg.videolan.org/x265/rev/a184fed3e30c
branches:
changeset: 7932:a184fed3e30c
user: Steve Borho <steve at borho.org>
date: Thu Sep 04 13:15:03 2014 +0200
description:
Merge with stable
Subject: [x265] Entropy: Replaced getCtxQtCbf() with table
details: http://hg.videolan.org/x265/rev/8e4a0aeed2ca
branches:
changeset: 7933:8e4a0aeed2ca
user: Ashok Kumar Mishra<ashok at multicorewareinc.com>
date: Mon Sep 01 16:44:44 2014 +0530
description:
Entropy: Replaced getCtxQtCbf() with table
Subject: [x265] entropy: cleanup codeCUTransQuantBypassFlag
details: http://hg.videolan.org/x265/rev/7b364065ee45
branches:
changeset: 7934:7b364065ee45
user: Deepthi Nandakumar <deepthi at multicorewareinc.com>
date: Thu Sep 04 12:10:09 2014 +0530
description:
entropy: cleanup codeCUTransQuantBypassFlag
Subject: [x265] entropy: cleanup codePredMode
details: http://hg.videolan.org/x265/rev/0c50af24fdeb
branches:
changeset: 7935:0c50af24fdeb
user: Deepthi Nandakumar <deepthi at multicorewareinc.com>
date: Thu Sep 04 12:12:44 2014 +0530
description:
entropy: cleanup codePredMode
Subject: [x265] quant: use table for ctxCbf
details: http://hg.videolan.org/x265/rev/99754bc87944
branches:
changeset: 7936:99754bc87944
user: Deepthi Nandakumar <deepthi at multicorewareinc.com>
date: Thu Sep 04 12:17:44 2014 +0530
description:
quant: use table for ctxCbf
Subject: [x265] entropy: cleanup codeQtRootCbf
details: http://hg.videolan.org/x265/rev/7d81a06a1281
branches:
changeset: 7937:7d81a06a1281
user: Deepthi Nandakumar <deepthi at multicorewareinc.com>
date: Thu Sep 04 12:24:51 2014 +0530
description:
entropy: cleanup codeQtRootCbf
Subject: [x265] Merge
details: http://hg.videolan.org/x265/rev/b686cb0abd71
branches:
changeset: 7938:b686cb0abd71
user: Deepthi Nandakumar <deepthi at multicorewareinc.com>
date: Thu Sep 04 17:06:16 2014 +0530
description:
Merge
Subject: [x265] asm: avx2 asm code for dct4
details: http://hg.videolan.org/x265/rev/1e4dfa1b1a04
branches:
changeset: 7939:1e4dfa1b1a04
user: Dnyaneshwar G <dnyaneshwar at multicorewareinc.com>
date: Mon Sep 01 15:33:25 2014 +0530
description:
asm: avx2 asm code for dct4
Subject: [x265] Cleaned up TComDataCU::getQuadtreeTULog2MinSizeInCU for clarity and a bit of performance
details: http://hg.videolan.org/x265/rev/e1c4b45b9749
branches:
changeset: 7940:e1c4b45b9749
user: David T Yuen <dtyx265 at gmail.com>
date: Wed Sep 03 16:00:08 2014 -0700
description:
Cleaned up TComDataCU::getQuadtreeTULog2MinSizeInCU for clarity and a bit of performance
Subject: [x265] change index of m_buOffsetY[] from raster to zscan
details: http://hg.videolan.org/x265/rev/95eaa1854b78
branches:
changeset: 7941:95eaa1854b78
user: Satoshi Nakagawa <nakagawa424 at oki.com>
date: Wed Sep 03 17:26:01 2014 +0900
description:
change index of m_buOffsetY[] from raster to zscan
Subject: [x265] TComDataCU: Reduced repeated function call to calculate depth range
details: http://hg.videolan.org/x265/rev/73450cfe71bd
branches:
changeset: 7942:73450cfe71bd
user: Ashok Kumar Mishra<ashok at multicorewareinc.com>
date: Tue Sep 02 20:40:53 2014 +0530
description:
TComDataCU: Reduced repeated function call to calculate depth range
Subject: [x265] x86asm: warn when inappropriate instruction used in function with specified cpuflags
details: http://hg.videolan.org/x265/rev/a13952e1c9ec
branches:
changeset: 7943:a13952e1c9ec
user: Murugan Vairavel <murugan at multicorewareinc.com>
date: Thu Sep 04 17:25:30 2014 +0530
description:
x86asm: warn when inappropriate instruction used in function with specified cpuflags
Subject: [x265] count_nonzero primitive optimization, downscaling quantCoef from int32_t* to int16_t*
details: http://hg.videolan.org/x265/rev/93f7d92c566c
branches:
changeset: 7944:93f7d92c566c
user: Praveen Tiwari
date: Mon Aug 25 12:49:37 2014 +0530
description:
count_nonzero primitive optimization, downscaling quantCoef from int32_t* to int16_t*
Subject: [x265] dequant_normal optimization, downscaling quantCoef from int32_t* to int16_t*
details: http://hg.videolan.org/x265/rev/391bc4a8fd2a
branches:
changeset: 7945:391bc4a8fd2a
user: Praveen Tiwari
date: Tue Sep 02 11:21:52 2014 +0530
description:
dequant_normal optimization, downscaling quantCoef from int32_t* to int16_t*
Subject: [x265] dequant_normal asm code optimization as per new interface
details: http://hg.videolan.org/x265/rev/6866cdd49bb9
branches:
changeset: 7946:6866cdd49bb9
user: Praveen Tiwari
date: Tue Sep 02 11:23:11 2014 +0530
description:
dequant_normal asm code optimization as per new interface
Subject: [x265] dequant_scaling optimization, downscaling quantCoef from int32_t* to int16_t*
details: http://hg.videolan.org/x265/rev/05cb3e47d7a2
branches:
changeset: 7947:05cb3e47d7a2
user: Praveen Tiwari
date: Tue Sep 02 11:38:07 2014 +0530
description:
dequant_scaling optimization, downscaling quantCoef from int32_t* to int16_t*
Subject: [x265] quant.cpp, cleaned redundant code
details: http://hg.videolan.org/x265/rev/58ff366aebd8
branches:
changeset: 7948:58ff366aebd8
user: Praveen Tiwari
date: Mon Aug 25 15:03:23 2014 +0530
description:
quant.cpp, cleaned redundant code
Subject: [x265] nquant optimization, downscaling qCoef from int32_t* to int16_t*
details: http://hg.videolan.org/x265/rev/217edde31b13
branches:
changeset: 7949:217edde31b13
user: Praveen Tiwari
date: Tue Sep 02 12:05:17 2014 +0530
description:
nquant optimization, downscaling qCoef from int32_t* to int16_t*
Subject: [x265] rdoQuant optimization, downscaling dstCoeff fron int32_t* to int16_t*
details: http://hg.videolan.org/x265/rev/b77bde05f1ed
branches:
changeset: 7950:b77bde05f1ed
user: Praveen Tiwari
date: Mon Aug 25 16:26:49 2014 +0530
description:
rdoQuant optimization, downscaling dstCoeff fron int32_t* to int16_t*
Subject: [x265] signBitHidingHDQ optimization, downscaling coeff from int32_t* to int16_t*
details: http://hg.videolan.org/x265/rev/c89ecf8d1931
branches:
changeset: 7951:c89ecf8d1931
user: Praveen Tiwari
date: Mon Aug 25 16:54:19 2014 +0530
description:
signBitHidingHDQ optimization, downscaling coeff from int32_t* to int16_t*
Subject: [x265] cvt16to32_cnt optimization
details: http://hg.videolan.org/x265/rev/d07fa2c6ac80
branches:
changeset: 7952:d07fa2c6ac80
user: Praveen Tiwari
date: Mon Sep 01 17:07:05 2014 +0530
description:
cvt16to32_cnt optimization
Subject: [x265] conv16to32_count C interface modification, downscaling coeff from int32_t* to int16_t*
details: http://hg.videolan.org/x265/rev/aebafdb2283d
branches:
changeset: 7953:aebafdb2283d
user: Praveen Tiwari
date: Tue Sep 02 14:04:02 2014 +0530
description:
conv16to32_count C interface modification, downscaling coeff from int32_t* to int16_t*
Subject: [x265] conv16to32_count renamed to copy_count as per new interface
details: http://hg.videolan.org/x265/rev/02173f362ce8
branches:
changeset: 7954:02173f362ce8
user: Praveen Tiwari
date: Tue Sep 02 14:27:40 2014 +0530
description:
conv16to32_count renamed to copy_count as per new interface
Subject: [x265] temporarily disable avx2 version of copy_cnt primitive, need to update as per new interface
details: http://hg.videolan.org/x265/rev/2fc1a7daf239
branches:
changeset: 7955:2fc1a7daf239
user: Praveen Tiwari
date: Tue Sep 02 14:38:41 2014 +0530
description:
temporarily disable avx2 version of copy_cnt primitive, need to update as per new interface
Subject: [x265] added copy_shr primitive
details: http://hg.videolan.org/x265/rev/5fa05cc5e1f6
branches:
changeset: 7956:5fa05cc5e1f6
user: Praveen Tiwari
date: Tue Sep 02 15:31:10 2014 +0530
description:
added copy_shr primitive
Subject: [x265] added copy_shl primitive
details: http://hg.videolan.org/x265/rev/6408be48a353
branches:
changeset: 7957:6408be48a353
user: Praveen Tiwari
date: Tue Sep 02 17:47:11 2014 +0530
description:
added copy_shl primitive
Subject: [x265] optimize cvt32to16_shl by replacing copy_shl
details: http://hg.videolan.org/x265/rev/82af686b08a7
branches:
changeset: 7958:82af686b08a7
user: Praveen Tiwari
date: Tue Sep 02 17:52:33 2014 +0530
description:
optimize cvt32to16_shl by replacing copy_shl
Subject: [x265] quant_c optimization, downscaling qCoef from int32_t* to int16_t*
details: http://hg.videolan.org/x265/rev/94f6a56e4cf4
branches:
changeset: 7959:94f6a56e4cf4
user: Praveen Tiwari
date: Tue Sep 02 18:15:36 2014 +0530
description:
quant_c optimization, downscaling qCoef from int32_t* to int16_t*
Subject: [x265] quant path cleanup
details: http://hg.videolan.org/x265/rev/00746de25827
branches:
changeset: 7960:00746de25827
user: Praveen Tiwari
date: Tue Sep 02 18:49:32 2014 +0530
description:
quant path cleanup
Subject: [x265] quant: nits
details: http://hg.videolan.org/x265/rev/81afe0de79e0
branches:
changeset: 7961:81afe0de79e0
user: Steve Borho <steve at borho.org>
date: Thu Sep 04 17:57:24 2014 +0200
description:
quant: nits
Subject: [x265] quant: fix check macro
details: http://hg.videolan.org/x265/rev/a203702273ce
branches:
changeset: 7962:a203702273ce
user: Steve Borho <steve at borho.org>
date: Thu Sep 04 18:16:15 2014 +0200
description:
quant: fix check macro
Subject: [x265] asm: fix SSSE3 in SSE2 build warning in unused primitive
details: http://hg.videolan.org/x265/rev/0e0d0309e616
branches:
changeset: 7963:0e0d0309e616
user: Steve Borho <steve at borho.org>
date: Thu Sep 04 18:17:44 2014 +0200
description:
asm: fix SSSE3 in SSE2 build warning in unused primitive
Bug fix back-ported from x264. The function was not connected to any primitive
pointer in x264 or x265, so this is really just quieting the warning
diffstat:
doc/reST/introduction.rst | 4 +-
source/CMakeLists.txt | 5 +-
source/Lib/TLibCommon/CommonDef.h | 9 +-
source/Lib/TLibCommon/ContextTables.h | 1 +
source/Lib/TLibCommon/TComDataCU.cpp | 280 +-
source/Lib/TLibCommon/TComDataCU.h | 42 +-
source/Lib/TLibCommon/TComMotionInfo.h | 7 -
source/Lib/TLibCommon/TComPattern.cpp | 12 +-
source/Lib/TLibCommon/TComPattern.h | 2 +-
source/Lib/TLibCommon/TComPicSym.cpp | 45 +-
source/Lib/TLibCommon/TComPicSym.h | 28 +-
source/Lib/TLibCommon/TComPicYuv.cpp | 18 +-
source/Lib/TLibCommon/TComPicYuv.h | 12 +-
source/Lib/TLibCommon/TComRom.cpp | 106 +-
source/Lib/TLibCommon/TComRom.h | 30 +-
source/Lib/TLibCommon/TComSampleAdaptiveOffset.cpp | 1329 ---------
source/Lib/TLibCommon/TComSampleAdaptiveOffset.h | 233 -
source/Lib/TLibCommon/TComYuv.h | 12 +-
source/Lib/TLibCommon/TypeDef.h | 1 -
source/Lib/TLibEncoder/TEncSampleAdaptiveOffset.cpp | 1729 ------------
source/Lib/TLibEncoder/TEncSampleAdaptiveOffset.h | 119 -
source/Lib/TLibEncoder/TEncSearch.cpp | 504 +-
source/Lib/TLibEncoder/TEncSearch.h | 22 +-
source/common/CMakeLists.txt | 2 -
source/common/common.h | 105 +-
source/common/dct.cpp | 40 +-
source/common/deblock.cpp | 49 +-
source/common/deblock.h | 2 +-
source/common/frame.cpp | 4 +-
source/common/frame.h | 4 -
source/common/param.cpp | 31 +-
source/common/pixel.cpp | 37 +
source/common/primitives.h | 20 +-
source/common/quant.cpp | 51 +-
source/common/quant.h | 8 +-
source/common/shortyuv.h | 10 +-
source/common/slice.cpp | 23 +
source/common/slice.h | 3 +-
source/common/vec/dct-sse41.cpp | 10 +-
source/common/version.cpp | 2 +
source/common/x86/asm-primitives.cpp | 39 +-
source/common/x86/blockcopy8.asm | 622 +++-
source/common/x86/blockcopy8.h | 21 +-
source/common/x86/const-a.asm | 3 +
source/common/x86/dct8.asm | 71 +
source/common/x86/dct8.h | 2 +-
source/common/x86/pixel-a.asm | 2 +-
source/common/x86/pixel-util.h | 8 +-
source/common/x86/pixel-util8.asm | 99 +-
source/common/x86/x86inc.asm | 632 ++--
source/encoder/CMakeLists.txt | 3 +-
source/encoder/analysis.cpp | 538 +--
source/encoder/analysis.h | 39 +-
source/encoder/bitcost.h | 10 +-
source/encoder/cturow.cpp | 8 +-
source/encoder/cturow.h | 20 +-
source/encoder/dpb.cpp | 2 +
source/encoder/encoder.cpp | 59 +-
source/encoder/encoder.h | 1 -
source/encoder/entropy.cpp | 227 +-
source/encoder/entropy.h | 35 +-
source/encoder/frameencoder.cpp | 102 +-
source/encoder/frameencoder.h | 60 +-
source/encoder/framefilter.cpp | 174 +-
source/encoder/framefilter.h | 47 +-
source/encoder/ratecontrol.cpp | 28 +-
source/encoder/sao.cpp | 2599 +++++++++++++++++++
source/encoder/sao.h | 179 +
source/test/intrapredharness.cpp | 40 +-
source/test/intrapredharness.h | 20 +-
source/test/ipfilterharness.cpp | 95 +-
source/test/ipfilterharness.h | 21 +-
source/test/mbdstharness.cpp | 235 +-
source/test/mbdstharness.h | 27 +-
source/test/pixelharness.cpp | 209 +-
source/test/pixelharness.h | 41 +-
source/test/testbench.cpp | 10 +-
source/test/testharness.h | 4 +
78 files changed, 5444 insertions(+), 5839 deletions(-)
diffs (truncated from 15866 to 300 lines):
diff -r 269ba0a6ce8c -r 0e0d0309e616 doc/reST/introduction.rst
--- a/doc/reST/introduction.rst Mon Aug 25 17:07:45 2014 -0500
+++ b/doc/reST/introduction.rst Thu Sep 04 18:17:44 2014 +0200
@@ -74,8 +74,8 @@ executable software created from the x26
responsible for understanding the laws in your country, and for
licensing all applicable patent rights needed for use or distribution of
software applications created from the x265 source code. A good place
-to start is with the Motion Picture Experts Group - Licensing Authority
-- HEVC Licensing Program.
+to start is with the `Motion Picture Experts Group - Licensing Authority
+- HEVC Licensing Program<http://www.mpegla.com/main/PID/HEVC/default.aspx>`_.
x265 is a registered trademark of MulticoreWare, Inc. The x265 logo is
a trademark of MulticoreWare, and may only be used with explicit written
diff -r 269ba0a6ce8c -r 0e0d0309e616 source/CMakeLists.txt
--- a/source/CMakeLists.txt Mon Aug 25 17:07:45 2014 -0500
+++ b/source/CMakeLists.txt Thu Sep 04 18:17:44 2014 +0200
@@ -55,9 +55,10 @@ endif()
if(UNIX)
SET(PLATFORM_LIBS pthread)
- if(NOT ${CMAKE_SYSTEM_NAME} MATCHES "Darwin")
+ find_library(LIBRT rt)
+ if(LIBRT)
SET(PLATFORM_LIBS ${PLATFORM_LIBS} rt)
- endif(NOT ${CMAKE_SYSTEM_NAME} MATCHES "Darwin")
+ endif()
endif(UNIX)
# Compiler detection
diff -r 269ba0a6ce8c -r 0e0d0309e616 source/Lib/TLibCommon/CommonDef.h
--- a/source/Lib/TLibCommon/CommonDef.h Mon Aug 25 17:07:45 2014 -0500
+++ b/source/Lib/TLibCommon/CommonDef.h Thu Sep 04 18:17:44 2014 +0200
@@ -94,14 +94,7 @@
#define REF_PIC_LIST_X 100
#define NOT_VALID -1
-#define MIN_QP 0
-#define MAX_QP 51
-#define MAX_MAX_QP 69
-
-#define MIN_QPSCALE 0.21249999999999999
-#define MAX_MAX_QPSCALE 615.46574234477100
-
-#define AMVP_MAX_NUM_CANDS 2 // max number of final AMVP candidates
+#define AMVP_NUM_CANDS 2 // number of AMVP candidates
#define MRG_MAX_NUM_CANDS 5 // max number of final merge candidates
#define MAX_CHROMA_FORMAT_IDC 3 // TODO: Remove me
diff -r 269ba0a6ce8c -r 0e0d0309e616 source/Lib/TLibCommon/ContextTables.h
--- a/source/Lib/TLibCommon/ContextTables.h Mon Aug 25 17:07:45 2014 -0500
+++ b/source/Lib/TLibCommon/ContextTables.h Thu Sep 04 18:17:44 2014 +0200
@@ -144,6 +144,7 @@ extern const uint8_t g_nextState[128][2]
#define NEIGHBOURHOOD_00_CONTEXT_1_THRESHOLD_4x4 3
#define NEIGHBOURHOOD_00_CONTEXT_2_THRESHOLD_4x4 1
+static const uint32_t ctxCbf[3][3] = { { 1, 0, 0 }, { 2, 3, 4 }, { 2, 3, 4} };
static const uint32_t significanceMapContextSetStart[MAX_NUM_CHANNEL_TYPE][3] = { { 0, 9, 21 }, { 0, 9, 12 } };
static const uint32_t significanceMapContextSetSize[MAX_NUM_CHANNEL_TYPE][3] = { { 9, 12, 6 }, { 9, 3, 3 } };
static const uint32_t nonDiagonalScan8x8ContextOffset[MAX_NUM_CHANNEL_TYPE] = { 6, 0 };
diff -r 269ba0a6ce8c -r 0e0d0309e616 source/Lib/TLibCommon/TComDataCU.cpp
--- a/source/Lib/TLibCommon/TComDataCU.cpp Mon Aug 25 17:07:45 2014 -0500
+++ b/source/Lib/TLibCommon/TComDataCU.cpp Thu Sep 04 18:17:44 2014 +0200
@@ -129,7 +129,7 @@ fail:
return ok;
}
-void TComDataCU::create(TComDataCU *cu, uint32_t numPartition, uint32_t cuSize, int unitSize, int csp, int index, bool isLossless)
+void TComDataCU::create(TComDataCU *cu, uint32_t numPartition, uint32_t cuSize, int csp, int index, bool isLossless)
{
m_hChromaShift = CHROMA_H_SHIFT(csp);
m_vChromaShift = CHROMA_V_SHIFT(csp);
@@ -139,12 +139,6 @@ void TComDataCU::create(TComDataCU *cu,
m_slice = NULL;
m_numPartitions = numPartition;
- uint32_t tmp = 4 * AMVP_DECIMATION_FACTOR / unitSize;
- tmp = tmp * tmp;
- X265_CHECK(tmp == (1 << (g_log2Size[tmp])), "unexpected pixel count\n");
- tmp = g_log2Size[tmp];
- m_unitMask = ~((1 << tmp) - 1);
-
uint32_t sizeL = cuSize * cuSize;
uint32_t sizeC = sizeL >> (m_hChromaShift + m_vChromaShift);
@@ -577,7 +571,7 @@ void TComDataCU::copyPartFrom(TComDataCU
// Copy current predicted part to a CU in picture.
// It is used to predict for next part
-void TComDataCU::copyToPic(uint8_t depth)
+void TComDataCU::copyToPic(uint32_t depth)
{
TComDataCU* cu = m_pic->getCU(m_cuAddr);
@@ -622,7 +616,7 @@ void TComDataCU::copyToPic(uint8_t depth
m_cuMvField[1].copyTo(cu->getCUMvField(REF_PIC_LIST_1), m_absIdxInLCU);
uint32_t tmpY = 1 << ((g_maxLog2CUSize - depth) * 2);
- uint32_t tmpY2 = m_absIdxInLCU << m_pic->getLog2UnitSize() * 2;
+ uint32_t tmpY2 = m_absIdxInLCU << LOG2_UNIT_SIZE * 2;
memcpy(cu->getCoeffY() + tmpY2, m_trCoeff[0], sizeof(coeff_t) * tmpY);
uint32_t tmpC = tmpY >> (m_hChromaShift + m_vChromaShift);
@@ -633,7 +627,7 @@ void TComDataCU::copyToPic(uint8_t depth
if (m_slice->m_pps->bTransquantBypassEnabled)
{
uint32_t tmp = 1 << ((g_maxLog2CUSize - depth) * 2);
- uint32_t tmp2 = m_absIdxInLCU << m_pic->getLog2UnitSize() * 2;
+ uint32_t tmp2 = m_absIdxInLCU << LOG2_UNIT_SIZE * 2;
memcpy(cu->getLumaOrigYuv() + tmp2, m_tqBypassOrigYuv[0], sizeof(pixel) * tmp);
memcpy(cu->getChromaOrigYuv(1) + tmpC2, m_tqBypassOrigYuv[1], sizeof(pixel) * tmpC);
@@ -641,7 +635,7 @@ void TComDataCU::copyToPic(uint8_t depth
}
}
-void TComDataCU::copyCodedToPic(uint8_t depth)
+void TComDataCU::copyCodedToPic(uint32_t depth)
{
TComDataCU* cu = m_pic->getCU(m_cuAddr);
@@ -660,7 +654,7 @@ void TComDataCU::copyCodedToPic(uint8_t
memcpy(cu->getCbf(TEXT_CHROMA_V) + m_absIdxInLCU, m_cbf[2], sizeInChar);
uint32_t tmpY = 1 << ((g_maxLog2CUSize - depth) * 2);
- uint32_t tmpY2 = m_absIdxInLCU << m_pic->getLog2UnitSize() * 2;
+ uint32_t tmpY2 = m_absIdxInLCU << LOG2_UNIT_SIZE * 2;
memcpy(cu->getCoeffY() + tmpY2, m_trCoeff[0], sizeof(coeff_t) * tmpY);
tmpY >>= m_hChromaShift + m_vChromaShift;
tmpY2 >>= m_hChromaShift + m_vChromaShift;
@@ -668,7 +662,7 @@ void TComDataCU::copyCodedToPic(uint8_t
memcpy(cu->m_trCoeff[2] + tmpY2, m_trCoeff[2], sizeof(coeff_t) * tmpY);
}
-void TComDataCU::copyToPic(uint8_t depth, uint32_t partIdx, uint32_t partDepth)
+void TComDataCU::copyToPic(uint32_t depth, uint32_t partIdx, uint32_t partDepth)
{
TComDataCU* cu = m_pic->getCU(m_cuAddr);
uint32_t qNumPart = m_numPartitions >> (partDepth << 1);
@@ -713,7 +707,7 @@ void TComDataCU::copyToPic(uint8_t depth
m_cuMvField[1].copyTo(cu->getCUMvField(REF_PIC_LIST_1), m_absIdxInLCU, partStart, qNumPart);
uint32_t tmpY = 1 << ((g_maxLog2CUSize - depth - partDepth) * 2);
- uint32_t tmpY2 = partOffset << m_pic->getLog2UnitSize() * 2;
+ uint32_t tmpY2 = partOffset << LOG2_UNIT_SIZE * 2;
memcpy(cu->getCoeffY() + tmpY2, m_trCoeff[0], sizeof(coeff_t) * tmpY);
uint32_t tmpC = tmpY >> (m_hChromaShift + m_vChromaShift);
@@ -822,19 +816,19 @@ TComDataCU* TComDataCU::getPUAboveLeft(u
TComDataCU* TComDataCU::getPUAboveRight(uint32_t& arPartUnitIdx, uint32_t curPartUnitIdx)
{
+ if ((m_pic->getCU(m_cuAddr)->getCUPelX() + g_zscanToPelX[curPartUnitIdx] + UNIT_SIZE) >= m_slice->m_sps->picWidthInLumaSamples)
+ return NULL;
+
uint32_t absPartIdxRT = g_zscanToRaster[curPartUnitIdx];
uint32_t numPartInCUSize = m_pic->getNumPartInCUSize();
- if ((m_pic->getCU(m_cuAddr)->getCUPelX() + g_rasterToPelX[absPartIdxRT] + m_pic->getUnitSize()) >= m_slice->m_sps->picWidthInLumaSamples)
- return NULL;
-
if (RasterAddress::lessThanCol(absPartIdxRT, numPartInCUSize - 1, numPartInCUSize))
{
if (!RasterAddress::isZeroRow(absPartIdxRT, numPartInCUSize))
{
if (curPartUnitIdx > g_rasterToZscan[absPartIdxRT - numPartInCUSize + 1])
{
- uint32_t absZorderCUIdx = g_zscanToRaster[m_absIdxInLCU] + (1 << (m_log2CUSize[0] - m_pic->getLog2UnitSize())) - 1;
+ uint32_t absZorderCUIdx = g_zscanToRaster[m_absIdxInLCU] + (1 << (m_log2CUSize[0] - LOG2_UNIT_SIZE)) - 1;
arPartUnitIdx = g_rasterToZscan[absPartIdxRT - numPartInCUSize + 1];
if (RasterAddress::isEqualRowOrCol(absPartIdxRT, absZorderCUIdx, numPartInCUSize))
{
@@ -863,14 +857,11 @@ TComDataCU* TComDataCU::getPUAboveRight(
TComDataCU* TComDataCU::getPUBelowLeft(uint32_t& blPartUnitIdx, uint32_t curPartUnitIdx)
{
- uint32_t absPartIdxLB = g_zscanToRaster[curPartUnitIdx];
+ if ((m_pic->getCU(m_cuAddr)->getCUPelY() + g_zscanToPelY[curPartUnitIdx] + UNIT_SIZE) >= m_slice->m_sps->picHeightInLumaSamples)
+ return NULL;
- if ((m_pic->getCU(m_cuAddr)->getCUPelY() + g_rasterToPelY[absPartIdxLB] + m_pic->getUnitSize()) >= m_slice->m_sps->picHeightInLumaSamples)
- {
- return NULL;
- }
-
- uint32_t numPartInCUSize = m_pic->getNumPartInCUSize();
+ uint32_t absPartIdxLB = g_zscanToRaster[curPartUnitIdx];
+ uint32_t numPartInCUSize = m_pic->getNumPartInCUSize();
if (RasterAddress::lessThanRow(absPartIdxLB, numPartInCUSize - 1, numPartInCUSize))
{
@@ -878,7 +869,7 @@ TComDataCU* TComDataCU::getPUBelowLeft(u
{
if (curPartUnitIdx > g_rasterToZscan[absPartIdxLB + numPartInCUSize - 1])
{
- uint32_t absZorderCUIdxLB = g_zscanToRaster[m_absIdxInLCU] + ((1 << (m_log2CUSize[0] - m_pic->getLog2UnitSize())) - 1) * m_pic->getNumPartInCUSize();
+ uint32_t absZorderCUIdxLB = g_zscanToRaster[m_absIdxInLCU] + ((1 << (m_log2CUSize[0] - LOG2_UNIT_SIZE)) - 1) * m_pic->getNumPartInCUSize();
blPartUnitIdx = g_rasterToZscan[absPartIdxLB + numPartInCUSize - 1];
if (RasterAddress::isEqualRowOrCol(absPartIdxLB, absZorderCUIdxLB, numPartInCUSize))
{
@@ -901,15 +892,14 @@ TComDataCU* TComDataCU::getPUBelowLeft(u
TComDataCU* TComDataCU::getPUBelowLeftAdi(uint32_t& blPartUnitIdx, uint32_t curPartUnitIdx, uint32_t partUnitOffset)
{
- uint32_t absPartIdxLB = g_zscanToRaster[curPartUnitIdx];
-
- if ((m_pic->getCU(m_cuAddr)->getCUPelY() + g_rasterToPelY[absPartIdxLB] + (partUnitOffset << m_pic->getLog2UnitSize())) >=
+ if ((m_pic->getCU(m_cuAddr)->getCUPelY() + g_zscanToPelY[curPartUnitIdx] + (partUnitOffset << LOG2_UNIT_SIZE)) >=
m_slice->m_sps->picHeightInLumaSamples)
{
return NULL;
}
- uint32_t numPartInCUSize = m_pic->getNumPartInCUSize();
+ uint32_t absPartIdxLB = g_zscanToRaster[curPartUnitIdx];
+ uint32_t numPartInCUSize = m_pic->getNumPartInCUSize();
if (RasterAddress::lessThanRow(absPartIdxLB, numPartInCUSize - partUnitOffset, numPartInCUSize))
{
@@ -917,7 +907,7 @@ TComDataCU* TComDataCU::getPUBelowLeftAd
{
if (curPartUnitIdx > g_rasterToZscan[absPartIdxLB + partUnitOffset * numPartInCUSize - 1])
{
- uint32_t absZorderCUIdxLB = g_zscanToRaster[m_absIdxInLCU] + ((1 << (m_log2CUSize[0] - m_pic->getLog2UnitSize())) - 1) * m_pic->getNumPartInCUSize();
+ uint32_t absZorderCUIdxLB = g_zscanToRaster[m_absIdxInLCU] + ((1 << (m_log2CUSize[0] - LOG2_UNIT_SIZE)) - 1) * m_pic->getNumPartInCUSize();
blPartUnitIdx = g_rasterToZscan[absPartIdxLB + partUnitOffset * numPartInCUSize - 1];
if (RasterAddress::isEqualRowOrCol(absPartIdxLB, absZorderCUIdxLB, numPartInCUSize))
{
@@ -944,14 +934,13 @@ TComDataCU* TComDataCU::getPUBelowLeftAd
TComDataCU* TComDataCU::getPUAboveRightAdi(uint32_t& arPartUnitIdx, uint32_t curPartUnitIdx, uint32_t partUnitOffset)
{
- uint32_t absPartIdxRT = g_zscanToRaster[curPartUnitIdx];
-
- if ((m_pic->getCU(m_cuAddr)->getCUPelX() + g_rasterToPelX[absPartIdxRT] + (partUnitOffset << m_pic->getLog2UnitSize())) >=
+ if ((m_pic->getCU(m_cuAddr)->getCUPelX() + g_zscanToPelX[curPartUnitIdx] + (partUnitOffset << LOG2_UNIT_SIZE)) >=
m_slice->m_sps->picWidthInLumaSamples)
{
return NULL;
}
+ uint32_t absPartIdxRT = g_zscanToRaster[curPartUnitIdx];
uint32_t numPartInCUSize = m_pic->getNumPartInCUSize();
if (RasterAddress::lessThanCol(absPartIdxRT, numPartInCUSize - partUnitOffset, numPartInCUSize))
@@ -960,7 +949,7 @@ TComDataCU* TComDataCU::getPUAboveRightA
{
if (curPartUnitIdx > g_rasterToZscan[absPartIdxRT - numPartInCUSize + partUnitOffset])
{
- uint32_t absZorderCUIdx = g_zscanToRaster[m_absIdxInLCU] + (1 << (m_log2CUSize[0] - m_pic->getLog2UnitSize())) - 1;
+ uint32_t absZorderCUIdx = g_zscanToRaster[m_absIdxInLCU] + (1 << (m_log2CUSize[0] - LOG2_UNIT_SIZE)) - 1;
arPartUnitIdx = g_rasterToZscan[absPartIdxRT - numPartInCUSize + partUnitOffset];
if (RasterAddress::isEqualRowOrCol(absPartIdxRT, absZorderCUIdx, numPartInCUSize))
{
@@ -1004,8 +993,7 @@ TComDataCU* TComDataCU::getPUAboveRightA
TComDataCU* TComDataCU::getQpMinCuLeft(uint32_t& lPartUnitIdx, uint32_t curAbsIdxInLCU)
{
uint32_t numPartInCUSize = m_pic->getNumPartInCUSize();
- uint32_t absZorderQpMinCUIdx = (curAbsIdxInLCU >> ((g_maxCUDepth - m_slice->m_pps->maxCuDQPDepth) << 1)) <<
- ((g_maxCUDepth - m_slice->m_pps->maxCuDQPDepth) << 1);
+ uint32_t absZorderQpMinCUIdx = curAbsIdxInLCU & (0xFF << (g_maxFullDepth - m_slice->m_pps->maxCuDQPDepth) * 2);
uint32_t absRorderQpMinCUIdx = g_zscanToRaster[absZorderQpMinCUIdx];
// check for left LCU boundary
@@ -1029,8 +1017,7 @@ TComDataCU* TComDataCU::getQpMinCuLeft(u
TComDataCU* TComDataCU::getQpMinCuAbove(uint32_t& aPartUnitIdx, uint32_t curAbsIdxInLCU)
{
uint32_t numPartInCUSize = m_pic->getNumPartInCUSize();
- uint32_t absZorderQpMinCUIdx = (curAbsIdxInLCU >> ((g_maxCUDepth - m_slice->m_pps->maxCuDQPDepth) << 1)) <<
- ((g_maxCUDepth - m_slice->m_pps->maxCuDQPDepth) << 1);
+ uint32_t absZorderQpMinCUIdx = curAbsIdxInLCU & (0xFF << (g_maxFullDepth - m_slice->m_pps->maxCuDQPDepth) * 2);
uint32_t absRorderQpMinCUIdx = g_zscanToRaster[absZorderQpMinCUIdx];
// check for top LCU boundary
@@ -1074,7 +1061,7 @@ int TComDataCU::getLastValidPartIdx(int
char TComDataCU::getLastCodedQP(uint32_t absPartIdx)
{
- uint32_t quPartIdxMask = ~((1 << ((g_maxCUDepth - m_slice->m_pps->maxCuDQPDepth) << 1)) - 1);
+ uint32_t quPartIdxMask = 0xFF << (g_maxFullDepth - m_slice->m_pps->maxCuDQPDepth) * 2;
int lastValidPartIdx = getLastValidPartIdx(absPartIdx & quPartIdxMask);
if (lastValidPartIdx >= 0)
@@ -1206,32 +1193,18 @@ uint32_t TComDataCU::getCtxSplitFlag(uin
return ctx;
}
-uint32_t TComDataCU::getQuadtreeTULog2MinSizeInCU(uint32_t absPartIdx)
+void TComDataCU::getQuadtreeTULog2MinSizeInCU(uint32_t tuDepthRange[2], uint32_t absPartIdx)
{
uint32_t log2CUSize = getLog2CUSize(absPartIdx);
PartSize partSize = getPartitionSize(absPartIdx);
- uint32_t quadtreeTUMaxDepth = getPredictionMode(absPartIdx) == MODE_INTRA ? m_slice->m_sps->quadtreeTUMaxDepthIntra : m_slice->m_sps->quadtreeTUMaxDepthInter;
- int intraSplitFlag = (getPredictionMode(absPartIdx) == MODE_INTRA && partSize == SIZE_NxN) ? 1 : 0;
- int interSplitFlag = ((quadtreeTUMaxDepth == 1) && (getPredictionMode(absPartIdx) == MODE_INTER) && (partSize != SIZE_2Nx2N));
+ uint32_t quadtreeTUMaxDepth = getPredictionMode(0) == MODE_INTRA ? m_slice->m_sps->quadtreeTUMaxDepthIntra : m_slice->m_sps->quadtreeTUMaxDepthInter;
+ uint32_t intraSplitFlag = (getPredictionMode(absPartIdx) == MODE_INTRA && partSize == SIZE_NxN) ? 1 : 0;
+ uint32_t interSplitFlag = ((quadtreeTUMaxDepth == 1) && (getPredictionMode(0) == MODE_INTER) && (partSize != SIZE_2Nx2N));
- uint32_t log2MinTUSizeInCU = 0;
More information about the x265-commits
mailing list