[x265-commits] [x265] fixed output mismatch problem with chroma 2xN block
Praveen at videolan.org
Praveen at videolan.org
Fri Oct 18 03:25:50 CEST 2013
details: http://hg.videolan.org/x265/rev/b3852d6908a5
branches:
changeset: 4512:b3852d6908a5
user: Praveen Tiwari
date: Thu Oct 17 14:11:44 2013 +0530
description:
fixed output mismatch problem with chroma 2xN block
Subject: [x265] added genration of random stride in chroma unit test code
details: http://hg.videolan.org/x265/rev/fc9dbd798ac3
branches:
changeset: 4513:fc9dbd798ac3
user: Praveen Tiwari
date: Thu Oct 17 14:14:40 2013 +0530
description:
added genration of random stride in chroma unit test code
Subject: [x265] removed unnecessary calculation form rand_srcStride
details: http://hg.videolan.org/x265/rev/dfae391107c3
branches:
changeset: 4514:dfae391107c3
user: Praveen Tiwari
date: Thu Oct 17 16:05:37 2013 +0530
description:
removed unnecessary calculation form rand_srcStride
Subject: [x265] x265_pixel_ssd_4x4_ssse3 miss EMMS
details: http://hg.videolan.org/x265/rev/2a3af4fe8e5c
branches:
changeset: 4515:2a3af4fe8e5c
user: Min Chen <chenm003 at 163.com>
date: Thu Oct 17 17:16:34 2013 +0800
description:
x265_pixel_ssd_4x4_ssse3 miss EMMS
Subject: [x265] pixel: fix the hash mismatch due to convert32to16_shr
details: http://hg.videolan.org/x265/rev/a31b03ff2cff
branches:
changeset: 4516:a31b03ff2cff
user: Yuvaraj Venkatesh <yuvaraj at multicorewareinc.com>
date: Thu Oct 17 13:12:54 2013 +0530
description:
pixel: fix the hash mismatch due to convert32to16_shr
Subject: [x265] improvement cvt32to16_shr by merge width and height loop
details: http://hg.videolan.org/x265/rev/f6226cef13f1
branches:
changeset: 4517:f6226cef13f1
user: Min Chen <chenm003 at 163.com>
date: Thu Oct 17 22:14:37 2013 +0800
description:
improvement cvt32to16_shr by merge width and height loop
Subject: [x265] common : Added new function x265_param2string
details: http://hg.videolan.org/x265/rev/09bb631e4253
branches:
changeset: 4518:09bb631e4253
user: Gopu Govindaswamy <gopu at multicorewareinc.com>
date: Thu Oct 17 14:52:17 2013 +0530
description:
common : Added new function x265_param2string
Subject: [x265] cli: rename bRDLevel to rdLevel
details: http://hg.videolan.org/x265/rev/ffb8df2f3778
branches:
changeset: 4519:ffb8df2f3778
user: Gopu Govindaswamy <gopu at multicorewareinc.com>
date: Thu Oct 17 15:02:34 2013 +0530
description:
cli: rename bRDLevel to rdLevel
Subject: [x265] cmake: fix assembly dependency path
details: http://hg.videolan.org/x265/rev/a09583956501
branches:
changeset: 4520:a09583956501
user: Steve Borho <steve at borho.org>
date: Thu Oct 17 13:22:03 2013 -0500
description:
cmake: fix assembly dependency path
Subject: [x265] TComPic: add m_qpAqOffset to store qp offsets per CU when Aq is enabled
details: http://hg.videolan.org/x265/rev/e2333fe80c56
branches:
changeset: 4521:e2333fe80c56
user: Aarthi Thirumalai<aarthi at multicorewareinc.com>
date: Thu Oct 17 14:37:09 2013 +0530
description:
TComPic: add m_qpAqOffset to store qp offsets per CU when Aq is enabled
Subject: [x265] rc: implement Adaptive Quantization.
details: http://hg.videolan.org/x265/rev/c49db12611a2
branches:
changeset: 4522:c49db12611a2
user: Aarthi Thirumalai<aarthi at multicorewareinc.com>
date: Thu Oct 17 12:51:26 2013 +0530
description:
rc: implement Adaptive Quantization.
added functions to compute AC Energy per CU for all planes,
calculate qpAqOffset for each CU
Subject: [x265] pixel16: converted sad_4 from vector class to intrinsic
details: http://hg.videolan.org/x265/rev/f5cdcb7cdaca
branches:
changeset: 4523:f5cdcb7cdaca
user: Yuvaraj Venkatesh <yuvaraj at multicorewareinc.com>
date: Thu Oct 17 17:46:41 2013 +0530
description:
pixel16: converted sad_4 from vector class to intrinsic
Subject: [x265] primitives: cleanup luma partition enums and primitive initialization
details: http://hg.videolan.org/x265/rev/2eb3f19bb34a
branches:
changeset: 4524:2eb3f19bb34a
user: Steve Borho <steve at borho.org>
date: Thu Oct 17 17:17:12 2013 -0500
description:
primitives: cleanup luma partition enums and primitive initialization
Don't define any enums for partitions which are not used by HEVC. Line up
chroma enums to match luma enums. Stop instantiating C primitives that are
never used. Shorten up the partition enum names. Prune unused SSD assembly
routines, move ASM funcdefs into headers
Subject: [x265] primitives: define luma_hpp block interpolation function pointers
details: http://hg.videolan.org/x265/rev/8f0f4bb9825e
branches:
changeset: 4525:8f0f4bb9825e
user: Steve Borho <steve at borho.org>
date: Thu Oct 17 17:30:40 2013 -0500
description:
primitives: define luma_hpp block interpolation function pointers
Subject: [x265] unit test code for luma filter
details: http://hg.videolan.org/x265/rev/2b312edc7d7d
branches:
changeset: 4526:2b312edc7d7d
user: Praveen Tiwari
date: Thu Oct 17 21:00:27 2013 +0530
description:
unit test code for luma filter
Subject: [x265] ipfilter: setup luma function pointers
details: http://hg.videolan.org/x265/rev/2ecc6883d465
branches:
changeset: 4527:2ecc6883d465
user: Praveen Tiwari
date: Thu Oct 17 21:03:28 2013 +0530
description:
ipfilter: setup luma function pointers
Subject: [x265] asm: fundef creation and function pointer table setup for luma asm primitives
details: http://hg.videolan.org/x265/rev/165d27a37689
branches:
changeset: 4528:165d27a37689
user: Praveen Tiwari
date: Thu Oct 17 21:06:54 2013 +0530
description:
asm: fundef creation and function pointer table setup for luma asm primitives
Subject: [x265] removed unnecessary calculation from chroma REPORT_SPEEDUP function
details: http://hg.videolan.org/x265/rev/b42f1963229b
branches:
changeset: 4529:b42f1963229b
user: Praveen Tiwari
date: Thu Oct 17 21:10:34 2013 +0530
description:
removed unnecessary calculation from chroma REPORT_SPEEDUP function
diffstat:
source/Lib/TLibCommon/TComPic.cpp | 24 +-
source/Lib/TLibCommon/TComPic.h | 6 +-
source/Lib/TLibCommon/TComTrQuant.cpp | 6 +-
source/common/CMakeLists.txt | 10 +-
source/common/common.cpp | 62 +++-
source/common/common.h | 1 +
source/common/ipfilter.cpp | 56 +-
source/common/pixel.cpp | 293 ++++++----------
source/common/primitives.cpp | 60 ++-
source/common/primitives.h | 64 +-
source/common/vec/pixel-sse3.cpp | 28 +-
source/common/vec/pixel-sse41.cpp | 40 +-
source/common/vec/pixel16-sse41.cpp | 62 +-
source/common/x86/asm-primitives.cpp | 581 ++++++++++++++++-----------------
source/common/x86/ipfilter8.asm | 2 +-
source/common/x86/ipfilter8.h | 94 +++++
source/common/x86/mc.h | 36 ++
source/common/x86/pixel-a.asm | 118 +-----
source/common/x86/pixel.h | 61 +-
source/encoder/encoder.cpp | 7 +-
source/encoder/framefilter.cpp | 25 +-
source/encoder/motion.cpp | 49 +-
source/encoder/ratecontrol.cpp | 79 ++++
source/encoder/ratecontrol.h | 3 +-
source/encoder/slicetype.cpp | 12 +-
source/test/ipfilterharness.cpp | 87 +++-
source/test/ipfilterharness.h | 2 +
source/test/pixelharness.cpp | 45 +-
source/test/testharness.h | 18 +
source/x265.cpp | 2 +-
source/x265.h | 2 +-
31 files changed, 1073 insertions(+), 862 deletions(-)
diffs (truncated from 2787 to 300 lines):
diff -r 2fbeab18f182 -r b42f1963229b source/Lib/TLibCommon/TComPic.cpp
--- a/source/Lib/TLibCommon/TComPic.cpp Thu Oct 17 02:55:32 2013 -0500
+++ b/source/Lib/TLibCommon/TComPic.cpp Thu Oct 17 21:10:34 2013 +0530
@@ -38,6 +38,7 @@
#include "TComPic.h"
#include "SEI.h"
#include "mv.h"
+#include "TLibEncoder/TEncCfg.h"
using namespace x265;
@@ -61,6 +62,7 @@ TComPic::TComPic()
memset(&m_lowres, 0, sizeof(m_lowres));
m_next = NULL;
m_prev = NULL;
+ m_qpAqOffset = NULL;
m_SSDY = 0;
m_SSDU = 0;
m_SSDV = 0;
@@ -69,25 +71,32 @@ TComPic::TComPic()
TComPic::~TComPic()
{}
-void TComPic::create(int width, int height, UInt maxWidth, UInt maxHeight, UInt maxDepth, Window &conformanceWindow, Window &defaultDisplayWindow, int bframes)
+void TComPic::create(TEncCfg* cfg)
{
m_picSym = new TComPicSym;
- m_picSym->create(width, height, maxWidth, maxHeight, maxDepth);
+ m_picSym->create(cfg->param.sourceWidth, cfg->param.sourceHeight, g_maxCUWidth, g_maxCUHeight, g_maxCUDepth);
m_origPicYuv = new TComPicYuv;
- m_origPicYuv->create(width, height, maxWidth, maxHeight, maxDepth);
+ m_origPicYuv->create(cfg->param.sourceWidth, cfg->param.sourceHeight, g_maxCUWidth, g_maxCUHeight, g_maxCUDepth);
m_reconPicYuv = new TComPicYuv;
- m_reconPicYuv->create(width, height, maxWidth, maxHeight, maxDepth);
+ m_reconPicYuv->create(cfg->param.sourceWidth, cfg->param.sourceHeight, g_maxCUWidth, g_maxCUHeight, g_maxCUDepth);
/* store conformance window parameters with picture */
- m_conformanceWindow = conformanceWindow;
+ m_conformanceWindow = cfg->getConformanceWindow();
/* store display window parameters with picture */
- m_defaultDisplayWindow = defaultDisplayWindow;
+ m_defaultDisplayWindow = cfg->getDefaultDisplayWindow();
/* configure lowres dimensions */
- m_lowres.create(this, bframes);
+ m_lowres.create(this, cfg->param.bframes);
+
+ if (cfg->param.rc.aqMode)
+ {
+ m_qpAqOffset = (double*)x265_malloc(sizeof(double) * getPicSym()->getNumberOfCUsInFrame());
+ if (!m_qpAqOffset)
+ cfg->param.rc.aqMode = 0;
+ }
}
void TComPic::destroy(int bframes)
@@ -114,6 +123,7 @@ void TComPic::destroy(int bframes)
}
m_lowres.destroy(bframes);
+ X265_FREE(m_qpAqOffset);
}
//! \}
diff -r 2fbeab18f182 -r b42f1963229b source/Lib/TLibCommon/TComPic.h
--- a/source/Lib/TLibCommon/TComPic.h Thu Oct 17 02:55:32 2013 -0500
+++ b/source/Lib/TLibCommon/TComPic.h Thu Oct 17 21:10:34 2013 +0530
@@ -48,6 +48,8 @@
namespace x265 {
// private namespace
+class TEncCfg;
+
//! \ingroup TLibCommon
//! \{
@@ -84,7 +86,7 @@ public:
TComPic* m_next;
TComPic* m_prev;
-
+ double* m_qpAqOffset;
UInt64 m_SSDY;
UInt64 m_SSDU;
UInt64 m_SSDV;
@@ -92,7 +94,7 @@ public:
TComPic();
virtual ~TComPic();
- void create(int width, int height, UInt maxWidth, UInt maxHeight, UInt maxDepth, Window &conformanceWindow, Window &defaultDisplayWindow, int bframes);
+ void create(TEncCfg* cfg);
virtual void destroy(int bframes);
diff -r 2fbeab18f182 -r b42f1963229b source/Lib/TLibCommon/TComTrQuant.cpp
--- a/source/Lib/TLibCommon/TComTrQuant.cpp Thu Oct 17 02:55:32 2013 -0500
+++ b/source/Lib/TLibCommon/TComTrQuant.cpp Thu Oct 17 21:10:34 2013 +0530
@@ -490,11 +490,9 @@ void TComTrQuant::xITransformSkip(int* c
int j, k;
if (shift > 0)
{
+ assert(width == height);
transformSkipShift = shift;
- for (j = 0; j < height; j++)
- {
- primitives.cvt32to16_shr(&residual[j * stride], &coef[j * width], shift, width);
- }
+ primitives.cvt32to16_shr(residual, coef, stride, shift, width);
}
else
{
diff -r 2fbeab18f182 -r b42f1963229b source/common/CMakeLists.txt
--- a/source/common/CMakeLists.txt Thu Oct 17 02:55:32 2013 -0500
+++ b/source/common/CMakeLists.txt Thu Oct 17 21:10:34 2013 +0530
@@ -180,9 +180,9 @@ if(ENABLE_PRIMITIVES_ASM)
add_custom_command(
OUTPUT ${ASM}.o
COMMAND ${YASM_EXECUTABLE} ARGS ${FLAGS} ${CMAKE_CURRENT_SOURCE_DIR}/x86/${ASM} -o ${ASM}.o
- DEPENDS ${ASM})
+ DEPENDS ${CMAKE_CURRENT_SOURCE_DIR}/x86/${ASM})
endforeach()
- add_library(assembly STATIC x86/asm-primitives.cpp x86/pixel.h ${OBJS})
+ add_library(assembly STATIC x86/asm-primitives.cpp x86/pixel.h x86/mc.h x86/ipfilter8.h ${OBJS})
elseif(MSVC_IDE)
# this is horrible. ugly, and hacky, and it reproduces logic found
# in the yasm CMake modules, but this is required because of this cmake bug
@@ -202,12 +202,12 @@ if(ENABLE_PRIMITIVES_ASM)
add_custom_command(
OUTPUT ${ASM}.obj
COMMAND ${YASM_EXECUTABLE} ARGS ${FLAGS} ${CMAKE_CURRENT_SOURCE_DIR}/x86/${ASM} -o ${ASM}.obj
- DEPENDS ${ASM})
+ DEPENDS x86/${ASM})
endforeach()
- add_library(assembly STATIC x86/asm-primitives.cpp x86/pixel.h ${FULLPATHASM} ${OBJS})
+ add_library(assembly STATIC x86/asm-primitives.cpp x86/pixel.h x86/mc.h x86/ipfilter8.h ${FULLPATHASM} ${OBJS})
else()
enable_language(ASM_YASM)
- set(ASM_PRIMITIVES x86/asm-primitives.cpp x86/pixel.h ${FULLPATHASM})
+ set(ASM_PRIMITIVES x86/asm-primitives.cpp x86/pixel.h x86/mc.h x86/ipfilter8.h ${FULLPATHASM})
endif()
endif(ENABLE_PRIMITIVES_ASM)
diff -r 2fbeab18f182 -r b42f1963229b source/common/common.cpp
--- a/source/common/common.cpp Thu Oct 17 02:55:32 2013 -0500
+++ b/source/common/common.cpp Thu Oct 17 21:10:34 2013 +0530
@@ -138,7 +138,7 @@ void x265_param_default(x265_param_t *pa
param->maxNumMergeCand = 5u;
param->bEnableAMP = 1;
param->bEnableRectInter = 1;
- param->bRDLevel = X265_FULL_RDO;
+ param->rdLevel = X265_FULL_RDO;
param->bEnableRDO = 1;
param->bEnableRDOQ = 1;
param->bEnableRDOQTS = 1;
@@ -280,8 +280,7 @@ int x265_check_params(x265_param_t *para
"Picture height must be an integer multiple of the specified chroma subsampling");
CHECK(param->rc.rateControlMode<X265_RC_ABR || param->rc.rateControlMode> X265_RC_CRF,
"Rate control mode is out of range");
- CHECK(param->bRDLevel < X265_NO_RDO_NO_RDOQ ||
- param->bRDLevel > X265_FULL_RDO,
+ CHECK(param->rdLevel < X265_NO_RDO_NO_RDOQ || param->rdLevel > X265_FULL_RDO,
"RD Level is out of range");
CHECK(param->bframes > param->lookaheadDepth,
"Lookahead depth must be greater than the max consecutive bframe count");
@@ -395,7 +394,7 @@ void x265_print_params(x265_param_t *par
TOOLOPT(param->bEnableCbfFastMode, "cfm");
TOOLOPT(param->bEnableConstrainedIntra, "cip");
TOOLOPT(param->bEnableEarlySkip, "esd");
- fprintf(stderr, "rd=%d ", param->bRDLevel);
+ fprintf(stderr, "rd=%d ", param->rdLevel);
TOOLOPT(param->bEnableLoopFilter, "lft");
if (param->bEnableSAO)
@@ -519,7 +518,7 @@ int x265_param_parse(x265_param_t *p, co
OPT("crqpoffs")
p->crQpOffset = atoi(value);
OPT("rd")
- p->bRDLevel = atoi(value);
+ p->rdLevel = atoi(value);
OPT("signhide")
p->bEnableSignHiding = bvalue;
OPT("lft")
@@ -543,3 +542,56 @@ int x265_param_parse(x265_param_t *p, co
berror |= valuewasnull;
return berror ? X265_PARAM_BAD_VALUE : 0;
}
+
+char *x265_param2string( x265_param_t *p)
+{
+ char *buf, *s;
+ buf = s = (char *)X265_MALLOC(char, 2000);
+ if (!buf)
+ return NULL;
+
+#define BOOL(param, cliopt) \
+ s += sprintf(s, " %s", (param) ? cliopt : "no-"cliopt);
+
+ BOOL(p->bEnableWavefront, "wpp");
+ s += sprintf(s, " fps=%d", p->frameRate);
+ s += sprintf(s, " threads=%d", p->poolNumThreads);
+ s += sprintf(s, " frame-threads=%d", p->frameNumThreads);
+ s += sprintf(s, " ctu=%d", p->maxCUSize);
+ s += sprintf(s, " tu-intra-depth=%d", p->tuQTMaxIntraDepth);
+ s += sprintf(s, " tu-inter-depth=%d", p->tuQTMaxInterDepth);
+ s += sprintf(s, " me=%d", p->searchMethod);
+ s += sprintf(s, " subme=%d", p->subpelRefine);
+ s += sprintf(s, " merange=%d", p->searchRange);
+ BOOL(p->bEnableRectInter, "rect");
+ BOOL(p->bEnableAMP, "amp");
+ s += sprintf(s, " max-merge=%d", p->maxNumMergeCand);
+ BOOL(p->bEnableEarlySkip, "early-skip");
+ BOOL(p->bEnableCbfFastMode, "fast-cbf");
+ s += sprintf(s, " rdpenalty=%d", p->rdPenalty);
+ BOOL(p->bEnableTransformSkip, "tskip");
+ BOOL(p->bEnableTSkipFast, "tskip-fast");
+ BOOL(p->bEnableStrongIntraSmoothing, "strong-intra-smoothing");
+ BOOL(p->bEnableConstrainedIntra, "constrained-intra");
+ s += sprintf(s, " refresh=%d", p->decodingRefreshType);
+ s += sprintf(s, " keyint=%d", p->keyframeMax);
+ s += sprintf(s, " rc-lookahead=%d", p->lookaheadDepth);
+ s += sprintf(s, " bframes=%d", p->bframes);
+ s += sprintf(s, " bframe-bias=%d", p->bFrameBias);
+ s += sprintf(s, " b-adapt=%d", p->bFrameAdaptive);
+ s += sprintf(s, " ref=%d", p->maxNumReferences);
+ BOOL(p->bEnableWeightedPred, "weightp");
+ s += sprintf(s, " bitrate=%d", p->rc.bitrate);
+ s += sprintf(s, " qp=%d", p->rc.qp);
+ s += sprintf(s, " cbqpoffs=%d", p->cbQpOffset);
+ s += sprintf(s, " crqpoffs=%d", p->crQpOffset);
+ s += sprintf(s, " rd=%d", p->rdLevel);
+ BOOL(p->bEnableSignHiding, "signhide");
+ BOOL(p->bEnableLoopFilter, "lft");
+ BOOL(p->bEnableSAO, "sao");
+ s += sprintf(s, " sao-lcu-bounds=%d", p->saoLcuBoundary);
+ s += sprintf(s, " sao-lcu-opt=%d", p->saoLcuBasedOptimization);
+#undef BOOL
+
+ return buf;
+}
diff -r 2fbeab18f182 -r b42f1963229b source/common/common.h
--- a/source/common/common.h Thu Oct 17 02:55:32 2013 -0500
+++ b/source/common/common.h Thu Oct 17 21:10:34 2013 +0530
@@ -114,5 +114,6 @@ void x265_log(x265_param_t *param, int l
int x265_check_params(x265_param_t *param);
void x265_print_params(x265_param_t *param);
int x265_set_globals(x265_param_t *param);
+char *x265_param2string(x265_param_t *p);
#endif // ifndef X265_COMMON_H
diff -r 2fbeab18f182 -r b42f1963229b source/common/ipfilter.cpp
--- a/source/common/ipfilter.cpp Thu Oct 17 02:55:32 2013 -0500
+++ b/source/common/ipfilter.cpp Thu Oct 17 21:10:34 2013 +0530
@@ -3,6 +3,7 @@
*
* Authors: Deepthi Devaki <deepthidevaki at multicorewareinc.com>,
* Rajesh Paulraj <rajesh at multicorewareinc.com>
+ * Praveen Kumar Tiwari <praveen at multicorewareinc.com>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
@@ -495,34 +496,39 @@ void interp_horiz_pp_c(pixel *src, intpt
namespace x265 {
// x265 private namespace
-#define SETUP_PARTITION(W, H) \
- p.chroma_hpp[CHROMA_PARTITION_ ## W ## x ## H] = interp_horiz_pp_c<4, W, H>;
+#define CHROMA(W, H) \
+ p.chroma_hpp[CHROMA_ ## W ## x ## H] = interp_horiz_pp_c<4, W, H>
+
+#define LUMA(W, H) \
+ p.luma_hpp[LUMA_ ## W ## x ## H] = interp_horiz_pp_c<8, W, H>
void Setup_C_IPFilterPrimitives(EncoderPrimitives& p)
{
- SETUP_PARTITION(2, 4);
- SETUP_PARTITION(2, 8);
- SETUP_PARTITION(4, 2);
- SETUP_PARTITION(4, 4);
- SETUP_PARTITION(4, 8);
- SETUP_PARTITION(4, 16);
- SETUP_PARTITION(6, 8);
- SETUP_PARTITION(8, 2);
- SETUP_PARTITION(8, 4);
- SETUP_PARTITION(8, 6);
- SETUP_PARTITION(8, 8);
- SETUP_PARTITION(8, 16);
- SETUP_PARTITION(8, 32);
- SETUP_PARTITION(12, 16);
- SETUP_PARTITION(16, 4);
- SETUP_PARTITION(16, 8);
- SETUP_PARTITION(16, 12);
- SETUP_PARTITION(16, 16);
- SETUP_PARTITION(16, 32);
- SETUP_PARTITION(32, 8);
- SETUP_PARTITION(32, 16);
- SETUP_PARTITION(32, 24);
- SETUP_PARTITION(32, 32);
More information about the x265-commits
mailing list