Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
BC
public
external
libvpx
Commits
0d53fc26
Commit
0d53fc26
authored
Oct 30, 2012
by
Ronald S. Bultje
Browse files
Change decoder vp8_ and vp8dx_ public symbol prefixes to vp9_.
Change-Id: Iedb4c3b4171d8640cc525727b4c3658e2bb400db
parent
d115dbc2
Changes
22
Hide whitespace changes
Inline
Side-by-side
Showing
20 changed files
with
227 additions
and
227 deletions
+227
-227
third_party/x86inc/x86inc.asm
third_party/x86inc/x86inc.asm
+1
-1
vp8/common/onyxd.h
vp8/common/onyxd.h
+7
-7
vp8/common/rtcd_defs.sh
vp8/common/rtcd_defs.sh
+22
-22
vp8/common/x86/idct_x86.h
vp8/common/x86/idct_x86.h
+6
-6
vp8/common/x86/x86_systemdependent.c
vp8/common/x86/x86_systemdependent.c
+3
-3
vp8/decoder/arm/dequantize_arm.c
vp8/decoder/arm/dequantize_arm.c
+6
-6
vp8/decoder/dboolhuff.c
vp8/decoder/dboolhuff.c
+6
-6
vp8/decoder/dboolhuff.h
vp8/decoder/dboolhuff.h
+5
-5
vp8/decoder/decodemv.c
vp8/decoder/decodemv.c
+2
-2
vp8/decoder/decodemv.h
vp8/decoder/decodemv.h
+2
-2
vp8/decoder/decodframe.c
vp8/decoder/decodframe.c
+44
-44
vp8/decoder/dequantize.c
vp8/decoder/dequantize.c
+12
-12
vp8/decoder/dequantize.h
vp8/decoder/dequantize.h
+15
-15
vp8/decoder/detokenize.c
vp8/decoder/detokenize.c
+5
-5
vp8/decoder/detokenize.h
vp8/decoder/detokenize.h
+4
-4
vp8/decoder/idct_blk.c
vp8/decoder/idct_blk.c
+38
-38
vp8/decoder/onyxd_if.c
vp8/decoder/onyxd_if.c
+13
-13
vp8/decoder/onyxd_int.h
vp8/decoder/onyxd_int.h
+6
-6
vp8/decoder/x86/idct_blk_mmx.c
vp8/decoder/x86/idct_blk_mmx.c
+27
-27
vp8/decoder/x86/idct_blk_sse2.c
vp8/decoder/x86/idct_blk_sse2.c
+3
-3
No files found.
third_party/x86inc/x86inc.asm
View file @
0d53fc26
...
...
@@ -36,7 +36,7 @@
%include "vpx_config.asm"
%define program_name vp
x
%define program_name vp
9
%define UNIX64 0
...
...
vp8/common/onyxd.h
View file @
0d53fc26
...
...
@@ -43,21 +43,21 @@ extern "C"
VP8D_OK
=
0
}
VP8D_SETTING
;
void
vp
8
dx_initialize
(
void
);
void
vp
9
dx_initialize
(
void
);
void
vp8dx_set_setting
(
VP8D_PTR
comp
,
VP8D_SETTING
oxst
,
int
x
);
int
vp8dx_get_setting
(
VP8D_PTR
comp
,
VP8D_SETTING
oxst
);
int
vp
8
dx_receive_compressed_data
(
VP8D_PTR
comp
,
unsigned
long
size
,
const
unsigned
char
*
dest
,
int64_t
time_stamp
);
int
vp
8
dx_get_raw_frame
(
VP8D_PTR
comp
,
YV12_BUFFER_CONFIG
*
sd
,
int64_t
*
time_stamp
,
int64_t
*
time_end_stamp
,
vp8_ppflags_t
*
flags
);
int
vp
9
dx_receive_compressed_data
(
VP8D_PTR
comp
,
unsigned
long
size
,
const
unsigned
char
*
dest
,
int64_t
time_stamp
);
int
vp
9
dx_get_raw_frame
(
VP8D_PTR
comp
,
YV12_BUFFER_CONFIG
*
sd
,
int64_t
*
time_stamp
,
int64_t
*
time_end_stamp
,
vp8_ppflags_t
*
flags
);
vpx_codec_err_t
vp
8
dx_get_reference
(
VP8D_PTR
comp
,
VP8_REFFRAME
ref_frame_flag
,
YV12_BUFFER_CONFIG
*
sd
);
vpx_codec_err_t
vp
8
dx_set_reference
(
VP8D_PTR
comp
,
VP8_REFFRAME
ref_frame_flag
,
YV12_BUFFER_CONFIG
*
sd
);
vpx_codec_err_t
vp
9
dx_get_reference
(
VP8D_PTR
comp
,
VP8_REFFRAME
ref_frame_flag
,
YV12_BUFFER_CONFIG
*
sd
);
vpx_codec_err_t
vp
9
dx_set_reference
(
VP8D_PTR
comp
,
VP8_REFFRAME
ref_frame_flag
,
YV12_BUFFER_CONFIG
*
sd
);
VP8D_PTR
vp
8
dx_create_decompressor
(
VP8D_CONFIG
*
oxcf
);
VP8D_PTR
vp
9
dx_create_decompressor
(
VP8D_CONFIG
*
oxcf
);
void
vp
8
dx_remove_decompressor
(
VP8D_PTR
comp
);
void
vp
9
dx_remove_decompressor
(
VP8D_PTR
comp
);
#ifdef __cplusplus
}
...
...
vp8/common/rtcd_defs.sh
View file @
0d53fc26
...
...
@@ -37,38 +37,38 @@ fi
#
# Dequant
#
prototype void vp
8
_dequantize_b
"struct blockd *x"
specialize vp
8
_dequantize_b mmx
prototype void vp
9
_dequantize_b
"struct blockd *x"
specialize vp
9
_dequantize_b mmx
prototype void vp
8
_dequantize_b_2x2
"struct blockd *x"
specialize vp
8
_dequantize_b_2x2
prototype void vp
9
_dequantize_b_2x2
"struct blockd *x"
specialize vp
9
_dequantize_b_2x2
prototype void vp
8
_dequant_dc_idct_add_y_block_8x8
"short *q, short *dq, unsigned char *pre, unsigned char *dst, int stride, char *eobs, short *dc, struct macroblockd *xd"
specialize vp
8
_dequant_dc_idct_add_y_block_8x8
prototype void vp
9
_dequant_dc_idct_add_y_block_8x8
"short *q, short *dq, unsigned char *pre, unsigned char *dst, int stride, char *eobs, short *dc, struct macroblockd *xd"
specialize vp
9
_dequant_dc_idct_add_y_block_8x8
prototype void vp
8
_dequant_idct_add_y_block_8x8
"short *q, short *dq, unsigned char *pre, unsigned char *dst, int stride, char *eobs, struct macroblockd *xd"
specialize vp
8
_dequant_idct_add_y_block_8x8
prototype void vp
9
_dequant_idct_add_y_block_8x8
"short *q, short *dq, unsigned char *pre, unsigned char *dst, int stride, char *eobs, struct macroblockd *xd"
specialize vp
9
_dequant_idct_add_y_block_8x8
prototype void vp
8
_dequant_idct_add_uv_block_8x8
"short *q, short *dq, unsigned char *pre, unsigned char *dstu, unsigned char *dstv, int stride, char *eobs, struct macroblockd *xd"
specialize vp
8
_dequant_idct_add_uv_block_8x8
prototype void vp
9
_dequant_idct_add_uv_block_8x8
"short *q, short *dq, unsigned char *pre, unsigned char *dstu, unsigned char *dstv, int stride, char *eobs, struct macroblockd *xd"
specialize vp
9
_dequant_idct_add_uv_block_8x8
prototype void vp
8
_dequant_idct_add_16x16
"short *input, short *dq, unsigned char *pred, unsigned char *dest, int pitch, int stride"
specialize vp
8
_dequant_idct_add_16x16
prototype void vp
9
_dequant_idct_add_16x16
"short *input, short *dq, unsigned char *pred, unsigned char *dest, int pitch, int stride"
specialize vp
9
_dequant_idct_add_16x16
prototype void vp
8
_dequant_idct_add
"short *input, short *dq, unsigned char *pred, unsigned char *dest, int pitch, int stride"
specialize vp
8
_dequant_idct_add
prototype void vp
9
_dequant_idct_add
"short *input, short *dq, unsigned char *pred, unsigned char *dest, int pitch, int stride"
specialize vp
9
_dequant_idct_add
prototype void vp
8
_dequant_dc_idct_add
"short *input, short *dq, unsigned char *pred, unsigned char *dest, int pitch, int stride, int Dc"
specialize vp
8
_dequant_dc_idct_add
prototype void vp
9
_dequant_dc_idct_add
"short *input, short *dq, unsigned char *pred, unsigned char *dest, int pitch, int stride, int Dc"
specialize vp
9
_dequant_dc_idct_add
prototype void vp
8
_dequant_dc_idct_add_y_block
"short *q, short *dq, unsigned char *pre, unsigned char *dst, int stride, char *eobs, short *dc"
specialize vp
8
_dequant_dc_idct_add_y_block mmx
prototype void vp
9
_dequant_dc_idct_add_y_block
"short *q, short *dq, unsigned char *pre, unsigned char *dst, int stride, char *eobs, short *dc"
specialize vp
9
_dequant_dc_idct_add_y_block mmx
prototype void vp
8
_dequant_idct_add_y_block
"short *q, short *dq, unsigned char *pre, unsigned char *dst, int stride, char *eobs"
specialize vp
8
_dequant_idct_add_y_block mmx
prototype void vp
9
_dequant_idct_add_y_block
"short *q, short *dq, unsigned char *pre, unsigned char *dst, int stride, char *eobs"
specialize vp
9
_dequant_idct_add_y_block mmx
prototype void vp
8
_dequant_idct_add_uv_block
"short *q, short *dq, unsigned char *pre, unsigned char *dstu, unsigned char *dstv, int stride, char *eobs"
specialize vp
8
_dequant_idct_add_uv_block mmx
prototype void vp
9
_dequant_idct_add_uv_block
"short *q, short *dq, unsigned char *pre, unsigned char *dstu, unsigned char *dstv, int stride, char *eobs"
specialize vp
9
_dequant_idct_add_uv_block mmx
#
# RECON
...
...
vp8/common/x86/idct_x86.h
View file @
0d53fc26
...
...
@@ -20,22 +20,22 @@
*/
#if HAVE_MMX
extern
prototype_idct
(
vp
x
_short_idct4x4llm_1_mmx
);
extern
prototype_idct
(
vp
x
_short_idct4x4llm_mmx
);
extern
prototype_idct_scalar_add
(
vp
x
_dc_only_idct_add_mmx
);
extern
prototype_idct
(
vp
9
_short_idct4x4llm_1_mmx
);
extern
prototype_idct
(
vp
9
_short_idct4x4llm_mmx
);
extern
prototype_idct_scalar_add
(
vp
9
_dc_only_idct_add_mmx
);
extern
prototype_second_order
(
vp8_short_inv_walsh4x4_mmx
);
extern
prototype_second_order
(
vp8_short_inv_walsh4x4_1_mmx
);
#if !CONFIG_RUNTIME_CPU_DETECT
#undef vp8_idct_idct1
#define vp8_idct_idct1 vp
x
_short_idct4x4llm_1_mmx
#define vp8_idct_idct1 vp
9
_short_idct4x4llm_1_mmx
#undef vp8_idct_idct16
#define vp8_idct_idct16 vp
x
_short_idct4x4llm_mmx
#define vp8_idct_idct16 vp
9
_short_idct4x4llm_mmx
#undef vp8_idct_idct1_scalar_add
#define vp8_idct_idct1_scalar_add vp
x
_dc_only_idct_add_mmx
#define vp8_idct_idct1_scalar_add vp
9
_dc_only_idct_add_mmx
#undef vp8_idct_iwalsh16
#define vp8_idct_iwalsh16 vp8_short_inv_walsh4x4_mmx
...
...
vp8/common/x86/x86_systemdependent.c
View file @
0d53fc26
...
...
@@ -34,9 +34,9 @@ void vp8_arch_x86_common_init(VP8_COMMON *ctx) {
#if HAVE_MMX
// The commented functions need to be re-written for vpx.
if
(
flags
&
HAS_MMX
)
{
rtcd
->
idct
.
idct1
=
vp
x
_short_idct4x4llm_1_mmx
;
rtcd
->
idct
.
idct16
=
vp
x
_short_idct4x4llm_mmx
;
rtcd
->
idct
.
idct1_scalar_add
=
vp
x
_dc_only_idct_add_mmx
;
rtcd
->
idct
.
idct1
=
vp
9
_short_idct4x4llm_1_mmx
;
rtcd
->
idct
.
idct16
=
vp
9
_short_idct4x4llm_mmx
;
rtcd
->
idct
.
idct1_scalar_add
=
vp
9
_dc_only_idct_add_mmx
;
// rtcd->idct.iwalsh16 = vp8_short_inv_walsh4x4_mmx;
// rtcd->idct.iwalsh1 = vp8_short_inv_walsh4x4_1_mmx;
...
...
vp8/decoder/arm/dequantize_arm.c
View file @
0d53fc26
...
...
@@ -15,30 +15,30 @@
#include "vpx_mem/vpx_mem.h"
#if HAVE_ARMV7
extern
void
vp
8
_dequantize_b_loop_neon
(
short
*
Q
,
short
*
DQC
,
short
*
DQ
);
extern
void
vp
9
_dequantize_b_loop_neon
(
short
*
Q
,
short
*
DQC
,
short
*
DQ
);
#endif
#if HAVE_ARMV6
extern
void
vp
8
_dequantize_b_loop_v6
(
short
*
Q
,
short
*
DQC
,
short
*
DQ
);
extern
void
vp
9
_dequantize_b_loop_v6
(
short
*
Q
,
short
*
DQC
,
short
*
DQ
);
#endif
#if HAVE_ARMV7
void
vp
8
_dequantize_b_neon
(
BLOCKD
*
d
)
{
void
vp
9
_dequantize_b_neon
(
BLOCKD
*
d
)
{
short
*
DQ
=
d
->
dqcoeff
;
short
*
Q
=
d
->
qcoeff
;
short
*
DQC
=
d
->
dequant
;
vp
8
_dequantize_b_loop_neon
(
Q
,
DQC
,
DQ
);
vp
9
_dequantize_b_loop_neon
(
Q
,
DQC
,
DQ
);
}
#endif
#if HAVE_ARMV6
void
vp
8
_dequantize_b_v6
(
BLOCKD
*
d
)
{
void
vp
9
_dequantize_b_v6
(
BLOCKD
*
d
)
{
short
*
DQ
=
d
->
dqcoeff
;
short
*
Q
=
d
->
qcoeff
;
short
*
DQC
=
d
->
dequant
;
vp
8
_dequantize_b_loop_v6
(
Q
,
DQC
,
DQ
);
vp
9
_dequantize_b_loop_v6
(
Q
,
DQC
,
DQ
);
}
#endif
vp8/decoder/dboolhuff.c
View file @
0d53fc26
...
...
@@ -13,7 +13,7 @@
#include "vpx_ports/mem.h"
#include "vpx_mem/vpx_mem.h"
int
vp
8
dx_start_decode
(
BOOL_DECODER
*
br
,
int
vp
9
dx_start_decode
(
BOOL_DECODER
*
br
,
const
unsigned
char
*
source
,
unsigned
int
source_sz
)
{
br
->
user_buffer_end
=
source
+
source_sz
;
...
...
@@ -26,13 +26,13 @@ int vp8dx_start_decode(BOOL_DECODER *br,
return
1
;
/* Populate the buffer */
vp
8
dx_bool_decoder_fill
(
br
);
vp
9
dx_bool_decoder_fill
(
br
);
return
0
;
}
void
vp
8
dx_bool_decoder_fill
(
BOOL_DECODER
*
br
)
{
void
vp
9
dx_bool_decoder_fill
(
BOOL_DECODER
*
br
)
{
const
unsigned
char
*
bufptr
;
const
unsigned
char
*
bufend
;
VP8_BD_VALUE
value
;
...
...
@@ -66,7 +66,7 @@ int vp9_inv_recenter_nonneg(int v, int m) {
else
return
m
-
((
v
+
1
)
>>
1
);
}
int
vp
8
_decode_uniform
(
BOOL_DECODER
*
br
,
int
n
)
{
int
vp
9
_decode_uniform
(
BOOL_DECODER
*
br
,
int
n
)
{
int
v
;
int
l
=
get_unsigned_bits
(
n
);
int
m
=
(
1
<<
l
)
-
n
;
...
...
@@ -78,13 +78,13 @@ int vp8_decode_uniform(BOOL_DECODER *br, int n) {
return
(
v
<<
1
)
-
m
+
vp8_decode_value
(
br
,
1
);
}
int
vp
8
_decode_term_subexp
(
BOOL_DECODER
*
br
,
int
k
,
int
num_syms
)
{
int
vp
9
_decode_term_subexp
(
BOOL_DECODER
*
br
,
int
k
,
int
num_syms
)
{
int
i
=
0
,
mk
=
0
,
word
;
while
(
1
)
{
int
b
=
(
i
?
k
+
i
-
1
:
k
);
int
a
=
(
1
<<
b
);
if
(
num_syms
<=
mk
+
3
*
a
)
{
word
=
vp
8
_decode_uniform
(
br
,
num_syms
-
mk
)
+
mk
;
word
=
vp
9
_decode_uniform
(
br
,
num_syms
-
mk
)
+
mk
;
break
;
}
else
{
if
(
vp8_decode_value
(
br
,
1
))
{
...
...
vp8/decoder/dboolhuff.h
View file @
0d53fc26
...
...
@@ -35,14 +35,14 @@ typedef struct {
DECLARE_ALIGNED
(
16
,
extern
const
unsigned
char
,
vp8_norm
[
256
]);
int
vp
8
dx_start_decode
(
BOOL_DECODER
*
br
,
int
vp
9
dx_start_decode
(
BOOL_DECODER
*
br
,
const
unsigned
char
*
source
,
unsigned
int
source_sz
);
void
vp
8
dx_bool_decoder_fill
(
BOOL_DECODER
*
br
);
void
vp
9
dx_bool_decoder_fill
(
BOOL_DECODER
*
br
);
int
vp
8
_decode_uniform
(
BOOL_DECODER
*
br
,
int
n
);
int
vp
8
_decode_term_subexp
(
BOOL_DECODER
*
br
,
int
k
,
int
num_syms
);
int
vp
9
_decode_uniform
(
BOOL_DECODER
*
br
,
int
n
);
int
vp
9
_decode_term_subexp
(
BOOL_DECODER
*
br
,
int
k
,
int
num_syms
);
int
vp9_inv_recenter_nonneg
(
int
v
,
int
m
);
/*The refill loop is used in several places, so define it in a macro to make
...
...
@@ -87,7 +87,7 @@ static int vp8dx_decode_bool(BOOL_DECODER *br, int probability) {
split
=
1
+
(((
br
->
range
-
1
)
*
probability
)
>>
8
);
if
(
br
->
count
<
0
)
vp
8
dx_bool_decoder_fill
(
br
);
vp
9
dx_bool_decoder_fill
(
br
);
value
=
br
->
value
;
count
=
br
->
count
;
...
...
vp8/decoder/decodemv.c
View file @
0d53fc26
...
...
@@ -1174,7 +1174,7 @@ static void read_mb_modes_mv(VP8D_COMP *pbi, MODE_INFO *mi, MB_MODE_INFO *mbmi,
}
}
void
vp
x
_decode_mode_mvs_init
(
VP8D_COMP
*
pbi
,
BOOL_DECODER
*
const
bc
)
{
void
vp
9
_decode_mode_mvs_init
(
VP8D_COMP
*
pbi
,
BOOL_DECODER
*
const
bc
)
{
VP8_COMMON
*
cm
=
&
pbi
->
common
;
vpx_memset
(
cm
->
mbskip_pred_probs
,
0
,
sizeof
(
cm
->
mbskip_pred_probs
));
...
...
@@ -1186,7 +1186,7 @@ void vpx_decode_mode_mvs_init(VP8D_COMP *pbi, BOOL_DECODER* const bc) {
mb_mode_mv_init
(
pbi
,
bc
);
}
void
vp
x
_decode_mb_mode_mv
(
VP8D_COMP
*
pbi
,
void
vp
9
_decode_mb_mode_mv
(
VP8D_COMP
*
pbi
,
MACROBLOCKD
*
xd
,
int
mb_row
,
int
mb_col
,
...
...
vp8/decoder/decodemv.h
View file @
0d53fc26
...
...
@@ -11,9 +11,9 @@
#include "onyxd_int.h"
void
vp
x
_decode_mb_mode_mv
(
VP8D_COMP
*
const
pbi
,
void
vp
9
_decode_mb_mode_mv
(
VP8D_COMP
*
const
pbi
,
MACROBLOCKD
*
const
xd
,
int
mb_row
,
int
mb_col
,
BOOL_DECODER
*
const
bc
);
void
vp
x
_decode_mode_mvs_init
(
VP8D_COMP
*
const
pbi
,
BOOL_DECODER
*
const
bc
);
void
vp
9
_decode_mode_mvs_init
(
VP8D_COMP
*
const
pbi
,
BOOL_DECODER
*
const
bc
);
vp8/decoder/decodframe.c
View file @
0d53fc26
...
...
@@ -68,11 +68,11 @@ static int inv_remap_prob(int v, int m) {
}
static
vp8_prob
read_prob_diff_update
(
vp8_reader
*
const
bc
,
int
oldp
)
{
int
delp
=
vp
8
_decode_term_subexp
(
bc
,
SUBEXP_PARAM
,
255
);
int
delp
=
vp
9
_decode_term_subexp
(
bc
,
SUBEXP_PARAM
,
255
);
return
(
vp8_prob
)
inv_remap_prob
(
delp
,
oldp
);
}
void
vp
8
cx_init_de_quantizer
(
VP8D_COMP
*
pbi
)
{
void
vp
9
cx_init_de_quantizer
(
VP8D_COMP
*
pbi
)
{
int
i
;
int
Q
;
VP8_COMMON
*
const
pc
=
&
pbi
->
common
;
...
...
@@ -127,29 +127,29 @@ static void mb_init_dequantizer(VP8D_COMP *pbi, MACROBLOCKD *xd) {
pbi
->
common
.
rtcd
.
idct
.
idct1_scalar_add
=
vp8_dc_only_inv_walsh_add_c
;
pbi
->
common
.
rtcd
.
idct
.
iwalsh1
=
vp8_short_inv_walsh4x4_1_lossless_c
;
pbi
->
common
.
rtcd
.
idct
.
iwalsh16
=
vp8_short_inv_walsh4x4_lossless_c
;
pbi
->
idct_add
=
vp
8
_dequant_idct_add_lossless_c
;
pbi
->
dc_idct_add
=
vp
8
_dequant_dc_idct_add_lossless_c
;
pbi
->
dc_idct_add_y_block
=
vp
8
_dequant_dc_idct_add_y_block_lossless_c
;
pbi
->
idct_add_y_block
=
vp
8
_dequant_idct_add_y_block_lossless_c
;
pbi
->
idct_add_uv_block
=
vp
8
_dequant_idct_add_uv_block_lossless_c
;
pbi
->
idct_add
=
vp
9
_dequant_idct_add_lossless_c
;
pbi
->
dc_idct_add
=
vp
9
_dequant_dc_idct_add_lossless_c
;
pbi
->
dc_idct_add_y_block
=
vp
9
_dequant_dc_idct_add_y_block_lossless_c
;
pbi
->
idct_add_y_block
=
vp
9
_dequant_idct_add_y_block_lossless_c
;
pbi
->
idct_add_uv_block
=
vp
9
_dequant_idct_add_uv_block_lossless_c
;
}
else
{
pbi
->
common
.
rtcd
.
idct
.
idct1
=
vp8_short_idct4x4llm_1_c
;
pbi
->
common
.
rtcd
.
idct
.
idct16
=
vp8_short_idct4x4llm_c
;
pbi
->
common
.
rtcd
.
idct
.
idct1_scalar_add
=
vp8_dc_only_idct_add_c
;
pbi
->
common
.
rtcd
.
idct
.
iwalsh1
=
vp8_short_inv_walsh4x4_1_c
;
pbi
->
common
.
rtcd
.
idct
.
iwalsh16
=
vp8_short_inv_walsh4x4_c
;
pbi
->
idct_add
=
vp
8
_dequant_idct_add
;
pbi
->
dc_idct_add
=
vp
8
_dequant_dc_idct_add
;
pbi
->
dc_idct_add_y_block
=
vp
8
_dequant_dc_idct_add_y_block
;
pbi
->
idct_add_y_block
=
vp
8
_dequant_idct_add_y_block
;
pbi
->
idct_add_uv_block
=
vp
8
_dequant_idct_add_uv_block
;
pbi
->
idct_add
=
vp
9
_dequant_idct_add
;
pbi
->
dc_idct_add
=
vp
9
_dequant_dc_idct_add
;
pbi
->
dc_idct_add_y_block
=
vp
9
_dequant_dc_idct_add_y_block
;
pbi
->
idct_add_y_block
=
vp
9
_dequant_idct_add_y_block
;
pbi
->
idct_add_uv_block
=
vp
9
_dequant_idct_add_uv_block
;
}
#else
pbi
->
idct_add
=
vp
8
_dequant_idct_add
;
pbi
->
dc_idct_add
=
vp
8
_dequant_dc_idct_add
;
pbi
->
dc_idct_add_y_block
=
vp
8
_dequant_dc_idct_add_y_block
;
pbi
->
idct_add_y_block
=
vp
8
_dequant_idct_add_y_block
;
pbi
->
idct_add_uv_block
=
vp
8
_dequant_idct_add_uv_block
;
pbi
->
idct_add
=
vp
9
_dequant_idct_add
;
pbi
->
dc_idct_add
=
vp
9
_dequant_dc_idct_add
;
pbi
->
dc_idct_add_y_block
=
vp
9
_dequant_dc_idct_add_y_block
;
pbi
->
idct_add_y_block
=
vp
9
_dequant_idct_add_y_block
;
pbi
->
idct_add_uv_block
=
vp
9
_dequant_idct_add_uv_block
;
#endif
for
(
i
=
16
;
i
<
24
;
i
++
)
{
...
...
@@ -226,7 +226,7 @@ static void decode_macroblock(VP8D_COMP *pbi, MACROBLOCKD *xd,
mode
=
xd
->
mode_info_context
->
mbmi
.
mode
;
if
(
xd
->
mode_info_context
->
mbmi
.
mb_skip_coeff
)
{
vp
8
_reset_mb_tokens_context
(
xd
);
vp
9
_reset_mb_tokens_context
(
xd
);
#if CONFIG_SUPERBLOCKS
if
(
xd
->
mode_info_context
->
mbmi
.
encoded_as_sb
&&
(
mb_col
<
pc
->
mb_cols
-
1
||
mb_row
<
pc
->
mb_rows
-
1
))
{
...
...
@@ -234,7 +234,7 @@ static void decode_macroblock(VP8D_COMP *pbi, MACROBLOCKD *xd,
xd
->
above_context
++
;
if
(
mb_row
<
pc
->
mb_rows
-
1
)
xd
->
left_context
++
;
vp
8
_reset_mb_tokens_context
(
xd
);
vp
9
_reset_mb_tokens_context
(
xd
);
if
(
mb_col
<
pc
->
mb_cols
-
1
)
xd
->
above_context
--
;
if
(
mb_row
<
pc
->
mb_rows
-
1
)
...
...
@@ -247,11 +247,11 @@ static void decode_macroblock(VP8D_COMP *pbi, MACROBLOCKD *xd,
xd
->
eobs
[
i
]
=
0
;
}
if
(
tx_size
==
TX_16X16
)
{
eobtotal
=
vp
8
_decode_mb_tokens_16x16
(
pbi
,
xd
,
bc
);
eobtotal
=
vp
9
_decode_mb_tokens_16x16
(
pbi
,
xd
,
bc
);
}
else
if
(
tx_size
==
TX_8X8
)
{
eobtotal
=
vp
8
_decode_mb_tokens_8x8
(
pbi
,
xd
,
bc
);
eobtotal
=
vp
9
_decode_mb_tokens_8x8
(
pbi
,
xd
,
bc
);
}
else
{
eobtotal
=
vp
8
_decode_mb_tokens
(
pbi
,
xd
,
bc
);
eobtotal
=
vp
9
_decode_mb_tokens
(
pbi
,
xd
,
bc
);
}
}
...
...
@@ -330,16 +330,16 @@ static void decode_macroblock(VP8D_COMP *pbi, MACROBLOCKD *xd,
if
(
xd
->
mode_info_context
->
mbmi
.
txfm_size
==
TX_8X8
)
{
tx_type
=
get_tx_type
(
xd
,
&
xd
->
block
[
idx
]);
if
(
tx_type
!=
DCT_DCT
)
{
vp
8
_ht_dequant_idct_add_8x8_c
(
tx_type
,
vp
9
_ht_dequant_idct_add_8x8_c
(
tx_type
,
q
,
dq
,
pre
,
dst
,
16
,
stride
);
}
else
{
vp
8
_dequant_idct_add_8x8_c
(
q
,
dq
,
pre
,
dst
,
16
,
stride
);
vp
9
_dequant_idct_add_8x8_c
(
q
,
dq
,
pre
,
dst
,
16
,
stride
);
}
q
+=
64
;
}
else
{
for
(
j
=
0
;
j
<
4
;
j
++
)
{
b
=
&
xd
->
block
[
ib
+
iblock
[
j
]];
vp
8
_dequant_idct_add
(
b
->
qcoeff
,
b
->
dequant
,
b
->
predictor
,
vp
9
_dequant_idct_add
(
b
->
qcoeff
,
b
->
dequant
,
b
->
predictor
,
*
(
b
->
base_dst
)
+
b
->
dst
,
16
,
b
->
dst_stride
);
}
}
...
...
@@ -370,17 +370,17 @@ static void decode_macroblock(VP8D_COMP *pbi, MACROBLOCKD *xd,
tx_type
=
get_tx_type
(
xd
,
b
);
if
(
tx_type
!=
DCT_DCT
)
{
vp
8
_ht_dequant_idct_add_c
(
tx_type
,
b
->
qcoeff
,
vp
9
_ht_dequant_idct_add_c
(
tx_type
,
b
->
qcoeff
,
b
->
dequant
,
b
->
predictor
,
*
(
b
->
base_dst
)
+
b
->
dst
,
16
,
b
->
dst_stride
);
}
else
{
vp
8
_dequant_idct_add
(
b
->
qcoeff
,
b
->
dequant
,
b
->
predictor
,
vp
9
_dequant_idct_add
(
b
->
qcoeff
,
b
->
dequant
,
b
->
predictor
,
*
(
b
->
base_dst
)
+
b
->
dst
,
16
,
b
->
dst_stride
);
}
}
}
else
if
(
mode
==
SPLITMV
)
{
if
(
tx_size
==
TX_8X8
)
{
vp
8
_dequant_idct_add_y_block_8x8
(
xd
->
qcoeff
,
xd
->
block
[
0
].
dequant
,
vp
9
_dequant_idct_add_y_block_8x8
(
xd
->
qcoeff
,
xd
->
block
[
0
].
dequant
,
xd
->
predictor
,
xd
->
dst
.
y_buffer
,
xd
->
dst
.
y_stride
,
xd
->
eobs
,
xd
);
}
else
{
...
...
@@ -395,11 +395,11 @@ static void decode_macroblock(VP8D_COMP *pbi, MACROBLOCKD *xd,
BLOCKD
*
bd
=
&
xd
->
block
[
0
];
tx_type
=
get_tx_type
(
xd
,
bd
);
if
(
tx_type
!=
DCT_DCT
)
{
vp
8
_ht_dequant_idct_add_16x16_c
(
tx_type
,
xd
->
qcoeff
,
vp
9
_ht_dequant_idct_add_16x16_c
(
tx_type
,
xd
->
qcoeff
,
xd
->
block
[
0
].
dequant
,
xd
->
predictor
,
xd
->
dst
.
y_buffer
,
16
,
xd
->
dst
.
y_stride
);
}
else
{
vp
8
_dequant_idct_add_16x16
(
xd
->
qcoeff
,
xd
->
block
[
0
].
dequant
,
vp
9
_dequant_idct_add_16x16
(
xd
->
qcoeff
,
xd
->
block
[
0
].
dequant
,
xd
->
predictor
,
xd
->
dst
.
y_buffer
,
16
,
xd
->
dst
.
y_stride
);
}
...
...
@@ -424,18 +424,18 @@ static void decode_macroblock(VP8D_COMP *pbi, MACROBLOCKD *xd,
xd
->
mode_info_context
+=
(
n
&
1
);
xd
->
mode_info_context
+=
(
n
>>
1
)
*
pc
->
mode_info_stride
;
if
(
!
orig_skip_flag
)
{
eobtotal
=
vp
8
_decode_mb_tokens_8x8
(
pbi
,
xd
,
bc
);
eobtotal
=
vp
9
_decode_mb_tokens_8x8
(
pbi
,
xd
,
bc
);
if
(
eobtotal
==
0
)
// skip loopfilter
xd
->
mode_info_context
->
mbmi
.
mb_skip_coeff
=
1
;
}
else
{
vp
8
_reset_mb_tokens_context
(
xd
);
vp
9
_reset_mb_tokens_context
(
xd
);
}
}
if
(
xd
->
mode_info_context
->
mbmi
.
mb_skip_coeff
)
continue
;
// only happens for SBs, which are already in dest buffer
#endif
vp
8
_dequantize_b_2x2
(
b
);
vp
9
_dequantize_b_2x2
(
b
);
IDCT_INVOKE
(
RTCD_VTABLE
(
idct
),
ihaar2
)(
&
b
->
dqcoeff
[
0
],
b
->
diff
,
8
);
((
int
*
)
b
->
qcoeff
)[
0
]
=
0
;
// 2nd order block are set to 0 after inverse transform
((
int
*
)
b
->
qcoeff
)[
1
]
=
0
;
...
...
@@ -447,19 +447,19 @@ static void decode_macroblock(VP8D_COMP *pbi, MACROBLOCKD *xd,
((
int
*
)
b
->
qcoeff
)[
7
]
=
0
;
#if CONFIG_SUPERBLOCKS
if
(
xd
->
mode_info_context
->
mbmi
.
encoded_as_sb
)
{
vp
8
_dequant_dc_idct_add_y_block_8x8_inplace_c
(
xd
->
qcoeff
,
vp
9
_dequant_dc_idct_add_y_block_8x8_inplace_c
(
xd
->
qcoeff
,
xd
->
block
[
0
].
dequant
,
xd
->
dst
.
y_buffer
+
(
n
>>
1
)
*
16
*
xd
->
dst
.
y_stride
+
(
n
&
1
)
*
16
,
xd
->
dst
.
y_stride
,
xd
->
eobs
,
xd
->
block
[
24
].
diff
,
xd
);
// do UV inline also
vp
8
_dequant_idct_add_uv_block_8x8_inplace_c
(
xd
->
qcoeff
+
16
*
16
,
vp
9
_dequant_idct_add_uv_block_8x8_inplace_c
(
xd
->
qcoeff
+
16
*
16
,
xd
->
block
[
16
].
dequant
,
xd
->
dst
.
u_buffer
+
(
n
>>
1
)
*
8
*
xd
->
dst
.
uv_stride
+
(
n
&
1
)
*
8
,
xd
->
dst
.
v_buffer
+
(
n
>>
1
)
*
8
*
xd
->
dst
.
uv_stride
+
(
n
&
1
)
*
8
,
xd
->
dst
.
uv_stride
,
xd
->
eobs
+
16
,
xd
);
}
else
#endif
vp
8
_dequant_dc_idct_add_y_block_8x8
(
xd
->
qcoeff
,
vp
9
_dequant_dc_idct_add_y_block_8x8
(
xd
->
qcoeff
,
xd
->
block
[
0
].
dequant
,
xd
->
predictor
,
xd
->
dst
.
y_buffer
,
xd
->
dst
.
y_stride
,
xd
->
eobs
,
xd
->
block
[
24
].
diff
,
xd
);
#if CONFIG_SUPERBLOCKS
...
...
@@ -467,7 +467,7 @@ static void decode_macroblock(VP8D_COMP *pbi, MACROBLOCKD *xd,
xd
->
mode_info_context
=
orig
;
#endif
}
else
{
vp
8
_dequantize_b
(
b
);
vp
9
_dequantize_b
(
b
);
if
(
xd
->
eobs
[
24
]
>
1
)
{
IDCT_INVOKE
(
RTCD_VTABLE
(
idct
),
iwalsh16
)(
&
b
->
dqcoeff
[
0
],
b
->
diff
);
((
int
*
)
b
->
qcoeff
)[
0
]
=
0
;
...
...
@@ -497,7 +497,7 @@ static void decode_macroblock(VP8D_COMP *pbi, MACROBLOCKD *xd,
xd
->
mode_info_context
->
mbmi
.
mode
!=
SPLITMV
)
||
tx_size
==
TX_16X16
)
vp
8
_dequant_idct_add_uv_block_8x8
vp
9
_dequant_idct_add_uv_block_8x8
(
xd
->
qcoeff
+
16
*
16
,
xd
->
block
[
16
].
dequant
,
xd
->
predictor
+
16
*
16
,
xd
->
dst
.
u_buffer
,
xd
->
dst
.
v_buffer
,
xd
->
dst
.
uv_stride
,
xd
->
eobs
+
16
,
xd
);
//
...
...
@@ -610,7 +610,7 @@ decode_sb_row(VP8D_COMP *pbi, VP8_COMMON *pc, int mbrow, MACROBLOCKD *xd,
if
(
i
)
mi
->
mbmi
.
encoded_as_sb
=
0
;
#endif
vp
x
_decode_mb_mode_mv
(
pbi
,
xd
,
mb_row
,
mb_col
,
bc
);
vp
9
_decode_mb_mode_mv
(
pbi
,
xd
,
mb_row
,
mb_col
,
bc
);
update_blockd_bmi
(
xd
);
...
...
@@ -729,7 +729,7 @@ static void setup_token_decoder(VP8D_COMP *pbi,
"%d length"
,
1
);
}
if
(
vp
8
dx_start_decode
(
bool_decoder
,
partition
,
partition_size
))
if
(
vp
9
dx_start_decode
(
bool_decoder
,
partition
,
partition_size
))
vpx_internal_error
(
&
pc
->
error
,
VPX_CODEC_MEM_ERROR
,
"Failed to allocate bool decoder %d"
,
1
);
}
...
...
@@ -897,7 +897,7 @@ static void read_coef_probs(VP8D_COMP *pbi, BOOL_DECODER* const bc) {
}
}
int
vp
8
_decode_frame
(
VP8D_COMP
*
pbi
)
{
int
vp
9
_decode_frame
(
VP8D_COMP
*
pbi
)
{
BOOL_DECODER
header_bc
,
residual_bc
;
VP8_COMMON
*
const
pc
=
&
pbi
->
common
;
MACROBLOCKD
*
const
xd
=
&
pbi
->
mb
;
...
...
@@ -986,7 +986,7 @@ int vp8_decode_frame(VP8D_COMP *pbi) {
init_frame
(
pbi
);
if
(
vp
8
dx_start_decode
(
&
header_bc
,
data
,
first_partition_length_in_bytes
))
if
(
vp
9
dx_start_decode
(
&
header_bc
,
data
,
first_partition_length_in_bytes
))
vpx_internal_error
(
&
pc
->
error
,
VPX_CODEC_MEM_ERROR
,
"Failed to allocate bool decoder 0"
);
if
(
pc
->
frame_type
==
KEY_FRAME
)
{
...
...
@@ -1143,7 +1143,7 @@ int vp8_decode_frame(VP8D_COMP *pbi) {
pc
->
uvac_delta_q
=
get_delta_q
(
&
header_bc
,
pc
->
uvac_delta_q
,
&
q_update
);
if
(
q_update
)
vp
8
cx_init_de_quantizer
(
pbi
);
vp
9
cx_init_de_quantizer
(
pbi
);
/* MB level dequantizer setup */
mb_init_dequantizer
(
pbi
,
&
pbi
->
mb
);
...
...
@@ -1274,7 +1274,7 @@ int vp8_decode_frame(VP8D_COMP *pbi) {
/* Read the mb_no_coeff_skip flag */
pc
->
mb_no_coeff_skip
=
(
int
)
vp8_read_bit
(
&
header_bc
);
vp
x
_decode_mode_mvs_init
(
pbi
,
&
header_bc
);
vp
9
_decode_mode_mvs_init
(
pbi
,
&
header_bc
);
vpx_memset
(
pc
->
above_context
,
0
,
sizeof
(
ENTROPY_CONTEXT_PLANES
)
*
pc
->
mb_cols
);
...
...
vp8/decoder/dequantize.c
View file @
0d53fc26
...
...
@@ -29,7 +29,7 @@ extern void vp8_short_inv_walsh4x4_1_x8_c(short *input, short *output, int pitch
extern
int
dec_debug
;
#endif
void
vp
8
_dequantize_b_c
(
BLOCKD
*
d
)
{
void
vp
9
_dequantize_b_c
(
BLOCKD
*
d
)
{
int
i
;
short
*
DQ
=
d
->
dqcoeff
;
...
...
@@ -42,7 +42,7 @@ void vp8_dequantize_b_c(BLOCKD *d) {
}
void
vp
8
_ht_dequant_idct_add_c
(
TX_TYPE
tx_type
,
short
*
input
,
short
*
dq
,
void
vp
9
_ht_dequant_idct_add_c
(
TX_TYPE
tx_type
,
short
*
input
,
short
*
dq
,
unsigned
char
*
pred
,
unsigned
char
*
dest
,
int
pitch
,
int
stride
)
{
short
output
[
16
];
...
...
@@ -77,7 +77,7 @@ void vp8_ht_dequant_idct_add_c(TX_TYPE tx_type, short *input, short *dq,
}
}
void
vp
8
_ht_dequant_idct_add_8x8_c
(
TX_TYPE
tx_type
,
short
*
input
,
short
*
dq
,
void
vp
9
_ht_dequant_idct_add_8x8_c
(
TX_TYPE
tx_type
,
short
*
input
,
short
*
dq
,
unsigned
char
*
pred
,
unsigned
char
*
dest
,
int
pitch
,
int
stride
)
{
short
output
[
64
];
...
...
@@ -121,7 +121,7 @@ void vp8_ht_dequant_idct_add_8x8_c(TX_TYPE tx_type, short *input, short *dq,
}
}
void
vp
8
_dequant_idct_add_c
(
short
*
input
,
short
*
dq
,
unsigned
char
*
pred
,
void
vp
9
_dequant_idct_add_c
(
short
*
input
,
short
*
dq
,
unsigned
char
*
pred
,
unsigned
char
*
dest
,
int
pitch
,
int
stride
)
{
short
output
[
16
];
short
*
diff_ptr
=
output
;
...
...
@@ -156,7 +156,7 @@ void vp8_dequant_idct_add_c(short *input, short *dq, unsigned char *pred,
}
}
void
vp
8
_dequant_dc_idct_add_c
(
short
*
input
,
short
*
dq
,
unsigned
char
*
pred
,
void
vp
9
_dequant_dc_idct_add_c
(
short
*
input
,
short
*
dq
,
unsigned
char
*
pred
,
unsigned
char
*
dest
,
int
pitch
,
int
stride
,
int
Dc
)
{
int
i
;
...
...
@@ -195,7 +195,7 @@ void vp8_dequant_dc_idct_add_c(short *input, short *dq, unsigned char *pred,
}