[x265-commits] [x265] b-pyramid implementation: Allow the use of B-frames as re...

Gopu Govindaswamy gopu at multicorewareinc.com
Wed Nov 20 07:27:21 CET 2013


details:   http://hg.videolan.org/x265/rev/1449a1a2041f
branches:  
changeset: 5148:1449a1a2041f
user:      Gopu Govindaswamy <gopu at multicorewareinc.com>
date:      Tue Nov 19 14:49:12 2013 +0530
description:
b-pyramid implementation: Allow the use of B-frames as references for non B and B frames

when we enable the b-pyramid the bitrates efficienctly reduced and there is not much diff in the performance
and the PSNR 00. increased some of the clips and decreased some of clips

Test results for reference when enable and disable the b-pyramid:
cli option : -b 10 --hash=1 -f 100 --b-pyramid=1 --b-adapt=2
Enable B-reference  : --b-pyramid=1
Disable B-reference : --b-pyramid=0

Results:
Enable / Disable

Clips - Johnny_1280x720_60.y4m
Total time taken - 11.19s (8.94 fps) / 13.44s (7.44 fps)
Bitrates  - 303.52 kb/s / 326.79 kb/s
PSNR      - 40.679 / 40.612

Clips - Cactus_1920x1080_50.y4m
Total Time taken - 44.61s (2.24 fps) / 48.23s (2.07 fps)
Bitrates   - 3420.80 kb/s / 3575.20 kb/s
PSNR       - 35.709 / 35.726

Clips  - BasketballDrive_1920x1080_50.y4m
Total time taken -  54.15s (1.85 fps) / 53.72s (1.86 fps)
Bitrates  - 4114.07 kb/s / 4310.45 kb/s
PSNR      - 37.283 / 37.290

Clips  - FourPeople_1280x720_60
Total time taken -  11.79s (8.48 fps) / 12.16s (8.23 fps)
Bitrates  - 514.90 kb/s / 539.08 kb/s
PSNR      - 39.782 / 39.757
Subject: [x265] api: cleanup bpyramid

details:   http://hg.videolan.org/x265/rev/f38139868da6
branches:  
changeset: 5149:f38139868da6
user:      Steve Borho <steve at borho.org>
date:      Tue Nov 19 12:33:08 2013 -0600
description:
api: cleanup bpyramid
Subject: [x265] api: remove reserved NAL enums and C++ style comments from public header

details:   http://hg.videolan.org/x265/rev/6bf2bdc1dd1c
branches:  
changeset: 5150:6bf2bdc1dd1c
user:      Steve Borho <steve at borho.org>
date:      Mon Nov 18 19:31:35 2013 -0600
description:
api: remove reserved NAL enums and C++ style comments from public header
Subject: [x265] api: remove hungarian prefixes from x265_nal members

details:   http://hg.videolan.org/x265/rev/75328ddf6ef1
branches:  
changeset: 5151:75328ddf6ef1
user:      Steve Borho <steve at borho.org>
date:      Mon Nov 18 19:35:53 2013 -0600
description:
api: remove hungarian prefixes from x265_nal members

These particular prefixes came from x264 originally
Subject: [x265] api: remove old suffix and prefix from C symbols in comment, reflow

details:   http://hg.videolan.org/x265/rev/afde9f11046a
branches:  
changeset: 5152:afde9f11046a
user:      Steve Borho <steve at borho.org>
date:      Mon Nov 18 19:37:45 2013 -0600
description:
api: remove old suffix and prefix from C symbols in comment, reflow
Subject: [x265] api: make x265_encoder_get_stats() somewhat future proof

details:   http://hg.videolan.org/x265/rev/5ae9bb8daaec
branches:  
changeset: 5153:5ae9bb8daaec
user:      Steve Borho <steve at borho.org>
date:      Mon Nov 18 19:51:10 2013 -0600
description:
api: make x265_encoder_get_stats() somewhat future proof

By passing in the size of x265_stats as the user application knows about the
encoder can know not to try to set new fields that were added to the end of
x265_stats.  This requires some discipline on our part to only append to the
structure and to always check the size for any new fields we might add.
Subject: [x265] api: nit

details:   http://hg.videolan.org/x265/rev/ca30b6c351c2
branches:  
changeset: 5154:ca30b6c351c2
user:      Steve Borho <steve at borho.org>
date:      Mon Nov 18 19:51:18 2013 -0600
description:
api: nit
Subject: [x265] encoder: simplify size variables

details:   http://hg.videolan.org/x265/rev/8abf4200186a
branches:  
changeset: 5155:8abf4200186a
user:      Steve Borho <steve at borho.org>
date:      Mon Nov 18 19:57:04 2013 -0600
description:
encoder: simplify size variables
Subject: [x265] api: cleanup x265_param orderings, add full comments

details:   http://hg.videolan.org/x265/rev/7dea1450b7fa
branches:  
changeset: 5156:7dea1450b7fa
user:      Steve Borho <steve at borho.org>
date:      Tue Nov 19 01:39:48 2013 -0600
description:
api: cleanup x265_param orderings, add full comments
Subject: [x265] common: validate --subme value

details:   http://hg.videolan.org/x265/rev/371f83f5c9cd
branches:  
changeset: 5157:371f83f5c9cd
user:      Steve Borho <steve at borho.org>
date:      Tue Nov 19 01:40:15 2013 -0600
description:
common: validate --subme value
Subject: [x265] common: nit

details:   http://hg.videolan.org/x265/rev/a901089e8218
branches:  
changeset: 5158:a901089e8218
user:      Steve Borho <steve at borho.org>
date:      Tue Nov 19 01:40:24 2013 -0600
description:
common: nit
Subject: [x265] cli: fix warning in CLI help

details:   http://hg.videolan.org/x265/rev/e63916b50ac1
branches:  
changeset: 5159:e63916b50ac1
user:      Steve Borho <steve at borho.org>
date:      Tue Nov 19 15:11:05 2013 -0600
description:
cli: fix warning in CLI help
Subject: [x265] api: enable b-pyramid by default

details:   http://hg.videolan.org/x265/rev/de92149b3c9b
branches:  
changeset: 5160:de92149b3c9b
user:      Steve Borho <steve at borho.org>
date:      Tue Nov 19 15:15:54 2013 -0600
description:
api: enable b-pyramid by default

The only reason for it to be disabled is if the decoder/use case prevented it
Subject: [x265] api: fix typos and improve chroma qp offset descriptions

details:   http://hg.videolan.org/x265/rev/59dcbb0be7ca
branches:  
changeset: 5161:59dcbb0be7ca
user:      Steve Borho <steve at borho.org>
date:      Tue Nov 19 15:20:10 2013 -0600
description:
api: fix typos and improve chroma qp offset descriptions
Subject: [x265] api: enable weightp by default, disable for ultrafast

details:   http://hg.videolan.org/x265/rev/f68e0b9cae2e
branches:  
changeset: 5162:f68e0b9cae2e
user:      Steve Borho <steve at borho.org>
date:      Tue Nov 19 15:23:37 2013 -0600
description:
api: enable weightp by default, disable for ultrafast
Subject: [x265] asm: code for transpose4x4 routine

details:   http://hg.videolan.org/x265/rev/d484c28c63f5
branches:  
changeset: 5163:d484c28c63f5
user:      Murugan Vairavel <murugan at multicorewareinc.com>
date:      Mon Nov 18 19:53:41 2013 +0530
description:
asm: code for transpose4x4 routine
Subject: [x265] asm: code for transpose_8x8 routine

details:   http://hg.videolan.org/x265/rev/1e1ecddee271
branches:  
changeset: 5164:1e1ecddee271
user:      Murugan Vairavel <murugan at multicorewareinc.com>
date:      Tue Nov 19 11:53:09 2013 +0530
description:
asm: code for transpose_8x8 routine
Subject: [x265] asm: code for transpose_16x16 routine

details:   http://hg.videolan.org/x265/rev/d8d9f36d0a44
branches:  
changeset: 5165:d8d9f36d0a44
user:      Murugan Vairavel <murugan at multicorewareinc.com>
date:      Tue Nov 19 19:19:30 2013 +0530
description:
asm: code for transpose_16x16 routine
Subject: [x265] TComYuv::copyToPicLuma, blockcopy_pp asm integration

details:   http://hg.videolan.org/x265/rev/e77e7c4465f1
branches:  
changeset: 5166:e77e7c4465f1
user:      Praveen Tiwari
date:      Tue Nov 19 18:05:42 2013 +0530
description:
TComYuv::copyToPicLuma, blockcopy_pp asm integration
Subject: [x265] TComYuv::copyPartToPartChroma, blockcopy_pp asm integration

details:   http://hg.videolan.org/x265/rev/10617a4ef7a5
branches:  
changeset: 5167:10617a4ef7a5
user:      Praveen Tiwari
date:      Tue Nov 19 18:27:42 2013 +0530
description:
TComYuv::copyPartToPartChroma, blockcopy_pp asm integration
Subject: [x265] csp support for blockcopy_ps

details:   http://hg.videolan.org/x265/rev/32bd40623496
branches:  
changeset: 5168:32bd40623496
user:      Praveen Tiwari
date:      Tue Nov 19 19:12:11 2013 +0530
description:
csp support for blockcopy_ps
Subject: [x265] TComYuv::copyPartToPartChroma, blockcopy_ps asm integration

details:   http://hg.videolan.org/x265/rev/036a65157263
branches:  
changeset: 5169:036a65157263
user:      Praveen Tiwari
date:      Tue Nov 19 19:15:19 2013 +0530
description:
TComYuv::copyPartToPartChroma, blockcopy_ps asm integration
Subject: [x265] blockcopy_ps, asm integration

details:   http://hg.videolan.org/x265/rev/cc88ae755af4
branches:  
changeset: 5170:cc88ae755af4
user:      Praveen Tiwari
date:      Tue Nov 19 19:32:00 2013 +0530
description:
blockcopy_ps, asm integration
Subject: [x265] csp support for blockcopy_sp

details:   http://hg.videolan.org/x265/rev/fd382d7bfeea
branches:  
changeset: 5171:fd382d7bfeea
user:      Praveen Tiwari
date:      Tue Nov 19 20:29:29 2013 +0530
description:
csp support for blockcopy_sp
Subject: [x265] blockcpy_sp asm integration

details:   http://hg.videolan.org/x265/rev/5df643257054
branches:  
changeset: 5172:5df643257054
user:      Praveen Tiwari
date:      Tue Nov 19 21:24:23 2013 +0530
description:
blockcpy_sp asm integration
Subject: [x265] clang: fix build warnings

details:   http://hg.videolan.org/x265/rev/108ddc9e5c6b
branches:  
changeset: 5173:108ddc9e5c6b
user:      Steve Borho <steve at borho.org>
date:      Tue Nov 19 23:45:52 2013 -0600
description:
clang: fix build warnings

diffstat:

 source/Lib/TLibCommon/TComYuv.cpp     |   53 ++-
 source/Lib/TLibCommon/TComYuv.h       |    6 +-
 source/Lib/TLibEncoder/TEncSearch.cpp |    6 +-
 source/common/TShortYUV.cpp           |   15 +-
 source/common/TShortYUV.h             |    2 +-
 source/common/common.cpp              |   15 +-
 source/common/pixel.cpp               |    4 +-
 source/common/primitives.h            |    4 +-
 source/common/x86/asm-primitives.cpp  |   52 +-
 source/common/x86/pixel-a.asm         |  129 ++++++++
 source/common/x86/pixel.h             |    3 +
 source/encoder/dpb.cpp                |   12 +-
 source/encoder/encoder.cpp            |   84 +++--
 source/encoder/encoder.h              |    2 +-
 source/encoder/slicetype.cpp          |   51 ++-
 source/test/pixelharness.cpp          |   40 +-
 source/x265.cpp                       |    8 +-
 source/x265.h                         |  506 ++++++++++++++++++++++++---------
 18 files changed, 699 insertions(+), 293 deletions(-)

diffs (truncated from 1623 to 300 lines):

diff -r 2f5f538d2cbc -r 108ddc9e5c6b source/Lib/TLibCommon/TComYuv.cpp
--- a/source/Lib/TLibCommon/TComYuv.cpp	Mon Nov 18 16:44:31 2013 -0600
+++ b/source/Lib/TLibCommon/TComYuv.cpp	Tue Nov 19 23:45:52 2013 -0600
@@ -103,8 +103,15 @@ void TComYuv::clear()
 
 void TComYuv::copyToPicYuv(TComPicYuv* destPicYuv, uint32_t cuAddr, uint32_t absZOrderIdx, uint32_t partDepth, uint32_t partIdx)
 {
+    int width, height;
+
+    width  = m_width >> partDepth;
+    height = m_height >> partDepth;
+
+    int part = partitionFromSizes(width, height);
+
     copyToPicLuma(destPicYuv, cuAddr, absZOrderIdx, partDepth, partIdx);
-    copyToPicChroma(destPicYuv, cuAddr, absZOrderIdx, partDepth, partIdx);
+    copyToPicChroma(destPicYuv, cuAddr, absZOrderIdx, part, partDepth, partIdx);
 }
 
 void TComYuv::copyToPicLuma(TComPicYuv* destPicYuv, uint32_t cuAddr, uint32_t absZOrderIdx, uint32_t partDepth, uint32_t partIdx)
@@ -125,12 +132,11 @@ void TComYuv::copyToPicLuma(TComPicYuv* 
     primitives.luma_copy_pp[part](dst, dststride, src, srcstride);
 }
 
-void TComYuv::copyToPicChroma(TComPicYuv* destPicYuv, uint32_t cuAddr, uint32_t absZOrderIdx, uint32_t partDepth, uint32_t partIdx)
+void TComYuv::copyToPicChroma(TComPicYuv* destPicYuv, uint32_t cuAddr, uint32_t absZOrderIdx, uint32_t part, uint32_t partDepth, uint32_t partIdx)
 {
-    int width, height;
+    int width;
 
     width  = m_cwidth >> partDepth;
-    height = m_cheight >> partDepth;
 
     Pel* srcU = getCbAddr(partIdx, width);
     Pel* srcV = getCrAddr(partIdx, width);
@@ -140,8 +146,8 @@ void TComYuv::copyToPicChroma(TComPicYuv
     uint32_t srcstride = getCStride();
     uint32_t dststride = destPicYuv->getCStride();
 
-    primitives.blockcpy_pp(width, height, dstU, dststride, srcU, srcstride);
-    primitives.blockcpy_pp(width, height, dstV, dststride, srcV, srcstride);
+    primitives.chroma_copy_pp[m_csp][part](dstU, dststride, srcU, srcstride);
+    primitives.chroma_copy_pp[m_csp][part](dstV, dststride, srcV, srcstride);
 }
 
 void TComYuv::copyFromPicYuv(TComPicYuv* srcPicYuv, uint32_t cuAddr, uint32_t absZOrderIdx)
@@ -254,10 +260,12 @@ void TComYuv::copyPartToPartYuv(TComYuv*
 
 void TComYuv::copyPartToPartYuv(TShortYUV* dstPicYuv, uint32_t partIdx, uint32_t width, uint32_t height, bool bLuma, bool bChroma)
 {
+    int part = partitionFromSizes(width, height);
+
     if (bLuma)
-        copyPartToPartLuma(dstPicYuv, partIdx, width, height);
+        copyPartToPartLuma(dstPicYuv, partIdx, part);
     if (bChroma)
-        copyPartToPartChroma(dstPicYuv, partIdx, width >> m_hChromaShift, height >> m_vChromaShift);
+        copyPartToPartChroma(dstPicYuv, partIdx, part);
 }
 
 void TComYuv::copyPartToPartLuma(TComYuv* dstPicYuv, uint32_t partIdx, uint32_t part)
@@ -273,7 +281,7 @@ void TComYuv::copyPartToPartLuma(TComYuv
     primitives.luma_copy_pp[part](dst, dststride, src, srcstride);
 }
 
-void TComYuv::copyPartToPartLuma(TShortYUV* dstPicYuv, uint32_t partIdx, uint32_t width, uint32_t height)
+void TComYuv::copyPartToPartLuma(TShortYUV* dstPicYuv, uint32_t partIdx, uint32_t part)
 {
     Pel* src = getLumaAddr(partIdx);
     int16_t* dst = dstPicYuv->getLumaAddr(partIdx);
@@ -281,7 +289,6 @@ void TComYuv::copyPartToPartLuma(TShortY
     uint32_t  srcstride = getStride();
     uint32_t  dststride = dstPicYuv->m_width;
 
-    int part = partitionFromSizes(width, height);
     primitives.luma_copy_ps[part](dst, dststride, src, srcstride);
 }
 
@@ -301,7 +308,7 @@ void TComYuv::copyPartToPartChroma(TComY
     primitives.chroma_copy_pp[m_csp][part](dstV, dststride, srcV, srcstride);
 }
 
-void TComYuv::copyPartToPartChroma(TShortYUV* dstPicYuv, uint32_t partIdx, uint32_t width, uint32_t height)
+void TComYuv::copyPartToPartChroma(TShortYUV* dstPicYuv, uint32_t partIdx, uint32_t part)
 {
     Pel*   srcU = getCbAddr(partIdx);
     Pel*   srcV = getCrAddr(partIdx);
@@ -311,11 +318,11 @@ void TComYuv::copyPartToPartChroma(TShor
     uint32_t srcstride = getCStride();
     uint32_t dststride = dstPicYuv->m_cwidth;
 
-    primitives.blockcpy_sp(width, height, dstU, dststride, srcU, srcstride);
-    primitives.blockcpy_sp(width, height, dstV, dststride, srcV, srcstride);
+    primitives.chroma_copy_ps[m_csp][part](dstU, dststride, srcU, srcstride);
+    primitives.chroma_copy_ps[m_csp][part](dstV, dststride, srcV, srcstride);
 }
 
-void TComYuv::copyPartToPartChroma(TComYuv* dstPicYuv, uint32_t partIdx, uint32_t width, uint32_t height, uint32_t chromaId)
+void TComYuv::copyPartToPartChroma(TComYuv* dstPicYuv, uint32_t partIdx, uint32_t, uint32_t, uint32_t chromaId)
 {
     if (chromaId == 0)
     {
@@ -324,7 +331,7 @@ void TComYuv::copyPartToPartChroma(TComY
         if (srcU == dstU) return;
         uint32_t srcstride = getCStride();
         uint32_t dststride = dstPicYuv->getCStride();
-        primitives.blockcpy_pp(width, height, dstU, dststride, srcU, srcstride);
+        primitives.chroma_copy_pp[m_csp][m_part](dstU, dststride, srcU, srcstride);
     }
     else if (chromaId == 1)
     {
@@ -333,7 +340,7 @@ void TComYuv::copyPartToPartChroma(TComY
         if (srcV == dstV) return;
         uint32_t srcstride = getCStride();
         uint32_t dststride = dstPicYuv->getCStride();
-        primitives.blockcpy_pp(width, height, dstV, dststride, srcV, srcstride);
+        primitives.chroma_copy_pp[m_csp][m_part](dstV, dststride, srcV, srcstride);
     }
     else
     {
@@ -344,12 +351,12 @@ void TComYuv::copyPartToPartChroma(TComY
         if (srcU == dstU && srcV == dstV) return;
         uint32_t srcstride = getCStride();
         uint32_t dststride = dstPicYuv->getCStride();
-        primitives.blockcpy_pp(width, height, dstU, dststride, srcU, srcstride);
-        primitives.blockcpy_pp(width, height, dstV, dststride, srcV, srcstride);
+        primitives.chroma_copy_pp[m_csp][m_part](dstU, dststride, srcU, srcstride);
+        primitives.chroma_copy_pp[m_csp][m_part](dstV, dststride, srcV, srcstride);
     }
 }
 
-void TComYuv::copyPartToPartChroma(TShortYUV* dstPicYuv, uint32_t partIdx, uint32_t width, uint32_t height, uint32_t chromaId)
+void TComYuv::copyPartToPartChroma(TShortYUV* dstPicYuv, uint32_t partIdx, uint32_t, uint32_t, uint32_t chromaId)
 {
     if (chromaId == 0)
     {
@@ -359,7 +366,7 @@ void TComYuv::copyPartToPartChroma(TShor
         uint32_t srcstride = getCStride();
         uint32_t dststride = dstPicYuv->m_cwidth;
 
-        primitives.blockcpy_sp(width, height, dstU, dststride, srcU, srcstride);
+        primitives.chroma_copy_ps[m_csp][m_part](dstU, dststride, srcU, srcstride);
     }
     else if (chromaId == 1)
     {
@@ -369,7 +376,7 @@ void TComYuv::copyPartToPartChroma(TShor
         uint32_t srcstride = getCStride();
         uint32_t dststride = dstPicYuv->m_cwidth;
 
-        primitives.blockcpy_sp(width, height, dstV, dststride, srcV, srcstride);
+        primitives.chroma_copy_ps[m_csp][m_part](dstV, dststride, srcV, srcstride);
     }
     else
     {
@@ -381,8 +388,8 @@ void TComYuv::copyPartToPartChroma(TShor
         uint32_t srcstride = getCStride();
         uint32_t dststride = dstPicYuv->m_cwidth;
 
-        primitives.blockcpy_sp(width, height, dstU, dststride, srcU, srcstride);
-        primitives.blockcpy_sp(width, height, dstV, dststride, srcV, srcstride);
+        primitives.chroma_copy_ps[m_csp][m_part](dstU, dststride, srcU, srcstride);
+        primitives.chroma_copy_ps[m_csp][m_part](dstV, dststride, srcV, srcstride);
     }
 }
 
diff -r 2f5f538d2cbc -r 108ddc9e5c6b source/Lib/TLibCommon/TComYuv.h
--- a/source/Lib/TLibCommon/TComYuv.h	Mon Nov 18 16:44:31 2013 -0600
+++ b/source/Lib/TLibCommon/TComYuv.h	Tue Nov 19 23:45:52 2013 -0600
@@ -119,7 +119,7 @@ public:
     //  Copy YUV buffer to picture buffer
     void    copyToPicYuv(TComPicYuv* destPicYuv, uint32_t cuAddr, uint32_t absZOrderIdx, uint32_t partDepth = 0, uint32_t partIdx = 0);
     void    copyToPicLuma(TComPicYuv* destPicYuv, uint32_t cuAddr, uint32_t absZOrderIdx, uint32_t partDepth = 0, uint32_t partIdx = 0);
-    void    copyToPicChroma(TComPicYuv* destPicYuv, uint32_t cuAddr, uint32_t absZOrderIdx, uint32_t partDepth = 0, uint32_t partIdx = 0);
+    void    copyToPicChroma(TComPicYuv* destPicYuv, uint32_t cuAddr, uint32_t absZOrderIdx, uint32_t part, uint32_t partDepth = 0, uint32_t partIdx = 0);
 
     //  Copy YUV buffer from picture buffer
     void    copyFromPicYuv(TComPicYuv* srcPicYuv, uint32_t cuAddr, uint32_t absZOrderIdx);
@@ -140,9 +140,9 @@ public:
     void    copyPartToPartYuv(TComYuv* dstPicYuv, uint32_t partIdx, uint32_t width, uint32_t height, bool bLuma = true, bool bChroma = true);
     void    copyPartToPartYuv(TShortYUV* dstPicYuv, uint32_t partIdx, uint32_t width, uint32_t height, bool bLuma = true, bool bChroma = true);
     void    copyPartToPartLuma(TComYuv* dstPicYuv, uint32_t partIdx, uint32_t part);
-    void    copyPartToPartLuma(TShortYUV* dstPicYuv, uint32_t partIdx, uint32_t width, uint32_t height);
+    void    copyPartToPartLuma(TShortYUV* dstPicYuv, uint32_t partIdx, uint32_t part);
     void    copyPartToPartChroma(TComYuv* dstPicYuv, uint32_t partIdx, uint32_t part);
-    void    copyPartToPartChroma(TShortYUV* dstPicYuv, uint32_t partIdx, uint32_t width, uint32_t height);
+    void    copyPartToPartChroma(TShortYUV* dstPicYuv, uint32_t partIdx, uint32_t part);
 
     void    copyPartToPartChroma(TComYuv* dstPicYuv, uint32_t partIdx, uint32_t width, uint32_t height, uint32_t chromaId);
     void    copyPartToPartChroma(TShortYUV* dstPicYuv, uint32_t partIdx, uint32_t width, uint32_t height, uint32_t chromaId);
diff -r 2f5f538d2cbc -r 108ddc9e5c6b source/Lib/TLibEncoder/TEncSearch.cpp
--- a/source/Lib/TLibEncoder/TEncSearch.cpp	Mon Nov 18 16:44:31 2013 -0600
+++ b/source/Lib/TLibEncoder/TEncSearch.cpp	Tue Nov 19 23:45:52 2013 -0600
@@ -1125,13 +1125,13 @@ void TEncSearch::xLoadIntraResultQT(TCom
         ::memcpy(coeffDstV, coeffSrcV, sizeof(TCoeff) * numCoeffC);
     }
 
+    int part = partitionFromSizes(1 << trSizeLog2, 1 << trSizeLog2);
     //===== copy reconstruction =====
-    m_qtTempTransformSkipTComYuv.copyPartToPartLuma(&m_qtTempTComYuv[qtlayer], absPartIdx, 1 << trSizeLog2, 1 << trSizeLog2);
+    m_qtTempTransformSkipTComYuv.copyPartToPartLuma(&m_qtTempTComYuv[qtlayer], absPartIdx, part);
 
     if (!bLumaOnly && !bSkipChroma)
     {
-        uint32_t trSizeCLog2 = (bChromaSame ? trSizeLog2 : trSizeLog2 - 1);
-        m_qtTempTransformSkipTComYuv.copyPartToPartChroma(&m_qtTempTComYuv[qtlayer], absPartIdx, 1 << trSizeCLog2, 1 << trSizeCLog2);
+        m_qtTempTransformSkipTComYuv.copyPartToPartChroma(&m_qtTempTComYuv[qtlayer], absPartIdx, part);
     }
 
     uint32_t   zOrder           = cu->getZorderIdxInCU() + absPartIdx;
diff -r 2f5f538d2cbc -r 108ddc9e5c6b source/common/TShortYUV.cpp
--- a/source/common/TShortYUV.cpp	Mon Nov 18 16:44:31 2013 -0600
+++ b/source/common/TShortYUV.cpp	Tue Nov 19 23:45:52 2013 -0600
@@ -56,6 +56,8 @@ void TShortYUV::create(unsigned int widt
     m_width  = width;
     m_height = height;
 
+    m_part = partitionFromSizes(m_width, m_height);
+
     m_cwidth  = width  >> m_hChromaShift;
     m_cheight = height >> m_vChromaShift;
     m_csp = csp;
@@ -192,7 +194,8 @@ void TShortYUV::copyPartToPartLuma(TComY
     unsigned int srcStride = m_width;
     unsigned int dstStride = dstPicYuv->getStride();
 
-    primitives.blockcpy_ps(width, height, dst, dstStride, src, srcStride);
+    int part = partitionFromSizes(width, height);
+    primitives.luma_copy_sp[part](dst, dstStride, src, srcStride);
 }
 
 void TShortYUV::copyPartToPartChroma(TShortYUV* dstPicYuv, unsigned int partIdx, unsigned int width, unsigned int height)
@@ -285,7 +288,7 @@ void TShortYUV::copyPartToPartChroma(TSh
     }
 }
 
-void TShortYUV::copyPartToPartChroma(TComYuv* dstPicYuv, unsigned int partIdx, unsigned int width, unsigned int height, unsigned int chromaId)
+void TShortYUV::copyPartToPartChroma(TComYuv* dstPicYuv, unsigned int partIdx, unsigned int, unsigned int, unsigned int chromaId)
 {
     if (chromaId == 0)
     {
@@ -293,7 +296,7 @@ void TShortYUV::copyPartToPartChroma(TCo
         Pel* dstU = dstPicYuv->getCbAddr(partIdx);
         unsigned int srcStride = m_cwidth;
         unsigned int dstStride = dstPicYuv->getCStride();
-        primitives.blockcpy_ps(width, height, dstU, dstStride, srcU, srcStride);
+        primitives.chroma_copy_sp[m_csp][m_part](dstU, dstStride, srcU, srcStride);
     }
     else if (chromaId == 1)
     {
@@ -301,7 +304,7 @@ void TShortYUV::copyPartToPartChroma(TCo
         Pel* dstV = dstPicYuv->getCrAddr(partIdx);
         unsigned int srcStride = m_cwidth;
         unsigned int dstStride = dstPicYuv->getCStride();
-        primitives.blockcpy_ps(width, height, dstV, dstStride, srcV, srcStride);
+        primitives.chroma_copy_sp[m_csp][m_part](dstV, dstStride, srcV, srcStride);
     }
     else
     {
@@ -312,7 +315,7 @@ void TShortYUV::copyPartToPartChroma(TCo
 
         unsigned int srcStride = m_cwidth;
         unsigned int dstStride = dstPicYuv->getCStride();
-        primitives.blockcpy_ps(width, height, dstU, dstStride, srcU, srcStride);
-        primitives.blockcpy_ps(width, height, dstV, dstStride, srcV, srcStride);
+        primitives.chroma_copy_sp[m_csp][m_part](dstU, dstStride, srcU, srcStride);
+        primitives.chroma_copy_sp[m_csp][m_part](dstV, dstStride, srcV, srcStride);
     }
 }
diff -r 2f5f538d2cbc -r 108ddc9e5c6b source/common/TShortYUV.h
--- a/source/common/TShortYUV.h	Mon Nov 18 16:44:31 2013 -0600
+++ b/source/common/TShortYUV.h	Tue Nov 19 23:45:52 2013 -0600
@@ -54,7 +54,7 @@ private:
     }
 
     int m_csp;
-
+    int m_part;
 public:
 
     int16_t* m_bufY;
diff -r 2f5f538d2cbc -r 108ddc9e5c6b source/common/common.cpp
--- a/source/common/common.cpp	Mon Nov 18 16:44:31 2013 -0600
+++ b/source/common/common.cpp	Tue Nov 19 23:45:52 2013 -0600
@@ -165,7 +165,8 @@ void x265_param_default(x265_param *para
     param->bframes = 3;
     param->lookaheadDepth = 40;
     param->bFrameAdaptive = X265_B_ADAPT_FAST;
-    param->scenecutThreshold = 40; /* Magic number pulled in from x264*/
+    param->bpyramid = 1;
+    param->scenecutThreshold = 40; /* Magic number pulled in from x264 */
 
     /* Intra Coding Tools */
     param->bEnableConstrainedIntra = 0;
@@ -176,7 +177,7 @@ void x265_param_default(x265_param *para
     param->subpelRefine = 5;
     param->searchRange = 60;
     param->maxNumMergeCand = 3;
-    param->bEnableWeightedPred = 0;
+    param->bEnableWeightedPred = 1;
     param->bEnableWeightedBiPred = 0;


More information about the x265-commits mailing list