[x265-commits] [x265] x265: whitespace nit
Deepthi Nandakumar
deepthi at multicorewareinc.com
Sun Nov 17 20:07:04 CET 2013
details: http://hg.videolan.org/x265/rev/a5689bb5808e
branches:
changeset: 5103:a5689bb5808e
user: Deepthi Nandakumar <deepthi at multicorewareinc.com>
date: Fri Nov 15 13:50:42 2013 +0530
description:
x265: whitespace nit
Subject: [x265] presets: fix bugs, better spread out the efficiency/speed data points.
details: http://hg.videolan.org/x265/rev/a85c5f418794
branches:
changeset: 5104:a85c5f418794
user: Deepthi Nandakumar <deepthi at multicorewareinc.com>
date: Fri Nov 15 13:51:52 2013 +0530
description:
presets: fix bugs, better spread out the efficiency/speed data points.
Subject: [x265] Merge
details: http://hg.videolan.org/x265/rev/c45770e5a2ae
branches:
changeset: 5105:c45770e5a2ae
user: Deepthi Nandakumar <deepthi at multicorewareinc.com>
date: Fri Nov 15 13:52:35 2013 +0530
description:
Merge
Subject: [x265] fix variable shadow warning
details: http://hg.videolan.org/x265/rev/95f292369c06
branches:
changeset: 5106:95f292369c06
user: Steve Borho <steve at borho.org>
date: Fri Nov 15 11:34:15 2013 -0600
description:
fix variable shadow warning
Subject: [x265] TComPrediction: cleanup hugarian notations and redundant vars
details: http://hg.videolan.org/x265/rev/959cabcc9ece
branches:
changeset: 5107:959cabcc9ece
user: Steve Borho <steve at borho.org>
date: Fri Nov 15 11:45:43 2013 -0600
description:
TComPrediction: cleanup hugarian notations and redundant vars
Subject: [x265] slicetype: hoist weightp analysis above dosearch checks
details: http://hg.videolan.org/x265/rev/3e9bb2ca458b
branches:
changeset: 5108:3e9bb2ca458b
user: Steve Borho <steve at borho.org>
date: Fri Nov 15 11:50:42 2013 -0600
description:
slicetype: hoist weightp analysis above dosearch checks
Subject: [x265] reverted chroma_copy_pp asm integration to avoid csp break
details: http://hg.videolan.org/x265/rev/2cb5461ccd45
branches:
changeset: 5109:2cb5461ccd45
user: Praveen Tiwari
date: Fri Nov 15 12:17:31 2013 +0530
description:
reverted chroma_copy_pp asm integration to avoid csp break
Subject: [x265] cmake: disable some flags for clang, old versions balk at them
details: http://hg.videolan.org/x265/rev/60a66cbd8b47
branches:
changeset: 5110:60a66cbd8b47
user: Steve Borho <steve at borho.org>
date: Sat Nov 16 01:12:12 2013 -0600
description:
cmake: disable some flags for clang, old versions balk at them
Subject: [x265] Adding function pointer type & array declaration for chroma vss filter functions
details: http://hg.videolan.org/x265/rev/f6efa96cfbd4
branches:
changeset: 5111:f6efa96cfbd4
user: Nabajit Deka
date: Fri Nov 15 16:53:18 2013 +0530
description:
Adding function pointer type & array declaration for chroma vss filter functions
Subject: [x265] Adding C primitive for chroma vss filter functions
details: http://hg.videolan.org/x265/rev/fdaef69fbf19
branches:
changeset: 5112:fdaef69fbf19
user: Nabajit Deka
date: Fri Nov 15 16:54:33 2013 +0530
description:
Adding C primitive for chroma vss filter functions
Subject: [x265] Adding test bench code for chroma vss filter functions
details: http://hg.videolan.org/x265/rev/47de8ca8952c
branches:
changeset: 5113:47de8ca8952c
user: Nabajit Deka
date: Fri Nov 15 17:00:39 2013 +0530
description:
Adding test bench code for chroma vss filter functions
Subject: [x265] Adding function pointer array and C primitive initializations for luma vss filter functions
details: http://hg.videolan.org/x265/rev/544c4712cd45
branches:
changeset: 5114:544c4712cd45
user: Nabajit Deka
date: Fri Nov 15 17:43:44 2013 +0530
description:
Adding function pointer array and C primitive initializations for luma vss filter functions
Subject: [x265] Adding test bench code for luma vss filter functions.
details: http://hg.videolan.org/x265/rev/7fd467ca4f3e
branches:
changeset: 5115:7fd467ca4f3e
user: Nabajit Deka
date: Fri Nov 15 17:45:00 2013 +0530
description:
Adding test bench code for luma vss filter functions.
Subject: [x265] asm: routines for chroma vss filter functions for all block sizes
details: http://hg.videolan.org/x265/rev/83c9a7a473c4
branches:
changeset: 5116:83c9a7a473c4
user: Nabajit Deka
date: Fri Nov 15 17:06:24 2013 +0530
description:
asm: routines for chroma vss filter functions for all block sizes
Subject: [x265] asm: routines for luma vss filter functions for all block sizes.
details: http://hg.videolan.org/x265/rev/4ee15557ea11
branches:
changeset: 5117:4ee15557ea11
user: Nabajit Deka
date: Fri Nov 15 17:46:57 2013 +0530
description:
asm: routines for luma vss filter functions for all block sizes.
Subject: [x265] Adding asm function declarations and initializations for chroma vss filter functions
details: http://hg.videolan.org/x265/rev/726f302ca952
branches:
changeset: 5118:726f302ca952
user: Nabajit Deka
date: Fri Nov 15 17:09:44 2013 +0530
description:
Adding asm function declarations and initializations for chroma vss filter functions
Subject: [x265] Adding asm function declarations and initializations for luma vss filter functions.
details: http://hg.videolan.org/x265/rev/ec9295e39fe6
branches:
changeset: 5119:ec9295e39fe6
user: Nabajit Deka
date: Fri Nov 15 17:48:07 2013 +0530
description:
Adding asm function declarations and initializations for luma vss filter functions.
Subject: [x265] TComYuv::copyFromPicLuma, asm integration for chroma blockcopy_pp
details: http://hg.videolan.org/x265/rev/0aa7be2c038a
branches:
changeset: 5120:0aa7be2c038a
user: Praveen Tiwari
date: Fri Nov 15 17:49:39 2013 +0530
description:
TComYuv::copyFromPicLuma, asm integration for chroma blockcopy_pp
Subject: [x265] checking for all supported csp values
details: http://hg.videolan.org/x265/rev/a4b880b9114d
branches:
changeset: 5121:a4b880b9114d
user: Praveen Tiwari
date: Fri Nov 15 19:22:46 2013 +0530
description:
checking for all supported csp values
Subject: [x265] TComYuv::copyToPartYuv, asm integration for blockcopy_pp
details: http://hg.videolan.org/x265/rev/08cb5a0bff32
branches:
changeset: 5122:08cb5a0bff32
user: Praveen Tiwari
date: Fri Nov 15 20:01:10 2013 +0530
description:
TComYuv::copyToPartYuv, asm integration for blockcopy_pp
Subject: [x265] TComYuv::copyPartToYuv, asm code integration for blockcopy_pp
details: http://hg.videolan.org/x265/rev/7e7397e823c9
branches:
changeset: 5123:7e7397e823c9
user: Praveen Tiwari
date: Fri Nov 15 20:31:09 2013 +0530
description:
TComYuv::copyPartToYuv, asm code integration for blockcopy_pp
Subject: [x265] slicetype: hoist intra cost estimate out of weightsAnalyze
details: http://hg.videolan.org/x265/rev/da5b10cf5ee5
branches:
changeset: 5124:da5b10cf5ee5
user: Steve Borho <steve at borho.org>
date: Sat Nov 16 10:11:36 2013 -0600
description:
slicetype: hoist intra cost estimate out of weightsAnalyze
Subject: [x265] repair -i0 behavior
details: http://hg.videolan.org/x265/rev/2552369e3537
branches:
changeset: 5125:2552369e3537
user: Steve Borho <steve at borho.org>
date: Sat Nov 16 10:31:27 2013 -0600
description:
repair -i0 behavior
Subject: [x265] asm: residual buffer is alignment to size, so we can use alignment load instruction
details: http://hg.videolan.org/x265/rev/e43b1e005ffa
branches:
changeset: 5126:e43b1e005ffa
user: Min Chen <chenm003 at 163.com>
date: Sat Nov 16 11:08:26 2013 -0600
description:
asm: residual buffer is alignment to size, so we can use alignment load instruction
Subject: [x265] cleanup: remove unused 64x64 functions
details: http://hg.videolan.org/x265/rev/64ece76a2152
branches:
changeset: 5127:64ece76a2152
user: Min Chen <chenm003 at 163.com>
date: Sat Nov 16 11:08:56 2013 -0600
description:
cleanup: remove unused 64x64 functions
Subject: [x265] asm: assembly code for calcresidual[]
details: http://hg.videolan.org/x265/rev/24bcae464492
branches:
changeset: 5128:24bcae464492
user: Min Chen <chenm003 at 163.com>
date: Sat Nov 16 11:09:02 2013 -0600
description:
asm: assembly code for calcresidual[]
Subject: [x265] fix eoln of pixel-util.asm
details: http://hg.videolan.org/x265/rev/119c01293aa5
branches:
changeset: 5129:119c01293aa5
user: Steve Borho <steve at borho.org>
date: Sat Nov 16 11:09:51 2013 -0600
description:
fix eoln of pixel-util.asm
Subject: [x265] vec: drop residual and recon intrinsic primitives, we have ASM
details: http://hg.videolan.org/x265/rev/3052fca7e7d1
branches:
changeset: 5130:3052fca7e7d1
user: Steve Borho <steve at borho.org>
date: Sat Nov 16 11:23:57 2013 -0600
description:
vec: drop residual and recon intrinsic primitives, we have ASM
Subject: [x265] vec: drop blockfill intrinsic primitives, we have ASM
details: http://hg.videolan.org/x265/rev/1544cf94837d
branches:
changeset: 5131:1544cf94837d
user: Steve Borho <steve at borho.org>
date: Sat Nov 16 11:25:12 2013 -0600
description:
vec: drop blockfill intrinsic primitives, we have ASM
Subject: [x265] cli: allow string argument names for --me, generalize
details: http://hg.videolan.org/x265/rev/14cd6a901cc4
branches:
changeset: 5132:14cd6a901cc4
user: Steve Borho <steve at borho.org>
date: Sat Nov 16 15:53:51 2013 -0600
description:
cli: allow string argument names for --me, generalize
Subject: [x265] common: remove thread counts from param2string
details: http://hg.videolan.org/x265/rev/e276322c6288
branches:
changeset: 5133:e276322c6288
user: Steve Borho <steve at borho.org>
date: Sat Nov 16 15:54:35 2013 -0600
description:
common: remove thread counts from param2string
Subject: [x265] clang: fix ambiguous * operator in intra-ssse3.cpp
details: http://hg.videolan.org/x265/rev/7cae5e2e17ed
branches:
changeset: 5134:7cae5e2e17ed
user: Steve Borho <steve at borho.org>
date: Sun Nov 17 11:05:06 2013 -0600
description:
clang: fix ambiguous * operator in intra-ssse3.cpp
Subject: [x265] vec: disable 16bpp ipfilter_ps[] functions, not 10bit pixel safe
details: http://hg.videolan.org/x265/rev/b32dc442ca83
branches:
changeset: 5135:b32dc442ca83
user: Steve Borho <steve at borho.org>
date: Sun Nov 17 11:22:39 2013 -0600
description:
vec: disable 16bpp ipfilter_ps[] functions, not 10bit pixel safe
Subject: [x265] testbench: quit zeroing buffers before every test
details: http://hg.videolan.org/x265/rev/e2895ce7bbeb
branches:
changeset: 5136:e2895ce7bbeb
user: Steve Borho <steve at borho.org>
date: Sun Nov 17 11:24:13 2013 -0600
description:
testbench: quit zeroing buffers before every test
diffstat:
source/CMakeLists.txt | 2 +-
source/Lib/TLibCommon/TComPic.cpp | 2 +-
source/Lib/TLibCommon/TComPrediction.cpp | 132 +--
source/Lib/TLibCommon/TComSlice.h | 17 +-
source/Lib/TLibCommon/TComYuv.cpp | 41 +-
source/Lib/TLibCommon/TComYuv.h | 7 +-
source/Lib/TLibEncoder/TEncSearch.cpp | 11 +-
source/common/CMakeLists.txt | 4 +-
source/common/common.cpp | 105 ++-
source/common/common.h | 1 -
source/common/ipfilter.cpp | 39 +-
source/common/lowres.cpp | 4 +-
source/common/lowres.h | 18 +-
source/common/pixel.cpp | 8 +-
source/common/primitives.cpp | 5 +
source/common/primitives.h | 17 +-
source/common/vec/intra-ssse3.cpp | 2 +-
source/common/vec/ipfilter-sse41.cpp | 58 +-
source/common/vec/pixel-sse3.cpp | 393 -----------
source/common/x86/asm-primitives.cpp | 123 ++-
source/common/x86/ipfilter8.asm | 455 ++++++++++++-
source/common/x86/ipfilter8.h | 65 +
source/common/x86/pixel-util.asm | 1026 ++++++++++++++++-------------
source/common/x86/pixel.h | 5 +-
source/encoder/encoder.cpp | 2 +-
source/encoder/slicetype.cpp | 193 ++++-
source/encoder/slicetype.h | 16 +-
source/test/ipfilterharness.cpp | 146 +++-
source/test/ipfilterharness.h | 2 +
source/test/pixelharness.cpp | 20 +-
source/x265.cpp | 4 -
source/x265.h | 3 +-
32 files changed, 1756 insertions(+), 1170 deletions(-)
diffs (truncated from 4131 to 300 lines):
diff -r 1b9545e23e36 -r e2895ce7bbeb source/CMakeLists.txt
--- a/source/CMakeLists.txt Thu Nov 14 16:45:03 2013 +0800
+++ b/source/CMakeLists.txt Sun Nov 17 11:24:13 2013 -0600
@@ -73,7 +73,7 @@ if(INTEL_CXX AND UNIX)
elseif(CLANG)
# treat clang roughly like gcc
set(GCC 1)
- add_definitions(-Wall -Wextra -Wshadow -mstackrealign -ffast-math)
+ add_definitions(-Wall -Wextra -Wshadow -ffast-math)
elseif(CMAKE_COMPILER_IS_GNUCXX)
add_definitions(-Wall -Wextra -Wshadow -mstackrealign -ffast-math)
execute_process(COMMAND ${CMAKE_CXX_COMPILER} -dumpversion OUTPUT_VARIABLE GCC_VERSION)
diff -r 1b9545e23e36 -r e2895ce7bbeb source/Lib/TLibCommon/TComPic.cpp
--- a/source/Lib/TLibCommon/TComPic.cpp Thu Nov 14 16:45:03 2013 +0800
+++ b/source/Lib/TLibCommon/TComPic.cpp Sun Nov 17 11:24:13 2013 -0600
@@ -92,7 +92,7 @@ void TComPic::create(TEncCfg* cfg)
m_defaultDisplayWindow = cfg->getDefaultDisplayWindow();
/* configure lowres dimensions */
- m_lowres.create(this, cfg->param.bframes, &cfg->param.rc.aqMode);
+ m_lowres.create(m_origPicYuv, cfg->param.bframes, &cfg->param.rc.aqMode);
}
void TComPic::destroy(int bframes)
diff -r 1b9545e23e36 -r e2895ce7bbeb source/Lib/TLibCommon/TComPrediction.cpp
--- a/source/Lib/TLibCommon/TComPrediction.cpp Thu Nov 14 16:45:03 2013 +0800
+++ b/source/Lib/TLibCommon/TComPrediction.cpp Sun Nov 17 11:24:13 2013 -0600
@@ -245,7 +245,7 @@ bool TComPrediction::xCheckIdenticalMoti
return false;
}
-void TComPrediction::motionCompensation(TComDataCU* cu, TComYuv* predYuv, int picList, int partIdx, bool bLuma, bool bChroma)
+void TComPrediction::motionCompensation(TComDataCU* cu, TComYuv* predYuv, int list, int partIdx, bool bLuma, bool bChroma)
{
int width;
int height;
@@ -254,26 +254,26 @@ void TComPrediction::motionCompensation(
if (partIdx >= 0)
{
cu->getPartIndexAndSize(partIdx, partAddr, width, height);
- if (picList != REF_PIC_LIST_X)
+ if (list != REF_PIC_LIST_X)
{
if (cu->getSlice()->getPPS()->getUseWP())
{
- TShortYUV* pcMbYuv = &m_predShortYuv[0];
- int refId = cu->getCUMvField(picList)->getRefIdx(partAddr);
+ TShortYUV* shortYuv = &m_predShortYuv[0];
+ int refId = cu->getCUMvField(list)->getRefIdx(partAddr);
assert(refId >= 0);
- MV mv = cu->getCUMvField(picList)->getMv(partAddr);
+ MV mv = cu->getCUMvField(list)->getMv(partAddr);
cu->clipMv(mv);
if (bLuma)
- xPredInterLumaBlk(cu, cu->getSlice()->getRefPic(picList, refId)->getPicYuvRec(), partAddr, &mv, width, height, pcMbYuv);
+ xPredInterLumaBlk(cu, cu->getSlice()->getRefPic(list, refId)->getPicYuvRec(), partAddr, &mv, width, height, shortYuv);
if (bChroma)
- xPredInterChromaBlk(cu, cu->getSlice()->getRefPic(picList, refId)->getPicYuvRec(), partAddr, &mv, width, height, pcMbYuv);
+ xPredInterChromaBlk(cu, cu->getSlice()->getRefPic(list, refId)->getPicYuvRec(), partAddr, &mv, width, height, shortYuv);
- xWeightedPredictionUni(cu, pcMbYuv, partAddr, width, height, picList, predYuv, -1, bLuma, bChroma);
+ xWeightedPredictionUni(cu, shortYuv, partAddr, width, height, list, predYuv, -1, bLuma, bChroma);
}
else
{
- xPredInterUni(cu, partAddr, width, height, picList, predYuv, bLuma, bChroma);
+ xPredInterUni(cu, partAddr, width, height, list, predYuv, bLuma, bChroma);
}
}
else
@@ -294,28 +294,28 @@ void TComPrediction::motionCompensation(
{
cu->getPartIndexAndSize(partIdx, partAddr, width, height);
- if (picList != REF_PIC_LIST_X)
+ if (list != REF_PIC_LIST_X)
{
if (cu->getSlice()->getPPS()->getUseWP())
{
- TShortYUV* pcMbYuv = &m_predShortYuv[0];
+ TShortYUV* shortYuv = &m_predShortYuv[0];
- int refId = cu->getCUMvField(picList)->getRefIdx(partAddr);
+ int refId = cu->getCUMvField(list)->getRefIdx(partAddr);
assert(refId >= 0);
- MV mv = cu->getCUMvField(picList)->getMv(partAddr);
+ MV mv = cu->getCUMvField(list)->getMv(partAddr);
cu->clipMv(mv);
if (bLuma)
- xPredInterLumaBlk(cu, cu->getSlice()->getRefPic(picList, refId)->getPicYuvRec(), partAddr, &mv, width, height, pcMbYuv);
+ xPredInterLumaBlk(cu, cu->getSlice()->getRefPic(list, refId)->getPicYuvRec(), partAddr, &mv, width, height, shortYuv);
if (bChroma)
- xPredInterChromaBlk(cu, cu->getSlice()->getRefPic(picList, refId)->getPicYuvRec(), partAddr, &mv, width, height, pcMbYuv);
+ xPredInterChromaBlk(cu, cu->getSlice()->getRefPic(list, refId)->getPicYuvRec(), partAddr, &mv, width, height, shortYuv);
- xWeightedPredictionUni(cu, pcMbYuv, partAddr, width, height, picList, predYuv, -1, bLuma, bChroma);
+ xWeightedPredictionUni(cu, shortYuv, partAddr, width, height, list, predYuv, -1, bLuma, bChroma);
}
else
{
- xPredInterUni(cu, partAddr, width, height, picList, predYuv, bLuma, bChroma);
+ xPredInterUni(cu, partAddr, width, height, list, predYuv, bLuma, bChroma);
}
}
else
@@ -332,35 +332,35 @@ void TComPrediction::motionCompensation(
}
}
-void TComPrediction::xPredInterUni(TComDataCU* cu, uint32_t partAddr, int width, int height, int picList, TComYuv* outPredYuv, bool bLuma, bool bChroma)
+void TComPrediction::xPredInterUni(TComDataCU* cu, uint32_t partAddr, int width, int height, int list, TComYuv* outPredYuv, bool bLuma, bool bChroma)
{
- int refIdx = cu->getCUMvField(picList)->getRefIdx(partAddr);
+ int refIdx = cu->getCUMvField(list)->getRefIdx(partAddr);
assert(refIdx >= 0);
- MV mv = cu->getCUMvField(picList)->getMv(partAddr);
+ MV mv = cu->getCUMvField(list)->getMv(partAddr);
cu->clipMv(mv);
if (bLuma)
- xPredInterLumaBlk(cu, cu->getSlice()->getRefPic(picList, refIdx)->getPicYuvRec(), partAddr, &mv, width, height, outPredYuv);
+ xPredInterLumaBlk(cu, cu->getSlice()->getRefPic(list, refIdx)->getPicYuvRec(), partAddr, &mv, width, height, outPredYuv);
if (bChroma)
- xPredInterChromaBlk(cu, cu->getSlice()->getRefPic(picList, refIdx)->getPicYuvRec(), partAddr, &mv, width, height, outPredYuv);
+ xPredInterChromaBlk(cu, cu->getSlice()->getRefPic(list, refIdx)->getPicYuvRec(), partAddr, &mv, width, height, outPredYuv);
}
-void TComPrediction::xPredInterUni(TComDataCU* cu, uint32_t partAddr, int width, int height, int picList, TShortYUV* outPredYuv, bool bLuma, bool bChroma)
+void TComPrediction::xPredInterUni(TComDataCU* cu, uint32_t partAddr, int width, int height, int list, TShortYUV* outPredYuv, bool bLuma, bool bChroma)
{
- int refIdx = cu->getCUMvField(picList)->getRefIdx(partAddr);
+ int refIdx = cu->getCUMvField(list)->getRefIdx(partAddr);
assert(refIdx >= 0);
- MV mv = cu->getCUMvField(picList)->getMv(partAddr);
+ MV mv = cu->getCUMvField(list)->getMv(partAddr);
cu->clipMv(mv);
if (bLuma)
- xPredInterLumaBlk(cu, cu->getSlice()->getRefPic(picList, refIdx)->getPicYuvRec(), partAddr, &mv, width, height, outPredYuv);
+ xPredInterLumaBlk(cu, cu->getSlice()->getRefPic(list, refIdx)->getPicYuvRec(), partAddr, &mv, width, height, outPredYuv);
if (bChroma)
- xPredInterChromaBlk(cu, cu->getSlice()->getRefPic(picList, refIdx)->getPicYuvRec(), partAddr, &mv, width, height, outPredYuv);
+ xPredInterChromaBlk(cu, cu->getSlice()->getRefPic(list, refIdx)->getPicYuvRec(), partAddr, &mv, width, height, outPredYuv);
}
void TComPrediction::xPredInterBi(TComDataCU* cu, uint32_t partAddr, int width, int height, TComYuv*& outPredYuv, bool bLuma, bool bChroma)
@@ -369,16 +369,13 @@ void TComPrediction::xPredInterBi(TComDa
if (cu->getCUMvField(REF_PIC_LIST_0)->getRefIdx(partAddr) >= 0 && cu->getCUMvField(REF_PIC_LIST_1)->getRefIdx(partAddr) >= 0)
{
- TShortYUV* pcMbYuv;
- for (int refList = 0; refList < 2; refList++)
+ for (int list = 0; list < 2; list++)
{
- int picList = refList;
- refIdx[refList] = cu->getCUMvField(picList)->getRefIdx(partAddr);
+ refIdx[list] = cu->getCUMvField(list)->getRefIdx(partAddr);
- assert(refIdx[refList] < cu->getSlice()->getNumRefIdx(picList));
+ assert(refIdx[list] < cu->getSlice()->getNumRefIdx(list));
- pcMbYuv = &m_predShortYuv[refList];
- xPredInterUni(cu, partAddr, width, height, picList, pcMbYuv, bLuma, bChroma);
+ xPredInterUni(cu, partAddr, width, height, list, &m_predShortYuv[list], bLuma, bChroma);
}
if (cu->getSlice()->getPPS()->getWPBiPred() && cu->getSlice()->getSliceType() == B_SLICE)
@@ -392,66 +389,49 @@ void TComPrediction::xPredInterBi(TComDa
}
else if (cu->getSlice()->getPPS()->getWPBiPred() && cu->getSlice()->getSliceType() == B_SLICE)
{
- TShortYUV* pcMbYuv;
- for (int refList = 0; refList < 2; refList++)
+ for (int list = 0; list < 2; list++)
{
- int picList = refList;
- refIdx[refList] = cu->getCUMvField(picList)->getRefIdx(partAddr);
+ refIdx[list] = cu->getCUMvField(list)->getRefIdx(partAddr);
+ if (refIdx[list] < 0) continue;
- if (refIdx[refList] < 0)
- {
- continue;
- }
+ assert(refIdx[list] < cu->getSlice()->getNumRefIdx(list));
- assert(refIdx[refList] < cu->getSlice()->getNumRefIdx(picList));
-
- pcMbYuv = &m_predShortYuv[refList];
- xPredInterUni(cu, partAddr, width, height, picList, pcMbYuv, bLuma, bChroma);
+ xPredInterUni(cu, partAddr, width, height, list, &m_predShortYuv[list], bLuma, bChroma);
}
xWeightedPredictionBi(cu, &m_predShortYuv[0], &m_predShortYuv[1], refIdx[0], refIdx[1], partAddr, width, height, outPredYuv, bLuma, bChroma);
}
else if (cu->getSlice()->getPPS()->getUseWP() && cu->getSlice()->getSliceType() == P_SLICE)
{
- TShortYUV* pcMbYuv;
-
- int picList = REF_PIC_LIST_0;
- refIdx[0] = cu->getCUMvField(picList)->getRefIdx(partAddr);
+ int list = REF_PIC_LIST_0;
+ refIdx[list] = cu->getCUMvField(list)->getRefIdx(partAddr);
if (!(refIdx[0] < 0))
{
- assert(refIdx[0] < cu->getSlice()->getNumRefIdx(picList));
-
- pcMbYuv = &m_predShortYuv[0];
- int refId = cu->getCUMvField(picList)->getRefIdx(partAddr);
+ assert(refIdx[0] < cu->getSlice()->getNumRefIdx(list));
+ int refId = cu->getCUMvField(list)->getRefIdx(partAddr);
assert(refId >= 0);
- MV mv = cu->getCUMvField(picList)->getMv(partAddr);
+ MV mv = cu->getCUMvField(list)->getMv(partAddr);
cu->clipMv(mv);
if (bLuma)
- xPredInterLumaBlk(cu, cu->getSlice()->getRefPic(picList, refId)->getPicYuvRec(), partAddr, &mv, width, height, pcMbYuv);
+ xPredInterLumaBlk(cu, cu->getSlice()->getRefPic(list, refId)->getPicYuvRec(), partAddr, &mv, width, height, &m_predShortYuv[0]);
if (bChroma)
- xPredInterChromaBlk(cu, cu->getSlice()->getRefPic(picList, refId)->getPicYuvRec(), partAddr, &mv, width, height, pcMbYuv);
+ xPredInterChromaBlk(cu, cu->getSlice()->getRefPic(list, refId)->getPicYuvRec(), partAddr, &mv, width, height, &m_predShortYuv[0]);
xWeightedPredictionUni(cu, &m_predShortYuv[0], partAddr, width, height, REF_PIC_LIST_0, outPredYuv, -1, bLuma, bChroma);
}
}
else
{
- for (int refList = 0; refList < 2; refList++)
+ for (int list = 0; list < 2; list++)
{
- int picList = refList;
- refIdx[refList] = cu->getCUMvField(picList)->getRefIdx(partAddr);
+ refIdx[list] = cu->getCUMvField(list)->getRefIdx(partAddr);
+ if (refIdx[list] < 0) continue;
- if (refIdx[refList] < 0)
- {
- continue;
- }
+ assert(refIdx[list] < cu->getSlice()->getNumRefIdx(list));
- assert(refIdx[refList] < cu->getSlice()->getNumRefIdx(picList));
-
- TComYuv* yuv = &m_predYuv[refList];
- xPredInterUni(cu, partAddr, width, height, picList, yuv, bLuma, bChroma);
+ xPredInterUni(cu, partAddr, width, height, list, &m_predYuv[list], bLuma, bChroma);
}
xWeightedAverage(&m_predYuv[0], &m_predYuv[1], refIdx[0], refIdx[1], partAddr, width, height, outPredYuv, bLuma, bChroma);
@@ -575,8 +555,8 @@ void TComPrediction::xPredInterChromaBlk
if ((yFrac | xFrac) == 0)
{
- primitives.chroma_copy_pp[partEnum](dstCb, dstStride, refCb, refStride);
- primitives.chroma_copy_pp[partEnum](dstCr, dstStride, refCr, refStride);
+ primitives.blockcpy_pp(cxWidth, cxHeight, dstCb, dstStride, refCb, refStride);
+ primitives.blockcpy_pp(cxWidth, cxHeight, dstCr, dstStride, refCr, refStride);
}
else if (yFrac == 0)
{
@@ -668,21 +648,21 @@ void TComPrediction::xWeightedAverage(TC
}
// AMVP
-void TComPrediction::getMvPredAMVP(TComDataCU* cu, uint32_t partIdx, uint32_t partAddr, int picList, MV& mvPred)
+void TComPrediction::getMvPredAMVP(TComDataCU* cu, uint32_t partIdx, uint32_t partAddr, int list, MV& mvPred)
{
- AMVPInfo* pcAMVPInfo = cu->getCUMvField(picList)->getAMVPInfo();
+ AMVPInfo* pcAMVPInfo = cu->getCUMvField(list)->getAMVPInfo();
if (pcAMVPInfo->m_num <= 1)
{
mvPred = pcAMVPInfo->m_mvCand[0];
- cu->setMVPIdxSubParts(0, picList, partAddr, partIdx, cu->getDepth(partAddr));
- cu->setMVPNumSubParts(pcAMVPInfo->m_num, picList, partAddr, partIdx, cu->getDepth(partAddr));
+ cu->setMVPIdxSubParts(0, list, partAddr, partIdx, cu->getDepth(partAddr));
+ cu->setMVPNumSubParts(pcAMVPInfo->m_num, list, partAddr, partIdx, cu->getDepth(partAddr));
return;
}
- assert(cu->getMVPIdx(picList, partAddr) >= 0);
- mvPred = pcAMVPInfo->m_mvCand[cu->getMVPIdx(picList, partAddr)];
+ assert(cu->getMVPIdx(list, partAddr) >= 0);
+ mvPred = pcAMVPInfo->m_mvCand[cu->getMVPIdx(list, partAddr)];
}
//! \}
diff -r 1b9545e23e36 -r e2895ce7bbeb source/Lib/TLibCommon/TComSlice.h
--- a/source/Lib/TLibCommon/TComSlice.h Thu Nov 14 16:45:03 2013 +0800
More information about the x265-commits
mailing list