[x265] [PATCH] TComYuv.cpp, calculate luma partEnum only if true

praveen at multicorewareinc.com praveen at multicorewareinc.com
Wed Nov 13 08:41:57 CET 2013


# HG changeset patch
# User Praveen Tiwari
# Date 1384328504 -19800
# Node ID d62a0b19e4a49f0fb8348b858a713be77fd86820
# Parent  1e0476f339c9fc39d59b48c76ca053898e64a73a
TComYuv.cpp, calculate luma partEnum only if true

diff -r 1e0476f339c9 -r d62a0b19e4a4 source/Lib/TLibCommon/TComYuv.cpp
--- a/source/Lib/TLibCommon/TComYuv.cpp	Wed Nov 13 12:54:00 2013 +0530
+++ b/source/Lib/TLibCommon/TComYuv.cpp	Wed Nov 13 13:11:44 2013 +0530
@@ -245,9 +245,11 @@
 
 void TComYuv::copyPartToPartYuv(TComYuv* dstPicYuv, uint32_t partIdx, uint32_t width, uint32_t height, bool bLuma, bool bChroma)
 {
-    int part = partitionFromSizes(width, height);
     if (bLuma)
+    {
+        int part = partitionFromSizes(width, height);
         copyPartToPartLuma(dstPicYuv, partIdx, part);
+    }
     if (bChroma)
         copyPartToPartChroma(dstPicYuv, partIdx, width >> m_hChromaShift, height >> m_vChromaShift);
 }


More information about the x265-devel mailing list