[x265] [PATCH 1 of 3] update Main12 asm value range check on dequant_normal_c

Min Chen chenm003 at 163.com
Tue Jul 28 04:04:15 CEST 2015


# HG changeset patch
# User Min Chen <chenm003 at 163.com>
# Date 1438027383 25200
# Node ID a2ffc27aed1aed64e9c64b325b9d6d1b77ad182a
# Parent  b015514a93868e2dcf431d2e94b147861076a376
update Main12 asm value range check on dequant_normal_c
---
 source/common/dct.cpp |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff -r b015514a9386 -r a2ffc27aed1a source/common/dct.cpp
--- a/source/common/dct.cpp	Sun Jul 26 16:12:32 2015 +0530
+++ b/source/common/dct.cpp	Mon Jul 27 13:03:03 2015 -0700
@@ -612,7 +612,7 @@
 static void dequant_normal_c(const int16_t* quantCoef, int16_t* coef, int num, int scale, int shift)
 {
 #if HIGH_BIT_DEPTH
-    X265_CHECK(scale < 32768 || ((scale & 3) == 0 && shift > 2), "dequant invalid scale %d\n", scale);
+    X265_CHECK(scale < 32768 || ((scale & 3) == 0 && shift > (X265_DEPTH - 8)), "dequant invalid scale %d\n", scale);
 #else
     // NOTE: maximum of scale is (72 * 256)
     X265_CHECK(scale < 32768, "dequant invalid scale %d\n", scale);



More information about the x265-devel mailing list