summaryrefslogtreecommitdiff
path: root/vp8
diff options
context:
space:
mode:
authorYaowu Xu <yaowu@google.com>2010-11-16 13:58:21 -0800
committerYaowu Xu <yaowu@google.com>2010-11-18 09:07:16 -0800
commit06c70d304ff1f672acbabbc3fae0a8202919a868 (patch)
treec251fbeb1d006f17261db423c62e6db48ef6698d /vp8
parenta2ebd0f3e4951832d2ecde5792cbd38819603ac1 (diff)
downloadlibvpx-06c70d304ff1f672acbabbc3fae0a8202919a868.tar
libvpx-06c70d304ff1f672acbabbc3fae0a8202919a868.tar.gz
libvpx-06c70d304ff1f672acbabbc3fae0a8202919a868.tar.bz2
libvpx-06c70d304ff1f672acbabbc3fae0a8202919a868.zip
extends the range of tokens
Extending the value range of tokens allows further experiments on extending quantizer range. Encoder and decoder were verified to produce matching reconstructed buffers by tests with forced quantized value of 1. Change-Id: I12faf92832867870b6f71ddeafbf643f1040086d
Diffstat (limited to 'vp8')
-rw-r--r--vp8/common/entropy.c6
-rw-r--r--vp8/common/entropy.h4
-rw-r--r--vp8/decoder/detokenize.c24
-rw-r--r--vp8/decoder/onyxd_int.h6
4 files changed, 20 insertions, 20 deletions
diff --git a/vp8/common/entropy.c b/vp8/common/entropy.c
index 1438e7e0f..2c17b1dd7 100644
--- a/vp8/common/entropy.c
+++ b/vp8/common/entropy.c
@@ -68,7 +68,7 @@ static const Prob Pcat3[] = { 173, 148, 140};
static const Prob Pcat4[] = { 176, 155, 140, 135};
static const Prob Pcat5[] = { 180, 157, 141, 134, 130};
static const Prob Pcat6[] =
-{ 254, 254, 243, 230, 196, 177, 153, 140, 133, 130, 129};
+{ 254, 254, 252, 249, 243, 230, 196, 177, 153, 140, 133, 130, 129};
static vp8_tree_index cat1[2], cat2[4], cat3[6], cat4[8], cat5[10], cat6[22];
@@ -103,7 +103,7 @@ static void init_bit_trees()
init_bit_tree(cat3, 3);
init_bit_tree(cat4, 4);
init_bit_tree(cat5, 5);
- init_bit_tree(cat6, 11);
+ init_bit_tree(cat6, 13);
}
@@ -121,7 +121,7 @@ vp8_extra_bit_struct vp8_extra_bits[12] =
{ cat3, Pcat3, bcc3, 3, 11},
{ cat4, Pcat4, bcc4, 4, 19},
{ cat5, Pcat5, bcc5, 5, 35},
- { cat6, Pcat6, bcc6, 11, 67},
+ { cat6, Pcat6, bcc6, 13, 67},
{ 0, 0, 0, 0, 0}
};
#include "defaultcoefcounts.h"
diff --git a/vp8/common/entropy.h b/vp8/common/entropy.h
index 70e2ae675..99c3bca39 100644
--- a/vp8/common/entropy.h
+++ b/vp8/common/entropy.h
@@ -27,7 +27,7 @@
#define DCT_VAL_CATEGORY3 7 /* 11-18 Extra Bits 3+1 */
#define DCT_VAL_CATEGORY4 8 /* 19-34 Extra Bits 4+1 */
#define DCT_VAL_CATEGORY5 9 /* 35-66 Extra Bits 5+1 */
-#define DCT_VAL_CATEGORY6 10 /* 67+ Extra Bits 11+1 */
+#define DCT_VAL_CATEGORY6 10 /* 67+ Extra Bits 13+1 */
#define DCT_EOB_TOKEN 11 /* EOB Extra Bits 0+0 */
#define vp8_coef_tokens 12
@@ -52,7 +52,7 @@ extern vp8_extra_bit_struct vp8_extra_bits[12]; /* indexed by token value */
#define PROB_UPDATE_BASELINE_COST 7
#define MAX_PROB 255
-#define DCT_MAX_VALUE 2048
+#define DCT_MAX_VALUE 8192
/* Coefficients are predicted via a 3-dimensional probability table. */
diff --git a/vp8/decoder/detokenize.c b/vp8/decoder/detokenize.c
index 7d013d240..1fdfdb783 100644
--- a/vp8/decoder/detokenize.c
+++ b/vp8/decoder/detokenize.c
@@ -38,23 +38,23 @@ typedef struct
{
INT16 min_val;
INT16 Length;
- UINT8 Probs[12];
+ UINT8 Probs[14];
} TOKENEXTRABITS;
*/
DECLARE_ALIGNED(16, static const TOKENEXTRABITS, vp8d_token_extra_bits2[MAX_ENTROPY_TOKENS]) =
{
- { 0, -1, { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 } }, /* ZERO_TOKEN */
- { 1, 0, { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 } }, /* ONE_TOKEN */
- { 2, 0, { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 } }, /* TWO_TOKEN */
- { 3, 0, { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 } }, /* THREE_TOKEN */
- { 4, 0, { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 } }, /* FOUR_TOKEN */
- { 5, 0, { 159, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 } }, /* DCT_VAL_CATEGORY1 */
- { 7, 1, { 145, 165, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 } }, /* DCT_VAL_CATEGORY2 */
- { 11, 2, { 140, 148, 173, 0, 0, 0, 0, 0, 0, 0, 0, 0 } }, /* DCT_VAL_CATEGORY3 */
- { 19, 3, { 135, 140, 155, 176, 0, 0, 0, 0, 0, 0, 0, 0 } }, /* DCT_VAL_CATEGORY4 */
- { 35, 4, { 130, 134, 141, 157, 180, 0, 0, 0, 0, 0, 0, 0 } }, /* DCT_VAL_CATEGORY5 */
- { 67, 10, { 129, 130, 133, 140, 153, 177, 196, 230, 243, 254, 254, 0 } }, /* DCT_VAL_CATEGORY6 */
+ { 0, -1, { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 } }, /* ZERO_TOKEN */
+ { 1, 0, { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 } }, /* ONE_TOKEN */
+ { 2, 0, { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 } }, /* TWO_TOKEN */
+ { 3, 0, { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 } }, /* THREE_TOKEN */
+ { 4, 0, { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 } }, /* FOUR_TOKEN */
+ { 5, 0, { 159, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 } }, /* DCT_VAL_CATEGORY1 */
+ { 7, 1, { 145, 165, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 } }, /* DCT_VAL_CATEGORY2 */
+ { 11, 2, { 140, 148, 173, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 } }, /* DCT_VAL_CATEGORY3 */
+ { 19, 3, { 135, 140, 155, 176, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 } }, /* DCT_VAL_CATEGORY4 */
+ { 35, 4, { 130, 134, 141, 157, 180, 0, 0, 0, 0, 0, 0, 0, 0, 0 } }, /* DCT_VAL_CATEGORY5 */
+ { 67, 12, { 129, 130, 133, 140, 153, 177, 196, 230, 243, 249, 252, 254, 254, 0 } }, /* DCT_VAL_CATEGORY6 */
{ 0, -1, { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 } }, /* EOB TOKEN */
};
diff --git a/vp8/decoder/onyxd_int.h b/vp8/decoder/onyxd_int.h
index 7593edf27..5ac032b8b 100644
--- a/vp8/decoder/onyxd_int.h
+++ b/vp8/decoder/onyxd_int.h
@@ -41,9 +41,9 @@ typedef struct
typedef struct
{
- INT16 min_val;
- INT16 Length;
- UINT8 Probs[12];
+ INT16 min_val;
+ INT16 Length;
+ UINT8 Probs[14];
} TOKENEXTRABITS;
typedef struct