7, 11, 14, 15,
};
-DECLARE_ALIGNED(16, const short, vp8_default_inv_zig_zag[16]) =
+DECLARE_ALIGNED(16, const short, vp8_default_inv_zig_zag[16]) =
{
1, 2, 6, 7,
3, 5, 8, 13,
init_bit_tree(cat6, 11);
}
-
-static vp8bc_index_t bcc1[1], bcc2[2], bcc3[3], bcc4[4], bcc5[5], bcc6[11];
-
vp8_extra_bit_struct vp8_extra_bits[12] =
{
- { 0, 0, 0, 0, 0},
- { 0, 0, 0, 0, 1},
- { 0, 0, 0, 0, 2},
- { 0, 0, 0, 0, 3},
- { 0, 0, 0, 0, 4},
- { cat1, Pcat1, bcc1, 1, 5},
- { cat2, Pcat2, bcc2, 2, 7},
- { cat3, Pcat3, bcc3, 3, 11},
- { cat4, Pcat4, bcc4, 4, 19},
- { cat5, Pcat5, bcc5, 5, 35},
- { cat6, Pcat6, bcc6, 11, 67},
- { 0, 0, 0, 0, 0}
+ { 0, 0, 0, 0},
+ { 0, 0, 0, 1},
+ { 0, 0, 0, 2},
+ { 0, 0, 0, 3},
+ { 0, 0, 0, 4},
+ { cat1, Pcat1, 1, 5},
+ { cat2, Pcat2, 2, 7},
+ { cat3, Pcat3, 3, 11},
+ { cat4, Pcat4, 4, 19},
+ { cat5, Pcat5, 5, 35},
+ { cat6, Pcat6, 11, 67},
+ { 0, 0, 0, 0}
};
#include "defaultcoefcounts.h"
{
vp8_tree_p tree;
const vp8_prob *prob;
- vp8bc_index_t *prob_bc;
int Len;
int base_val;
} vp8_extra_bit_struct;
push {r4-r11, lr}
; Add size of xcount * sizeof (TOKENEXTRA) to get stop
- ; sizeof (TOKENEXTRA) is 20
- add r2, r2, r2, lsl #2 ; xcount
+ ; sizeof (TOKENEXTRA) is 8
sub sp, sp, #12
- add r2, r1, r2, lsl #2 ; stop = p + xcount
+ add r2, r1, r2, lsl #3 ; stop = p + xcount*sizeof(TOKENEXTRA)
str r2, [sp, #0]
str r3, [sp, #8] ; save vp8_coef_encodings
ldr r2, [r0, #vp8_writer_lowvalue]
b check_p_lt_stop
while_p_lt_stop
- ldr r6, [r1, #tokenextra_token] ; t
+ ldrb r6, [r1, #tokenextra_token] ; t
ldr r4, [sp, #8] ; vp8_coef_encodings
mov lr, #0
add r4, r4, r6, lsl #3 ; a = vp8_coef_encodings + t
ldr r9, [r1, #tokenextra_context_tree] ; pp
- ldr r7, [r1, #tokenextra_skip_eob_node]
+ ldrb r7, [r1, #tokenextra_skip_eob_node]
ldr r6, [r4, #vp8_token_value] ; v
ldr r8, [r4, #vp8_token_len] ; n
subs r8, r8, #1 ; --n
bne token_loop
- ldr r6, [r1, #tokenextra_token] ; t
+ ldrb r6, [r1, #tokenextra_token] ; t
ldr r7, [sp, #48] ; vp8_extra_bits
; Add t * sizeof (vp8_extra_bit_struct) to get the desired
- ; element. Here vp8_extra_bit_struct == 20
- add r6, r6, r6, lsl #2 ; b = vp8_extra_bits + t
- add r12, r7, r6, lsl #2 ; b = vp8_extra_bits + t
+ ; element. Here vp8_extra_bit_struct == 16
+ add r12, r7, r6, lsl #4 ; b = vp8_extra_bits + t
ldr r4, [r12, #vp8_extra_bit_struct_base_val]
cmp r4, #0
; if( b->base_val)
ldr r8, [r12, #vp8_extra_bit_struct_len] ; L
- ldr lr, [r1, #tokenextra_extra] ; e = p->Extra
+ ldrsh lr, [r1, #tokenextra_extra] ; e = p->Extra
cmp r8, #0 ; if( L)
beq no_extra_bits
; actuall work gets done here!
while_p_lt_stop
- ldr r6, [r1, #tokenextra_token] ; t
+ ldrb r6, [r1, #tokenextra_token] ; t
ldr r4, [sp, #20] ; vp8_coef_encodings
mov lr, #0
add r4, r4, r6, lsl #3 ; a = vp8_coef_encodings + t
ldr r9, [r1, #tokenextra_context_tree] ; pp
- ldr r7, [r1, #tokenextra_skip_eob_node]
+ ldrb r7, [r1, #tokenextra_skip_eob_node]
ldr r6, [r4, #vp8_token_value] ; v
ldr r8, [r4, #vp8_token_len] ; n
subs r8, r8, #1 ; --n
bne token_loop
- ldr r6, [r1, #tokenextra_token] ; t
+ ldrb r6, [r1, #tokenextra_token] ; t
ldr r7, [sp, #8] ; vp8_extra_bits
; Add t * sizeof (vp8_extra_bit_struct) to get the desired
- ; element. Here vp8_extra_bit_struct == 20
- add r6, r6, r6, lsl #2 ; b = vp8_extra_bits + t
- add r12, r7, r6, lsl #2 ; b = vp8_extra_bits + t
+ ; element. Here vp8_extra_bit_struct == 16
+ add r12, r7, r6, lsl #4 ; b = vp8_extra_bits + t
ldr r4, [r12, #vp8_extra_bit_struct_base_val]
cmp r4, #0
; if( b->base_val)
ldr r8, [r12, #vp8_extra_bit_struct_len] ; L
- ldr lr, [r1, #tokenextra_extra] ; e = p->Extra
+ ldrsh lr, [r1, #tokenextra_extra] ; e = p->Extra
cmp r8, #0 ; if( L)
beq no_extra_bits
; actual work gets done here!
while_p_lt_stop
- ldr r6, [r1, #tokenextra_token] ; t
+ ldrb r6, [r1, #tokenextra_token] ; t
ldr r4, [sp, #80] ; vp8_coef_encodings
mov lr, #0
add r4, r4, r6, lsl #3 ; a = vp8_coef_encodings + t
ldr r9, [r1, #tokenextra_context_tree] ; pp
- ldr r7, [r1, #tokenextra_skip_eob_node]
+ ldrb r7, [r1, #tokenextra_skip_eob_node]
ldr r6, [r4, #vp8_token_value] ; v
ldr r8, [r4, #vp8_token_len] ; n
subs r8, r8, #1 ; --n
bne token_loop
- ldr r6, [r1, #tokenextra_token] ; t
+ ldrb r6, [r1, #tokenextra_token] ; t
ldr r7, [sp, #84] ; vp8_extra_bits
; Add t * sizeof (vp8_extra_bit_struct) to get the desired
- ; element. Here vp8_extra_bit_struct == 20
- add r6, r6, r6, lsl #2 ; b = vp8_extra_bits + t
- add r12, r7, r6, lsl #2 ; b = vp8_extra_bits + t
+ ; element. Here vp8_extra_bit_struct == 16
+ add r12, r7, r6, lsl #4 ; b = vp8_extra_bits + t
ldr r4, [r12, #vp8_extra_bit_struct_base_val]
cmp r4, #0
; if( b->base_val)
ldr r8, [r12, #vp8_extra_bit_struct_len] ; L
- ldr lr, [r1, #tokenextra_extra] ; e = p->Extra
+ ldrsh lr, [r1, #tokenextra_extra] ; e = p->Extra
cmp r8, #0 ; if( L)
beq no_extra_bits
DEFINE(vp8_extra_bit_struct_tree, offsetof(vp8_extra_bit_struct, tree));
DEFINE(vp8_extra_bit_struct_prob, offsetof(vp8_extra_bit_struct, prob));
-DEFINE(vp8_extra_bit_struct_prob_bc, offsetof(vp8_extra_bit_struct, prob_bc));
DEFINE(vp8_extra_bit_struct_len, offsetof(vp8_extra_bit_struct, Len));
DEFINE(vp8_extra_bit_struct_base_val, offsetof(vp8_extra_bit_struct, base_val));
// These two sizes are used in vp7cx_pack_tokens. They are hard coded
// so if the size changes this will have to be adjusted.
-ct_assert(TOKENEXTRA_SZ, sizeof(TOKENEXTRA) == 20)
-ct_assert(vp8_extra_bit_struct_sz, sizeof(vp8_extra_bit_struct) == 20)
+ct_assert(TOKENEXTRA_SZ, sizeof(TOKENEXTRA) == 8)
+ct_assert(vp8_extra_bit_struct_sz, sizeof(vp8_extra_bit_struct) == 16)
//add asserts for any offset that is not supported by assembly code
//add asserts for any size that is not supported by assembly code
t->Token = x;
t->context_tree = cpi->common.fc.coef_probs [type] [band] [pt];
- t->section = frametype * BLOCK_TYPES * 2 + 2 * type + (c == 0);
-
t->skip_eob_node = pt == 0 && ((band > 0 && type > 0) || (band > 1 && type == 0));
++cpi->coef_counts [type] [band] [pt] [x];
t->Token = x;
t->context_tree = cpi->common.fc.coef_probs [type] [band] [pt];
- t->section = frametype * BLOCK_TYPES * 2 + 2 * type + (c == 0);
t->skip_eob_node = pt == 0 && ((band > 0 && type > 0) || (band > 1 && type == 0));
++cpi->coef_counts [type] [band] [pt] [x];
t->Token = DCT_EOB_TOKEN;
t->context_tree = cpi->common.fc.coef_probs [1] [0] [pt];
- t->section = 11;
t->skip_eob_node = 0;
++cpi->coef_counts [1] [0] [pt] [DCT_EOB_TOKEN];
++t;
t->Token = DCT_EOB_TOKEN;
t->context_tree = cpi->common.fc.coef_probs [0] [1] [pt];
- t->section = 8;
t->skip_eob_node = 0;
++cpi->coef_counts [0] [1] [pt] [DCT_EOB_TOKEN];
++t;
t->Token = DCT_EOB_TOKEN;
t->context_tree = cpi->common.fc.coef_probs [2] [0] [pt];
- t->section = 13;
t->skip_eob_node = 0;
++cpi->coef_counts[2] [0] [pt] [DCT_EOB_TOKEN];
++t;
typedef struct
{
- int Token;
- int Extra;
const vp8_prob *context_tree;
- int skip_eob_node;
- int section;
+ short Extra;
+ unsigned char Token;
+ unsigned char skip_eob_node;
} TOKENEXTRA;
int rd_cost_mby(MACROBLOCKD *);