[x265-commits] [x265] api: change name back to inputBitDepth, to avoid breaking...
Steve Borho
steve at borho.org
Tue Feb 18 07:27:27 CET 2014
details: http://hg.videolan.org/x265/rev/ce96cdb390fe
branches:
changeset: 6163:ce96cdb390fe
user: Steve Borho <steve at borho.org>
date: Sun Feb 16 22:47:32 2014 -0600
description:
api: change name back to inputBitDepth, to avoid breaking ffmpeg
Subject: [x265] encoder: include the hash output into the debug output string
details: http://hg.videolan.org/x265/rev/393f6ef8b7bd
branches:
changeset: 6164:393f6ef8b7bd
user: Steve Borho <steve at borho.org>
date: Mon Feb 17 14:55:15 2014 -0600
description:
encoder: include the hash output into the debug output string
Subject: [x265] weightp: add debug logging for weight analysis
details: http://hg.videolan.org/x265/rev/a1047dfeebb6
branches:
changeset: 6165:a1047dfeebb6
user: Steve Borho <steve at borho.org>
date: Mon Feb 17 15:19:07 2014 -0600
description:
weightp: add debug logging for weight analysis
Subject: [x265] TComSlice: remove unused m_weightACDCParam and methods
details: http://hg.videolan.org/x265/rev/d2312e05014a
branches:
changeset: 6166:d2312e05014a
user: Steve Borho <steve at borho.org>
date: Mon Feb 17 15:46:48 2014 -0600
description:
TComSlice: remove unused m_weightACDCParam and methods
Subject: [x265] weight: remove odd struct renaming, remove unused wpACDCParam
details: http://hg.videolan.org/x265/rev/30edc6f7475e
branches:
changeset: 6167:30edc6f7475e
user: Steve Borho <steve at borho.org>
date: Mon Feb 17 17:00:24 2014 -0600
description:
weight: remove odd struct renaming, remove unused wpACDCParam
Subject: [x265] TComSlice: remove dup line
details: http://hg.videolan.org/x265/rev/4ba139f9df57
branches:
changeset: 6168:4ba139f9df57
user: Steve Borho <steve at borho.org>
date: Mon Feb 17 17:11:08 2014 -0600
description:
TComSlice: remove dup line
Subject: [x265] TComSlice: nit
details: http://hg.videolan.org/x265/rev/4a06d2485b45
branches:
changeset: 6169:4a06d2485b45
user: Steve Borho <steve at borho.org>
date: Mon Feb 17 17:11:16 2014 -0600
description:
TComSlice: nit
Subject: [x265] weightp: fix V plane debug output
details: http://hg.videolan.org/x265/rev/5bf042e30d30
branches:
changeset: 6170:5bf042e30d30
user: Steve Borho <steve at borho.org>
date: Mon Feb 17 17:17:16 2014 -0600
description:
weightp: fix V plane debug output
Subject: [x265] primitives: add count_nonzero
details: http://hg.videolan.org/x265/rev/12d752ac7c4f
branches:
changeset: 6171:12d752ac7c4f
user: Satoshi Nakagawa <nakagawa424 at oki.com>
date: Mon Feb 17 15:03:36 2014 +0900
description:
primitives: add count_nonzero
Subject: [x265] cleanup unused variables
details: http://hg.videolan.org/x265/rev/a3dc5ba8cc95
branches:
changeset: 6172:a3dc5ba8cc95
user: Satoshi Nakagawa <nakagawa424 at oki.com>
date: Mon Feb 17 16:56:18 2014 +0900
description:
cleanup unused variables
Subject: [x265] asm: fix for illegal instruction usage in ipfilter
details: http://hg.videolan.org/x265/rev/46a9e97caaba
branches:
changeset: 6173:46a9e97caaba
user: Murugan Vairavel <murugan at multicorewareinc.com>
date: Mon Feb 17 13:13:38 2014 +0530
description:
asm: fix for illegal instruction usage in ipfilter
Subject: [x265] testbench: adding seperate input buffer for idct and updated qp value for quant
details: http://hg.videolan.org/x265/rev/797e8bb43887
branches:
changeset: 6174:797e8bb43887
user: Murugan Vairavel <murugan at multicorewareinc.com>
date: Mon Feb 17 17:46:12 2014 +0530
description:
testbench: adding seperate input buffer for idct and updated qp value for quant
Subject: [x265] asm: 16bpp code for quant and dequant_normal
details: http://hg.videolan.org/x265/rev/765d6225b252
branches:
changeset: 6175:765d6225b252
user: Murugan Vairavel <murugan at multicorewareinc.com>
date: Mon Feb 17 17:46:58 2014 +0530
description:
asm: 16bpp code for quant and dequant_normal
Subject: [x265] asm : asm routine for chroma_p2s for 4:4:4 color space format
details: http://hg.videolan.org/x265/rev/df79cdee5d46
branches:
changeset: 6176:df79cdee5d46
user: Nabajit Deka
date: Mon Feb 17 18:13:57 2014 +0530
description:
asm : asm routine for chroma_p2s for 4:4:4 color space format
Subject: [x265] testbench : test bench correction for chroma_p2s
details: http://hg.videolan.org/x265/rev/3505b249397d
branches:
changeset: 6177:3505b249397d
user: Nabajit Deka
date: Mon Feb 17 18:16:40 2014 +0530
description:
testbench : test bench correction for chroma_p2s
Subject: [x265] TComRom: prevent multiple allocations or frees of globals
details: http://hg.videolan.org/x265/rev/d2a61d579c30
branches:
changeset: 6178:d2a61d579c30
user: Steve Borho <steve at borho.org>
date: Mon Feb 17 20:15:43 2014 -0600
description:
TComRom: prevent multiple allocations or frees of globals
Subject: [x265] TComRom: use x265_malloc/free for globals
details: http://hg.videolan.org/x265/rev/7b5b3a5475a7
branches:
changeset: 6179:7b5b3a5475a7
user: Steve Borho <steve at borho.org>
date: Mon Feb 17 20:16:12 2014 -0600
description:
TComRom: use x265_malloc/free for globals
Subject: [x265] encoder: show per-slice type SSIM as dB
details: http://hg.videolan.org/x265/rev/720768692efe
branches:
changeset: 6180:720768692efe
user: Steve Borho <steve at borho.org>
date: Tue Feb 18 00:22:17 2014 -0600
description:
encoder: show per-slice type SSIM as dB
diffstat:
source/Lib/TLibCommon/TComDataCU.cpp | 30 +-----
source/Lib/TLibCommon/TComDataCU.h | 7 +-
source/Lib/TLibCommon/TComRom.cpp | 15 ++-
source/Lib/TLibCommon/TComSlice.cpp | 25 +-----
source/Lib/TLibCommon/TComSlice.h | 19 +----
source/Lib/TLibCommon/TComWeightPrediction.cpp | 15 +++-
source/Lib/TLibEncoder/TEncCu.cpp | 23 +-----
source/Lib/TLibEncoder/TEncEntropy.cpp | 12 --
source/Lib/TLibEncoder/TEncEntropy.h | 1 -
source/Lib/TLibEncoder/TEncSbac.cpp | 3 +-
source/Lib/TLibEncoder/TEncSearch.cpp | 51 ++++--------
source/Lib/TLibEncoder/TEncSearch.h | 2 +-
source/common/common.cpp | 22 ++--
source/common/dct.cpp | 16 +++
source/common/lowres.h | 1 -
source/common/primitives.h | 2 +
source/common/x86/asm-primitives.cpp | 54 +++++++-----
source/common/x86/ipfilter8.asm | 70 +++++++++++++++-
source/common/x86/ipfilter8.h | 44 ++++++----
source/common/x86/pixel-util.h | 1 +
source/common/x86/pixel-util8.asm | 105 ++++++++++++++++++++----
source/encoder/encoder.cpp | 16 +-
source/encoder/reference.h | 3 +-
source/encoder/weightPrediction.cpp | 24 +++++
source/test/ipfilterharness.cpp | 30 +++---
source/test/mbdstharness.cpp | 44 +++++-----
source/test/mbdstharness.h | 3 +-
source/x265.cpp | 6 +-
source/x265.h | 2 +-
29 files changed, 378 insertions(+), 268 deletions(-)
diffs (truncated from 1576 to 300 lines):
diff -r 291b3a358a22 -r 720768692efe source/Lib/TLibCommon/TComDataCU.cpp
--- a/source/Lib/TLibCommon/TComDataCU.cpp Sat Feb 15 17:43:58 2014 -0600
+++ b/source/Lib/TLibCommon/TComDataCU.cpp Tue Feb 18 00:22:17 2014 -0600
@@ -920,7 +920,7 @@ TComDataCU* TComDataCU::getPUBelowLeft(u
return NULL;
}
-TComDataCU* TComDataCU::getPUBelowLeftAdi(uint32_t& blPartUnitIdx, uint32_t curPartUnitIdx, uint32_t partUnitOffset, bool bEnforceSliceRestriction)
+TComDataCU* TComDataCU::getPUBelowLeftAdi(uint32_t& blPartUnitIdx, uint32_t curPartUnitIdx, uint32_t partUnitOffset)
{
uint32_t absPartIdxLB = g_zscanToRaster[curPartUnitIdx];
uint32_t absZorderCUIdxLB = g_zscanToRaster[m_absIdxInLCU] + ((m_height[0] / m_pic->getMinCUHeight()) - 1) * m_pic->getNumPartInWidth();
@@ -954,7 +954,7 @@ TComDataCU* TComDataCU::getPUBelowLeftAd
return NULL;
}
blPartUnitIdx = g_rasterToZscan[absPartIdxLB + (1 + partUnitOffset) * numPartInCUWidth - 1];
- if ((bEnforceSliceRestriction && (m_cuLeft == NULL || m_cuLeft->getSlice() == NULL)))
+ if (m_cuLeft == NULL || m_cuLeft->getSlice() == NULL)
{
return NULL;
}
@@ -965,7 +965,7 @@ TComDataCU* TComDataCU::getPUBelowLeftAd
return NULL;
}
-TComDataCU* TComDataCU::getPUAboveRightAdi(uint32_t& arPartUnitIdx, uint32_t curPartUnitIdx, uint32_t partUnitOffset, bool bEnforceSliceRestriction)
+TComDataCU* TComDataCU::getPUAboveRightAdi(uint32_t& arPartUnitIdx, uint32_t curPartUnitIdx, uint32_t partUnitOffset)
{
uint32_t absPartIdxRT = g_zscanToRaster[curPartUnitIdx];
uint32_t absZorderCUIdx = g_zscanToRaster[m_absIdxInLCU] + (m_width[0] / m_pic->getMinCUWidth()) - 1;
@@ -999,7 +999,7 @@ TComDataCU* TComDataCU::getPUAboveRightA
return NULL;
}
arPartUnitIdx = g_rasterToZscan[absPartIdxRT + m_pic->getNumPartInCU() - numPartInCUWidth + partUnitOffset];
- if ((bEnforceSliceRestriction && (m_cuAbove == NULL || m_cuAbove->getSlice() == NULL)))
+ if (m_cuAbove == NULL || m_cuAbove->getSlice() == NULL)
{
return NULL;
}
@@ -1013,8 +1013,8 @@ TComDataCU* TComDataCU::getPUAboveRightA
}
arPartUnitIdx = g_rasterToZscan[m_pic->getNumPartInCU() - numPartInCUWidth + partUnitOffset - 1];
- if ((bEnforceSliceRestriction && (m_cuAboveRight == NULL || m_cuAboveRight->getSlice() == NULL ||
- (m_cuAboveRight->getAddr()) > getAddr())))
+ if ((m_cuAboveRight == NULL || m_cuAboveRight->getSlice() == NULL ||
+ (m_cuAboveRight->getAddr()) > getAddr()))
{
return NULL;
}
@@ -2460,18 +2460,9 @@ void TComDataCU::fillMvpCand(uint32_t pa
}
}
-bool TComDataCU::isBipredRestriction(uint32_t puIdx)
+bool TComDataCU::isBipredRestriction()
{
- int width = 0;
- int height = 0;
- uint32_t partAddr;
-
- getPartIndexAndSize(puIdx, partAddr, width, height);
- if (getWidth(0) == 8 && (width < 8 || height < 8))
- {
- return true;
- }
- return false;
+ return getWidth(0) == 8 && getPartitionSize(0) != SIZE_2Nx2N;
}
void TComDataCU::clipMv(MV& outMV)
@@ -2505,11 +2496,6 @@ uint32_t TComDataCU::getIntraSizeIdx(uin
return cnt > 6 ? 6 : cnt;
}
-void TComDataCU::clearCbf(uint32_t idx, TextType ttype, uint32_t numParts)
-{
- ::memset(&m_cbf[ttype][idx], 0, sizeof(UChar) * numParts);
-}
-
/** Set a I_PCM flag for all sub-partitions of a partition.
* \param bIpcmFlag I_PCM flag
* \param absPartIdx partition index
diff -r 291b3a358a22 -r 720768692efe source/Lib/TLibCommon/TComDataCU.h
--- a/source/Lib/TLibCommon/TComDataCU.h Sat Feb 15 17:43:58 2014 -0600
+++ b/source/Lib/TLibCommon/TComDataCU.h Tue Feb 18 00:22:17 2014 -0600
@@ -312,7 +312,6 @@ public:
void setCbf(uint32_t idx, TextType ttype, UChar uh) { m_cbf[ttype][idx] = uh; }
- void clearCbf(uint32_t idx, TextType ttype, uint32_t numParts);
UChar getQtRootCbf(uint32_t idx) { return getCbf(idx, TEXT_LUMA, 0) || getCbf(idx, TEXT_CHROMA_U, 0) || getCbf(idx, TEXT_CHROMA_V, 0); }
void setCbfSubParts(uint32_t cbfY, uint32_t cbfU, uint32_t cbfV, uint32_t absPartIdx, uint32_t depth);
@@ -426,8 +425,8 @@ public:
TComDataCU* getQpMinCuAbove(uint32_t& aPartUnitIdx, uint32_t currAbsIdxInLCU);
char getRefQP(uint32_t uiCurrAbsIdxInLCU);
- TComDataCU* getPUAboveRightAdi(uint32_t& arPartUnitIdx, uint32_t curPartUnitIdx, uint32_t partUnitOffset = 1, bool bEnforceSliceRestriction = true);
- TComDataCU* getPUBelowLeftAdi(uint32_t& blPartUnitIdx, uint32_t curPartUnitIdx, uint32_t partUnitOffset = 1, bool bEnforceSliceRestriction = true);
+ TComDataCU* getPUAboveRightAdi(uint32_t& arPartUnitIdx, uint32_t curPartUnitIdx, uint32_t partUnitOffset = 1);
+ TComDataCU* getPUBelowLeftAdi(uint32_t& blPartUnitIdx, uint32_t curPartUnitIdx, uint32_t partUnitOffset = 1);
void deriveLeftRightTopIdx(uint32_t partIdx, uint32_t& partIdxLT, uint32_t& partIdxRT);
void deriveLeftBottomIdx(uint32_t partIdx, uint32_t& partIdxLB);
@@ -447,7 +446,7 @@ public:
bool isIntra(uint32_t partIdx) { return m_predModes[partIdx] == MODE_INTRA; }
bool isSkipped(uint32_t partIdx); ///< SKIP (no residual)
- bool isBipredRestriction(uint32_t puIdx);
+ bool isBipredRestriction();
// -------------------------------------------------------------------------------------------------------------------
// member functions for symbol prediction (most probable / mode conversion)
diff -r 291b3a358a22 -r 720768692efe source/Lib/TLibCommon/TComRom.cpp
--- a/source/Lib/TLibCommon/TComRom.cpp Sat Feb 15 17:43:58 2014 -0600
+++ b/source/Lib/TLibCommon/TComRom.cpp Tue Feb 18 00:22:17 2014 -0600
@@ -36,6 +36,7 @@
*/
#include "TComRom.h"
+#include "threading.h"
#include <memory.h>
#include <cstdlib>
#include <stdio.h>
@@ -127,9 +128,14 @@ public:
}
};
+static int initialized /* = 0 */;
+
// initialize ROM variables
void initROM()
{
+ if (ATOMIC_CAS32(&initialized, 0, 1) == 1)
+ return;
+
int i, c;
// g_aucConvertToBit[ x ]: log2(x/4), if x=4 -> 0, x=8 -> 1, x=16 -> 2, ...
@@ -153,7 +159,7 @@ void initROM()
for (uint32_t scanTypeIndex = 0; scanTypeIndex < SCAN_NUMBER_OF_TYPES; scanTypeIndex++)
{
const COEFF_SCAN_TYPE scanType = COEFF_SCAN_TYPE(scanTypeIndex);
- g_scanOrder[SCAN_UNGROUPED][scanType][log2BlockWidth][log2BlockHeight] = new uint32_t[totalValues];
+ g_scanOrder[SCAN_UNGROUPED][scanType][log2BlockWidth][log2BlockHeight] = X265_MALLOC(uint32_t, totalValues);
ScanGenerator fullBlockScan(blockWidth, blockHeight, blockWidth, scanType);
for (uint32_t scanPosition = 0; scanPosition < totalValues; scanPosition++)
@@ -175,7 +181,7 @@ void initROM()
{
const COEFF_SCAN_TYPE scanType = COEFF_SCAN_TYPE(scanTypeIndex);
- g_scanOrder[SCAN_GROUPED_4x4][scanType][log2BlockWidth][log2BlockHeight] = new uint32_t[totalValues];
+ g_scanOrder[SCAN_GROUPED_4x4][scanType][log2BlockWidth][log2BlockHeight] = X265_MALLOC(uint32_t, totalValues);
ScanGenerator fullBlockScan(widthInGroups, heightInGroups, groupWidth, scanType);
@@ -205,6 +211,9 @@ void initROM()
void destroyROM()
{
+ if (ATOMIC_CAS32(&initialized, 1, 0) == 0)
+ return;
+
for (uint32_t groupTypeIndex = 0; groupTypeIndex < SCAN_NUMBER_OF_GROUP_TYPES; groupTypeIndex++)
{
for (uint32_t scanOrderIndex = 0; scanOrderIndex < SCAN_NUMBER_OF_TYPES; scanOrderIndex++)
@@ -213,7 +222,7 @@ void destroyROM()
{
for (uint32_t log2BlockHeight = 0; log2BlockHeight < MAX_CU_DEPTH; log2BlockHeight++)
{
- delete [] g_scanOrder[groupTypeIndex][scanOrderIndex][log2BlockWidth][log2BlockHeight];
+ X265_FREE(g_scanOrder[groupTypeIndex][scanOrderIndex][log2BlockWidth][log2BlockHeight]);
}
}
}
diff -r 291b3a358a22 -r 720768692efe source/Lib/TLibCommon/TComSlice.cpp
--- a/source/Lib/TLibCommon/TComSlice.cpp Sat Feb 15 17:43:58 2014 -0600
+++ b/source/Lib/TLibCommon/TComSlice.cpp Tue Feb 18 00:22:17 2014 -0600
@@ -93,7 +93,6 @@ TComSlice::TComSlice()
}
resetWpScaling();
- initWpAcDcParam();
m_saoEnabledFlag = false;
}
@@ -441,27 +440,6 @@ void TComSlice::checkCRA(TComReferencePi
}
}
-/** get AC and DC values for weighted pred
- * \param *wp
- * \returns void
- */
-void TComSlice::getWpAcDcParam(wpACDCParam *&wp)
-{
- wp = m_weightACDCParam;
-}
-
-/** init AC and DC values for weighted pred
- * \returns void
- */
-void TComSlice::initWpAcDcParam()
-{
- for (int comp = 0; comp < 3; comp++)
- {
- m_weightACDCParam[comp].ac = 0;
- m_weightACDCParam[comp].dc = 0;
- }
-}
-
/** get WP tables for weighted pred
* \param int
* \param refIdx
@@ -488,7 +466,6 @@ void TComSlice::resetWpScaling()
wpScalingParam *pwp = &(m_weightPredTable[e][i][yuv]);
pwp->bPresentFlag = false;
pwp->log2WeightDenom = 0;
- pwp->log2WeightDenom = 0;
pwp->inputWeight = 1;
pwp->inputOffset = 0;
}
@@ -515,7 +492,7 @@ void TComSlice::initWpScaling()
pwp->inputOffset = 0;
}
- pwp->w = pwp->inputWeight;
+ pwp->w = pwp->inputWeight;
pwp->o = pwp->inputOffset << (X265_DEPTH - 8);
pwp->shift = pwp->log2WeightDenom;
pwp->round = (pwp->log2WeightDenom >= 1) ? (1 << (pwp->log2WeightDenom - 1)) : (0);
diff -r 291b3a358a22 -r 720768692efe source/Lib/TLibCommon/TComSlice.h
--- a/source/Lib/TLibCommon/TComSlice.h Sat Feb 15 17:43:58 2014 -0600
+++ b/source/Lib/TLibCommon/TComSlice.h Tue Feb 18 00:22:17 2014 -0600
@@ -1251,7 +1251,7 @@ public:
void setSliceHeaderExtensionPresentFlag(bool val) { m_sliceHeaderExtensionPresentFlag = val; }
};
-struct WpScalingParam
+typedef struct wpScalingParam
{
// Explicit weighted prediction parameters parsed in slice header,
// or Implicit weighted prediction parameters (8 bits depth values).
@@ -1277,15 +1277,7 @@ struct WpScalingParam
inputWeight = X265_MIN(inputWeight, 127);
}
-};
-
-typedef WpScalingParam wpScalingParam;
-
-typedef struct
-{
- int64_t ac;
- int64_t dc;
-} wpACDCParam;
+} wpScalingParam;
/// slice header class
class TComSlice
@@ -1342,8 +1334,6 @@ private:
uint32_t m_sliceSegmentBits;
bool m_bFinalized;
- wpACDCParam m_weightACDCParam[3]; // [0:Y, 1:U, 2:V]
-
uint32_t m_tileOffstForMultES;
uint32_t* m_substreamSizes;
@@ -1551,11 +1541,6 @@ public:
void initWpScaling();
inline bool applyWP() { return (m_sliceType == P_SLICE && m_pps->getUseWP()) || (m_sliceType == B_SLICE && m_pps->getWPBiPred()); }
- void setWpAcDcParam(wpACDCParam wp[3]) { memcpy(m_weightACDCParam, wp, sizeof(wpACDCParam) * 3); }
-
- void getWpAcDcParam(wpACDCParam *&wp);
- void initWpAcDcParam();
-
void setTileOffstForMultES(uint32_t offset) { m_tileOffstForMultES = offset; }
uint32_t getTileOffstForMultES() { return m_tileOffstForMultES; }
diff -r 291b3a358a22 -r 720768692efe source/Lib/TLibCommon/TComWeightPrediction.cpp
--- a/source/Lib/TLibCommon/TComWeightPrediction.cpp Sat Feb 15 17:43:58 2014 -0600
+++ b/source/Lib/TLibCommon/TComWeightPrediction.cpp Tue Feb 18 00:22:17 2014 -0600
@@ -454,7 +454,20 @@ void TComWeightPrediction::addWeightUni(
srcStride = srcYuv0->m_width;
dstStride = outDstYuv->getStride();
- primitives.weight_sp(srcY0, dstY, srcStride, dstStride, width, height, w0, round, shift, offset);
+// primitives.weight_sp(srcY0, dstY, srcStride, dstStride, width, height, w0, round, shift, offset);
+ for ( int y = height-1; y >= 0; y-- )
+ {
+ for ( int x = width-1; x >= 0; )
+ {
+ // note: luma min width is 4
+ dstY[x] = weightUnidirY(w0,srcY0[x], round, shift, offset); x--;
+ dstY[x] = weightUnidirY(w0,srcY0[x], round, shift, offset); x--;
+ dstY[x] = weightUnidirY(w0,srcY0[x], round, shift, offset); x--;
More information about the x265-commits
mailing list