aboutsummaryrefslogtreecommitdiffstats
path: root/multimedia/libvpx/files/patch-mozilla-bug1224361
blob: f3b90cee21b6b9175fceac7aa70e1066018631e1 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
From ff3674a15e5b1a006546e1edc64c3e778eb34ab1 Mon Sep 17 00:00:00 2001
From: James Zern <jzern@google.com>
Date: Thu, 3 Dec 2015 16:16:28 -0800
Subject: vp8: fix quantizer clamping

the quantizer is transmitted as 7-bits + sign so needs to be clamped in
the delta + absolute case.

BUG=https://bugzilla.mozilla.org/show_bug.cgi?id=1224361

Change-Id: I9115f5d1d5cf7e0a1d149d79486d9d17de9b9639
---
 vp8/decoder/decodeframe.c | 5 ++---
 1 file changed, 2 insertions(+), 3 deletions(-)

diff --git vp8/decoder/decodeframe.c vp8/decoder/decodeframe.c
index f0d7603..4bc87eb 100644
--- vp8/decoder/decodeframe.c
+++ vp8/decoder/decodeframe.c
@@ -73,10 +73,9 @@ void vp8_mb_init_dequantizer(VP8D_COMP *pbi, MACROBLOCKD *xd)
 
         /* Delta Value */
         else
-        {
             QIndex = pc->base_qindex + xd->segment_feature_data[MB_LVL_ALT_Q][mbmi->segment_id];
-            QIndex = (QIndex >= 0) ? ((QIndex <= MAXQ) ? QIndex : MAXQ) : 0;    /* Clamp to valid range */
-        }
+
+        QIndex = (QIndex >= 0) ? ((QIndex <= MAXQ) ? QIndex : MAXQ) : 0;    /* Clamp to valid range */
     }
     else
         QIndex = pc->base_qindex;
+0800'>2017-07-212-4/+4 * - Update to 0.158.0amdmi32017-05-102-4/+4 * - Update to 0.157.2amdmi32017-03-292-4/+4 * - Update to 0.157.1amdmi32017-03-142-4/+4 * - Update WWWamdmi32017-01-231-1/+1 * - Update to 0.156.0amdmi32016-12-232-4/+4 * - Update to 0.155.1amdmi32016-10-013-78/+6 * - Update to 0.155.0amdmi32016-08-172-11/+7 * - Update to 0.154.0amdmi32016-05-132-5/+6 * Remove ${PORTSDIR}/ from dependencies, categories d, e, f, and g.mat2016-04-011-4/+4 * Convert LICENSE= "GPLxx # or later" to "GPLxx+"amdmi32016-01-131-1/+1 * - Add NO_ARCHamdmi32015-06-141-0/+1 * - Clarify LICENSEamdmi32015-04-301-1/+1 * USE_GITHUB: For the new support, fix DISTNAME to be more consistent.bdrewery2015-04-291-2/+2 * - Add CPE infoamdmi32015-04-041-1/+4 * - Update to 0.151.2amdmi32015-04-012-6/+7 * - Convert to USES=pythonamdmi32014-09-301-2/+2 * - Cleanup plistamdmi32014-09-221-2/+0 * - Move manpage to plistamdmi32013-10-192-5/+1 * Support stagingamdmi32013-09-251-7/+5 * Add NO_STAGE all over the place in preparation for the staging support (cat: ...bapt2013-09-211-0/+1 * - Update to 0.140.0amdmi32013-06-272-4/+4 * - Update to 0.139.2amdmi32013-05-312-5/+5