Index: source/libvpx/vp9/encoder/vp9_tokenize.c |
=================================================================== |
--- source/libvpx/vp9/encoder/vp9_tokenize.c (revision 292608) |
+++ source/libvpx/vp9/encoder/vp9_tokenize.c (working copy) |
@@ -261,7 +261,7 @@ |
} |
static INLINE void add_token(TOKENEXTRA **t, const vp9_prob *context_tree, |
- int16_t extra, uint8_t token, |
+ int32_t extra, uint8_t token, |
uint8_t skip_eob_node, |
unsigned int *counts) { |
(*t)->token = token; |
@@ -329,7 +329,7 @@ |
scan = so->scan; |
nb = so->neighbors; |
c = 0; |
-#if CONFIG_VP9_HIGH && CONFIG_HIGH_QUANT |
+#if CONFIG_VP9_HIGHBITDEPTH |
if (cpi->common.profile >= PROFILE_2) { |
dct_value_tokens = (cpi->common.bit_depth == VPX_BITS_10 ? |
vp9_dct_value_tokens_high10_ptr : |
@@ -403,6 +403,24 @@ |
return result; |
} |
+static void has_high_freq_coeff(int plane, int block, |
+ BLOCK_SIZE plane_bsize, TX_SIZE tx_size, |
+ void *argv) { |
+ struct is_skippable_args *args = argv; |
+ int eobs = (tx_size == TX_4X4) ? 3 : 10; |
+ (void) plane_bsize; |
+ |
+ *(args->skippable) |= (args->x->plane[plane].eobs[block] > eobs); |
+} |
+ |
+int vp9_has_high_freq_in_plane(MACROBLOCK *x, BLOCK_SIZE bsize, int plane) { |
+ int result = 0; |
+ struct is_skippable_args args = {x, &result}; |
+ vp9_foreach_transformed_block_in_plane(&x->e_mbd, bsize, plane, |
+ has_high_freq_coeff, &args); |
+ return result; |
+} |
+ |
void vp9_tokenize_sb(VP9_COMP *cpi, TOKENEXTRA **t, int dry_run, |
BLOCK_SIZE bsize) { |
VP9_COMMON *const cm = &cpi->common; |