]> granicus.if.org Git - libvpx/commitdiff
Change to use proper type in vp{9,10}_token_state
authorYaowu Xu <yaowu@google.com>
Wed, 4 May 2016 19:12:02 +0000 (12:12 -0700)
committerYaowu Xu <yaowu@google.com>
Wed, 4 May 2016 19:14:11 +0000 (12:14 -0700)
"qc" in vp{9,10}_token_state is used to save quantized coefficients, this
commit changes the type from short to tran_low_t to properly reflect
the value range for highbitdepth build.

This fixes an out-of-range bug when optimize_b is used in highbitdepth
build.

Change-Id: Ibf330879e6ac6ae8f099e085caa9d3d9a889fde8

vp10/encoder/encodemb.c
vp9/encoder/vp9_encodemb.c

index 92ba4ddb443b7c4a6126ef37d76cb450fb6a9592..fb11e466ace0fabf0815721260494af6aae81f34 100644 (file)
@@ -57,7 +57,7 @@ typedef struct vp10_token_state {
   int           error;
   int           next;
   int16_t       token;
-  short         qc;
+  tran_low_t    qc;
 } vp10_token_state;
 
 // TODO(jimbankoski): experiment to find optimal RD numbers.
index b6d66db7294e1df898ef0ed9b6a912225ec880db..d53bddb1ca55ba27aaa0712f791cbe03ff9baeb3 100644 (file)
@@ -59,7 +59,7 @@ typedef struct vp9_token_state {
   int           error;
   int           next;
   int16_t       token;
-  int16_t       qc;
+  tran_low_t    qc;
 } vp9_token_state;
 
 static const int plane_rd_mult[REF_TYPES][PLANE_TYPES] ={ {10, 6}, {8, 7}, };