History

Merge "remove unused dboolhuff code"

John Koleszar committed 15 years ago

Commit adaf2b62 parents 58d2e70 bb9c95e10 files · +12 −564Browse files

Unified · Split

10 files
  1. vp8/common/arm/vpx_asm_offsets.c +0 −9
  2. vp8/decoder/arm/arm_dsystemdependent.c +0 −13
  3. vp8/decoder/arm/armv6/dboolhuff_v6.asm +0 −163
  4. vp8/decoder/arm/dboolhuff_arm.h +0 −43
  5. vp8/decoder/arm/neon/dboolhuff_neon.asm +0 −160
  6. vp8/decoder/dboolhuff.c +5 −70
  7. vp8/decoder/dboolhuff.h +5 −95
  8. vp8/decoder/decodframe.c +2 −4
  9. vp8/decoder/generic/dsystemdependent.c +0 −6
  10. vp8/decoder/onyxd_int.h +0 −1
vp8/common/arm/vpx_asm_offsets.c+0−9
@@ -45,15 +45,6 @@ DEFINE(yv12_buffer_config_border, offsetof(YV12_BUFFER_CONFIG, bor · 44 unmodified lines
4545 #endif
4646
4747 #if CONFIG_VP8_DECODER
48−DEFINE(mb_diff, offsetof(MACROBLOCKD, diff));
49−DEFINE(mb_predictor, offsetof(MACROBLOCKD, predictor));
50−DEFINE(mb_dst_y_stride, offsetof(MACROBLOCKD, dst.y_stride));
51−DEFINE(mb_dst_y_buffer, offsetof(MACROBLOCKD, dst.y_buffer));
52−DEFINE(mb_dst_u_buffer, offsetof(MACROBLOCKD, dst.u_buffer));
53−DEFINE(mb_dst_v_buffer, offsetof(MACROBLOCKD, dst.v_buffer));
54−DEFINE(mb_up_available, offsetof(MACROBLOCKD, up_available));
55−DEFINE(mb_left_available, offsetof(MACROBLOCKD, left_available));
56−
5748 DEFINE(detok_scan, offsetof(DETOK, scan));
5849 DEFINE(detok_ptr_block2leftabove, offsetof(DETOK, ptr_block2leftabove));
5950 DEFINE(detok_coef_tree_ptr, offsetof(DETOK, vp8_coef_tree_ptr));
vp8/decoder/arm/arm_dsystemdependent.c+0−13
@@ -14,7 +14,6 @@ · 13 unmodified lines
1414 #include "blockd.h"
1515 #include "pragmas.h"
1616 #include "postproc.h"
17−#include "dboolhuff.h"
1817 #include "dequantize.h"
1918 #include "onyxd_int.h"
2019
@@ -35,12 +34,6 @@ void vp8_arch_arm_decode_init(VP8D_COMP *pbi) · 14 unmodified lines
3534 pbi->dequant.dc_idct_add_y_block = vp8_dequant_dc_idct_add_y_block_v6;
3635 pbi->dequant.idct_add_y_block = vp8_dequant_idct_add_y_block_v6;
3736 pbi->dequant.idct_add_uv_block = vp8_dequant_idct_add_uv_block_v6;
38−#if 0 /*For use with RTCD, when implemented*/
39− pbi->dboolhuff.start = vp8dx_start_decode_c;
40− pbi->dboolhuff.fill = vp8dx_bool_decoder_fill_c;
41− pbi->dboolhuff.debool = vp8dx_decode_bool_c;
42− pbi->dboolhuff.devalue = vp8dx_decode_value_c;
43−#endif
4437 }
4538 #endif
4639
@@ -54,12 +47,6 @@ void vp8_arch_arm_decode_init(VP8D_COMP *pbi) · 7 unmodified lines
5447 pbi->dequant.dc_idct_add_y_block = vp8_dequant_dc_idct_add_y_block_neon;
5548 pbi->dequant.idct_add_y_block = vp8_dequant_idct_add_y_block_neon;
5649 pbi->dequant.idct_add_uv_block = vp8_dequant_idct_add_uv_block_neon;
57−#if 0 /*For use with RTCD, when implemented*/
58− pbi->dboolhuff.start = vp8dx_start_decode_c;
59− pbi->dboolhuff.fill = vp8dx_bool_decoder_fill_c;
60− pbi->dboolhuff.debool = vp8dx_decode_bool_c;
61− pbi->dboolhuff.devalue = vp8dx_decode_value_c;
62−#endif
6350 }
6451 #endif
6552 #endif
vp8/decoder/arm/armv6/dboolhuff_v6.asm+0−163
@@ -1,163 +0,0 @@
1−;
2−; Copyright (c) 2010 The WebM project authors. All Rights Reserved.
3−;
4−; Use of this source code is governed by a BSD-style license
5−; that can be found in the LICENSE file in the root of the source
6−; tree. An additional intellectual property rights grant can be found
7−; in the file PATENTS. All contributing project authors may
8−; be found in the AUTHORS file in the root of the source tree.
9−;
10−
11−
12− EXPORT |vp8_decode_value_v6|
13− EXPORT |vp8dx_start_decode_v6|
14− EXPORT |vp8dx_stop_decode_v6|
15− EXPORT |vp8dx_decode_bool_v6|
16−
17− ARM
18− REQUIRE8
19− PRESERVE8
20−
21− INCLUDE vpx_asm_offsets.asm
22−
23−br RN r0
24−prob RN r1
25−bits RN r1
26− AREA |.text|, CODE, READONLY ; name this block of code
27−
28−; int z = 0;
29−; int bit;
30−; for ( bit=bits-1; bit>=0; bit-- )
31−; {
32−; z |= (vp8dx_decode_bool(br, 0x80)<<bit);
33−; }
34−; return z;
35−
36−;int vp8_decode_value_v6 ( BOOL_DECODER *br, int bits )
37−|vp8_decode_value_v6| PROC
38− stmdb sp!, {r4 - r6, lr}
39− mov r4, br
40− mov r5, bits
41− mov r6, #0
42−
43− subs r5, r5, #1
44− bmi decode_value_exit
45−
46−decode_value_loop
47− mov prob, #0x80
48− mov br, r4
49− bl vp8dx_decode_bool_v6_internal ; needed for conversion to s file
50− orr r6, r6, r0, lsl r5
51− subs r5, r5, #1
52− bpl decode_value_loop
53−
54−decode_value_exit
55− mov r0, r6
56− ldmia sp!, {r4 - r6, pc}
57− ENDP ; |vp8_decode_value_v6|
58−
59−
60−;void vp8dx_start_decode_v6 ( BOOL_DECODER *br, unsigned char *source )
61−|vp8dx_start_decode_v6| PROC
62− stmdb sp!, {r4 - r5, lr}
63− mov r2, #0
64− mov r3, #255
65−
66− str r2, [br, #bool_decoder_lowvalue]
67− str r3, [br, #bool_decoder_range]
68− str r1, [br, #bool_decoder_buffer]
69−
70− mov r3, #8
71− mov r2, #4
72− str r3, [br, #bool_decoder_count]
73− str r2, [br, #bool_decoder_pos]
74−
75− ldrb r2, [r1, #3]
76− ldrb r3, [r1, #2]
77− ldrb r4, [r1, #1]
78− ldrb r5, [r1]
79−
80− orr r1, r2, r3, lsl #8
81− orr r1, r1, r4, lsl #16
82− orr r1, r1, r5, lsl #24
83−
84− str r1, [br, #bool_decoder_value]
85−
86− ldmia sp!, {r4 - r5, pc}
87− ENDP ; |vp8dx_start_decode_v6|
88−
89−
90−;void vp8dx_stop_decode_v6 ( BOOL_DECODER *bc );
91−|vp8dx_stop_decode_v6| PROC
92− mov pc, lr
93− ENDP ; |vp8dx_stop_decode_v6|
94−
95−
96−; bigsplit RN r1
97−; buffer_v RN r1
98−; count_v RN r4
99−; range_v RN r2
100−; value_v RN r3
101−; pos_v RN r5
102−; split RN r6
103−; bit RN lr
104−;int vp8dx_decode_bool_v6 ( BOOL_DECODER *br, int probability )
105−|vp8dx_decode_bool_v6| PROC
106−vp8dx_decode_bool_v6_internal
107− stmdb sp!, {r4 - r6, lr}
108−
109− ldr r2, [br, #bool_decoder_range]
110− ldr r3, [br, #bool_decoder_value]
111−
112− mov r6, r2, lsl #8
113− sub r6, r6, #256 ; split = 1 + (((range-1) * probability) >> 8)
114− mov r12, #1
115− smlawb r6, r6, prob, r12
116−
117− mov lr, #0
118− subs r5, r3, r6, lsl #24
119−
120− ;cmp r3, r1
121− movhs lr, #1
122− movhs r3, r5
123− subhs r2, r2, r6
124− movlo r2, r6
125−
126− cmp r2, #0x80
127− blt range_less_0x80
128− ;strd r2, r3, [br, #bool_decoder_range]
129− str r2, [br, #bool_decoder_range]
130− str r3, [br, #bool_decoder_value]
131− mov r0, lr
132− ldmia sp!, {r4 - r6, pc}
133−
134−range_less_0x80
135− ldr r5, [br, #bool_decoder_pos]
136− ldr r1, [br, #bool_decoder_buffer]
137− ldr r4, [br, #bool_decoder_count]
138− add r1, r1, r5
139−
140− clz r12, r2
141− sub r12, r12, #24
142− subs r4, r4, r12
143− ldrleb r6, [r1], #1
144− mov r2, r2, lsl r12
145− mov r3, r3, lsl r12
146− addle r4, r4, #8
147− rsble r12, r4, #8
148− addle r5, r5, #1
149− orrle r3, r3, r6, lsl r12
150−
151− ;strd r2, r3, [br, #bool_decoder_range]
152− ;strd r4, r5, [br, #bool_decoder_count]
153− str r2, [br, #bool_decoder_range]
154− str r3, [br, #bool_decoder_value]
155− str r4, [br, #bool_decoder_count]
156− str r5, [br, #bool_decoder_pos]
157−
158− mov r0, lr
159−
160− ldmia sp!, {r4 - r6, pc}
161− ENDP ; |vp8dx_decode_bool_v6|
162−
163− END
vp8/decoder/arm/dboolhuff_arm.h+0−43
@@ -1,43 +0,0 @@
1−#ifndef DBOOLHUFF_ARM_H
2−#define DBOOLHUFF_ARM_H
3−
4−/* JLK
5− * There are currently no arm-optimized versions of
6− * these functions. As they are implemented, they
7− * can be uncommented below and added to
8− * arm/dsystemdependent.c
9− *
10− * The existing asm code is likely so different as
11− * to be useless. However, its been left (for now)
12− * for reference.
13− */
14−#if 0
15−#if HAVE_ARMV6
16−#undef vp8_dbool_start
17−#define vp8_dbool_start vp8dx_start_decode_v6
18−
19−#undef vp8_dbool_fill
20−#define vp8_dbool_fill vp8_bool_decoder_fill_v6
21−
22−#undef vp8_dbool_debool
23−#define vp8_dbool_debool vp8_decode_bool_v6
24−
25−#undef vp8_dbool_devalue
26−#define vp8_dbool_devalue vp8_decode_value_v6
27−#endif /* HAVE_ARMV6 */
28−
29−#if HAVE_ARMV7
30−#undef vp8_dbool_start
31−#define vp8_dbool_start vp8dx_start_decode_neon
32−
33−#undef vp8_dbool_fill
34−#define vp8_dbool_fill vp8_bool_decoder_fill_neon
35−
36−#undef vp8_dbool_debool
37−#define vp8_dbool_debool vp8_decode_bool_neon
38−
39−#undef vp8_dbool_devalue
40−#define vp8_dbool_devalue vp8_decode_value_neon
41−#endif /* HAVE_ARMV7 */
42−#endif
43−#endif /* DBOOLHUFF_ARM_H */
vp8/decoder/arm/neon/dboolhuff_neon.asm+0−160
@@ -1,160 +0,0 @@
1−;
2−; Copyright (c) 2010 The WebM project authors. All Rights Reserved.
3−;
4−; Use of this source code is governed by a BSD-style license
5−; that can be found in the LICENSE file in the root of the source
6−; tree. An additional intellectual property rights grant can be found
7−; in the file PATENTS. All contributing project authors may
8−; be found in the AUTHORS file in the root of the source tree.
9−;
10−
11−
12− EXPORT |vp8_decode_value_neon|
13− EXPORT |vp8dx_start_decode_neon|
14− EXPORT |vp8dx_stop_decode_neon|
15− EXPORT |vp8dx_decode_bool_neon|
16−
17− ARM
18− REQUIRE8
19− PRESERVE8
20−
21− INCLUDE vpx_asm_offsets.asm
22−
23− AREA |.text|, CODE, READONLY ; name this block of code
24−
25−; int z = 0;
26−; int bit;
27−; for ( bit=bits-1; bit>=0; bit-- )
28−; {
29−; z |= (vp8dx_decode_bool(br, 0x80)<<bit);
30−; }
31−; return z;
32−
33−;int vp8_decode_value_neon ( BOOL_DECODER *br, int bits )
34−|vp8_decode_value_neon| PROC
35− stmdb sp!, {r4 - r6, lr}
36− mov r4, r0
37− mov r5, r1
38− mov r6, #0
39−
40− subs r5, r5, #1
41− bmi decode_value_exit
42−
43−decode_value_loop
44− mov r1, #0x80
45− mov r0, r4
46− bl vp8dx_decode_bool_neon_internal ; needed for conversion to s file
47− orr r6, r6, r0, lsl r5
48− subs r5, r5, #1
49− bpl decode_value_loop
50−
51−decode_value_exit
52− mov r0, r6
53− ldmia sp!, {r4 - r6, pc}
54− ENDP ; |vp8_decode_value_neon|
55−
56−
57−;void vp8dx_start_decode_neon ( BOOL_DECODER *br, unsigned char *source )
58−|vp8dx_start_decode_neon| PROC
59− stmdb sp!, {r4 - r5, lr}
60− mov r2, #0
61− mov r3, #255
62−
63− str r2, [r0, #bool_decoder_lowvalue]
64− str r3, [r0, #bool_decoder_range]
65− str r1, [r0, #bool_decoder_buffer]
66−
67− mov r3, #8
68− mov r2, #4
69− str r3, [r0, #bool_decoder_count]
70− str r2, [r0, #bool_decoder_pos]
71−
72− ldrb r2, [r1, #3]
73− ldrb r3, [r1, #2]
74− ldrb r4, [r1, #1]
75− ldrb r5, [r1]
76−
77− orr r1, r2, r3, lsl #8
78− orr r1, r1, r4, lsl #16
79− orr r1, r1, r5, lsl #24
80−
81− str r1, [r0, #bool_decoder_value]
82−
83− ldmia sp!, {r4 - r5, pc}
84− ENDP ; |vp8dx_start_decode_neon|
85−
86−
87−;void vp8dx_stop_decode_neon ( BOOL_DECODER *bc );
88−|vp8dx_stop_decode_neon| PROC
89− mov pc, lr
90− ENDP ; |vp8dx_stop_decode_neon|
91−
92−
93−; bigsplit RN r1
94−; buffer_v RN r1
95−; count_v RN r4
96−; range_v RN r2
97−; value_v RN r3
98−; pos_v RN r5
99−; split RN r6
100−; bit RN lr
101−;int vp8dx_decode_bool_neon ( BOOL_DECODER *br, int probability )
102−|vp8dx_decode_bool_neon| PROC
103−vp8dx_decode_bool_neon_internal
104−;LDRD and STRD doubleword data transfers must be eight-byte aligned. Use ALIGN 8
105−;before memory allocation
106− stmdb sp!, {r4 - r5, lr}
107−
108− ldr r2, [r0, #bool_decoder_range] ;load range (r2), value(r3)
109− ldr r3, [r0, #bool_decoder_value]
110− ;ldrd r2, r3, [r0, #bool_decoder_range] ;ldrd costs 2 cycles
111− ;
112−
113− mov r4, r2, lsl #8
114− sub r4, r4, #256
115− mov r12, #1
116−
117− smlawb r4, r4, r1, r12 ;split = 1 + (((range-1) * probability) >> 8)
118−
119− mov lr, r0
120− mov r0, #0 ;bit = 0
121− ;
122− subs r5, r3, r4, lsl #24
123−
124− subhs r2, r2, r4 ;range = br->range-split
125− movlo r2, r4 ;range = split
126− movhs r0, #1 ;bit = 1
127− movhs r3, r5 ;value = value-bigsplit
128−
129− cmp r2, #0x80
130− blt range_less_0x80
131− strd r2, r3, [lr, #bool_decoder_range] ;store result
132−
133− ldmia sp!, {r4 - r5, pc}
134−
135−range_less_0x80
136−
137− ldrd r4, r5, [lr, #bool_decoder_count] ;load count, pos, buffer
138− ldr r1, [lr, #bool_decoder_buffer]
139−
140− clz r12, r2
141− add r1, r1, r5
142−
143− sub r12, r12, #24
144− subs r4, r4, r12 ;count -= shift
145− mov r2, r2, lsl r12 ;range <<= shift
146− mov r3, r3, lsl r12 ;value <<= shift
147− addle r4, r4, #8 ;count += 8
148− ldrleb r12, [r1], #1 ;br->buffer[br->pos]
149−
150− rsble r1, r4, #8 ;-count
151− addle r5, r5, #1 ;br->pos++
152− orrle r3, r3, r12, lsl r1 ;value |= (br->buffer[br->pos]) << (-count)
153−
154− strd r2, r3, [lr, #bool_decoder_range] ;store result
155− strd r4, r5, [lr, #bool_decoder_count]
156−
157− ldmia sp!, {r4 - r5, pc}
158− ENDP ; |vp8dx_decode_bool_neon|
159−
160− END
vp8/decoder/dboolhuff.c+5−70
@@ -26,8 +26,9 @@ DECLARE_ALIGNED(16, const unsigned char, vp8dx_bitreader_norm[256]) = · 25 unmodified lines
2626 };
2727
2828
29−int vp8dx_start_decode_c(BOOL_DECODER *br, const unsigned char *source,
30− unsigned int source_sz)
29+int vp8dx_start_decode(BOOL_DECODER *br,
30+ const unsigned char *source,
31+ unsigned int source_sz)
3132 {
3233 br->user_buffer_end = source+source_sz;
3334 br->user_buffer = source;
@@ -39,13 +40,13 @@ int vp8dx_start_decode_c(BOOL_DECODER *br, const unsigned char *source, · 5 unmodified lines
3940 return 1;
4041
4142 /* Populate the buffer */
42− vp8dx_bool_decoder_fill_c(br);
43+ vp8dx_bool_decoder_fill(br);
4344
4445 return 0;
4546 }
4647
4748
48−void vp8dx_bool_decoder_fill_c(BOOL_DECODER *br)
49+void vp8dx_bool_decoder_fill(BOOL_DECODER *br)
4950 {
5051 const unsigned char *bufptr;
5152 const unsigned char *bufend;
@@ -62,69 +63,3 @@ void vp8dx_bool_decoder_fill_c(BOOL_DECODER *br) · 10 unmodified lines
6263 br->value = value;
6364 br->count = count;
6465 }
65−
66−#if 0
67−/*
68− * Until optimized versions of these functions are available, we
69− * keep the implementation in the header to allow inlining.
70− *
71− * The RTCD-style invocations are still in place so this can
72− * be switched by just uncommenting these functions here and
73− * the DBOOLHUFF_INVOKE calls in the header.
74− */
75−int vp8dx_decode_bool_c(BOOL_DECODER *br, int probability)
76−{
77− unsigned int bit=0;
78− VP8_BD_VALUE value;
79− unsigned int split;
80− VP8_BD_VALUE bigsplit;
81− int count;
82− unsigned int range;
83−
84− value = br->value;
85− count = br->count;
86− range = br->range;
87−
88− split = 1 + (((range-1) * probability) >> 8);
89− bigsplit = (VP8_BD_VALUE)split << (VP8_BD_VALUE_SIZE - 8);
90−
91− range = split;
92− if(value >= bigsplit)
93− {
94− range = br->range-split;
95− value = value-bigsplit;
96− bit = 1;
97− }
98−
99− /*if(range>=0x80)
100− {
101− br->value = value;
102− br->range = range;
103− return bit;
104− }*/
105−
106− {
107− register unsigned int shift = vp8dx_bitreader_norm[range];
108− range <<= shift;
109− value <<= shift;
110− count -= shift;
111− }
112− br->value = value;
113− br->count = count;
114− br->range = range;
115− if (count < 0)
116− vp8dx_bool_decoder_fill_c(br);
117− return bit;
118−}
119−
120−int vp8dx_decode_value_c(BOOL_DECODER *br, int bits)
121−{
122− int z = 0;
123− int bit;
124− for ( bit=bits-1; bit>=0; bit-- )
125− {
126− z |= (vp8dx_decode_bool(br, 0x80)<<bit);
127− }
128− return z;
129−}
130−#endif
vp8/decoder/dboolhuff.h+5−95
@@ -25,10 +25,6 @@ typedef size_t VP8_BD_VALUE; · 24 unmodified lines
2525 Even relatively modest values like 100 would work fine.*/
2626 # define VP8_LOTS_OF_BITS (0x40000000)
2727
28−
29−
30−struct vp8_dboolhuff_rtcd_vtable;
31−
3228 typedef struct
3329 {
3430 const unsigned char *user_buffer_end;
@@ -36,82 +32,15 @@ typedef struct · 1 unmodified line
3632 VP8_BD_VALUE value;
3733 int count;
3834 unsigned int range;
39−#if CONFIG_RUNTIME_CPU_DETECT
40− struct vp8_dboolhuff_rtcd_vtable *rtcd;
41−#endif
4235 } BOOL_DECODER;
4336
44−#define prototype_dbool_start(sym) int sym(BOOL_DECODER *br, \
45− const unsigned char *source, unsigned int source_sz)
46−#define prototype_dbool_fill(sym) void sym(BOOL_DECODER *br)
47−#define prototype_dbool_debool(sym) int sym(BOOL_DECODER *br, int probability)
48−#define prototype_dbool_devalue(sym) int sym(BOOL_DECODER *br, int bits)
49−
50−#if ARCH_ARM
51−#include "arm/dboolhuff_arm.h"
52−#endif
53−
54−#ifndef vp8_dbool_start
55−#define vp8_dbool_start vp8dx_start_decode_c
56−#endif
57−
58−#ifndef vp8_dbool_fill
59−#define vp8_dbool_fill vp8dx_bool_decoder_fill_c
60−#endif
61−
62−#ifndef vp8_dbool_debool
63−#define vp8_dbool_debool vp8dx_decode_bool_c
64−#endif
65−
66−#ifndef vp8_dbool_devalue
67−#define vp8_dbool_devalue vp8dx_decode_value_c
68−#endif
69−
70−extern prototype_dbool_start(vp8_dbool_start);
71−extern prototype_dbool_fill(vp8_dbool_fill);
72−extern prototype_dbool_debool(vp8_dbool_debool);
73−extern prototype_dbool_devalue(vp8_dbool_devalue);
74−
75−typedef prototype_dbool_start((*vp8_dbool_start_fn_t));
76−typedef prototype_dbool_fill((*vp8_dbool_fill_fn_t));
77−typedef prototype_dbool_debool((*vp8_dbool_debool_fn_t));
78−typedef prototype_dbool_devalue((*vp8_dbool_devalue_fn_t));
79−
80−typedef struct vp8_dboolhuff_rtcd_vtable {
81− vp8_dbool_start_fn_t start;
82− vp8_dbool_fill_fn_t fill;
83− vp8_dbool_debool_fn_t debool;
84− vp8_dbool_devalue_fn_t devalue;
85−} vp8_dboolhuff_rtcd_vtable_t;
86−
87−/* There are no processor-specific versions of these
88− * functions right now. Disable RTCD to avoid using
89− * function pointers which gives a speed boost
90− */
91−/*#ifdef ENABLE_RUNTIME_CPU_DETECT
92−#define DBOOLHUFF_INVOKE(ctx,fn) (ctx)->fn
93−#define IF_RTCD(x) (x)
94−#else*/
95−#define DBOOLHUFF_INVOKE(ctx,fn) vp8_dbool_##fn
96−#define IF_RTCD(x) NULL
97−/*#endif*/
98−
9937 DECLARE_ALIGNED(16, extern const unsigned char, vp8dx_bitreader_norm[256]);
10038
101−/* wrapper functions to hide RTCD. static means inline means hopefully no
102− * penalty
103− */
104−static int vp8dx_start_decode(BOOL_DECODER *br,
105− struct vp8_dboolhuff_rtcd_vtable *rtcd,
106− const unsigned char *source, unsigned int source_sz) {
107−#if CONFIG_RUNTIME_CPU_DETECT
108− br->rtcd = rtcd;
109−#endif
110− return DBOOLHUFF_INVOKE(rtcd, start)(br, source, source_sz);
111−}
112−static void vp8dx_bool_decoder_fill(BOOL_DECODER *br) {
113− DBOOLHUFF_INVOKE(br->rtcd, fill)(br);
114−}
39+int vp8dx_start_decode(BOOL_DECODER *br,
40+ const unsigned char *source,
41+ unsigned int source_sz);
42+
43+void vp8dx_bool_decoder_fill(BOOL_DECODER *br);
11544
11645 /*The refill loop is used in several places, so define it in a macro to make
11746 sure they're all consistent.
@@ -138,12 +67,6 @@ static void vp8dx_bool_decoder_fill(BOOL_DECODER *br) { · 20 unmodified lines
13867
13968
14069 static int vp8dx_decode_bool(BOOL_DECODER *br, int probability) {
141− /*
142− * Until optimized versions of this function are available, we
143− * keep the implementation in the header to allow inlining.
144− *
145− *return DBOOLHUFF_INVOKE(br->rtcd, debool)(br, probability);
146− */
14770 unsigned int bit = 0;
14871 VP8_BD_VALUE value;
14972 unsigned int split;
@@ -167,13 +90,6 @@ static int vp8dx_decode_bool(BOOL_DECODER *br, int probability) { · 17 unmodified lines
16790 bit = 1;
16891 }
16992
170− /*if(range>=0x80)
171− {
172− br->value = value;
173− br->range = range;
174− return bit
175− }*/
176−
17793 {
17894 register unsigned int shift = vp8dx_bitreader_norm[range];
17995 range <<= shift;
@@ -190,12 +106,6 @@ static int vp8dx_decode_bool(BOOL_DECODER *br, int probability) { · 10 unmodified lines
190106
191107 static int vp8_decode_value(BOOL_DECODER *br, int bits)
192108 {
193− /*
194− * Until optimized versions of this function are available, we
195− * keep the implementation in the header to allow inlining.
196− *
197− *return DBOOLHUFF_INVOKE(br->rtcd, devalue)(br, bits);
198− */
199109 int z = 0;
200110 int bit;
201111
vp8/decoder/decodframe.c+2−4
@@ -475,8 +475,7 @@ static void setup_token_decoder(VP8D_COMP *pbi, · 474 unmodified lines
475475 "Truncated packet or corrupt partition "
476476 "%d length", i + 1);
477477
478− if (vp8dx_start_decode(bool_decoder, IF_RTCD(&pbi->dboolhuff),
479− partition, partition_size))
478+ if (vp8dx_start_decode(bool_decoder, partition, partition_size))
480479 vpx_internal_error(&pc->error, VPX_CODEC_MEM_ERROR,
481480 "Failed to allocate bool decoder %d", i + 1);
482481
@@ -651,8 +650,7 @@ int vp8_decode_frame(VP8D_COMP *pbi) · 168 unmodified lines
651650
652651 init_frame(pbi);
653652
654− if (vp8dx_start_decode(bc, IF_RTCD(&pbi->dboolhuff),
655− data, data_end - data))
653+ if (vp8dx_start_decode(bc, data, data_end - data))
656654 vpx_internal_error(&pc->error, VPX_CODEC_MEM_ERROR,
657655 "Failed to allocate bool decoder 0");
658656 if (pc->frame_type == KEY_FRAME) {
vp8/decoder/generic/dsystemdependent.c+0−6
@@ -27,12 +27,6 @@ void vp8_dmachine_specific_config(VP8D_COMP *pbi) · 26 unmodified lines
2727 pbi->dequant.dc_idct_add_y_block = vp8_dequant_dc_idct_add_y_block_c;
2828 pbi->dequant.idct_add_y_block = vp8_dequant_idct_add_y_block_c;
2929 pbi->dequant.idct_add_uv_block = vp8_dequant_idct_add_uv_block_c;
30− pbi->dboolhuff.start = vp8dx_start_decode_c;
31− pbi->dboolhuff.fill = vp8dx_bool_decoder_fill_c;
32−#if 0 /*For use with RTCD, when implemented*/
33− pbi->dboolhuff.debool = vp8dx_decode_bool_c;
34− pbi->dboolhuff.devalue = vp8dx_decode_value_c;
35−#endif
3630 #endif
3731
3832 #if ARCH_X86 || ARCH_X86_64
vp8/decoder/onyxd_int.h+0−1
@@ -125,7 +125,6 @@ typedef struct VP8Decompressor · 124 unmodified lines
125125
126126 #if CONFIG_RUNTIME_CPU_DETECT
127127 vp8_dequant_rtcd_vtable_t dequant;
128− struct vp8_dboolhuff_rtcd_vtable dboolhuff;
129128 #endif
130129
131130

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t