Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
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
46dff5d2
Commit
46dff5d2
authored
Feb 15, 2013
by
Ronald S. Bultje
Browse files
Remove some Y2-related code.
Change-Id: I4f46d142c2a8d1e8a880cfac63702dcbfb999b78
parent
7755657e
Changes
28
Hide whitespace changes
Inline
Side-by-side
vp9/common/vp9_blockd.c
View file @
46dff5d2
...
...
@@ -12,15 +12,15 @@
#include "vp9/common/vp9_blockd.h"
#include "vpx_mem/vpx_mem.h"
const
uint8_t
vp9_block2left
[
TX_SIZE_MAX_SB
][
2
5
]
=
{
{
0
,
0
,
0
,
0
,
1
,
1
,
1
,
1
,
2
,
2
,
2
,
2
,
3
,
3
,
3
,
3
,
4
,
4
,
5
,
5
,
6
,
6
,
7
,
7
,
8
},
{
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
},
{
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
4
,
4
,
4
,
4
,
6
,
6
,
6
,
6
,
8
},
{
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
4
,
4
,
4
,
4
,
6
,
6
,
6
,
6
,
8
}
const
uint8_t
vp9_block2left
[
TX_SIZE_MAX_SB
][
2
4
]
=
{
{
0
,
0
,
0
,
0
,
1
,
1
,
1
,
1
,
2
,
2
,
2
,
2
,
3
,
3
,
3
,
3
,
4
,
4
,
5
,
5
,
6
,
6
,
7
,
7
},
{
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
2
,
2
,
2
,
2
,
2
,
2
,
2
,
2
,
4
,
4
,
4
,
4
,
6
,
6
,
6
,
6
},
{
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
4
,
4
,
4
,
4
,
6
,
6
,
6
,
6
},
{
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
4
,
4
,
4
,
4
,
6
,
6
,
6
,
6
}
};
const
uint8_t
vp9_block2above
[
TX_SIZE_MAX_SB
][
2
5
]
=
{
{
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
},
{
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
},
{
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
4
,
4
,
4
,
4
,
6
,
6
,
6
,
6
,
8
},
{
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
4
,
4
,
4
,
4
,
6
,
6
,
6
,
6
,
8
}
const
uint8_t
vp9_block2above
[
TX_SIZE_MAX_SB
][
2
4
]
=
{
{
0
,
1
,
2
,
3
,
0
,
1
,
2
,
3
,
0
,
1
,
2
,
3
,
0
,
1
,
2
,
3
,
4
,
5
,
4
,
5
,
6
,
7
,
6
,
7
},
{
0
,
0
,
0
,
0
,
2
,
2
,
2
,
2
,
0
,
0
,
0
,
0
,
2
,
2
,
2
,
2
,
4
,
4
,
4
,
4
,
6
,
6
,
6
,
6
},
{
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
4
,
4
,
4
,
4
,
6
,
6
,
6
,
6
},
{
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
4
,
4
,
4
,
4
,
6
,
6
,
6
,
6
}
};
vp9/common/vp9_blockd.h
View file @
46dff5d2
...
...
@@ -52,8 +52,8 @@ typedef struct {
}
POS
;
typedef
enum
PlaneType
{
PLANE_TYPE_Y_NO_DC
=
0
,
PLANE_TYPE_Y2
,
PLANE_TYPE_Y_NO_DC
_UNUSED
=
0
,
PLANE_TYPE_Y2
_UNUSED
,
PLANE_TYPE_UV
,
PLANE_TYPE_Y_WITH_DC
,
}
PLANE_TYPE
;
...
...
@@ -63,7 +63,6 @@ typedef struct {
ENTROPY_CONTEXT
y1
[
4
];
ENTROPY_CONTEXT
u
[
2
];
ENTROPY_CONTEXT
v
[
2
];
ENTROPY_CONTEXT
y2
;
}
ENTROPY_CONTEXT_PLANES
;
#define VP9_COMBINEENTROPYCONTEXTS( Dest, A, B) \
...
...
@@ -144,7 +143,6 @@ typedef enum {
#if CONFIG_LOSSLESS
#define WHT_UPSCALE_FACTOR 3
#define Y2_WHT_UPSCALE_FACTOR 2
#endif
typedef
enum
{
...
...
@@ -288,23 +286,23 @@ typedef struct blockd {
}
BLOCKD
;
typedef
struct
superblockd
{
/* 32x32 Y and 16x16 U/V
. No 2nd order transform yet.
*/
/* 32x32 Y and 16x16 U/V */
DECLARE_ALIGNED
(
16
,
int16_t
,
diff
[
32
*
32
+
16
*
16
*
2
]);
DECLARE_ALIGNED
(
16
,
int16_t
,
qcoeff
[
32
*
32
+
16
*
16
*
2
]);
DECLARE_ALIGNED
(
16
,
int16_t
,
dqcoeff
[
32
*
32
+
16
*
16
*
2
]);
}
SUPERBLOCKD
;
typedef
struct
macroblockd
{
DECLARE_ALIGNED
(
16
,
int16_t
,
diff
[
400
]);
/* from idct diff */
DECLARE_ALIGNED
(
16
,
int16_t
,
diff
[
384
]);
/* from idct diff */
DECLARE_ALIGNED
(
16
,
uint8_t
,
predictor
[
384
]);
DECLARE_ALIGNED
(
16
,
int16_t
,
qcoeff
[
400
]);
DECLARE_ALIGNED
(
16
,
int16_t
,
dqcoeff
[
400
]);
DECLARE_ALIGNED
(
16
,
uint16_t
,
eobs
[
2
5
]);
DECLARE_ALIGNED
(
16
,
int16_t
,
qcoeff
[
384
]);
DECLARE_ALIGNED
(
16
,
int16_t
,
dqcoeff
[
384
]);
DECLARE_ALIGNED
(
16
,
uint16_t
,
eobs
[
2
4
]);
SUPERBLOCKD
sb_coeff_data
;
/* 16 Y blocks, 4 U, 4 V,
1 DC 2nd order block,
each with 16 entries. */
BLOCKD
block
[
2
5
];
/* 16 Y blocks, 4 U, 4 V, each with 16 entries. */
BLOCKD
block
[
2
4
];
int
fullpixel_mask
;
YV12_BUFFER_CONFIG
pre
;
/* Filtered copy of previous frame reconstruction */
...
...
@@ -321,7 +319,7 @@ typedef struct macroblockd {
int
left_available
;
int
right_available
;
/* Y,U,V
,Y2
*/
/* Y,U,V */
ENTROPY_CONTEXT_PLANES
*
above_context
;
ENTROPY_CONTEXT_PLANES
*
left_context
;
...
...
@@ -377,17 +375,10 @@ typedef struct macroblockd {
/* Inverse transform function pointers. */
void
(
*
inv_txm4x4_1
)(
int16_t
*
input
,
int16_t
*
output
,
int
pitch
);
void
(
*
inv_txm4x4
)(
int16_t
*
input
,
int16_t
*
output
,
int
pitch
);
void
(
*
inv_2ndtxm4x4_1
)(
int16_t
*
in
,
int16_t
*
out
);
void
(
*
inv_2ndtxm4x4
)(
int16_t
*
in
,
int16_t
*
out
);
void
(
*
itxm_add
)(
int16_t
*
input
,
const
int16_t
*
dq
,
uint8_t
*
pred
,
uint8_t
*
output
,
int
pitch
,
int
stride
);
void
(
*
dc_itxm_add
)(
int16_t
*
input
,
const
int16_t
*
dq
,
uint8_t
*
pred
,
uint8_t
*
output
,
int
pitch
,
int
stride
,
int
dc
);
void
(
*
dc_only_itxm_add
)(
int
input_dc
,
uint8_t
*
pred_ptr
,
uint8_t
*
dst_ptr
,
int
pitch
,
int
stride
);
void
(
*
dc_itxm_add_y_block
)(
int16_t
*
q
,
const
int16_t
*
dq
,
uint8_t
*
pre
,
uint8_t
*
dst
,
int
stride
,
uint16_t
*
eobs
,
const
int16_t
*
dc
);
void
(
*
itxm_add_y_block
)(
int16_t
*
q
,
const
int16_t
*
dq
,
uint8_t
*
pre
,
uint8_t
*
dst
,
int
stride
,
uint16_t
*
eobs
);
void
(
*
itxm_add_uv_block
)(
int16_t
*
q
,
const
int16_t
*
dq
,
...
...
@@ -488,8 +479,8 @@ static TX_TYPE txfm_map(B_PREDICTION_MODE bmode) {
return
tx_type
;
}
extern
const
uint8_t
vp9_block2left
[
TX_SIZE_MAX_SB
][
2
5
];
extern
const
uint8_t
vp9_block2above
[
TX_SIZE_MAX_SB
][
2
5
];
extern
const
uint8_t
vp9_block2left
[
TX_SIZE_MAX_SB
][
2
4
];
extern
const
uint8_t
vp9_block2above
[
TX_SIZE_MAX_SB
][
2
4
];
#define USE_ADST_FOR_I16X16_8X8 0
#define USE_ADST_FOR_I16X16_4X4 0
...
...
@@ -623,20 +614,6 @@ static TX_TYPE get_tx_type(const MACROBLOCKD *xd, const BLOCKD *b) {
return
tx_type
;
}
static
int
get_2nd_order_usage
(
const
MACROBLOCKD
*
xd
)
{
#if 1
return
0
;
#else
int
has_2nd_order
=
(
xd
->
mode_info_context
->
mbmi
.
mode
!=
SPLITMV
&&
xd
->
mode_info_context
->
mbmi
.
mode
!=
I8X8_PRED
&&
xd
->
mode_info_context
->
mbmi
.
mode
!=
B_PRED
&&
xd
->
mode_info_context
->
mbmi
.
txfm_size
!=
TX_16X16
);
if
(
has_2nd_order
)
has_2nd_order
=
(
get_tx_type
(
xd
,
xd
->
block
)
==
DCT_DCT
);
return
has_2nd_order
;
#endif
}
extern
void
vp9_build_block_doffsets
(
MACROBLOCKD
*
xd
);
extern
void
vp9_setup_block_dptrs
(
MACROBLOCKD
*
xd
);
...
...
vp9/common/vp9_idctllm.c
View file @
46dff5d2
...
...
@@ -298,122 +298,7 @@ void vp9_ihtllm_c(const int16_t *input, int16_t *output, int pitch,
}
}
void
vp9_short_inv_walsh4x4_c
(
int16_t
*
input
,
int16_t
*
output
)
{
int
i
;
int
a1
,
b1
,
c1
,
d1
;
int16_t
*
ip
=
input
;
int16_t
*
op
=
output
;
for
(
i
=
0
;
i
<
4
;
i
++
)
{
a1
=
((
ip
[
0
]
+
ip
[
3
]));
b1
=
((
ip
[
1
]
+
ip
[
2
]));
c1
=
((
ip
[
1
]
-
ip
[
2
]));
d1
=
((
ip
[
0
]
-
ip
[
3
]));
op
[
0
]
=
(
a1
+
b1
+
1
)
>>
1
;
op
[
1
]
=
(
c1
+
d1
)
>>
1
;
op
[
2
]
=
(
a1
-
b1
)
>>
1
;
op
[
3
]
=
(
d1
-
c1
)
>>
1
;
ip
+=
4
;
op
+=
4
;
}
ip
=
output
;
op
=
output
;
for
(
i
=
0
;
i
<
4
;
i
++
)
{
a1
=
ip
[
0
]
+
ip
[
12
];
b1
=
ip
[
4
]
+
ip
[
8
];
c1
=
ip
[
4
]
-
ip
[
8
];
d1
=
ip
[
0
]
-
ip
[
12
];
op
[
0
]
=
(
a1
+
b1
+
1
)
>>
1
;
op
[
4
]
=
(
c1
+
d1
)
>>
1
;
op
[
8
]
=
(
a1
-
b1
)
>>
1
;
op
[
12
]
=
(
d1
-
c1
)
>>
1
;
ip
++
;
op
++
;
}
}
void
vp9_short_inv_walsh4x4_1_c
(
int16_t
*
in
,
int16_t
*
out
)
{
int
i
;
int16_t
tmp
[
4
];
int16_t
*
ip
=
in
;
int16_t
*
op
=
tmp
;
op
[
0
]
=
(
ip
[
0
]
+
1
)
>>
1
;
op
[
1
]
=
op
[
2
]
=
op
[
3
]
=
(
ip
[
0
]
>>
1
);
ip
=
tmp
;
op
=
out
;
for
(
i
=
0
;
i
<
4
;
i
++
)
{
op
[
0
]
=
(
ip
[
0
]
+
1
)
>>
1
;
op
[
4
]
=
op
[
8
]
=
op
[
12
]
=
(
ip
[
0
]
>>
1
);
ip
++
;
op
++
;
}
}
#if CONFIG_LOSSLESS
void
vp9_short_inv_walsh4x4_lossless_c
(
int16_t
*
input
,
int16_t
*
output
)
{
int
i
;
int
a1
,
b1
,
c1
,
d1
;
int16_t
*
ip
=
input
;
int16_t
*
op
=
output
;
for
(
i
=
0
;
i
<
4
;
i
++
)
{
a1
=
((
ip
[
0
]
+
ip
[
3
]))
>>
Y2_WHT_UPSCALE_FACTOR
;
b1
=
((
ip
[
1
]
+
ip
[
2
]))
>>
Y2_WHT_UPSCALE_FACTOR
;
c1
=
((
ip
[
1
]
-
ip
[
2
]))
>>
Y2_WHT_UPSCALE_FACTOR
;
d1
=
((
ip
[
0
]
-
ip
[
3
]))
>>
Y2_WHT_UPSCALE_FACTOR
;
op
[
0
]
=
(
a1
+
b1
+
1
)
>>
1
;
op
[
1
]
=
(
c1
+
d1
)
>>
1
;
op
[
2
]
=
(
a1
-
b1
)
>>
1
;
op
[
3
]
=
(
d1
-
c1
)
>>
1
;
ip
+=
4
;
op
+=
4
;
}
ip
=
output
;
op
=
output
;
for
(
i
=
0
;
i
<
4
;
i
++
)
{
a1
=
ip
[
0
]
+
ip
[
12
];
b1
=
ip
[
4
]
+
ip
[
8
];
c1
=
ip
[
4
]
-
ip
[
8
];
d1
=
ip
[
0
]
-
ip
[
12
];
op
[
0
]
=
((
a1
+
b1
+
1
)
>>
1
)
<<
Y2_WHT_UPSCALE_FACTOR
;
op
[
4
]
=
((
c1
+
d1
)
>>
1
)
<<
Y2_WHT_UPSCALE_FACTOR
;
op
[
8
]
=
((
a1
-
b1
)
>>
1
)
<<
Y2_WHT_UPSCALE_FACTOR
;
op
[
12
]
=
((
d1
-
c1
)
>>
1
)
<<
Y2_WHT_UPSCALE_FACTOR
;
ip
++
;
op
++
;
}
}
void
vp9_short_inv_walsh4x4_1_lossless_c
(
int16_t
*
in
,
int16_t
*
out
)
{
int
i
;
int16_t
tmp
[
4
];
int16_t
*
ip
=
in
;
int16_t
*
op
=
tmp
;
op
[
0
]
=
((
ip
[
0
]
>>
Y2_WHT_UPSCALE_FACTOR
)
+
1
)
>>
1
;
op
[
1
]
=
op
[
2
]
=
op
[
3
]
=
((
ip
[
0
]
>>
Y2_WHT_UPSCALE_FACTOR
)
>>
1
);
ip
=
tmp
;
op
=
out
;
for
(
i
=
0
;
i
<
4
;
i
++
)
{
op
[
0
]
=
((
ip
[
0
]
+
1
)
>>
1
)
<<
Y2_WHT_UPSCALE_FACTOR
;
op
[
4
]
=
op
[
8
]
=
op
[
12
]
=
((
ip
[
0
]
>>
1
))
<<
Y2_WHT_UPSCALE_FACTOR
;
ip
++
;
op
++
;
}
}
void
vp9_short_inv_walsh4x4_x8_c
(
int16_t
*
input
,
int16_t
*
output
,
int
pitch
)
{
int
i
;
int
a1
,
b1
,
c1
,
d1
;
...
...
@@ -913,20 +798,6 @@ void vp9_short_idct1_8x8_c(int16_t *input, int16_t *output) {
*
output
=
(
out
+
16
)
>>
5
;
}
void
vp9_short_ihaar2x2_c
(
int16_t
*
input
,
int16_t
*
output
,
int
pitch
)
{
int
i
;
int16_t
*
ip
=
input
;
// 0, 1, 4, 8
int16_t
*
op
=
output
;
for
(
i
=
0
;
i
<
16
;
i
++
)
{
op
[
i
]
=
0
;
}
op
[
0
]
=
(
ip
[
0
]
+
ip
[
1
]
+
ip
[
4
]
+
ip
[
8
]
+
1
)
>>
1
;
op
[
1
]
=
(
ip
[
0
]
-
ip
[
1
]
+
ip
[
4
]
-
ip
[
8
])
>>
1
;
op
[
4
]
=
(
ip
[
0
]
+
ip
[
1
]
-
ip
[
4
]
-
ip
[
8
])
>>
1
;
op
[
8
]
=
(
ip
[
0
]
-
ip
[
1
]
-
ip
[
4
]
+
ip
[
8
])
>>
1
;
}
void
idct16_1d
(
int16_t
*
input
,
int16_t
*
output
)
{
int16_t
step1
[
16
],
step2
[
16
];
int
temp1
,
temp2
;
...
...
vp9/common/vp9_invtrans.c
View file @
46dff5d2
...
...
@@ -11,24 +11,6 @@
#include "vp9/common/vp9_invtrans.h"
#include "./vp9_rtcd.h"
static
void
recon_dcblock
(
MACROBLOCKD
*
xd
)
{
BLOCKD
*
b
=
&
xd
->
block
[
24
];
int
i
;
for
(
i
=
0
;
i
<
16
;
i
++
)
{
xd
->
block
[
i
].
dqcoeff
[
0
]
=
b
->
diff
[
i
];
}
}
static
void
recon_dcblock_8x8
(
MACROBLOCKD
*
xd
)
{
BLOCKD
*
b
=
&
xd
->
block
[
24
];
// for coeff 0, 2, 8, 10
xd
->
block
[
0
].
dqcoeff
[
0
]
=
b
->
diff
[
0
];
xd
->
block
[
4
].
dqcoeff
[
0
]
=
b
->
diff
[
1
];
xd
->
block
[
8
].
dqcoeff
[
0
]
=
b
->
diff
[
4
];
xd
->
block
[
12
].
dqcoeff
[
0
]
=
b
->
diff
[
8
];
}
void
vp9_inverse_transform_b_4x4
(
MACROBLOCKD
*
xd
,
int
block
,
int
pitch
)
{
BLOCKD
*
b
=
&
xd
->
block
[
block
];
if
(
b
->
eob
<=
1
)
...
...
@@ -39,14 +21,6 @@ void vp9_inverse_transform_b_4x4(MACROBLOCKD *xd, int block, int pitch) {
void
vp9_inverse_transform_mby_4x4
(
MACROBLOCKD
*
xd
)
{
int
i
;
BLOCKD
*
blockd
=
xd
->
block
;
int
has_2nd_order
=
get_2nd_order_usage
(
xd
);
if
(
has_2nd_order
)
{
/* do 2nd order transform on the dc block */
xd
->
inv_2ndtxm4x4
(
blockd
[
24
].
dqcoeff
,
blockd
[
24
].
diff
);
recon_dcblock
(
xd
);
}
for
(
i
=
0
;
i
<
16
;
i
++
)
{
TX_TYPE
tx_type
=
get_tx_type_4x4
(
xd
,
&
xd
->
block
[
i
]);
...
...
@@ -85,13 +59,6 @@ void vp9_inverse_transform_b_8x8(int16_t *input_dqcoeff, int16_t *output_coeff,
void
vp9_inverse_transform_mby_8x8
(
MACROBLOCKD
*
xd
)
{
int
i
;
BLOCKD
*
blockd
=
xd
->
block
;
int
has_2nd_order
=
get_2nd_order_usage
(
xd
);
if
(
has_2nd_order
)
{
// do 2nd order transform on the dc block
vp9_short_ihaar2x2
(
blockd
[
24
].
dqcoeff
,
blockd
[
24
].
diff
,
8
);
recon_dcblock_8x8
(
xd
);
// need to change for 8x8
}
for
(
i
=
0
;
i
<
9
;
i
+=
8
)
{
TX_TYPE
tx_type
=
get_tx_type_8x8
(
xd
,
&
xd
->
block
[
i
]);
...
...
vp9/common/vp9_mbpitch.c
View file @
46dff5d2
...
...
@@ -102,9 +102,7 @@ void vp9_setup_block_dptrs(MACROBLOCKD *xd) {
}
}
blockd
[
24
].
diff
=
&
xd
->
diff
[
384
];
for
(
r
=
0
;
r
<
25
;
r
++
)
{
for
(
r
=
0
;
r
<
24
;
r
++
)
{
blockd
[
r
].
qcoeff
=
xd
->
qcoeff
+
r
*
16
;
blockd
[
r
].
dqcoeff
=
xd
->
dqcoeff
+
r
*
16
;
}
...
...
vp9/common/vp9_onyxc_int.h
View file @
46dff5d2
...
...
@@ -133,7 +133,6 @@ typedef struct VP9Common {
struct
vpx_internal_error_info
error
;
DECLARE_ALIGNED
(
16
,
int16_t
,
Y1dequant
[
QINDEX_RANGE
][
16
]);
DECLARE_ALIGNED
(
16
,
int16_t
,
Y2dequant
[
QINDEX_RANGE
][
16
]);
DECLARE_ALIGNED
(
16
,
int16_t
,
UVdequant
[
QINDEX_RANGE
][
16
]);
int
Width
;
...
...
@@ -184,8 +183,8 @@ typedef struct VP9Common {
int
last_kf_gf_q
;
/* Q used on the last GF or KF */
int
y1dc_delta_q
;
int
y2dc_delta_q
;
int
y2ac_delta_q
;
int
y2dc_delta_q
_unused
;
int
y2ac_delta_q
_unused
;
int
uvdc_delta_q
;
int
uvac_delta_q
;
...
...
@@ -217,7 +216,7 @@ typedef struct VP9Common {
int
ref_frame_sign_bias
[
MAX_REF_FRAMES
];
/* Two state 0, 1 */
/* Y,U,V
,Y2
*/
/* Y,U,V */
ENTROPY_CONTEXT_PLANES
*
above_context
;
/* row of context for each plane */
ENTROPY_CONTEXT_PLANES
left_context
[
4
];
/* (up to) 4 contexts "" */
...
...
vp9/common/vp9_rtcd_defs.sh
View file @
46dff5d2
...
...
@@ -29,12 +29,6 @@ forward_decls vp9_common_forward_decls
prototype void vp9_dequantize_b
"struct blockd *x"
specialize vp9_dequantize_b
prototype void vp9_dequantize_b_2x2
"struct blockd *x"
specialize vp9_dequantize_b_2x2
prototype void vp9_dequant_dc_idct_add_y_block_8x8
"int16_t *q, const int16_t *dq, uint8_t *pre, uint8_t *dst, int stride, uint16_t *eobs, const int16_t *dc, struct macroblockd *xd"
specialize vp9_dequant_dc_idct_add_y_block_8x8
prototype void vp9_dequant_idct_add_y_block_8x8
"int16_t *q, const int16_t *dq, uint8_t *pre, uint8_t *dst, int stride, uint16_t *eobs, struct macroblockd *xd"
specialize vp9_dequant_idct_add_y_block_8x8
...
...
@@ -44,18 +38,12 @@ specialize vp9_dequant_idct_add_uv_block_8x8
prototype void vp9_dequant_idct_add_16x16
"int16_t *input, const int16_t *dq, uint8_t *pred, uint8_t *dest, int pitch, int stride, int eob"
specialize vp9_dequant_idct_add_16x16
prototype void vp9_dequant_idct_add_8x8
"int16_t *input, const int16_t *dq, uint8_t *pred, uint8_t *dest, int pitch, int stride, int
dc, int
eob"
prototype void vp9_dequant_idct_add_8x8
"int16_t *input, const int16_t *dq, uint8_t *pred, uint8_t *dest, int pitch, int stride, int eob"
specialize vp9_dequant_idct_add_8x8
prototype void vp9_dequant_idct_add
"int16_t *input, const int16_t *dq, uint8_t *pred, uint8_t *dest, int pitch, int stride"
specialize vp9_dequant_idct_add
prototype void vp9_dequant_dc_idct_add
"int16_t *input, const int16_t *dq, uint8_t *pred, uint8_t *dest, int pitch, int stride, int dc"
specialize vp9_dequant_dc_idct_add
prototype void vp9_dequant_dc_idct_add_y_block
"int16_t *q, const int16_t *dq, uint8_t *pre, uint8_t *dst, int stride, uint16_t *eobs, const int16_t *dcs"
specialize vp9_dequant_dc_idct_add_y_block
prototype void vp9_dequant_idct_add_y_block
"int16_t *q, const int16_t *dq, uint8_t *pre, uint8_t *dst, int stride, uint16_t *eobs"
specialize vp9_dequant_idct_add_y_block
...
...
@@ -280,9 +268,6 @@ specialize vp9_short_idct10_8x8
prototype void vp9_short_idct1_8x8
"int16_t *input, int16_t *output"
specialize vp9_short_idct1_8x8
prototype void vp9_short_ihaar2x2
"int16_t *input, int16_t *output, int pitch"
specialize vp9_short_ihaar2x2
prototype void vp9_short_idct16x16
"int16_t *input, int16_t *output, int pitch"
specialize vp9_short_idct16x16
...
...
@@ -312,15 +297,6 @@ specialize vp9_short_iht4x4
prototype void vp9_ihtllm
"const int16_t *input, int16_t *output, int pitch, int tx_type, int tx_dim, int16_t eobs"
specialize vp9_ihtllm
#
# 2nd order
#
prototype void vp9_short_inv_walsh4x4_1
"int16_t *in, int16_t *out"
specialize vp9_short_inv_walsh4x4_1
prototype void vp9_short_inv_walsh4x4
"int16_t *in, int16_t *out"
specialize vp9_short_inv_walsh4x4_
# dct and add
...
...
@@ -334,10 +310,6 @@ prototype void vp9_short_inv_walsh4x4_x8 "int16_t *input, int16_t *output, int p
specialize vp9_short_inv_walsh4x4_x8
prototype void vp9_dc_only_inv_walsh_add
"int input_dc, uint8_t *pred_ptr, uint8_t *dst_ptr, int pitch, int stride"
specialize vp9_dc_only_inv_walsh_add
prototype void vp9_short_inv_walsh4x4_1_lossless
"int16_t *in, int16_t *out"
specialize vp9_short_inv_walsh4x4_1_lossless
prototype void vp9_short_inv_walsh4x4_lossless
"int16_t *in, int16_t *out"
specialize vp9_short_inv_walsh4x4_lossless
fi
prototype unsigned int vp9_sad32x3
"const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride, int max_sad"
...
...
@@ -552,7 +524,7 @@ specialize vp9_sub_pixel_mse32x32
prototype unsigned int vp9_get_mb_ss
"const int16_t *"
specialize vp9_get_mb_ss mmx sse2
# ENCODEMB INVOKE
prototype int vp9_mbblock_error
"struct macroblock *mb
, int dc
"
prototype int vp9_mbblock_error
"struct macroblock *mb"
specialize vp9_mbblock_error mmx sse2
vp9_mbblock_error_sse2
=
vp9_mbblock_error_xmm
...
...
@@ -596,27 +568,18 @@ specialize vp9_fht
prototype void vp9_short_fdct8x8
"int16_t *InputData, int16_t *OutputData, int pitch"
specialize vp9_short_fdct8x8
prototype void vp9_short_fhaar2x2
"int16_t *InputData, int16_t *OutputData, int pitch"
specialize vp9_short_fhaar2x2
prototype void vp9_short_fdct4x4
"int16_t *InputData, int16_t *OutputData, int pitch"
specialize vp9_short_fdct4x4
prototype void vp9_short_fdct8x4
"int16_t *InputData, int16_t *OutputData, int pitch"
specialize vp9_short_fdct8x4
prototype void vp9_short_walsh4x4
"int16_t *InputData, int16_t *OutputData, int pitch"
specialize vp9_short_walsh4x4
prototype void vp9_short_fdct32x32
"int16_t *InputData, int16_t *OutputData, int pitch"
specialize vp9_short_fdct32x32
prototype void vp9_short_fdct16x16
"int16_t *InputData, int16_t *OutputData, int pitch"
specialize vp9_short_fdct16x16
prototype void vp9_short_walsh4x4_lossless
"int16_t *InputData, int16_t *OutputData, int pitch"
specialize vp9_short_walsh4x4_lossless
prototype void vp9_short_walsh4x4_x8
"int16_t *InputData, int16_t *OutputData, int pitch"
specialize vp9_short_walsh4x4_x8
...
...
vp9/decoder/vp9_decodframe.c
View file @
46dff5d2
...
...
@@ -83,7 +83,6 @@ void vp9_init_de_quantizer(VP9D_COMP *pbi) {
for
(
Q
=
0
;
Q
<
QINDEX_RANGE
;
Q
++
)
{
pc
->
Y1dequant
[
Q
][
0
]
=
(
int16_t
)
vp9_dc_quant
(
Q
,
pc
->
y1dc_delta_q
);
pc
->
Y2dequant
[
Q
][
0
]
=
(
int16_t
)
vp9_dc2quant
(
Q
,
pc
->
y2dc_delta_q
);
pc
->
UVdequant
[
Q
][
0
]
=
(
int16_t
)
vp9_dc_uv_quant
(
Q
,
pc
->
uvdc_delta_q
);
/* all the ac values =; */
...
...
@@ -91,7 +90,6 @@ void vp9_init_de_quantizer(VP9D_COMP *pbi) {
int
rc
=
vp9_default_zig_zag1d_4x4
[
i
];
pc
->
Y1dequant
[
Q
][
rc
]
=
(
int16_t
)
vp9_ac_yquant
(
Q
);
pc
->
Y2dequant
[
Q
][
rc
]
=
(
int16_t
)
vp9_ac2quant
(
Q
,
pc
->
y2ac_delta_q
);
pc
->
UVdequant
[
Q
][
rc
]
=
(
int16_t
)
vp9_ac_uv_quant
(
Q
,
pc
->
uvac_delta_q
);
}
}
...
...
@@ -126,12 +124,8 @@ static void mb_init_dequantizer(VP9D_COMP *pbi, MACROBLOCKD *xd) {
xd
->
inv_txm4x4_1
=
vp9_short_idct4x4llm_1
;
xd
->
inv_txm4x4
=
vp9_short_idct4x4llm
;
xd
->
inv_2ndtxm4x4_1
=
vp9_short_inv_walsh4x4_1
;
xd
->
inv_2ndtxm4x4
=
vp9_short_inv_walsh4x4
;
xd
->
itxm_add
=
vp9_dequant_idct_add
;
xd
->
dc_only_itxm_add
=
vp9_dc_only_idct_add_c
;
xd
->
dc_itxm_add
=
vp9_dequant_dc_idct_add
;
xd
->
dc_itxm_add_y_block
=
vp9_dequant_dc_idct_add_y_block
;
xd
->
itxm_add_y_block
=
vp9_dequant_idct_add_y_block
;
xd
->
itxm_add_uv_block
=
vp9_dequant_idct_add_uv_block
;
#if CONFIG_LOSSLESS
...
...
@@ -139,12 +133,8 @@ static void mb_init_dequantizer(VP9D_COMP *pbi, MACROBLOCKD *xd) {
assert
(
QIndex
==
0
);
xd
->
inv_txm4x4_1
=
vp9_short_inv_walsh4x4_1_x8
;
xd
->
inv_txm4x4
=
vp9_short_inv_walsh4x4_x8
;
xd
->
inv_2ndtxm4x4_1
=
vp9_short_inv_walsh4x4_1_lossless
;
xd
->
inv_2ndtxm4x4
=
vp9_short_inv_walsh4x4_lossless
;
xd
->
itxm_add
=
vp9_dequant_idct_add_lossless_c
;
xd
->
dc_only_itxm_add
=
vp9_dc_only_inv_walsh_add_c
;
xd
->
dc_itxm_add
=
vp9_dequant_dc_idct_add_lossless_c
;
xd
->
dc_itxm_add_y_block
=
vp9_dequant_dc_idct_add_y_block_lossless_c
;
xd
->
itxm_add_y_block
=
vp9_dequant_idct_add_y_block_lossless_c
;
xd
->
itxm_add_uv_block
=
vp9_dequant_idct_add_uv_block_lossless_c
;
}
...
...
@@ -153,9 +143,6 @@ static void mb_init_dequantizer(VP9D_COMP *pbi, MACROBLOCKD *xd) {
for
(
i
=
16
;
i
<
24
;
i
++
)
{
xd
->
block
[
i
].
dequant
=
pc
->
UVdequant
[
QIndex
];
}
xd
->
block
[
24
].
dequant
=
pc
->
Y2dequant
[
QIndex
];
}
/* skip_recon_mb() is Modified: Instead of writing the result to predictor buffer and then copying it
...
...
@@ -222,7 +209,6 @@ static void decode_16x16(VP9D_COMP *pbi, MACROBLOCKD *xd,
BOOL_DECODER
*
const
bc
)
{
BLOCKD
*
bd
=
&
xd
->
block
[
0
];
TX_TYPE
tx_type
=
get_tx_type_16x16
(
xd
,
bd
);
assert
(
get_2nd_order_usage
(
xd
)
==
0
);
#ifdef DEC_DEBUG
if
(
dec_debug
)
{
int
i
;
...
...
@@ -274,7 +260,6 @@ static void decode_8x8(VP9D_COMP *pbi, MACROBLOCKD *xd,
#endif
if
(
tx_type
!=
DCT_DCT
||
xd
->
mode_info_context
->
mbmi
.
mode
==
I8X8_PRED
)
{
int
i
;
assert
(
get_2nd_order_usage
(
xd
)
==
0
);
for
(
i
=
0
;
i
<
4
;
i
++
)
{
int
ib
=
vp9_i8x8_block
[
i
];
int
idx
=
(
ib
&
0x02
)
?
(
ib
+
2
)
:
ib
;
...
...
@@ -294,39 +279,16 @@ static void decode_8x8(VP9D_COMP *pbi, MACROBLOCKD *xd,
xd
->
eobs
[
idx
]);
}
else
{
vp9_dequant_idct_add_8x8_c
(
q
,
dq
,
pre
,
dst
,
16
,
stride
,
0
,
xd
->
eobs
[
idx
]);
xd
->
eobs
[
idx
]);
}
}
}
else
if
(
xd
->
mode_info_context
->
mbmi
.
mode
==
SPLITMV
||
get_2nd_order_usage
(
xd
)
==
0
)
{
assert
(
get_2nd_order_usage
(
xd
)
==
0
);
}
else
{
vp9_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
{
BLOCKD
*
b
=
&
xd
->
block
[
24
];
assert
(
get_2nd_order_usage
(
xd
)
==
1
);
vp9_dequantize_b_2x2
(
b
);
vp9_short_ihaar2x2
(
&
b
->
dqcoeff
[
0
],
b
->
diff
,
8
);
((
int
*
)
b
->
qcoeff
)[
0
]
=
0
;
// 2nd order block are set to 0 after idct
((
int
*
)
b
->
qcoeff
)[
1
]
=
0
;
((
int
*
)
b
->
qcoeff
)[
2
]
=
0
;
((
int
*
)
b
->
qcoeff
)[
3
]
=
0
;
((
int
*
)
b
->
qcoeff
)[
4
]
=
0
;
((
int
*
)
b
->
qcoeff
)[
5
]
=
0
;
((
int
*
)
b
->
qcoeff
)[
6
]
=
0
;
((
int
*
)
b
->
qcoeff
)[
7
]
=
0
;
vp9_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
);
}
// Now do UV
...
...
@@ -374,7 +336,6 @@ static void decode_4x4(VP9D_COMP *pbi, MACROBLOCKD *xd,
int
i
,
eobtotal
=
0
;
MB_PREDICTION_MODE
mode
=
xd
->
mode_info_context
->
mbmi
.
mode
;
if
(
mode
==
I8X8_PRED
)
{
assert
(
get_2nd_order_usage
(
xd
)
==
0
);
for
(
i
=
0
;
i
<
4
;
i
++
)
{
int
ib
=
vp9_i8x8_block
[
i
];
const
int
iblock
[
4
]
=
{
0
,