Skip to content
GitLab
Menu
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
Xiph.Org
aom-rav1e
Commits
89ee68b1
Commit
89ee68b1
authored
Feb 28, 2012
by
Yaowu Xu
Browse files
Merge t8x8 experiments
Change-Id: I8e9b6b154e1a0d0cb42d596366380d69c00ac15f
parent
3ceb4310
Changes
40
Hide whitespace changes
Inline
Side-by-side
vp8/common/alloccommon.c
View file @
89ee68b1
...
...
@@ -209,9 +209,7 @@ void vp8_create_common(VP8_COMMON *oci)
vp8_default_bmode_probs
(
oci
->
fc
.
bmode_prob
);
#if CONFIG_T8X8
oci
->
txfm_mode
=
ONLY_4X4
;
#endif
oci
->
mb_no_coeff_skip
=
1
;
oci
->
comp_pred_mode
=
HYBRID_PREDICTION
;
oci
->
no_lpf
=
0
;
...
...
vp8/common/blockd.c
View file @
89ee68b1
...
...
@@ -22,7 +22,6 @@ const unsigned char vp8_block2above[25] =
0
,
1
,
2
,
3
,
0
,
1
,
2
,
3
,
0
,
1
,
2
,
3
,
0
,
1
,
2
,
3
,
4
,
5
,
4
,
5
,
6
,
7
,
6
,
7
,
8
};
#if CONFIG_T8X8
const
unsigned
char
vp8_block2left_8x8
[
25
]
=
{
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
2
,
2
,
2
,
2
,
2
,
2
,
2
,
2
,
4
,
4
,
4
,
4
,
6
,
6
,
6
,
6
,
8
...
...
@@ -31,6 +30,4 @@ const unsigned char vp8_block2above_8x8[25] =
{
0
,
0
,
0
,
0
,
2
,
2
,
2
,
2
,
0
,
0
,
0
,
0
,
2
,
2
,
2
,
2
,
4
,
4
,
4
,
4
,
6
,
6
,
6
,
6
,
8
};
#endif
vp8/common/blockd.h
View file @
89ee68b1
...
...
@@ -183,9 +183,7 @@ typedef struct
MB_PREDICTION_MODE
second_mode
,
second_uv_mode
;
#endif
MV_REFERENCE_FRAME
ref_frame
,
second_ref_frame
;
#if CONFIG_T8X8
TX_SIZE
txfm_size
;
#endif
int_mv
mv
,
second_mv
;
unsigned
char
partitioning
;
unsigned
char
mb_skip_coeff
;
/* does this mb has coefficients at all, 1=no coefficients, 0=need decode tokens */
...
...
vp8/common/coefupdateprobs.h
View file @
89ee68b1
...
...
@@ -183,7 +183,6 @@ const vp8_prob vp8_coef_update_probs [BLOCK_TYPES] [COEF_BANDS] [PREV_COEF_CONTE
},
},
};
#if CONFIG_T8X8
const
vp8_prob
vp8_coef_update_probs_8x8
[
BLOCK_TYPES
]
[
COEF_BANDS
]
[
PREV_COEF_CONTEXTS
]
...
...
@@ -359,4 +358,3 @@ const vp8_prob vp8_coef_update_probs_8x8 [BLOCK_TYPES]
},
};
#endif
\ No newline at end of file
vp8/common/entropy.c
View file @
89ee68b1
...
...
@@ -60,7 +60,6 @@ DECLARE_ALIGNED(16, const int, vp8_default_zig_zag1d[16]) =
9
,
12
,
13
,
10
,
7
,
11
,
14
,
15
,
};
#if CONFIG_T8X8
DECLARE_ALIGNED
(
64
,
cuchar
,
vp8_coef_bands_8x8
[
64
])
=
{
0
,
1
,
2
,
3
,
5
,
4
,
4
,
5
,
5
,
3
,
6
,
3
,
5
,
4
,
6
,
6
,
6
,
5
,
5
,
6
,
6
,
6
,
6
,
6
,
...
...
@@ -77,7 +76,6 @@ DECLARE_ALIGNED(64, const int, vp8_default_zig_zag1d_8x8[64]) =
35
,
42
,
49
,
56
,
57
,
50
,
43
,
36
,
29
,
22
,
15
,
23
,
30
,
37
,
44
,
51
,
58
,
59
,
52
,
45
,
38
,
31
,
39
,
46
,
53
,
60
,
61
,
54
,
47
,
55
,
62
,
63
,
};
#endif
DECLARE_ALIGNED
(
16
,
const
short
,
vp8_default_inv_zig_zag
[
16
])
=
{
...
...
@@ -88,9 +86,7 @@ DECLARE_ALIGNED(16, const short, vp8_default_inv_zig_zag[16]) =
};
DECLARE_ALIGNED
(
16
,
short
,
vp8_default_zig_zag_mask
[
16
]);
#if CONFIG_T8X8
DECLARE_ALIGNED
(
64
,
short
,
vp8_default_zig_zag_mask_8x8
[
64
]);
//int64_t
#endif
/* Array indices are identical to previously-existing CONTEXT_NODE indices */
...
...
@@ -132,12 +128,10 @@ void vp8_init_scan_order_mask()
{
vp8_default_zig_zag_mask
[
vp8_default_zig_zag1d
[
i
]]
=
1
<<
i
;
}
#if CONFIG_T8X8
for
(
i
=
0
;
i
<
64
;
i
++
)
{
vp8_default_zig_zag_mask_8x8
[
vp8_default_zig_zag1d_8x8
[
i
]]
=
1
<<
i
;
}
#endif
}
static
void
init_bit_tree
(
vp8_tree_index
*
p
,
int
n
)
...
...
@@ -184,12 +178,9 @@ vp8_extra_bit_struct vp8_extra_bits[12] =
void
vp8_default_coef_probs
(
VP8_COMMON
*
pc
)
{
#if CONFIG_T8X8
int
h
;
#endif
vpx_memcpy
(
pc
->
fc
.
coef_probs
,
default_coef_probs
,
sizeof
(
default_coef_probs
));
#if CONFIG_T8X8
h
=
0
;
do
{
...
...
@@ -213,7 +204,7 @@ void vp8_default_coef_probs(VP8_COMMON *pc)
while
(
++
i
<
COEF_BANDS
);
}
while
(
++
h
<
BLOCK_TYPES
);
#endif
}
void
vp8_coef_tree_initialize
()
...
...
vp8/common/entropy.h
View file @
89ee68b1
...
...
@@ -63,9 +63,7 @@ extern vp8_extra_bit_struct vp8_extra_bits[12]; /* indexed by token value */
#define COEF_BANDS 8
extern
DECLARE_ALIGNED
(
16
,
const
unsigned
char
,
vp8_coef_bands
[
16
]);
#if CONFIG_T8X8
extern
DECLARE_ALIGNED
(
64
,
const
unsigned
char
,
vp8_coef_bands_8x8
[
64
]);
#endif
/* Inside dimension is 3-valued measure of nearby complexity, that is,
the extent to which nearby coefficients are nonzero. For the first
...
...
@@ -89,18 +87,14 @@ extern DECLARE_ALIGNED(64, const unsigned char, vp8_coef_bands_8x8[64]);
extern
DECLARE_ALIGNED
(
16
,
const
unsigned
char
,
vp8_prev_token_class
[
MAX_ENTROPY_TOKENS
]);
extern
const
vp8_prob
vp8_coef_update_probs
[
BLOCK_TYPES
]
[
COEF_BANDS
]
[
PREV_COEF_CONTEXTS
]
[
ENTROPY_NODES
];
#if CONFIG_T8X8
extern
const
vp8_prob
vp8_coef_update_probs_8x8
[
BLOCK_TYPES
]
[
COEF_BANDS
]
[
PREV_COEF_CONTEXTS
]
[
ENTROPY_NODES
];
#endif
struct
VP8Common
;
void
vp8_default_coef_probs
(
struct
VP8Common
*
);
extern
DECLARE_ALIGNED
(
16
,
const
int
,
vp8_default_zig_zag1d
[
16
]);
extern
DECLARE_ALIGNED
(
16
,
const
short
,
vp8_default_inv_zig_zag
[
16
]);
extern
short
vp8_default_zig_zag_mask
[
16
];
#if CONFIG_T8X8
extern
DECLARE_ALIGNED
(
64
,
const
int
,
vp8_default_zig_zag1d_8x8
[
64
]);
extern
short
vp8_default_zig_zag_mask_8x8
[
64
];
//int64_t
#endif
void
vp8_coef_tree_initialize
(
void
);
#endif
vp8/common/generic/systemdependent.c
View file @
89ee68b1
...
...
@@ -30,11 +30,9 @@ void vp8_machine_specific_config(VP8_COMMON *ctx)
rtcd
->
idct
.
idct1_scalar_add
=
vp8_dc_only_idct_add_c
;
rtcd
->
idct
.
iwalsh1
=
vp8_short_inv_walsh4x4_1_c
;
rtcd
->
idct
.
iwalsh16
=
vp8_short_inv_walsh4x4_c
;
#if CONFIG_T8X8
rtcd
->
idct
.
idct8
=
vp8_short_idct8x8_c
;
rtcd
->
idct
.
idct1_scalar_add_8x8
=
vp8_dc_only_idct_add_8x8_c
;
rtcd
->
idct
.
ihaar2
=
vp8_short_ihaar2x2_c
;
#endif
rtcd
->
recon
.
copy16x16
=
vp8_copy_mem16x16_c
;
rtcd
->
recon
.
copy8x8
=
vp8_copy_mem8x8_c
;
rtcd
->
recon
.
avg16x16
=
vp8_avg_mem16x16_c
;
...
...
vp8/common/idct.h
View file @
89ee68b1
...
...
@@ -31,7 +31,7 @@
#include
"arm/idct_arm.h"
#endif
#if CONFIG_T8X8
#ifndef vp8_idct_idct8
#define vp8_idct_idct8 vp8_short_idct8x8_c
#endif
...
...
@@ -57,7 +57,7 @@ extern prototype_idct(vp8_idct_ihaar2_1);
#endif
extern
prototype_idct_scalar_add
(
vp8_idct_idct1_scalar_add_8x8
);
#endif
#ifndef vp8_idct_idct1
#define vp8_idct_idct1 vp8_short_idct4x4llm_1_c
...
...
@@ -98,13 +98,11 @@ typedef struct
vp8_second_order_fn_t
iwalsh1
;
vp8_second_order_fn_t
iwalsh16
;
#if CONFIG_T8X8
vp8_idct_fn_t
idct8
;
vp8_idct_fn_t
idct8_1
;
vp8_idct_scalar_add_fn_t
idct1_scalar_add_8x8
;
vp8_idct_fn_t
ihaar2
;
vp8_idct_fn_t
ihaar2_1
;
#endif
}
vp8_idct_rtcd_vtable_t
;
#if CONFIG_RUNTIME_CPU_DETECT
...
...
vp8/common/idctllm.c
View file @
89ee68b1
...
...
@@ -200,7 +200,7 @@ void vp8_short_inv_walsh4x4_1_c(short *input, short *output)
}
}
#if CONFIG_T8X8
void
vp8_dc_only_idct_add_8x8_c
(
short
input_dc
,
unsigned
char
*
pred_ptr
,
unsigned
char
*
dst_ptr
,
...
...
@@ -408,4 +408,3 @@ void vp8_short_ihaar2x2_c(short *input, short *output, int pitch)
op
[
8
]
=
(
ip
[
0
]
-
ip
[
1
]
-
ip
[
4
]
+
ip
[
8
])
>>
1
;
}
#endif
vp8/common/invtrans.c
View file @
89ee68b1
...
...
@@ -24,7 +24,6 @@ static void recon_dcblock(MACROBLOCKD *x)
}
}
#if CONFIG_T8X8
static
void
recon_dcblock_8x8
(
MACROBLOCKD
*
x
)
{
BLOCKD
*
b
=
&
x
->
block
[
24
];
//for coeff 0, 2, 8, 10
...
...
@@ -34,7 +33,7 @@ static void recon_dcblock_8x8(MACROBLOCKD *x)
x
->
block
[
12
].
dqcoeff
[
0
]
=
b
->
diff
[
8
];
}
#endif
void
vp8_inverse_transform_b
(
const
vp8_idct_rtcd_vtable_t
*
rtcd
,
BLOCKD
*
b
,
int
pitch
)
{
...
...
@@ -99,7 +98,7 @@ void vp8_inverse_transform_mb(const vp8_idct_rtcd_vtable_t *rtcd, MACROBLOCKD *x
}
#if CONFIG_T8X8
void
vp8_inverse_transform_b_8x8
(
const
vp8_idct_rtcd_vtable_t
*
rtcd
,
short
*
input_dqcoeff
,
short
*
output_coeff
,
int
pitch
)
//pay attention to use when 8x8
{
// int b,i;
...
...
@@ -171,4 +170,4 @@ void vp8_inverse_transform_mb_8x8(const vp8_idct_rtcd_vtable_t *rtcd, MACROBLOCK
}
}
#endif
vp8/common/invtrans.h
View file @
89ee68b1
...
...
@@ -20,11 +20,9 @@ extern void vp8_inverse_transform_mb(const vp8_idct_rtcd_vtable_t *rtcd, MACROBL
extern
void
vp8_inverse_transform_mby
(
const
vp8_idct_rtcd_vtable_t
*
rtcd
,
MACROBLOCKD
*
x
);
extern
void
vp8_inverse_transform_mbuv
(
const
vp8_idct_rtcd_vtable_t
*
rtcd
,
MACROBLOCKD
*
x
);
#if CONFIG_T8X8
extern
void
vp8_inverse_transform_b_8x8
(
const
vp8_idct_rtcd_vtable_t
*
rtcd
,
short
*
input_dqcoeff
,
short
*
output_coeff
,
int
pitch
);
extern
void
vp8_inverse_transform_mb_8x8
(
const
vp8_idct_rtcd_vtable_t
*
rtcd
,
MACROBLOCKD
*
x
);
extern
void
vp8_inverse_transform_mby_8x8
(
const
vp8_idct_rtcd_vtable_t
*
rtcd
,
MACROBLOCKD
*
x
);
extern
void
vp8_inverse_transform_mbuv_8x8
(
const
vp8_idct_rtcd_vtable_t
*
rtcd
,
MACROBLOCKD
*
x
);
#endif
#endif
vp8/common/loopfilter.c
View file @
89ee68b1
...
...
@@ -72,7 +72,6 @@ void vp8_loop_filter_bh_c(unsigned char *y_ptr, unsigned char *u_ptr,
vp8_loop_filter_horizontal_edge_c
(
v_ptr
+
4
*
uv_stride
,
uv_stride
,
lfi
->
blim
,
lfi
->
lim
,
lfi
->
hev_thr
,
1
);
}
#if CONFIG_T8X8
void
vp8_loop_filter_bh8x8_c
(
unsigned
char
*
y_ptr
,
unsigned
char
*
u_ptr
,
unsigned
char
*
v_ptr
,
int
y_stride
,
int
uv_stride
,
loop_filter_info
*
lfi
)
...
...
@@ -80,7 +79,6 @@ void vp8_loop_filter_bh8x8_c(unsigned char *y_ptr, unsigned char *u_ptr,
vp8_mbloop_filter_horizontal_edge_c
(
y_ptr
+
8
*
y_stride
,
y_stride
,
lfi
->
blim
,
lfi
->
lim
,
lfi
->
hev_thr
,
2
);
}
#endif
void
vp8_loop_filter_bhs_c
(
unsigned
char
*
y_ptr
,
int
y_stride
,
const
unsigned
char
*
blimit
)
...
...
@@ -106,7 +104,6 @@ void vp8_loop_filter_bv_c(unsigned char *y_ptr, unsigned char *u_ptr,
vp8_loop_filter_vertical_edge_c
(
v_ptr
+
4
,
uv_stride
,
lfi
->
blim
,
lfi
->
lim
,
lfi
->
hev_thr
,
1
);
}
#if CONFIG_T8X8
void
vp8_loop_filter_bv8x8_c
(
unsigned
char
*
y_ptr
,
unsigned
char
*
u_ptr
,
unsigned
char
*
v_ptr
,
int
y_stride
,
int
uv_stride
,
loop_filter_info
*
lfi
)
...
...
@@ -115,8 +112,6 @@ void vp8_loop_filter_bv8x8_c(unsigned char *y_ptr, unsigned char *u_ptr,
y_ptr
+
8
,
y_stride
,
lfi
->
blim
,
lfi
->
lim
,
lfi
->
hev_thr
,
2
);
}
#endif
void
vp8_loop_filter_bvs_c
(
unsigned
char
*
y_ptr
,
int
y_stride
,
const
unsigned
char
*
blimit
)
{
...
...
@@ -348,9 +343,7 @@ void vp8_loop_filter_frame
const
int
mode_index
=
lfi_n
->
mode_lf_lut
[
mode_info_context
->
mbmi
.
mode
];
const
int
seg
=
mode_info_context
->
mbmi
.
segment_id
;
const
int
ref_frame
=
mode_info_context
->
mbmi
.
ref_frame
;
#if CONFIG_T8X8
int
tx_type
=
mode_info_context
->
mbmi
.
txfm_size
;
#endif
filter_level
=
lfi_n
->
lvl
[
seg
][
ref_frame
][
mode_index
];
if
(
filter_level
)
...
...
@@ -369,12 +362,10 @@ void vp8_loop_filter_frame
if
(
!
skip_lf
)
{
#if CONFIG_T8X8
if
(
tx_type
==
TX_8X8
)
vp8_loop_filter_bv8x8_c
(
y_ptr
,
u_ptr
,
v_ptr
,
post
->
y_stride
,
post
->
uv_stride
,
&
lfi
);
else
#endif
LF_INVOKE
(
&
cm
->
rtcd
.
loopfilter
,
normal_b_v
)
(
y_ptr
,
u_ptr
,
v_ptr
,
post
->
y_stride
,
post
->
uv_stride
,
&
lfi
);
...
...
@@ -387,12 +378,10 @@ void vp8_loop_filter_frame
if
(
!
skip_lf
)
{
#if CONFIG_T8X8
if
(
tx_type
==
TX_8X8
)
vp8_loop_filter_bh8x8_c
(
y_ptr
,
u_ptr
,
v_ptr
,
post
->
y_stride
,
post
->
uv_stride
,
&
lfi
);
else
#endif
LF_INVOKE
(
&
cm
->
rtcd
.
loopfilter
,
normal_b_h
)
(
y_ptr
,
u_ptr
,
v_ptr
,
post
->
y_stride
,
post
->
uv_stride
,
&
lfi
);
}
...
...
@@ -479,9 +468,7 @@ void vp8_loop_filter_frame_yonly
const
int
mode_index
=
lfi_n
->
mode_lf_lut
[
mode_info_context
->
mbmi
.
mode
];
const
int
seg
=
mode_info_context
->
mbmi
.
segment_id
;
const
int
ref_frame
=
mode_info_context
->
mbmi
.
ref_frame
;
#if CONFIG_T8X8
int
tx_type
=
mode_info_context
->
mbmi
.
txfm_size
;
#endif
filter_level
=
lfi_n
->
lvl
[
seg
][
ref_frame
][
mode_index
];
...
...
@@ -501,12 +488,10 @@ void vp8_loop_filter_frame_yonly
if
(
!
skip_lf
)
{
#if CONFIG_T8X8
if
(
tx_type
==
TX_8X8
)
vp8_loop_filter_bv8x8_c
(
y_ptr
,
0
,
0
,
post
->
y_stride
,
0
,
&
lfi
);
else
#endif
LF_INVOKE
(
&
cm
->
rtcd
.
loopfilter
,
normal_b_v
)
(
y_ptr
,
0
,
0
,
post
->
y_stride
,
0
,
&
lfi
);
}
...
...
@@ -518,12 +503,10 @@ void vp8_loop_filter_frame_yonly
if
(
!
skip_lf
)
{
#if CONFIG_T8X8
if
(
tx_type
==
TX_8X8
)
vp8_loop_filter_bh8x8_c
(
y_ptr
,
0
,
0
,
post
->
y_stride
,
0
,
&
lfi
);
else
#endif
LF_INVOKE
(
&
cm
->
rtcd
.
loopfilter
,
normal_b_h
)
(
y_ptr
,
0
,
0
,
post
->
y_stride
,
0
,
&
lfi
);
}
...
...
vp8/common/onyxc_int.h
View file @
89ee68b1
...
...
@@ -53,9 +53,7 @@ typedef struct frame_contexts
#endif
vp8_prob
sub_mv_ref_prob
[
VP8_SUBMVREFS
-
1
];
vp8_prob
coef_probs
[
BLOCK_TYPES
]
[
COEF_BANDS
]
[
PREV_COEF_CONTEXTS
]
[
ENTROPY_NODES
];
#if CONFIG_T8X8
vp8_prob
coef_probs_8x8
[
BLOCK_TYPES
]
[
COEF_BANDS
]
[
PREV_COEF_CONTEXTS
]
[
ENTROPY_NODES
];
#endif
MV_CONTEXT
mvc
[
2
];
MV_CONTEXT
pre_mvc
[
2
];
/* not to caculate the mvcost for the frame if mvc doesn't change. */
#if CONFIG_HIGH_PRECISION_MV
...
...
@@ -84,14 +82,12 @@ typedef enum
NB_PREDICTION_TYPES
=
3
,
}
COMPPREDMODE_TYPE
;
#if CONFIG_T8X8
/* TODO: allows larger transform */
typedef
enum
{
ONLY_4X4
=
0
,
ALLOW_8X8
=
1
}
TXFM_MODE
;
#endif
/* CONFIG_T8X8 */
typedef
struct
VP8_COMMON_RTCD
{
...
...
@@ -150,9 +146,7 @@ typedef struct VP8Common
/* profile settings */
int
experimental
;
int
mb_no_coeff_skip
;
#if CONFIG_T8X8
TXFM_MODE
txfm_mode
;
#endif
COMPPREDMODE_TYPE
comp_pred_mode
;
int
no_lpf
;
int
use_bilinear_mc_filter
;
...
...
vp8/decoder/decodframe.c
View file @
89ee68b1
...
...
@@ -158,7 +158,6 @@ static void decode_macroblock(VP8D_COMP *pbi, MACROBLOCKD *xd,
MB_PREDICTION_MODE
mode
;
int
i
;
#if CONFIG_T8X8
int
tx_type
;
if
(
pbi
->
common
.
txfm_mode
==
ONLY_4X4
)
{
...
...
@@ -175,7 +174,6 @@ static void decode_macroblock(VP8D_COMP *pbi, MACROBLOCKD *xd,
}
tx_type
=
xd
->
mode_info_context
->
mbmi
.
txfm_size
;
#endif
if
(
xd
->
mode_info_context
->
mbmi
.
mb_skip_coeff
)
{
...
...
@@ -183,19 +181,14 @@ static void decode_macroblock(VP8D_COMP *pbi, MACROBLOCKD *xd,
}
else
if
(
!
vp8dx_bool_error
(
xd
->
current_bc
))
{
#if CONFIG_T8X8
for
(
i
=
0
;
i
<
25
;
i
++
)
{
xd
->
block
[
i
].
eob
=
0
;
xd
->
eobs
[
i
]
=
0
;
}
if
(
tx_type
==
TX_8X8
)
{
eobtotal
=
vp8_decode_mb_tokens_8x8
(
pbi
,
xd
);
}
else
#endif
eobtotal
=
vp8_decode_mb_tokens
(
pbi
,
xd
);
#ifdef DEC_DEBUG
if
(
dec_debug
)
{
...
...
@@ -360,7 +353,7 @@ static void decode_macroblock(VP8D_COMP *pbi, MACROBLOCKD *xd,
{
BLOCKD
*
b
=
&
xd
->
block
[
24
];
#if CONFIG_T8X8
if
(
tx_type
==
TX_8X8
)
{
DEQUANT_INVOKE
(
&
pbi
->
dequant
,
block_2x2
)(
b
);
...
...
@@ -388,11 +381,8 @@ static void decode_macroblock(VP8D_COMP *pbi, MACROBLOCKD *xd,
(
xd
->
qcoeff
,
xd
->
block
[
0
].
dequant
,
xd
->
predictor
,
xd
->
dst
.
y_buffer
,
xd
->
dst
.
y_stride
,
xd
->
eobs
,
xd
->
block
[
24
].
diff
,
xd
);
}
else
#endif
{
DEQUANT_INVOKE
(
&
pbi
->
dequant
,
block
)(
b
);
if
(
xd
->
eobs
[
24
]
>
1
)
...
...
@@ -419,18 +409,13 @@ static void decode_macroblock(VP8D_COMP *pbi, MACROBLOCKD *xd,
xd
->
dst
.
y_stride
,
xd
->
eobs
,
xd
->
block
[
24
].
diff
);
}
}
#if CONFIG_T8X8
if
(
tx_type
==
TX_8X8
)
{
DEQUANT_INVOKE
(
&
pbi
->
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
);
//
}
else
#endif
if
(
xd
->
mode_info_context
->
mbmi
.
mode
!=
I8X8_PRED
)
else
if
(
xd
->
mode_info_context
->
mbmi
.
mode
!=
I8X8_PRED
)
DEQUANT_INVOKE
(
&
pbi
->
dequant
,
idct_add_uv_block
)
(
xd
->
qcoeff
+
16
*
16
,
xd
->
block
[
16
].
dequant
,
xd
->
predictor
+
16
*
16
,
xd
->
dst
.
u_buffer
,
xd
->
dst
.
v_buffer
,
...
...
@@ -1086,9 +1071,7 @@ int vp8_decode_frame(VP8D_COMP *pbi)
}
/* Read the loop filter level and type */
#if CONFIG_T8X8
pc
->
txfm_mode
=
(
TXFM_MODE
)
vp8_read_bit
(
bc
);
#endif
pc
->
filter_type
=
(
LOOPFILTERTYPE
)
vp8_read_bit
(
bc
);
pc
->
filter_level
=
vp8_read_literal
(
bc
,
6
);
...
...
@@ -1242,7 +1225,7 @@ int vp8_decode_frame(VP8D_COMP *pbi)
}
}
}
#if CONFIG_T8X8
if
(
pbi
->
common
.
txfm_mode
==
ALLOW_8X8
&&
vp8_read_bit
(
bc
))
{
// read coef probability tree
...
...
@@ -1261,7 +1244,7 @@ int vp8_decode_frame(VP8D_COMP *pbi)
}
}
}
#endif
vpx_memcpy
(
&
xd
->
pre
,
&
pc
->
yv12_fb
[
pc
->
lst_fb_idx
],
sizeof
(
YV12_BUFFER_CONFIG
));
vpx_memcpy
(
&
xd
->
dst
,
&
pc
->
yv12_fb
[
pc
->
new_fb_idx
],
sizeof
(
YV12_BUFFER_CONFIG
));
...
...
vp8/decoder/dequantize.c
View file @
89ee68b1
...
...
@@ -17,10 +17,8 @@
extern
void
vp8_short_idct4x4llm_c
(
short
*
input
,
short
*
output
,
int
pitch
)
;
extern
void
vp8_short_idct4x4llm_1_c
(
short
*
input
,
short
*
output
,
int
pitch
);
#if CONFIG_T8X8
extern
void
vp8_short_idct8x8_c
(
short
*
input
,
short
*
output
,
int
pitch
);
extern
void
vp8_short_idct8x8_1_c
(
short
*
input
,
short
*
output
,
int
pitch
);
#endif
#ifdef DEC_DEBUG
extern
int
dec_debug
;
...
...
@@ -121,7 +119,6 @@ void vp8_dequant_dc_idct_add_c(short *input, short *dq, unsigned char *pred,
}
}
#if CONFIG_T8X8
void
vp8_dequantize_b_2x2_c
(
BLOCKD
*
d
)
{
int
i
;
...
...
@@ -330,4 +327,3 @@ void vp8_dequant_dc_idct_add_8x8_c(short *input, short *dq, unsigned char *pred,
#endif
}
#endif
\ No newline at end of file
vp8/decoder/dequantize.h
View file @
89ee68b1
...
...
@@ -42,7 +42,6 @@
unsigned char *pre, unsigned char *dst_u, \
unsigned char *dst_v, int stride, char *eobs)
#if CONFIG_T8X8
#define prototype_dequant_dc_idct_add_y_block_8x8(sym) \
void sym(short *q, short *dq, \
unsigned char *pre, unsigned char *dst, \
...
...
@@ -59,8 +58,6 @@
unsigned char *dst_v, int stride, char *eobs, \
MACROBLOCKD *xd)
#endif
#if ARCH_X86 || ARCH_X86_64
#include
"x86/dequantize_x86.h"
#endif
...
...
@@ -99,7 +96,7 @@ extern prototype_dequant_idct_add_y_block(vp8_dequant_idct_add_y_block);
#endif
extern
prototype_dequant_idct_add_uv_block
(
vp8_dequant_idct_add_uv_block
);
#if CONFIG_T8X8
#ifndef vp8_dequant_block_2x2
#define vp8_dequant_block_2x2 vp8_dequantize_b_2x2_c
#endif
...
...
@@ -130,7 +127,7 @@ extern prototype_dequant_idct_add_y_block_8x8(vp8_dequant_idct_add_y_block_8x8);
#endif
extern
prototype_dequant_idct_add_uv_block_8x8
(
vp8_dequant_idct_add_uv_block_8x8
);
#endif
typedef
prototype_dequant_block
((
*
vp8_dequant_block_fn_t
));
...
...
@@ -144,13 +141,12 @@ typedef prototype_dequant_idct_add_y_block((*vp8_dequant_idct_add_y_block_fn_t))
typedef
prototype_dequant_idct_add_uv_block
((
*
vp8_dequant_idct_add_uv_block_fn_t
));
#if CONFIG_T8X8
typedef
prototype_dequant_dc_idct_add_y_block_8x8
((
*
vp8_dequant_dc_idct_add_y_block_fn_t_8x8
));
typedef
prototype_dequant_idct_add_y_block_8x8
((
*
vp8_dequant_idct_add_y_block_fn_t_8x8
));
typedef
prototype_dequant_idct_add_uv_block_8x8
((
*
vp8_dequant_idct_add_uv_block_fn_t_8x8
));
#endif
typedef
struct
{
vp8_dequant_block_fn_t
block
;
...
...
@@ -159,14 +155,12 @@ typedef struct
vp8_dequant_dc_idct_add_y_block_fn_t
dc_idct_add_y_block
;
vp8_dequant_idct_add_y_block_fn_t
idct_add_y_block
;
vp8_dequant_idct_add_uv_block_fn_t
idct_add_uv_block
;
#if CONFIG_T8X8
vp8_dequant_block_fn_t
block_2x2
;
vp8_dequant_idct_add_fn_t
idct_add_8x8
;
vp8_dequant_dc_idct_add_fn_t
dc_idct_add_8x8
;
vp8_dequant_dc_idct_add_y_block_fn_t_8x8
dc_idct_add_y_block_8x8
;
vp8_dequant_idct_add_y_block_fn_t_8x8
idct_add_y_block_8x8
;
vp8_dequant_idct_add_uv_block_fn_t_8x8
idct_add_uv_block_8x8
;
#endif
}
vp8_dequant_rtcd_vtable_t
;
#if CONFIG_RUNTIME_CPU_DETECT
...
...
vp8/decoder/detokenize.c
View file @
89ee68b1
...
...
@@ -28,7 +28,6 @@ DECLARE_ALIGNED(16, static const unsigned char, coef_bands_x[16]) =
6
*
OCB_X
,
6
*
OCB_X
,
6
*
OCB_X
,
6
*
OCB_X
,
6
*
OCB_X
,
6
*
OCB_X
,
6
*
OCB_X
,
7
*
OCB_X
};
#if CONFIG_T8X8
DECLARE_ALIGNED
(
64
,
static
const
unsigned
char
,
coef_bands_x_8x8
[
64
])
=
{
0
*
OCB_X
,
1
*
OCB_X
,
2
*
OCB_X
,
3
*
OCB_X
,
5
*
OCB_X
,
4
*
OCB_X
,
4
*
OCB_X
,
5
*
OCB_X
,
5
*
OCB_X
,
3
*
OCB_X
,
6
*
OCB_X
,
3
*
OCB_X
,
5
*
OCB_X
,
4
*
OCB_X
,
6
*
OCB_X
,
6
*
OCB_X
,
...
...
@@ -39,7 +38,7 @@ DECLARE_ALIGNED(64, static const unsigned char, coef_bands_x_8x8[64]) = {
7
*
OCB_X
,
7
*
OCB_X
,
7
*
OCB_X
,
7
*
OCB_X
,
7
*
OCB_X
,
7
*
OCB_X
,
7
*
OCB_X
,
7
*
OCB_X
,
7
*
OCB_X
,
7
*
OCB_X
,
7
*
OCB_X
,
7
*
OCB_X
,
7
*
OCB_X
,
7
*
OCB_X
,
7
*
OCB_X
,
7
*
OCB_X
,
};
#endif
#define EOB_CONTEXT_NODE 0
#define ZERO_CONTEXT_NODE 1
#define ONE_CONTEXT_NODE 2
...
...
@@ -166,7 +165,7 @@ DECLARE_ALIGNED(16, extern const unsigned char, vp8_norm[256]);
range = range - split; \
NORMALIZE \
}
#if CONFIG_T8X8
#define DECODE_AND_LOOP_IF_ZERO_8x8_2(probability,branch) \
{ \
split = 1 + ((( probability*(range-1) ) ) >> 8); \
...
...
@@ -207,7 +206,7 @@ DECLARE_ALIGNED(16, extern const unsigned char, vp8_norm[256]);
range = range - split; \
NORMALIZE \
}
#endif
#define DECODE_SIGN_WRITE_COEFF_AND_CHECK_EXIT(val) \
DECODE_AND_APPLYSIGN(val) \
Prob = coef_probs + (ENTROPY_NODES*2); \
...
...
@@ -218,7 +217,7 @@ DECLARE_ALIGNED(16, extern const unsigned char, vp8_norm[256]);
qcoeff_ptr [ 15 ] = (INT16) v; \
goto BLOCK_FINISHED;
#if CONFIG_T8X8
#define DECODE_SIGN_WRITE_COEFF_AND_CHECK_EXIT_8x8_2(val) \
DECODE_AND_APPLYSIGN(val) \
Prob = coef_probs + (ENTROPY_NODES*2); \
...
...
@@ -237,7 +236,7 @@ DECLARE_ALIGNED(16, extern const unsigned char, vp8_norm[256]);
goto DO_WHILE_8x8; }\
qcoeff_ptr [ scan[63] ] = (INT16) v; \
goto BLOCK_FINISHED_8x8;
#endif
#define DECODE_EXTRABIT_AND_ADJUST_VAL(prob, bits_count)\
split = 1 + (((range-1) * prob) >> 8); \
...
...
@@ -255,7 +254,7 @@ DECLARE_ALIGNED(16, extern const unsigned char, vp8_norm[256]);
}\
NORMALIZE
#if CONFIG_T8X8
int
vp8_decode_mb_tokens_8x8
(
VP8D_COMP
*
dx
,
MACROBLOCKD
*
x
)
{
ENTROPY_CONTEXT
*
A
=
(
ENTROPY_CONTEXT
*
)
x
->
above_context
;
...
...
@@ -580,7 +579,7 @@ BLOCK_FINISHED_8x8:
return
eobtotal
;
}