Adjust style to match Google Coding Style a little more closely.
Most of these were picked up by jenkins in the commit that changed the vp8 namespace to vp9 in common/. Change-Id: I5cbd56ffc753b92ef805133cda6acc1713a13878
This commit is contained in:
@@ -11,7 +11,6 @@
|
||||
|
||||
#include "vpx_ports/config.h"
|
||||
#include "vpx_ports/arm.h"
|
||||
#include "vp8/common/g_common.h"
|
||||
#include "vp8/common/pragmas.h"
|
||||
#include "vp8/common/subpixel.h"
|
||||
#include "vp8/common/loopfilter.h"
|
||||
|
||||
@@ -8,13 +8,11 @@
|
||||
* be found in the AUTHORS file in the root of the source tree.
|
||||
*/
|
||||
|
||||
|
||||
#include <stdio.h>
|
||||
#include "blockd.h"
|
||||
|
||||
|
||||
void vp9_print_modes_and_motion_vectors(MODE_INFO *mi, int rows, int cols, int frame) {
|
||||
|
||||
void vp9_print_modes_and_motion_vectors(MODE_INFO *mi, int rows, int cols,
|
||||
int frame) {
|
||||
int mb_row;
|
||||
int mb_col;
|
||||
int mb_index = 0;
|
||||
@@ -120,7 +118,6 @@ void vp9_print_modes_and_motion_vectors(MODE_INFO *mi, int rows, int cols, int f
|
||||
|
||||
fprintf(mvs, "\n");
|
||||
|
||||
|
||||
/* print out the block modes */
|
||||
mb_index = 0;
|
||||
fprintf(mvs, "MVs for Frame %d\n", frame);
|
||||
@@ -145,6 +142,5 @@ void vp9_print_modes_and_motion_vectors(MODE_INFO *mi, int rows, int cols, int f
|
||||
}
|
||||
fprintf(mvs, "\n");
|
||||
|
||||
|
||||
fclose(mvs);
|
||||
}
|
||||
|
||||
@@ -111,28 +111,23 @@ const vp9_prob vp9_sub_mv_ref_prob2 [SUBMVREF_COUNT][VP9_SUBMVREFS - 1] = {
|
||||
{ 208, 1, 1 }
|
||||
};
|
||||
|
||||
|
||||
|
||||
vp9_mbsplit vp9_mbsplits [VP9_NUMMBSPLITS] = {
|
||||
{
|
||||
0, 0, 0, 0,
|
||||
0, 0, 0, 0,
|
||||
1, 1, 1, 1,
|
||||
1, 1, 1, 1,
|
||||
},
|
||||
{
|
||||
}, {
|
||||
0, 0, 1, 1,
|
||||
0, 0, 1, 1,
|
||||
0, 0, 1, 1,
|
||||
0, 0, 1, 1,
|
||||
},
|
||||
{
|
||||
}, {
|
||||
0, 0, 1, 1,
|
||||
0, 0, 1, 1,
|
||||
2, 2, 3, 3,
|
||||
2, 2, 3, 3,
|
||||
},
|
||||
{
|
||||
}, {
|
||||
0, 1, 2, 3,
|
||||
4, 5, 6, 7,
|
||||
8, 9, 10, 11,
|
||||
@@ -144,7 +139,6 @@ const int vp9_mbsplit_count [VP9_NUMMBSPLITS] = { 2, 2, 4, 16};
|
||||
|
||||
const vp9_prob vp9_mbsplit_probs [VP9_NUMMBSPLITS - 1] = { 110, 111, 150};
|
||||
|
||||
|
||||
/* Array indices are identical to previously-existing INTRAMODECONTEXTNODES. */
|
||||
|
||||
const vp9_tree_index vp9_bmode_tree[VP9_BINTRAMODES * 2 - 2] = /* INTRAMODECONTEXTNODE value */
|
||||
@@ -241,7 +235,6 @@ const vp9_tree_index vp9_sub_mv_ref_tree[6] = {
|
||||
-ZERO4X4, -NEW4X4
|
||||
};
|
||||
|
||||
|
||||
struct vp9_token_struct vp9_bmode_encodings [VP9_BINTRAMODES];
|
||||
struct vp9_token_struct vp9_ymode_encodings [VP9_YMODES];
|
||||
#if CONFIG_SUPERBLOCKS
|
||||
@@ -258,48 +251,45 @@ struct vp9_token_struct vp9_sb_mv_ref_encoding_array [VP9_MVREFS];
|
||||
#endif
|
||||
struct vp9_token_struct vp9_sub_mv_ref_encoding_array [VP9_SUBMVREFS];
|
||||
|
||||
|
||||
|
||||
void vp9_init_mbmode_probs(VP9_COMMON *x) {
|
||||
unsigned int bct [VP9_YMODES] [2]; /* num Ymodes > num UV modes */
|
||||
|
||||
vp9_tree_probs_from_distribution(VP9_YMODES, vp9_ymode_encodings,
|
||||
vp9_ymode_tree, x->fc.ymode_prob, bct, y_mode_cts, 256, 1);
|
||||
vp9_ymode_tree, x->fc.ymode_prob,
|
||||
bct, y_mode_cts, 256, 1);
|
||||
{
|
||||
int i;
|
||||
for (i = 0; i < 8; i++) {
|
||||
vp9_tree_probs_from_distribution(
|
||||
VP9_YMODES, vp9_kf_ymode_encodings, vp9_kf_ymode_tree,
|
||||
x->kf_ymode_prob[i], bct, kf_y_mode_cts[i],
|
||||
256, 1);
|
||||
vp9_tree_probs_from_distribution(VP9_YMODES, vp9_kf_ymode_encodings,
|
||||
vp9_kf_ymode_tree, x->kf_ymode_prob[i],
|
||||
bct, kf_y_mode_cts[i], 256, 1);
|
||||
#if CONFIG_SUPERBLOCKS
|
||||
vp9_tree_probs_from_distribution(
|
||||
VP9_I32X32_MODES, vp9_sb_kf_ymode_encodings, vp9_sb_ymode_tree,
|
||||
x->sb_kf_ymode_prob[i], bct, kf_y_mode_cts[i],
|
||||
256, 1);
|
||||
vp9_tree_probs_from_distribution(VP9_I32X32_MODES,
|
||||
vp9_sb_kf_ymode_encodings,
|
||||
vp9_sb_ymode_tree,
|
||||
x->sb_kf_ymode_prob[i], bct,
|
||||
kf_y_mode_cts[i], 256, 1);
|
||||
#endif
|
||||
}
|
||||
}
|
||||
{
|
||||
int i;
|
||||
for (i = 0; i < VP9_YMODES; i++) {
|
||||
vp9_tree_probs_from_distribution(
|
||||
VP9_UV_MODES, vp9_uv_mode_encodings, vp9_uv_mode_tree,
|
||||
x->kf_uv_mode_prob[i], bct, kf_uv_mode_cts[i],
|
||||
256, 1);
|
||||
vp9_tree_probs_from_distribution(
|
||||
VP9_UV_MODES, vp9_uv_mode_encodings, vp9_uv_mode_tree,
|
||||
x->fc.uv_mode_prob[i], bct, uv_mode_cts[i],
|
||||
256, 1);
|
||||
vp9_tree_probs_from_distribution(VP9_UV_MODES, vp9_uv_mode_encodings,
|
||||
vp9_uv_mode_tree, x->kf_uv_mode_prob[i],
|
||||
bct, kf_uv_mode_cts[i], 256, 1);
|
||||
vp9_tree_probs_from_distribution(VP9_UV_MODES, vp9_uv_mode_encodings,
|
||||
vp9_uv_mode_tree, x->fc.uv_mode_prob[i],
|
||||
bct, uv_mode_cts[i], 256, 1);
|
||||
}
|
||||
}
|
||||
|
||||
vp9_tree_probs_from_distribution(
|
||||
VP9_I8X8_MODES, vp9_i8x8_mode_encodings, vp9_i8x8_mode_tree,
|
||||
x->fc.i8x8_mode_prob, bct, i8x8_mode_cts,
|
||||
256, 1);
|
||||
vp9_tree_probs_from_distribution(VP9_I8X8_MODES, vp9_i8x8_mode_encodings,
|
||||
vp9_i8x8_mode_tree, x->fc.i8x8_mode_prob,
|
||||
bct, i8x8_mode_cts, 256, 1);
|
||||
|
||||
vpx_memcpy(x->fc.sub_mv_ref_prob, vp9_sub_mv_ref_prob2, sizeof(vp9_sub_mv_ref_prob2));
|
||||
vpx_memcpy(x->fc.sub_mv_ref_prob, vp9_sub_mv_ref_prob2,
|
||||
sizeof(vp9_sub_mv_ref_prob2));
|
||||
vpx_memcpy(x->fc.mbsplit_prob, vp9_mbsplit_probs, sizeof(vp9_mbsplit_probs));
|
||||
vpx_memcpy(x->fc.switchable_interp_prob, vp9_switchable_interp_prob,
|
||||
sizeof(vp9_switchable_interp_prob));
|
||||
@@ -311,7 +301,8 @@ static void intra_bmode_probs_from_distribution(
|
||||
unsigned int branch_ct [VP9_BINTRAMODES - 1] [2],
|
||||
const unsigned int events [VP9_BINTRAMODES]) {
|
||||
vp9_tree_probs_from_distribution(VP9_BINTRAMODES, vp9_bmode_encodings,
|
||||
vp9_bmode_tree, p, branch_ct, events, 256, 1);
|
||||
vp9_bmode_tree, p, branch_ct,
|
||||
events, 256, 1);
|
||||
}
|
||||
|
||||
void vp9_default_bmode_probs(vp9_prob p [VP9_BINTRAMODES - 1]) {
|
||||
@@ -319,20 +310,17 @@ void vp9_default_bmode_probs(vp9_prob p [VP9_BINTRAMODES - 1]) {
|
||||
intra_bmode_probs_from_distribution(p, branch_ct, bmode_cts);
|
||||
}
|
||||
|
||||
void vp9_kf_default_bmode_probs(vp9_prob p [VP9_BINTRAMODES] [VP9_BINTRAMODES] [VP9_BINTRAMODES - 1]) {
|
||||
unsigned int branch_ct [VP9_BINTRAMODES - 1] [2];
|
||||
void vp9_kf_default_bmode_probs(vp9_prob p[VP9_BINTRAMODES][VP9_BINTRAMODES]
|
||||
[VP9_BINTRAMODES - 1]) {
|
||||
unsigned int branch_ct[VP9_BINTRAMODES - 1][2];
|
||||
int i, j;
|
||||
|
||||
int i = 0;
|
||||
|
||||
do {
|
||||
int j = 0;
|
||||
|
||||
do {
|
||||
for (i = 0; i < VP9_BINTRAMODES; i++) {
|
||||
for (j = 0; j < VP9_BINTRAMODES; j++) {
|
||||
intra_bmode_probs_from_distribution(
|
||||
p[i][j], branch_ct, vp9_kf_default_bmode_counts[i][j]);
|
||||
|
||||
} while (++j < VP9_BINTRAMODES);
|
||||
} while (++i < VP9_BINTRAMODES);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
#if VP9_SWITCHABLE_FILTERS == 3
|
||||
@@ -548,10 +536,9 @@ void vp9_adapt_mode_probs(VP9_COMMON *cm) {
|
||||
else cm->fc.ymode_prob[t] = prob;
|
||||
}
|
||||
for (i = 0; i < VP9_YMODES; ++i) {
|
||||
vp9_tree_probs_from_distribution(
|
||||
VP9_UV_MODES, vp9_uv_mode_encodings, vp9_uv_mode_tree,
|
||||
uvmode_probs, branch_ct, cm->fc.uv_mode_counts[i],
|
||||
256, 1);
|
||||
vp9_tree_probs_from_distribution(VP9_UV_MODES, vp9_uv_mode_encodings,
|
||||
vp9_uv_mode_tree, uvmode_probs, branch_ct,
|
||||
cm->fc.uv_mode_counts[i], 256, 1);
|
||||
for (t = 0; t < VP9_UV_MODES - 1; ++t) {
|
||||
int prob;
|
||||
count = branch_ct[t][0] + branch_ct[t][1];
|
||||
@@ -564,10 +551,9 @@ void vp9_adapt_mode_probs(VP9_COMMON *cm) {
|
||||
else cm->fc.uv_mode_prob[i][t] = prob;
|
||||
}
|
||||
}
|
||||
vp9_tree_probs_from_distribution(
|
||||
VP9_BINTRAMODES, vp9_bmode_encodings, vp9_bmode_tree,
|
||||
bmode_probs, branch_ct, cm->fc.bmode_counts,
|
||||
256, 1);
|
||||
vp9_tree_probs_from_distribution(VP9_BINTRAMODES, vp9_bmode_encodings,
|
||||
vp9_bmode_tree, bmode_probs, branch_ct,
|
||||
cm->fc.bmode_counts, 256, 1);
|
||||
for (t = 0; t < VP9_BINTRAMODES - 1; ++t) {
|
||||
int prob;
|
||||
count = branch_ct[t][0] + branch_ct[t][1];
|
||||
@@ -579,10 +565,9 @@ void vp9_adapt_mode_probs(VP9_COMMON *cm) {
|
||||
else if (prob > 255) cm->fc.bmode_prob[t] = 255;
|
||||
else cm->fc.bmode_prob[t] = prob;
|
||||
}
|
||||
vp9_tree_probs_from_distribution(
|
||||
VP9_I8X8_MODES, vp9_i8x8_mode_encodings, vp9_i8x8_mode_tree,
|
||||
i8x8_mode_probs, branch_ct, cm->fc.i8x8_mode_counts,
|
||||
256, 1);
|
||||
vp9_tree_probs_from_distribution(VP9_I8X8_MODES, vp9_i8x8_mode_encodings,
|
||||
vp9_i8x8_mode_tree, i8x8_mode_probs,
|
||||
branch_ct, cm->fc.i8x8_mode_counts, 256, 1);
|
||||
for (t = 0; t < VP9_I8X8_MODES - 1; ++t) {
|
||||
int prob;
|
||||
count = branch_ct[t][0] + branch_ct[t][1];
|
||||
@@ -595,10 +580,11 @@ void vp9_adapt_mode_probs(VP9_COMMON *cm) {
|
||||
else cm->fc.i8x8_mode_prob[t] = prob;
|
||||
}
|
||||
for (i = 0; i < SUBMVREF_COUNT; ++i) {
|
||||
vp9_tree_probs_from_distribution(
|
||||
VP9_SUBMVREFS, vp9_sub_mv_ref_encoding_array, vp9_sub_mv_ref_tree,
|
||||
sub_mv_ref_probs, branch_ct, cm->fc.sub_mv_ref_counts[i],
|
||||
256, 1);
|
||||
vp9_tree_probs_from_distribution(VP9_SUBMVREFS,
|
||||
vp9_sub_mv_ref_encoding_array,
|
||||
vp9_sub_mv_ref_tree, sub_mv_ref_probs,
|
||||
branch_ct, cm->fc.sub_mv_ref_counts[i],
|
||||
256, 1);
|
||||
for (t = 0; t < VP9_SUBMVREFS - 1; ++t) {
|
||||
int prob;
|
||||
count = branch_ct[t][0] + branch_ct[t][1];
|
||||
@@ -611,10 +597,9 @@ void vp9_adapt_mode_probs(VP9_COMMON *cm) {
|
||||
else cm->fc.sub_mv_ref_prob[i][t] = prob;
|
||||
}
|
||||
}
|
||||
vp9_tree_probs_from_distribution(
|
||||
VP9_NUMMBSPLITS, vp9_mbsplit_encodings, vp9_mbsplit_tree,
|
||||
mbsplit_probs, branch_ct, cm->fc.mbsplit_counts,
|
||||
256, 1);
|
||||
vp9_tree_probs_from_distribution(VP9_NUMMBSPLITS, vp9_mbsplit_encodings,
|
||||
vp9_mbsplit_tree, mbsplit_probs, branch_ct,
|
||||
cm->fc.mbsplit_counts, 256, 1);
|
||||
for (t = 0; t < VP9_NUMMBSPLITS - 1; ++t) {
|
||||
int prob;
|
||||
count = branch_ct[t][0] + branch_ct[t][1];
|
||||
|
||||
@@ -20,20 +20,21 @@
|
||||
|
||||
typedef const int vp9_mbsplit[16];
|
||||
|
||||
extern vp9_mbsplit vp9_mbsplits [VP9_NUMMBSPLITS];
|
||||
extern vp9_mbsplit vp9_mbsplits[VP9_NUMMBSPLITS];
|
||||
|
||||
extern const int vp9_mbsplit_count [VP9_NUMMBSPLITS]; /* # of subsets */
|
||||
extern const int vp9_mbsplit_count[VP9_NUMMBSPLITS]; /* # of subsets */
|
||||
|
||||
extern const vp9_prob vp9_mbsplit_probs [VP9_NUMMBSPLITS - 1];
|
||||
extern const vp9_prob vp9_mbsplit_probs[VP9_NUMMBSPLITS - 1];
|
||||
|
||||
extern int vp9_mv_cont(const int_mv *l, const int_mv *a);
|
||||
|
||||
extern const vp9_prob vp9_sub_mv_ref_prob [VP9_SUBMVREFS - 1];
|
||||
extern const vp9_prob vp9_sub_mv_ref_prob2 [SUBMVREF_COUNT][VP9_SUBMVREFS - 1];
|
||||
extern const vp9_prob vp9_sub_mv_ref_prob[VP9_SUBMVREFS - 1];
|
||||
|
||||
extern const vp9_prob vp9_sub_mv_ref_prob2[SUBMVREF_COUNT][VP9_SUBMVREFS - 1];
|
||||
|
||||
extern const unsigned int vp9_kf_default_bmode_counts[VP9_BINTRAMODES][VP9_BINTRAMODES][VP9_BINTRAMODES];
|
||||
|
||||
extern const unsigned int vp9_kf_default_bmode_counts[VP9_BINTRAMODES]
|
||||
[VP9_BINTRAMODES]
|
||||
[VP9_BINTRAMODES];
|
||||
|
||||
extern const vp9_tree_index vp9_bmode_tree[];
|
||||
|
||||
@@ -47,43 +48,55 @@ extern const vp9_tree_index vp9_mv_ref_tree[];
|
||||
extern const vp9_tree_index vp9_sb_mv_ref_tree[];
|
||||
extern const vp9_tree_index vp9_sub_mv_ref_tree[];
|
||||
|
||||
extern struct vp9_token_struct vp9_bmode_encodings [VP9_BINTRAMODES];
|
||||
extern struct vp9_token_struct vp9_ymode_encodings [VP9_YMODES];
|
||||
extern struct vp9_token_struct vp9_sb_kf_ymode_encodings [VP9_I32X32_MODES];
|
||||
extern struct vp9_token_struct vp9_kf_ymode_encodings [VP9_YMODES];
|
||||
extern struct vp9_token_struct vp9_i8x8_mode_encodings [VP9_I8X8_MODES];
|
||||
extern struct vp9_token_struct vp9_uv_mode_encodings [VP9_UV_MODES];
|
||||
extern struct vp9_token_struct vp9_mbsplit_encodings [VP9_NUMMBSPLITS];
|
||||
extern struct vp9_token_struct vp9_bmode_encodings[VP9_BINTRAMODES];
|
||||
extern struct vp9_token_struct vp9_ymode_encodings[VP9_YMODES];
|
||||
extern struct vp9_token_struct vp9_sb_kf_ymode_encodings[VP9_I32X32_MODES];
|
||||
extern struct vp9_token_struct vp9_kf_ymode_encodings[VP9_YMODES];
|
||||
extern struct vp9_token_struct vp9_i8x8_mode_encodings[VP9_I8X8_MODES];
|
||||
extern struct vp9_token_struct vp9_uv_mode_encodings[VP9_UV_MODES];
|
||||
extern struct vp9_token_struct vp9_mbsplit_encodings[VP9_NUMMBSPLITS];
|
||||
|
||||
/* Inter mode values do not start at zero */
|
||||
|
||||
extern struct vp9_token_struct vp9_mv_ref_encoding_array [VP9_MVREFS];
|
||||
extern struct vp9_token_struct vp9_sb_mv_ref_encoding_array [VP9_MVREFS];
|
||||
extern struct vp9_token_struct vp9_sub_mv_ref_encoding_array [VP9_SUBMVREFS];
|
||||
extern struct vp9_token_struct vp9_mv_ref_encoding_array[VP9_MVREFS];
|
||||
extern struct vp9_token_struct vp9_sb_mv_ref_encoding_array[VP9_MVREFS];
|
||||
extern struct vp9_token_struct vp9_sub_mv_ref_encoding_array[VP9_SUBMVREFS];
|
||||
|
||||
void vp9_entropy_mode_init(void);
|
||||
|
||||
struct VP9Common;
|
||||
|
||||
void vp9_init_mbmode_probs(struct VP9Common *x);
|
||||
|
||||
extern void vp9_init_mode_contexts(struct VP9Common *pc);
|
||||
extern void vp9_update_mode_context(struct VP9Common *pc);;
|
||||
|
||||
extern void vp9_update_mode_context(struct VP9Common *pc);
|
||||
|
||||
extern void vp9_accum_mv_refs(struct VP9Common *pc,
|
||||
MB_PREDICTION_MODE m,
|
||||
const int ct[4]);
|
||||
|
||||
void vp9_default_bmode_probs(vp9_prob dest [VP9_BINTRAMODES - 1]);
|
||||
void vp9_kf_default_bmode_probs(vp9_prob dest [VP9_BINTRAMODES] [VP9_BINTRAMODES] [VP9_BINTRAMODES - 1]);
|
||||
void vp9_default_bmode_probs(vp9_prob dest[VP9_BINTRAMODES - 1]);
|
||||
|
||||
void vp9_kf_default_bmode_probs(vp9_prob dest[VP9_BINTRAMODES][VP9_BINTRAMODES]
|
||||
[VP9_BINTRAMODES - 1]);
|
||||
|
||||
void vp9_adapt_mode_probs(struct VP9Common *);
|
||||
|
||||
#define VP9_SWITCHABLE_FILTERS 2 /* number of switchable filters */
|
||||
|
||||
extern const INTERPOLATIONFILTERTYPE vp9_switchable_interp
|
||||
[VP9_SWITCHABLE_FILTERS];
|
||||
|
||||
extern const int vp9_switchable_interp_map[SWITCHABLE + 1];
|
||||
|
||||
extern const vp9_tree_index vp9_switchable_interp_tree
|
||||
[2*(VP9_SWITCHABLE_FILTERS - 1)];
|
||||
[2 * (VP9_SWITCHABLE_FILTERS - 1)];
|
||||
|
||||
extern struct vp9_token_struct vp9_switchable_interp_encodings
|
||||
[VP9_SWITCHABLE_FILTERS];
|
||||
extern const vp9_prob vp9_switchable_interp_prob
|
||||
[VP9_SWITCHABLE_FILTERS + 1][VP9_SWITCHABLE_FILTERS - 1];
|
||||
|
||||
extern const vp9_prob vp9_switchable_interp_prob[VP9_SWITCHABLE_FILTERS + 1]
|
||||
[VP9_SWITCHABLE_FILTERS - 1];
|
||||
|
||||
#endif
|
||||
|
||||
@@ -8,24 +8,19 @@
|
||||
* be found in the AUTHORS file in the root of the source tree.
|
||||
*/
|
||||
|
||||
|
||||
#include "extend.h"
|
||||
#include "vpx_mem/vpx_mem.h"
|
||||
|
||||
|
||||
static void copy_and_extend_plane
|
||||
(
|
||||
unsigned char *s, /* source */
|
||||
int sp, /* source pitch */
|
||||
unsigned char *d, /* destination */
|
||||
int dp, /* destination pitch */
|
||||
int h, /* height */
|
||||
int w, /* width */
|
||||
int et, /* extend top border */
|
||||
int el, /* extend left border */
|
||||
int eb, /* extend bottom border */
|
||||
int er /* extend right border */
|
||||
) {
|
||||
static void copy_and_extend_plane(unsigned char *s, /* source */
|
||||
int sp, /* source pitch */
|
||||
unsigned char *d, /* destination */
|
||||
int dp, /* destination pitch */
|
||||
int h, /* height */
|
||||
int w, /* width */
|
||||
int et, /* extend top border */
|
||||
int el, /* extend left border */
|
||||
int eb, /* extend bottom border */
|
||||
int er) { /* extend right border */
|
||||
int i;
|
||||
unsigned char *src_ptr1, *src_ptr2;
|
||||
unsigned char *dest_ptr1, *dest_ptr2;
|
||||
@@ -67,7 +62,6 @@ static void copy_and_extend_plane
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
void vp9_copy_and_extend_frame(YV12_BUFFER_CONFIG *src,
|
||||
YV12_BUFFER_CONFIG *dst) {
|
||||
int et = dst->border;
|
||||
@@ -96,7 +90,6 @@ void vp9_copy_and_extend_frame(YV12_BUFFER_CONFIG *src,
|
||||
et, el, eb, er);
|
||||
}
|
||||
|
||||
|
||||
void vp9_copy_and_extend_frame_with_rect(YV12_BUFFER_CONFIG *src,
|
||||
YV12_BUFFER_CONFIG *dst,
|
||||
int srcy, int srcx,
|
||||
@@ -149,9 +142,9 @@ void vp9_copy_and_extend_frame_with_rect(YV12_BUFFER_CONFIG *src,
|
||||
et, el, eb, er);
|
||||
}
|
||||
|
||||
|
||||
/* note the extension is only for the last row, for intra prediction purpose */
|
||||
void vp9_extend_mb_row(YV12_BUFFER_CONFIG *ybf, unsigned char *YPtr, unsigned char *UPtr, unsigned char *VPtr) {
|
||||
void vp9_extend_mb_row(YV12_BUFFER_CONFIG *ybf, unsigned char *YPtr,
|
||||
unsigned char *UPtr, unsigned char *VPtr) {
|
||||
int i;
|
||||
|
||||
YPtr += ybf->y_stride * 14;
|
||||
|
||||
@@ -8,18 +8,20 @@
|
||||
* be found in the AUTHORS file in the root of the source tree.
|
||||
*/
|
||||
|
||||
|
||||
#ifndef __INC_EXTEND_H
|
||||
#define __INC_EXTEND_H
|
||||
|
||||
#include "vpx_scale/yv12config.h"
|
||||
|
||||
void vp9_extend_mb_row(YV12_BUFFER_CONFIG *ybf, unsigned char *YPtr, unsigned char *UPtr, unsigned char *VPtr);
|
||||
void vp9_extend_mb_row(YV12_BUFFER_CONFIG *ybf, unsigned char *YPtr,
|
||||
unsigned char *UPtr, unsigned char *VPtr);
|
||||
|
||||
void vp9_copy_and_extend_frame(YV12_BUFFER_CONFIG *src,
|
||||
YV12_BUFFER_CONFIG *dst);
|
||||
|
||||
void vp9_copy_and_extend_frame_with_rect(YV12_BUFFER_CONFIG *src,
|
||||
YV12_BUFFER_CONFIG *dst,
|
||||
int srcy, int srcx,
|
||||
int srch, int srcw);
|
||||
|
||||
#endif
|
||||
#endif // __INC_EXTEND_H
|
||||
|
||||
@@ -140,16 +140,13 @@ DECLARE_ALIGNED(16, const short, vp9_sub_pel_filters_6[SUBPEL_SHIFTS][6]) = {
|
||||
{1, -2, 8, 125, -5, 1}
|
||||
};
|
||||
|
||||
static void filter_block2d_first_pass_6
|
||||
(
|
||||
unsigned char *src_ptr,
|
||||
int *output_ptr,
|
||||
unsigned int src_pixels_per_line,
|
||||
unsigned int pixel_step,
|
||||
unsigned int output_height,
|
||||
unsigned int output_width,
|
||||
const short *vp9_filter
|
||||
) {
|
||||
static void filter_block2d_first_pass_6(unsigned char *src_ptr,
|
||||
int *output_ptr,
|
||||
unsigned int src_pixels_per_line,
|
||||
unsigned int pixel_step,
|
||||
unsigned int output_height,
|
||||
unsigned int output_width,
|
||||
const short *vp9_filter) {
|
||||
unsigned int i, j;
|
||||
int Temp;
|
||||
|
||||
@@ -181,17 +178,14 @@ static void filter_block2d_first_pass_6
|
||||
}
|
||||
}
|
||||
|
||||
static void filter_block2d_second_pass_6
|
||||
(
|
||||
int *src_ptr,
|
||||
unsigned char *output_ptr,
|
||||
int output_pitch,
|
||||
unsigned int src_pixels_per_line,
|
||||
unsigned int pixel_step,
|
||||
unsigned int output_height,
|
||||
unsigned int output_width,
|
||||
const short *vp9_filter
|
||||
) {
|
||||
static void filter_block2d_second_pass_6(int *src_ptr,
|
||||
unsigned char *output_ptr,
|
||||
int output_pitch,
|
||||
unsigned int src_pixels_per_line,
|
||||
unsigned int pixel_step,
|
||||
unsigned int output_height,
|
||||
unsigned int output_width,
|
||||
const short *vp9_filter) {
|
||||
unsigned int i, j;
|
||||
int Temp;
|
||||
|
||||
@@ -232,17 +226,14 @@ static void filter_block2d_second_pass_6
|
||||
* and then averages that with the content already present in the output
|
||||
* ((filter_result + dest + 1) >> 1) and stores that in the output.
|
||||
*/
|
||||
static void filter_block2d_second_pass_avg_6
|
||||
(
|
||||
int *src_ptr,
|
||||
unsigned char *output_ptr,
|
||||
int output_pitch,
|
||||
unsigned int src_pixels_per_line,
|
||||
unsigned int pixel_step,
|
||||
unsigned int output_height,
|
||||
unsigned int output_width,
|
||||
const short *vp9_filter
|
||||
) {
|
||||
static void filter_block2d_second_pass_avg_6(int *src_ptr,
|
||||
unsigned char *output_ptr,
|
||||
int output_pitch,
|
||||
unsigned int src_pixels_per_line,
|
||||
unsigned int pixel_step,
|
||||
unsigned int output_height,
|
||||
unsigned int output_width,
|
||||
const short *vp9_filter) {
|
||||
unsigned int i, j;
|
||||
int Temp;
|
||||
|
||||
@@ -276,15 +267,12 @@ static void filter_block2d_second_pass_avg_6
|
||||
}
|
||||
|
||||
#define Interp_Extend 3
|
||||
static void filter_block2d_6
|
||||
(
|
||||
unsigned char *src_ptr,
|
||||
unsigned char *output_ptr,
|
||||
unsigned int src_pixels_per_line,
|
||||
int output_pitch,
|
||||
const short *HFilter,
|
||||
const short *VFilter
|
||||
) {
|
||||
static void filter_block2d_6(unsigned char *src_ptr,
|
||||
unsigned char *output_ptr,
|
||||
unsigned int src_pixels_per_line,
|
||||
int output_pitch,
|
||||
const short *HFilter,
|
||||
const short *VFilter) {
|
||||
int FData[(3 + Interp_Extend * 2) * 4]; /* Temp data buffer used in filtering */
|
||||
|
||||
/* First filter 1-D horizontally... */
|
||||
@@ -296,15 +284,12 @@ static void filter_block2d_6
|
||||
}
|
||||
|
||||
|
||||
void vp9_sixtap_predict_c
|
||||
(
|
||||
unsigned char *src_ptr,
|
||||
int src_pixels_per_line,
|
||||
int xoffset,
|
||||
int yoffset,
|
||||
unsigned char *dst_ptr,
|
||||
int dst_pitch
|
||||
) {
|
||||
void vp9_sixtap_predict_c(unsigned char *src_ptr,
|
||||
int src_pixels_per_line,
|
||||
int xoffset,
|
||||
int yoffset,
|
||||
unsigned char *dst_ptr,
|
||||
int dst_pitch) {
|
||||
const short *HFilter;
|
||||
const short *VFilter;
|
||||
|
||||
@@ -321,15 +306,12 @@ void vp9_sixtap_predict_c
|
||||
* then averages that with the content already present in the output
|
||||
* ((filter_result + dest + 1) >> 1) and stores that in the output.
|
||||
*/
|
||||
static void filter_block2d_avg_6
|
||||
(
|
||||
unsigned char *src_ptr,
|
||||
unsigned char *output_ptr,
|
||||
unsigned int src_pixels_per_line,
|
||||
int output_pitch,
|
||||
const short *HFilter,
|
||||
const short *VFilter
|
||||
) {
|
||||
static void filter_block2d_avg_6(unsigned char *src_ptr,
|
||||
unsigned char *output_ptr,
|
||||
unsigned int src_pixels_per_line,
|
||||
int output_pitch,
|
||||
const short *HFilter,
|
||||
const short *VFilter) {
|
||||
int FData[(3 + Interp_Extend * 2) * 4]; /* Temp data buffer used in filtering */
|
||||
|
||||
/* First filter 1-D horizontally... */
|
||||
@@ -670,15 +652,12 @@ static void block2d_average_c(unsigned char *src,
|
||||
|
||||
#define block2d_average block2d_average_c
|
||||
|
||||
void vp9_eighttap_predict_c
|
||||
(
|
||||
unsigned char *src_ptr,
|
||||
int src_pixels_per_line,
|
||||
int xoffset,
|
||||
int yoffset,
|
||||
unsigned char *dst_ptr,
|
||||
int dst_pitch
|
||||
) {
|
||||
void vp9_eighttap_predict_c(unsigned char *src_ptr,
|
||||
int src_pixels_per_line,
|
||||
int xoffset,
|
||||
int yoffset,
|
||||
unsigned char *dst_ptr,
|
||||
int dst_pitch) {
|
||||
const short *HFilter;
|
||||
const short *VFilter;
|
||||
|
||||
@@ -690,15 +669,12 @@ void vp9_eighttap_predict_c
|
||||
dst_ptr, dst_pitch);
|
||||
}
|
||||
|
||||
void vp9_eighttap_predict_avg4x4_c
|
||||
(
|
||||
unsigned char *src_ptr,
|
||||
int src_pixels_per_line,
|
||||
int xoffset,
|
||||
int yoffset,
|
||||
unsigned char *dst_ptr,
|
||||
int dst_pitch
|
||||
) {
|
||||
void vp9_eighttap_predict_avg4x4_c(unsigned char *src_ptr,
|
||||
int src_pixels_per_line,
|
||||
int xoffset,
|
||||
int yoffset,
|
||||
unsigned char *dst_ptr,
|
||||
int dst_pitch) {
|
||||
const short *HFilter = vp9_sub_pel_filters_8[xoffset];
|
||||
const short *VFilter = vp9_sub_pel_filters_8[yoffset];
|
||||
unsigned char tmp[4 * 4];
|
||||
@@ -709,15 +685,12 @@ void vp9_eighttap_predict_avg4x4_c
|
||||
block2d_average(tmp, 4, dst_ptr, dst_pitch, VPX_FILTER_4x4);
|
||||
}
|
||||
|
||||
void vp9_eighttap_predict_sharp_c
|
||||
(
|
||||
unsigned char *src_ptr,
|
||||
int src_pixels_per_line,
|
||||
int xoffset,
|
||||
int yoffset,
|
||||
unsigned char *dst_ptr,
|
||||
int dst_pitch
|
||||
) {
|
||||
void vp9_eighttap_predict_sharp_c(unsigned char *src_ptr,
|
||||
int src_pixels_per_line,
|
||||
int xoffset,
|
||||
int yoffset,
|
||||
unsigned char *dst_ptr,
|
||||
int dst_pitch) {
|
||||
const short *HFilter;
|
||||
const short *VFilter;
|
||||
|
||||
@@ -729,15 +702,12 @@ void vp9_eighttap_predict_sharp_c
|
||||
dst_ptr, dst_pitch);
|
||||
}
|
||||
|
||||
void vp9_eighttap_predict_avg4x4_sharp_c
|
||||
(
|
||||
unsigned char *src_ptr,
|
||||
int src_pixels_per_line,
|
||||
int xoffset,
|
||||
int yoffset,
|
||||
unsigned char *dst_ptr,
|
||||
int dst_pitch
|
||||
) {
|
||||
void vp9_eighttap_predict_avg4x4_sharp_c(unsigned char *src_ptr,
|
||||
int src_pixels_per_line,
|
||||
int xoffset,
|
||||
int yoffset,
|
||||
unsigned char *dst_ptr,
|
||||
int dst_pitch) {
|
||||
const short *HFilter = vp9_sub_pel_filters_8s[xoffset];
|
||||
const short *VFilter = vp9_sub_pel_filters_8s[yoffset];
|
||||
unsigned char tmp[4 * 4];
|
||||
@@ -748,15 +718,12 @@ void vp9_eighttap_predict_avg4x4_sharp_c
|
||||
block2d_average(tmp, 4, dst_ptr, dst_pitch, VPX_FILTER_4x4);
|
||||
}
|
||||
|
||||
void vp9_eighttap_predict8x8_c
|
||||
(
|
||||
unsigned char *src_ptr,
|
||||
int src_pixels_per_line,
|
||||
int xoffset,
|
||||
int yoffset,
|
||||
unsigned char *dst_ptr,
|
||||
int dst_pitch
|
||||
) {
|
||||
void vp9_eighttap_predict8x8_c(unsigned char *src_ptr,
|
||||
int src_pixels_per_line,
|
||||
int xoffset,
|
||||
int yoffset,
|
||||
unsigned char *dst_ptr,
|
||||
int dst_pitch) {
|
||||
const short *HFilter = vp9_sub_pel_filters_8[xoffset];
|
||||
const short *VFilter = vp9_sub_pel_filters_8[yoffset];
|
||||
|
||||
@@ -765,15 +732,12 @@ void vp9_eighttap_predict8x8_c
|
||||
dst_ptr, dst_pitch);
|
||||
}
|
||||
|
||||
void vp9_eighttap_predict8x8_sharp_c
|
||||
(
|
||||
unsigned char *src_ptr,
|
||||
int src_pixels_per_line,
|
||||
int xoffset,
|
||||
int yoffset,
|
||||
unsigned char *dst_ptr,
|
||||
int dst_pitch
|
||||
) {
|
||||
void vp9_eighttap_predict8x8_sharp_c(unsigned char *src_ptr,
|
||||
int src_pixels_per_line,
|
||||
int xoffset,
|
||||
int yoffset,
|
||||
unsigned char *dst_ptr,
|
||||
int dst_pitch) {
|
||||
const short *HFilter = vp9_sub_pel_filters_8s[xoffset];
|
||||
const short *VFilter = vp9_sub_pel_filters_8s[yoffset];
|
||||
|
||||
@@ -782,15 +746,12 @@ void vp9_eighttap_predict8x8_sharp_c
|
||||
dst_ptr, dst_pitch);
|
||||
}
|
||||
|
||||
void vp9_eighttap_predict_avg8x8_c
|
||||
(
|
||||
unsigned char *src_ptr,
|
||||
int src_pixels_per_line,
|
||||
int xoffset,
|
||||
int yoffset,
|
||||
unsigned char *dst_ptr,
|
||||
int dst_pitch
|
||||
) {
|
||||
void vp9_eighttap_predict_avg8x8_c(unsigned char *src_ptr,
|
||||
int src_pixels_per_line,
|
||||
int xoffset,
|
||||
int yoffset,
|
||||
unsigned char *dst_ptr,
|
||||
int dst_pitch) {
|
||||
unsigned char tmp[8 * 8];
|
||||
const short *HFilter = vp9_sub_pel_filters_8[xoffset];
|
||||
const short *VFilter = vp9_sub_pel_filters_8[yoffset];
|
||||
@@ -801,15 +762,12 @@ void vp9_eighttap_predict_avg8x8_c
|
||||
block2d_average(tmp, 8, dst_ptr, dst_pitch, VPX_FILTER_8x8);
|
||||
}
|
||||
|
||||
void vp9_eighttap_predict_avg8x8_sharp_c
|
||||
(
|
||||
unsigned char *src_ptr,
|
||||
int src_pixels_per_line,
|
||||
int xoffset,
|
||||
int yoffset,
|
||||
unsigned char *dst_ptr,
|
||||
int dst_pitch
|
||||
) {
|
||||
void vp9_eighttap_predict_avg8x8_sharp_c(unsigned char *src_ptr,
|
||||
int src_pixels_per_line,
|
||||
int xoffset,
|
||||
int yoffset,
|
||||
unsigned char *dst_ptr,
|
||||
int dst_pitch) {
|
||||
unsigned char tmp[8 * 8];
|
||||
const short *HFilter = vp9_sub_pel_filters_8s[xoffset];
|
||||
const short *VFilter = vp9_sub_pel_filters_8s[yoffset];
|
||||
@@ -820,16 +778,12 @@ void vp9_eighttap_predict_avg8x8_sharp_c
|
||||
block2d_average(tmp, 8, dst_ptr, dst_pitch, VPX_FILTER_8x8);
|
||||
}
|
||||
|
||||
void vp9_eighttap_predict8x4_c
|
||||
(
|
||||
unsigned char *src_ptr,
|
||||
int src_pixels_per_line,
|
||||
int xoffset,
|
||||
int yoffset,
|
||||
unsigned char *dst_ptr,
|
||||
int dst_pitch
|
||||
) {
|
||||
|
||||
void vp9_eighttap_predict8x4_c(unsigned char *src_ptr,
|
||||
int src_pixels_per_line,
|
||||
int xoffset,
|
||||
int yoffset,
|
||||
unsigned char *dst_ptr,
|
||||
int dst_pitch) {
|
||||
const short *HFilter = vp9_sub_pel_filters_8[xoffset];
|
||||
const short *VFilter = vp9_sub_pel_filters_8[yoffset];
|
||||
|
||||
@@ -838,15 +792,12 @@ void vp9_eighttap_predict8x4_c
|
||||
dst_ptr, dst_pitch);
|
||||
}
|
||||
|
||||
void vp9_eighttap_predict8x4_sharp_c
|
||||
(
|
||||
unsigned char *src_ptr,
|
||||
int src_pixels_per_line,
|
||||
int xoffset,
|
||||
int yoffset,
|
||||
unsigned char *dst_ptr,
|
||||
int dst_pitch
|
||||
) {
|
||||
void vp9_eighttap_predict8x4_sharp_c(unsigned char *src_ptr,
|
||||
int src_pixels_per_line,
|
||||
int xoffset,
|
||||
int yoffset,
|
||||
unsigned char *dst_ptr,
|
||||
int dst_pitch) {
|
||||
const short *HFilter = vp9_sub_pel_filters_8s[xoffset];
|
||||
const short *VFilter = vp9_sub_pel_filters_8s[yoffset];
|
||||
|
||||
@@ -855,15 +806,12 @@ void vp9_eighttap_predict8x4_sharp_c
|
||||
dst_ptr, dst_pitch);
|
||||
}
|
||||
|
||||
void vp9_eighttap_predict16x16_c
|
||||
(
|
||||
unsigned char *src_ptr,
|
||||
int src_pixels_per_line,
|
||||
int xoffset,
|
||||
int yoffset,
|
||||
unsigned char *dst_ptr,
|
||||
int dst_pitch
|
||||
) {
|
||||
void vp9_eighttap_predict16x16_c(unsigned char *src_ptr,
|
||||
int src_pixels_per_line,
|
||||
int xoffset,
|
||||
int yoffset,
|
||||
unsigned char *dst_ptr,
|
||||
int dst_pitch) {
|
||||
const short *HFilter = vp9_sub_pel_filters_8[xoffset];
|
||||
const short *VFilter = vp9_sub_pel_filters_8[yoffset];
|
||||
|
||||
@@ -872,15 +820,12 @@ void vp9_eighttap_predict16x16_c
|
||||
dst_ptr, dst_pitch);
|
||||
}
|
||||
|
||||
void vp9_eighttap_predict16x16_sharp_c
|
||||
(
|
||||
unsigned char *src_ptr,
|
||||
int src_pixels_per_line,
|
||||
int xoffset,
|
||||
int yoffset,
|
||||
unsigned char *dst_ptr,
|
||||
int dst_pitch
|
||||
) {
|
||||
void vp9_eighttap_predict16x16_sharp_c(unsigned char *src_ptr,
|
||||
int src_pixels_per_line,
|
||||
int xoffset,
|
||||
int yoffset,
|
||||
unsigned char *dst_ptr,
|
||||
int dst_pitch) {
|
||||
const short *HFilter = vp9_sub_pel_filters_8s[xoffset];
|
||||
const short *VFilter = vp9_sub_pel_filters_8s[yoffset];
|
||||
|
||||
@@ -889,15 +834,12 @@ void vp9_eighttap_predict16x16_sharp_c
|
||||
dst_ptr, dst_pitch);
|
||||
}
|
||||
|
||||
void vp9_eighttap_predict_avg16x16_c
|
||||
(
|
||||
unsigned char *src_ptr,
|
||||
int src_pixels_per_line,
|
||||
int xoffset,
|
||||
int yoffset,
|
||||
unsigned char *dst_ptr,
|
||||
int dst_pitch
|
||||
) {
|
||||
void vp9_eighttap_predict_avg16x16_c(unsigned char *src_ptr,
|
||||
int src_pixels_per_line,
|
||||
int xoffset,
|
||||
int yoffset,
|
||||
unsigned char *dst_ptr,
|
||||
int dst_pitch) {
|
||||
DECLARE_ALIGNED_ARRAY(16, unsigned char, tmp, 16 * 16);
|
||||
const short *HFilter = vp9_sub_pel_filters_8[xoffset];
|
||||
const short *VFilter = vp9_sub_pel_filters_8[yoffset];
|
||||
@@ -908,15 +850,12 @@ void vp9_eighttap_predict_avg16x16_c
|
||||
block2d_average(tmp, 16, dst_ptr, dst_pitch, VPX_FILTER_16x16);
|
||||
}
|
||||
|
||||
void vp9_eighttap_predict_avg16x16_sharp_c
|
||||
(
|
||||
unsigned char *src_ptr,
|
||||
int src_pixels_per_line,
|
||||
int xoffset,
|
||||
int yoffset,
|
||||
unsigned char *dst_ptr,
|
||||
int dst_pitch
|
||||
) {
|
||||
void vp9_eighttap_predict_avg16x16_sharp_c(unsigned char *src_ptr,
|
||||
int src_pixels_per_line,
|
||||
int xoffset,
|
||||
int yoffset,
|
||||
unsigned char *dst_ptr,
|
||||
int dst_pitch) {
|
||||
DECLARE_ALIGNED_ARRAY(16, unsigned char, tmp, 16 * 16);
|
||||
const short *HFilter = vp9_sub_pel_filters_8s[xoffset];
|
||||
const short *VFilter = vp9_sub_pel_filters_8s[yoffset];
|
||||
@@ -949,15 +888,12 @@ void vp9_eighttap_predict_avg16x16_sharp_c
|
||||
* Two filter taps should sum to VP9_FILTER_WEIGHT.
|
||||
*
|
||||
****************************************************************************/
|
||||
static void filter_block2d_bil_first_pass
|
||||
(
|
||||
unsigned char *src_ptr,
|
||||
unsigned short *dst_ptr,
|
||||
unsigned int src_stride,
|
||||
unsigned int height,
|
||||
unsigned int width,
|
||||
const short *vp9_filter
|
||||
) {
|
||||
static void filter_block2d_bil_first_pass(unsigned char *src_ptr,
|
||||
unsigned short *dst_ptr,
|
||||
unsigned int src_stride,
|
||||
unsigned int height,
|
||||
unsigned int width,
|
||||
const short *vp9_filter) {
|
||||
unsigned int i, j;
|
||||
|
||||
for (i = 0; i < height; i++) {
|
||||
@@ -997,15 +933,12 @@ static void filter_block2d_bil_first_pass
|
||||
* Two filter taps should sum to VP9_FILTER_WEIGHT.
|
||||
*
|
||||
****************************************************************************/
|
||||
static void filter_block2d_bil_second_pass
|
||||
(
|
||||
unsigned short *src_ptr,
|
||||
unsigned char *dst_ptr,
|
||||
int dst_pitch,
|
||||
unsigned int height,
|
||||
unsigned int width,
|
||||
const short *vp9_filter
|
||||
) {
|
||||
static void filter_block2d_bil_second_pass(unsigned short *src_ptr,
|
||||
unsigned char *dst_ptr,
|
||||
int dst_pitch,
|
||||
unsigned int height,
|
||||
unsigned int width,
|
||||
const short *vp9_filter) {
|
||||
unsigned int i, j;
|
||||
int Temp;
|
||||
|
||||
@@ -1033,15 +966,12 @@ static void filter_block2d_bil_second_pass
|
||||
* with the values already present in the output and stores the result of
|
||||
* that back into the output ((filter_result + dest + 1) >> 1).
|
||||
*/
|
||||
static void filter_block2d_bil_second_pass_avg
|
||||
(
|
||||
unsigned short *src_ptr,
|
||||
unsigned char *dst_ptr,
|
||||
int dst_pitch,
|
||||
unsigned int height,
|
||||
unsigned int width,
|
||||
const short *vp9_filter
|
||||
) {
|
||||
static void filter_block2d_bil_second_pass_avg(unsigned short *src_ptr,
|
||||
unsigned char *dst_ptr,
|
||||
int dst_pitch,
|
||||
unsigned int height,
|
||||
unsigned int width,
|
||||
const short *vp9_filter) {
|
||||
unsigned int i, j;
|
||||
int Temp;
|
||||
|
||||
@@ -1083,17 +1013,14 @@ static void filter_block2d_bil_second_pass_avg
|
||||
* SPECIAL NOTES : The largest block size can be handled here is 16x16
|
||||
*
|
||||
****************************************************************************/
|
||||
static void filter_block2d_bil
|
||||
(
|
||||
unsigned char *src_ptr,
|
||||
unsigned char *dst_ptr,
|
||||
unsigned int src_pitch,
|
||||
unsigned int dst_pitch,
|
||||
const short *HFilter,
|
||||
const short *VFilter,
|
||||
int Width,
|
||||
int Height
|
||||
) {
|
||||
static void filter_block2d_bil(unsigned char *src_ptr,
|
||||
unsigned char *dst_ptr,
|
||||
unsigned int src_pitch,
|
||||
unsigned int dst_pitch,
|
||||
const short *HFilter,
|
||||
const short *VFilter,
|
||||
int Width,
|
||||
int Height) {
|
||||
|
||||
unsigned short FData[17 * 16]; /* Temp data buffer used in filtering */
|
||||
|
||||
@@ -1104,17 +1031,14 @@ static void filter_block2d_bil
|
||||
filter_block2d_bil_second_pass(FData, dst_ptr, dst_pitch, Height, Width, VFilter);
|
||||
}
|
||||
|
||||
static void filter_block2d_bil_avg
|
||||
(
|
||||
unsigned char *src_ptr,
|
||||
unsigned char *dst_ptr,
|
||||
unsigned int src_pitch,
|
||||
unsigned int dst_pitch,
|
||||
const short *HFilter,
|
||||
const short *VFilter,
|
||||
int Width,
|
||||
int Height
|
||||
) {
|
||||
static void filter_block2d_bil_avg(unsigned char *src_ptr,
|
||||
unsigned char *dst_ptr,
|
||||
unsigned int src_pitch,
|
||||
unsigned int dst_pitch,
|
||||
const short *HFilter,
|
||||
const short *VFilter,
|
||||
int Width,
|
||||
int Height) {
|
||||
unsigned short FData[17 * 16]; /* Temp data buffer used in filtering */
|
||||
|
||||
/* First filter 1-D horizontally... */
|
||||
@@ -1124,50 +1048,27 @@ static void filter_block2d_bil_avg
|
||||
filter_block2d_bil_second_pass_avg(FData, dst_ptr, dst_pitch, Height, Width, VFilter);
|
||||
}
|
||||
|
||||
void vp9_bilinear_predict4x4_c
|
||||
(
|
||||
unsigned char *src_ptr,
|
||||
int src_pixels_per_line,
|
||||
int xoffset,
|
||||
int yoffset,
|
||||
unsigned char *dst_ptr,
|
||||
int dst_pitch
|
||||
) {
|
||||
void vp9_bilinear_predict4x4_c(unsigned char *src_ptr,
|
||||
int src_pixels_per_line,
|
||||
int xoffset,
|
||||
int yoffset,
|
||||
unsigned char *dst_ptr,
|
||||
int dst_pitch) {
|
||||
const short *HFilter;
|
||||
const short *VFilter;
|
||||
|
||||
HFilter = vp9_bilinear_filters[xoffset];
|
||||
VFilter = vp9_bilinear_filters[yoffset];
|
||||
#if 0
|
||||
{
|
||||
int i;
|
||||
unsigned char temp1[16];
|
||||
unsigned char temp2[16];
|
||||
|
||||
bilinear_predict4x4_mmx(src_ptr, src_pixels_per_line, xoffset, yoffset, temp1, 4);
|
||||
filter_block2d_bil(src_ptr, temp2, src_pixels_per_line, 4, HFilter, VFilter, 4, 4);
|
||||
|
||||
for (i = 0; i < 16; i++) {
|
||||
if (temp1[i] != temp2[i]) {
|
||||
bilinear_predict4x4_mmx(src_ptr, src_pixels_per_line, xoffset, yoffset, temp1, 4);
|
||||
filter_block2d_bil(src_ptr, temp2, src_pixels_per_line, 4, HFilter, VFilter, 4, 4);
|
||||
}
|
||||
}
|
||||
}
|
||||
#endif
|
||||
filter_block2d_bil(src_ptr, dst_ptr, src_pixels_per_line, dst_pitch, HFilter, VFilter, 4, 4);
|
||||
|
||||
}
|
||||
|
||||
void vp9_bilinear_predict_avg4x4_c
|
||||
(
|
||||
unsigned char *src_ptr,
|
||||
int src_pixels_per_line,
|
||||
int xoffset,
|
||||
int yoffset,
|
||||
unsigned char *dst_ptr,
|
||||
int dst_pitch
|
||||
) {
|
||||
void vp9_bilinear_predict_avg4x4_c(unsigned char *src_ptr,
|
||||
int src_pixels_per_line,
|
||||
int xoffset,
|
||||
int yoffset,
|
||||
unsigned char *dst_ptr,
|
||||
int dst_pitch) {
|
||||
const short *HFilter;
|
||||
const short *VFilter;
|
||||
|
||||
@@ -1178,15 +1079,12 @@ void vp9_bilinear_predict_avg4x4_c
|
||||
dst_pitch, HFilter, VFilter, 4, 4);
|
||||
}
|
||||
|
||||
void vp9_bilinear_predict8x8_c
|
||||
(
|
||||
unsigned char *src_ptr,
|
||||
int src_pixels_per_line,
|
||||
int xoffset,
|
||||
int yoffset,
|
||||
unsigned char *dst_ptr,
|
||||
int dst_pitch
|
||||
) {
|
||||
void vp9_bilinear_predict8x8_c(unsigned char *src_ptr,
|
||||
int src_pixels_per_line,
|
||||
int xoffset,
|
||||
int yoffset,
|
||||
unsigned char *dst_ptr,
|
||||
int dst_pitch) {
|
||||
const short *HFilter;
|
||||
const short *VFilter;
|
||||
|
||||
@@ -1197,15 +1095,12 @@ void vp9_bilinear_predict8x8_c
|
||||
|
||||
}
|
||||
|
||||
void vp9_bilinear_predict_avg8x8_c
|
||||
(
|
||||
unsigned char *src_ptr,
|
||||
int src_pixels_per_line,
|
||||
int xoffset,
|
||||
int yoffset,
|
||||
unsigned char *dst_ptr,
|
||||
int dst_pitch
|
||||
) {
|
||||
void vp9_bilinear_predict_avg8x8_c(unsigned char *src_ptr,
|
||||
int src_pixels_per_line,
|
||||
int xoffset,
|
||||
int yoffset,
|
||||
unsigned char *dst_ptr,
|
||||
int dst_pitch) {
|
||||
const short *HFilter;
|
||||
const short *VFilter;
|
||||
|
||||
@@ -1216,15 +1111,12 @@ void vp9_bilinear_predict_avg8x8_c
|
||||
dst_pitch, HFilter, VFilter, 8, 8);
|
||||
}
|
||||
|
||||
void vp9_bilinear_predict8x4_c
|
||||
(
|
||||
unsigned char *src_ptr,
|
||||
int src_pixels_per_line,
|
||||
int xoffset,
|
||||
int yoffset,
|
||||
unsigned char *dst_ptr,
|
||||
int dst_pitch
|
||||
) {
|
||||
void vp9_bilinear_predict8x4_c(unsigned char *src_ptr,
|
||||
int src_pixels_per_line,
|
||||
int xoffset,
|
||||
int yoffset,
|
||||
unsigned char *dst_ptr,
|
||||
int dst_pitch) {
|
||||
const short *HFilter;
|
||||
const short *VFilter;
|
||||
|
||||
@@ -1235,15 +1127,12 @@ void vp9_bilinear_predict8x4_c
|
||||
|
||||
}
|
||||
|
||||
void vp9_bilinear_predict16x16_c
|
||||
(
|
||||
unsigned char *src_ptr,
|
||||
int src_pixels_per_line,
|
||||
int xoffset,
|
||||
int yoffset,
|
||||
unsigned char *dst_ptr,
|
||||
int dst_pitch
|
||||
) {
|
||||
void vp9_bilinear_predict16x16_c(unsigned char *src_ptr,
|
||||
int src_pixels_per_line,
|
||||
int xoffset,
|
||||
int yoffset,
|
||||
unsigned char *dst_ptr,
|
||||
int dst_pitch) {
|
||||
const short *HFilter;
|
||||
const short *VFilter;
|
||||
|
||||
@@ -1253,15 +1142,12 @@ void vp9_bilinear_predict16x16_c
|
||||
filter_block2d_bil(src_ptr, dst_ptr, src_pixels_per_line, dst_pitch, HFilter, VFilter, 16, 16);
|
||||
}
|
||||
|
||||
void vp9_bilinear_predict_avg16x16_c
|
||||
(
|
||||
unsigned char *src_ptr,
|
||||
int src_pixels_per_line,
|
||||
int xoffset,
|
||||
int yoffset,
|
||||
unsigned char *dst_ptr,
|
||||
int dst_pitch
|
||||
) {
|
||||
void vp9_bilinear_predict_avg16x16_c(unsigned char *src_ptr,
|
||||
int src_pixels_per_line,
|
||||
int xoffset,
|
||||
int yoffset,
|
||||
unsigned char *dst_ptr,
|
||||
int dst_pitch) {
|
||||
const short *HFilter;
|
||||
const short *VFilter;
|
||||
|
||||
|
||||
@@ -81,24 +81,20 @@ static unsigned int check_mv_bounds(int_mv *mv,
|
||||
(mv->as_mv.row > mb_to_bottom_edge);
|
||||
}
|
||||
|
||||
void vp9_find_near_mvs
|
||||
(
|
||||
MACROBLOCKD *xd,
|
||||
const MODE_INFO *here,
|
||||
const MODE_INFO *lfhere,
|
||||
int_mv *nearest, int_mv *nearby, int_mv *best,
|
||||
int near_mv_ref_cts[4],
|
||||
int refframe,
|
||||
int *ref_frame_sign_bias
|
||||
);
|
||||
void vp9_find_near_mvs(MACROBLOCKD *xd,
|
||||
const MODE_INFO *here,
|
||||
const MODE_INFO *lfhere,
|
||||
int_mv *nearest, int_mv *nearby, int_mv *best,
|
||||
int near_mv_ref_cts[4],
|
||||
int refframe,
|
||||
int *ref_frame_sign_bias);
|
||||
|
||||
vp9_prob *vp9_mv_ref_probs(VP9_COMMON *pc,
|
||||
vp9_prob p[VP9_MVREFS - 1], const int near_mv_ref_ct[4]
|
||||
);
|
||||
vp9_prob p[VP9_MVREFS - 1],
|
||||
const int near_mv_ref_ct[4]);
|
||||
|
||||
extern const unsigned char vp9_mbsplit_offset[4][16];
|
||||
|
||||
|
||||
static int left_block_mv(const MODE_INFO *cur_mb, int b) {
|
||||
if (!(b & 3)) {
|
||||
/* On L edge, get from MB to left of us */
|
||||
|
||||
@@ -1,21 +0,0 @@
|
||||
/*
|
||||
* Copyright (c) 2010 The WebM project authors. All Rights Reserved.
|
||||
*
|
||||
* Use of this source code is governed by a BSD-style license
|
||||
* that can be found in the LICENSE file in the root of the source
|
||||
* tree. An additional intellectual property rights grant can be found
|
||||
* in the file PATENTS. All contributing project authors may
|
||||
* be found in the AUTHORS file in the root of the source tree.
|
||||
*/
|
||||
|
||||
|
||||
extern void (*vp9_clear_system_state)(void);
|
||||
extern void (*vp9_plane_add_noise)(unsigned char *Start, unsigned int Width, unsigned int Height, int Pitch, int DPitch, int q);
|
||||
extern void (*de_interlace)
|
||||
(
|
||||
unsigned char *src_ptr,
|
||||
unsigned char *dst_ptr,
|
||||
int Width,
|
||||
int Height,
|
||||
int Stride
|
||||
);
|
||||
@@ -11,7 +11,6 @@
|
||||
|
||||
#include "vpx_ports/config.h"
|
||||
#include "vpx_rtcd.h"
|
||||
#include "vp8/common/g_common.h"
|
||||
#include "vp8/common/subpixel.h"
|
||||
#include "vp8/common/loopfilter.h"
|
||||
#include "vp8/common/idct.h"
|
||||
@@ -41,13 +40,13 @@ void vp9_machine_specific_config(VP9_COMMON *ctx) {
|
||||
rtcd->subpix.eighttap_avg4x4 = vp9_eighttap_predict_avg4x4_c;
|
||||
rtcd->subpix.eighttap8x4 = vp9_eighttap_predict8x4_c;
|
||||
rtcd->subpix.eighttap4x4 = vp9_eighttap_predict_c;
|
||||
rtcd->subpix.eighttap16x16_sharp = vp9_eighttap_predict16x16_sharp_c;
|
||||
rtcd->subpix.eighttap8x8_sharp = vp9_eighttap_predict8x8_sharp_c;
|
||||
rtcd->subpix.eighttap_avg16x16_sharp = vp9_eighttap_predict_avg16x16_sharp_c;
|
||||
rtcd->subpix.eighttap_avg8x8_sharp = vp9_eighttap_predict_avg8x8_sharp_c;
|
||||
rtcd->subpix.eighttap_avg4x4_sharp = vp9_eighttap_predict_avg4x4_sharp_c;
|
||||
rtcd->subpix.eighttap8x4_sharp = vp9_eighttap_predict8x4_sharp_c;
|
||||
rtcd->subpix.eighttap4x4_sharp = vp9_eighttap_predict_sharp_c;
|
||||
rtcd->subpix.eighttap16x16_sharp = vp9_eighttap_predict16x16_sharp_c;
|
||||
rtcd->subpix.eighttap8x8_sharp = vp9_eighttap_predict8x8_sharp_c;
|
||||
rtcd->subpix.eighttap_avg16x16_sharp = vp9_eighttap_predict_avg16x16_sharp_c;
|
||||
rtcd->subpix.eighttap_avg8x8_sharp = vp9_eighttap_predict_avg8x8_sharp_c;
|
||||
rtcd->subpix.eighttap_avg4x4_sharp = vp9_eighttap_predict_avg4x4_sharp_c;
|
||||
rtcd->subpix.eighttap8x4_sharp = vp9_eighttap_predict8x4_sharp_c;
|
||||
rtcd->subpix.eighttap4x4_sharp = vp9_eighttap_predict_sharp_c;
|
||||
|
||||
rtcd->subpix.sixtap16x16 = vp9_sixtap_predict16x16_c;
|
||||
rtcd->subpix.sixtap8x8 = vp9_sixtap_predict8x8_c;
|
||||
@@ -80,7 +79,6 @@ void vp9_machine_specific_config(VP9_COMMON *ctx) {
|
||||
vp9_arch_x86_common_init(ctx);
|
||||
#endif
|
||||
|
||||
|
||||
#if ARCH_ARM
|
||||
vp9_arch_arm_common_init(ctx);
|
||||
#endif
|
||||
|
||||
@@ -413,7 +413,7 @@ void vp9_ihtllm_float_c(const int16_t *input, int16_t *output, int pitch,
|
||||
#define HORIZONTAL_SHIFT 17 // 15
|
||||
#define HORIZONTAL_ROUNDING ((1 << (HORIZONTAL_SHIFT - 1)) - 1)
|
||||
void vp9_ihtllm_int_c(const int16_t *input, int16_t *output, int pitch,
|
||||
TX_TYPE tx_type, int tx_dim) {
|
||||
TX_TYPE tx_type, int tx_dim) {
|
||||
int i, j, k;
|
||||
int16_t imbuf[256];
|
||||
|
||||
@@ -564,7 +564,8 @@ void vp9_short_idct4x4llm_1_c(short *input, short *output, int pitch) {
|
||||
}
|
||||
}
|
||||
|
||||
void vp9_dc_only_idct_add_c(short input_dc, unsigned char *pred_ptr, unsigned char *dst_ptr, int pitch, int stride) {
|
||||
void vp9_dc_only_idct_add_c(short input_dc, unsigned char *pred_ptr,
|
||||
unsigned char *dst_ptr, int pitch, int stride) {
|
||||
int a1 = ((input_dc + 16) >> 5);
|
||||
int r, c;
|
||||
|
||||
@@ -584,7 +585,6 @@ void vp9_dc_only_idct_add_c(short input_dc, unsigned char *pred_ptr, unsigned ch
|
||||
dst_ptr += stride;
|
||||
pred_ptr += pitch;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
void vp9_short_inv_walsh4x4_c(short *input, short *output) {
|
||||
@@ -765,7 +765,9 @@ void vp9_short_inv_walsh4x4_1_x8_c(short *in, short *out, int pitch) {
|
||||
}
|
||||
}
|
||||
|
||||
void vp9_dc_only_inv_walsh_add_c(short input_dc, unsigned char *pred_ptr, unsigned char *dst_ptr, int pitch, int stride) {
|
||||
void vp9_dc_only_inv_walsh_add_c(short input_dc, unsigned char *pred_ptr,
|
||||
unsigned char *dst_ptr,
|
||||
int pitch, int stride) {
|
||||
int r, c;
|
||||
short tmp[16];
|
||||
vp9_short_inv_walsh4x4_1_x8_c(&input_dc, tmp, 4 << 1);
|
||||
|
||||
@@ -8,7 +8,6 @@
|
||||
* be found in the AUTHORS file in the root of the source tree.
|
||||
*/
|
||||
|
||||
|
||||
#ifndef __INC_INVTRANS_H
|
||||
#define __INC_INVTRANS_H
|
||||
|
||||
@@ -16,19 +15,39 @@
|
||||
#include "idct.h"
|
||||
#include "blockd.h"
|
||||
|
||||
extern void vp9_inverse_transform_b_4x4(const vp9_idct_rtcd_vtable_t *rtcd, BLOCKD *b, int pitch);
|
||||
extern void vp9_inverse_transform_mb_4x4(const vp9_idct_rtcd_vtable_t *rtcd, MACROBLOCKD *xd);
|
||||
extern void vp9_inverse_transform_mby_4x4(const vp9_idct_rtcd_vtable_t *rtcd, MACROBLOCKD *xd);
|
||||
extern void vp9_inverse_transform_mbuv_4x4(const vp9_idct_rtcd_vtable_t *rtcd, MACROBLOCKD *xd);
|
||||
extern void vp9_inverse_transform_b_4x4(const vp9_idct_rtcd_vtable_t *rtcd,
|
||||
BLOCKD *b, int pitch);
|
||||
|
||||
extern void vp9_inverse_transform_b_8x8(const vp9_idct_rtcd_vtable_t *rtcd, short *input_dqcoeff, short *output_coeff, int pitch);
|
||||
extern void vp9_inverse_transform_mb_8x8(const vp9_idct_rtcd_vtable_t *rtcd, MACROBLOCKD *xd);
|
||||
extern void vp9_inverse_transform_mby_8x8(const vp9_idct_rtcd_vtable_t *rtcd, MACROBLOCKD *xd);
|
||||
extern void vp9_inverse_transform_mbuv_8x8(const vp9_idct_rtcd_vtable_t *rtcd, MACROBLOCKD *xd);
|
||||
extern void vp9_inverse_transform_mb_4x4(const vp9_idct_rtcd_vtable_t *rtcd,
|
||||
MACROBLOCKD *xd);
|
||||
|
||||
extern void vp9_inverse_transform_mby_4x4(const vp9_idct_rtcd_vtable_t *rtcd,
|
||||
MACROBLOCKD *xd);
|
||||
|
||||
extern void vp9_inverse_transform_mbuv_4x4(const vp9_idct_rtcd_vtable_t *rtcd,
|
||||
MACROBLOCKD *xd);
|
||||
|
||||
extern void vp9_inverse_transform_b_8x8(const vp9_idct_rtcd_vtable_t *rtcd,
|
||||
short *input_dqcoeff,
|
||||
short *output_coeff, int pitch);
|
||||
|
||||
extern void vp9_inverse_transform_mb_8x8(const vp9_idct_rtcd_vtable_t *rtcd,
|
||||
MACROBLOCKD *xd);
|
||||
|
||||
extern void vp9_inverse_transform_mby_8x8(const vp9_idct_rtcd_vtable_t *rtcd,
|
||||
MACROBLOCKD *xd);
|
||||
|
||||
extern void vp9_inverse_transform_mbuv_8x8(const vp9_idct_rtcd_vtable_t *rtcd,
|
||||
MACROBLOCKD *xd);
|
||||
|
||||
extern void vp9_inverse_transform_b_16x16(const vp9_idct_rtcd_vtable_t *rtcd,
|
||||
short *input_dqcoeff, short *output_coeff,
|
||||
int pitch);
|
||||
extern void vp9_inverse_transform_mb_16x16(const vp9_idct_rtcd_vtable_t *rtcd, MACROBLOCKD *xd);
|
||||
extern void vp9_inverse_transform_mby_16x16(const vp9_idct_rtcd_vtable_t *rtcd, MACROBLOCKD *xd);
|
||||
#endif
|
||||
short *input_dqcoeff,
|
||||
short *output_coeff, int pitch);
|
||||
|
||||
extern void vp9_inverse_transform_mb_16x16(const vp9_idct_rtcd_vtable_t *rtcd,
|
||||
MACROBLOCKD *xd);
|
||||
|
||||
extern void vp9_inverse_transform_mby_16x16(const vp9_idct_rtcd_vtable_t *rtcd,
|
||||
MACROBLOCKD *xd);
|
||||
|
||||
#endif // __INC_INVTRANS_H
|
||||
|
||||
@@ -8,7 +8,6 @@
|
||||
* be found in the AUTHORS file in the root of the source tree.
|
||||
*/
|
||||
|
||||
|
||||
#include "vpx_config.h"
|
||||
#include "loopfilter.h"
|
||||
#include "onyxc_int.h"
|
||||
@@ -52,7 +51,6 @@ static void lf_init_lut(loop_filter_info_n *lfi) {
|
||||
lfi->mode_lf_lut[NEARMV] = 2;
|
||||
lfi->mode_lf_lut[NEWMV] = 2;
|
||||
lfi->mode_lf_lut[SPLITMV] = 3;
|
||||
|
||||
}
|
||||
|
||||
void vp9_loop_filter_update_sharpness(loop_filter_info_n *lfi,
|
||||
@@ -178,11 +176,7 @@ void vp9_loop_filter_frame_init(VP9_COMMON *cm,
|
||||
}
|
||||
}
|
||||
|
||||
void vp9_loop_filter_frame
|
||||
(
|
||||
VP9_COMMON *cm,
|
||||
MACROBLOCKD *xd
|
||||
) {
|
||||
void vp9_loop_filter_frame(VP9_COMMON *cm, MACROBLOCKD *xd) {
|
||||
YV12_BUFFER_CONFIG *post = cm->frame_to_show;
|
||||
loop_filter_info_n *lfi_n = &cm->lf_info;
|
||||
struct loop_filter_info lfi;
|
||||
@@ -316,12 +310,8 @@ void vp9_loop_filter_frame
|
||||
}
|
||||
}
|
||||
|
||||
void vp9_loop_filter_frame_yonly
|
||||
(
|
||||
VP9_COMMON *cm,
|
||||
MACROBLOCKD *xd,
|
||||
int default_filt_lvl
|
||||
) {
|
||||
void vp9_loop_filter_frame_yonly(VP9_COMMON *cm, MACROBLOCKD *xd,
|
||||
int default_filt_lvl) {
|
||||
YV12_BUFFER_CONFIG *post = cm->frame_to_show;
|
||||
|
||||
unsigned char *y_ptr;
|
||||
@@ -413,21 +403,15 @@ void vp9_loop_filter_frame_yonly
|
||||
|
||||
y_ptr += 16;
|
||||
mode_info_context++; /* step to next MB */
|
||||
|
||||
}
|
||||
|
||||
y_ptr += post->y_stride * 16 - post->y_width;
|
||||
mode_info_context++; /* Skip border mb */
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
void vp9_loop_filter_partial_frame
|
||||
(
|
||||
VP9_COMMON *cm,
|
||||
MACROBLOCKD *xd,
|
||||
int default_filt_lvl
|
||||
) {
|
||||
void vp9_loop_filter_partial_frame(VP9_COMMON *cm, MACROBLOCKD *xd,
|
||||
int default_filt_lvl) {
|
||||
YV12_BUFFER_CONFIG *post = cm->frame_to_show;
|
||||
|
||||
unsigned char *y_ptr;
|
||||
|
||||
@@ -8,7 +8,6 @@
|
||||
* be found in the AUTHORS file in the root of the source tree.
|
||||
*/
|
||||
|
||||
|
||||
#ifndef loopfilter_h
|
||||
#define loopfilter_h
|
||||
|
||||
@@ -33,10 +32,14 @@ typedef enum {
|
||||
* passed it can be loaded into vector registers.
|
||||
*/
|
||||
typedef struct {
|
||||
DECLARE_ALIGNED(SIMD_WIDTH, unsigned char, mblim[MAX_LOOP_FILTER + 1][SIMD_WIDTH]);
|
||||
DECLARE_ALIGNED(SIMD_WIDTH, unsigned char, blim[MAX_LOOP_FILTER + 1][SIMD_WIDTH]);
|
||||
DECLARE_ALIGNED(SIMD_WIDTH, unsigned char, lim[MAX_LOOP_FILTER + 1][SIMD_WIDTH]);
|
||||
DECLARE_ALIGNED(SIMD_WIDTH, unsigned char, hev_thr[4][SIMD_WIDTH]);
|
||||
DECLARE_ALIGNED(SIMD_WIDTH, unsigned char,
|
||||
mblim[MAX_LOOP_FILTER + 1][SIMD_WIDTH]);
|
||||
DECLARE_ALIGNED(SIMD_WIDTH, unsigned char,
|
||||
blim[MAX_LOOP_FILTER + 1][SIMD_WIDTH]);
|
||||
DECLARE_ALIGNED(SIMD_WIDTH, unsigned char,
|
||||
lim[MAX_LOOP_FILTER + 1][SIMD_WIDTH]);
|
||||
DECLARE_ALIGNED(SIMD_WIDTH, unsigned char,
|
||||
hev_thr[4][SIMD_WIDTH]);
|
||||
unsigned char lvl[4][4][4];
|
||||
unsigned char hev_thr_lut[2][MAX_LOOP_FILTER + 1];
|
||||
unsigned char mode_lf_lut[MB_MODE_COUNT];
|
||||
@@ -49,7 +52,6 @@ struct loop_filter_info {
|
||||
const unsigned char *hev_thr;
|
||||
};
|
||||
|
||||
|
||||
#define prototype_loopfilter(sym) \
|
||||
void sym(unsigned char *src, int pitch, const unsigned char *blimit,\
|
||||
const unsigned char *limit, const unsigned char *thresh, int count)
|
||||
@@ -69,15 +71,12 @@ struct loop_filter_info {
|
||||
#include "arm/loopfilter_arm.h"
|
||||
#endif
|
||||
|
||||
typedef void loop_filter_uvfunction
|
||||
(
|
||||
unsigned char *u, /* source pointer */
|
||||
int p, /* pitch */
|
||||
const unsigned char *blimit,
|
||||
const unsigned char *limit,
|
||||
const unsigned char *thresh,
|
||||
unsigned char *v
|
||||
);
|
||||
typedef void loop_filter_uvfunction(unsigned char *u, /* source pointer */
|
||||
int p, /* pitch */
|
||||
const unsigned char *blimit,
|
||||
const unsigned char *limit,
|
||||
const unsigned char *thresh,
|
||||
unsigned char *v);
|
||||
|
||||
/* assorted loopfilter functions which get used elsewhere */
|
||||
struct VP9Common;
|
||||
@@ -102,4 +101,4 @@ void vp9_loop_filter_frame_yonly(struct VP9Common *cm,
|
||||
void vp9_loop_filter_update_sharpness(loop_filter_info_n *lfi,
|
||||
int sharpness_lvl);
|
||||
|
||||
#endif
|
||||
#endif // loopfilter_h
|
||||
|
||||
@@ -7,6 +7,7 @@
|
||||
* in the file PATENTS. All contributing project authors may
|
||||
* be found in the AUTHORS file in the root of the source tree.
|
||||
*/
|
||||
|
||||
#include <stdlib.h>
|
||||
#include "vpx_config.h"
|
||||
#include "loopfilter.h"
|
||||
@@ -122,15 +123,12 @@ void vp9_loop_filter_horizontal_edge_c
|
||||
} while (++i < count * 8);
|
||||
}
|
||||
|
||||
void vp9_loop_filter_vertical_edge_c
|
||||
(
|
||||
unsigned char *s,
|
||||
int p,
|
||||
const unsigned char *blimit,
|
||||
const unsigned char *limit,
|
||||
const unsigned char *thresh,
|
||||
int count
|
||||
) {
|
||||
void vp9_loop_filter_vertical_edge_c(unsigned char *s,
|
||||
int p,
|
||||
const unsigned char *blimit,
|
||||
const unsigned char *limit,
|
||||
const unsigned char *thresh,
|
||||
int count) {
|
||||
int hev = 0; /* high edge variance */
|
||||
signed char mask = 0;
|
||||
int i = 0;
|
||||
@@ -382,56 +380,72 @@ void vp9_loop_filter_simple_vertical_edge_c
|
||||
void vp9_loop_filter_mbv_c(unsigned char *y_ptr, unsigned char *u_ptr,
|
||||
unsigned char *v_ptr, int y_stride, int uv_stride,
|
||||
struct loop_filter_info *lfi) {
|
||||
vp9_mbloop_filter_vertical_edge_c(y_ptr, y_stride, lfi->mblim, lfi->lim, lfi->hev_thr, 2);
|
||||
vp9_mbloop_filter_vertical_edge_c(y_ptr, y_stride,
|
||||
lfi->mblim, lfi->lim, lfi->hev_thr, 2);
|
||||
|
||||
if (u_ptr)
|
||||
vp9_mbloop_filter_vertical_edge_c(u_ptr, uv_stride, lfi->mblim, lfi->lim, lfi->hev_thr, 1);
|
||||
vp9_mbloop_filter_vertical_edge_c(u_ptr, uv_stride,
|
||||
lfi->mblim, lfi->lim, lfi->hev_thr, 1);
|
||||
|
||||
if (v_ptr)
|
||||
vp9_mbloop_filter_vertical_edge_c(v_ptr, uv_stride, lfi->mblim, lfi->lim, lfi->hev_thr, 1);
|
||||
vp9_mbloop_filter_vertical_edge_c(v_ptr, uv_stride,
|
||||
lfi->mblim, lfi->lim, lfi->hev_thr, 1);
|
||||
}
|
||||
|
||||
/* Vertical B Filtering */
|
||||
void vp9_loop_filter_bv_c(unsigned char *y_ptr, unsigned char *u_ptr,
|
||||
unsigned char *v_ptr, int y_stride, int uv_stride,
|
||||
struct loop_filter_info *lfi) {
|
||||
vp9_loop_filter_vertical_edge_c(y_ptr + 4, y_stride, lfi->blim, lfi->lim, lfi->hev_thr, 2);
|
||||
vp9_loop_filter_vertical_edge_c(y_ptr + 8, y_stride, lfi->blim, lfi->lim, lfi->hev_thr, 2);
|
||||
vp9_loop_filter_vertical_edge_c(y_ptr + 12, y_stride, lfi->blim, lfi->lim, lfi->hev_thr, 2);
|
||||
vp9_loop_filter_vertical_edge_c(y_ptr + 4, y_stride,
|
||||
lfi->blim, lfi->lim, lfi->hev_thr, 2);
|
||||
vp9_loop_filter_vertical_edge_c(y_ptr + 8, y_stride,
|
||||
lfi->blim, lfi->lim, lfi->hev_thr, 2);
|
||||
vp9_loop_filter_vertical_edge_c(y_ptr + 12, y_stride,
|
||||
lfi->blim, lfi->lim, lfi->hev_thr, 2);
|
||||
|
||||
if (u_ptr)
|
||||
vp9_loop_filter_vertical_edge_c(u_ptr + 4, uv_stride, lfi->blim, lfi->lim, lfi->hev_thr, 1);
|
||||
vp9_loop_filter_vertical_edge_c(u_ptr + 4, uv_stride,
|
||||
lfi->blim, lfi->lim, lfi->hev_thr, 1);
|
||||
|
||||
if (v_ptr)
|
||||
vp9_loop_filter_vertical_edge_c(v_ptr + 4, uv_stride, lfi->blim, lfi->lim, lfi->hev_thr, 1);
|
||||
vp9_loop_filter_vertical_edge_c(v_ptr + 4, uv_stride,
|
||||
lfi->blim, lfi->lim, lfi->hev_thr, 1);
|
||||
}
|
||||
|
||||
/* Horizontal MB filtering */
|
||||
void vp9_loop_filter_mbh_c(unsigned char *y_ptr, unsigned char *u_ptr,
|
||||
unsigned char *v_ptr, int y_stride, int uv_stride,
|
||||
struct loop_filter_info *lfi) {
|
||||
vp9_mbloop_filter_horizontal_edge_c(y_ptr, y_stride, lfi->mblim, lfi->lim, lfi->hev_thr, 2);
|
||||
vp9_mbloop_filter_horizontal_edge_c(y_ptr, y_stride,
|
||||
lfi->mblim, lfi->lim, lfi->hev_thr, 2);
|
||||
|
||||
if (u_ptr)
|
||||
vp9_mbloop_filter_horizontal_edge_c(u_ptr, uv_stride, lfi->mblim, lfi->lim, lfi->hev_thr, 1);
|
||||
vp9_mbloop_filter_horizontal_edge_c(u_ptr, uv_stride,
|
||||
lfi->mblim, lfi->lim, lfi->hev_thr, 1);
|
||||
|
||||
if (v_ptr)
|
||||
vp9_mbloop_filter_horizontal_edge_c(v_ptr, uv_stride, lfi->mblim, lfi->lim, lfi->hev_thr, 1);
|
||||
vp9_mbloop_filter_horizontal_edge_c(v_ptr, uv_stride,
|
||||
lfi->mblim, lfi->lim, lfi->hev_thr, 1);
|
||||
}
|
||||
|
||||
/* Horizontal B Filtering */
|
||||
void vp9_loop_filter_bh_c(unsigned char *y_ptr, unsigned char *u_ptr,
|
||||
unsigned char *v_ptr, int y_stride, int uv_stride,
|
||||
struct loop_filter_info *lfi) {
|
||||
vp9_loop_filter_horizontal_edge_c(y_ptr + 4 * y_stride, y_stride, lfi->blim, lfi->lim, lfi->hev_thr, 2);
|
||||
vp9_loop_filter_horizontal_edge_c(y_ptr + 8 * y_stride, y_stride, lfi->blim, lfi->lim, lfi->hev_thr, 2);
|
||||
vp9_loop_filter_horizontal_edge_c(y_ptr + 12 * y_stride, y_stride, lfi->blim, lfi->lim, lfi->hev_thr, 2);
|
||||
vp9_loop_filter_horizontal_edge_c(y_ptr + 4 * y_stride, y_stride,
|
||||
lfi->blim, lfi->lim, lfi->hev_thr, 2);
|
||||
vp9_loop_filter_horizontal_edge_c(y_ptr + 8 * y_stride, y_stride,
|
||||
lfi->blim, lfi->lim, lfi->hev_thr, 2);
|
||||
vp9_loop_filter_horizontal_edge_c(y_ptr + 12 * y_stride, y_stride,
|
||||
lfi->blim, lfi->lim, lfi->hev_thr, 2);
|
||||
|
||||
if (u_ptr)
|
||||
vp9_loop_filter_horizontal_edge_c(u_ptr + 4 * uv_stride, uv_stride, lfi->blim, lfi->lim, lfi->hev_thr, 1);
|
||||
vp9_loop_filter_horizontal_edge_c(u_ptr + 4 * uv_stride, uv_stride,
|
||||
lfi->blim, lfi->lim, lfi->hev_thr, 1);
|
||||
|
||||
if (v_ptr)
|
||||
vp9_loop_filter_horizontal_edge_c(v_ptr + 4 * uv_stride, uv_stride, lfi->blim, lfi->lim, lfi->hev_thr, 1);
|
||||
vp9_loop_filter_horizontal_edge_c(v_ptr + 4 * uv_stride, uv_stride,
|
||||
lfi->blim, lfi->lim, lfi->hev_thr, 1);
|
||||
}
|
||||
|
||||
void vp9_loop_filter_bh8x8_c(unsigned char *y_ptr, unsigned char *u_ptr,
|
||||
@@ -443,9 +457,12 @@ void vp9_loop_filter_bh8x8_c(unsigned char *y_ptr, unsigned char *u_ptr,
|
||||
|
||||
void vp9_loop_filter_bhs_c(unsigned char *y_ptr, int y_stride,
|
||||
const unsigned char *blimit) {
|
||||
vp9_loop_filter_simple_horizontal_edge_c(y_ptr + 4 * y_stride, y_stride, blimit);
|
||||
vp9_loop_filter_simple_horizontal_edge_c(y_ptr + 8 * y_stride, y_stride, blimit);
|
||||
vp9_loop_filter_simple_horizontal_edge_c(y_ptr + 12 * y_stride, y_stride, blimit);
|
||||
vp9_loop_filter_simple_horizontal_edge_c(y_ptr + 4 * y_stride,
|
||||
y_stride, blimit);
|
||||
vp9_loop_filter_simple_horizontal_edge_c(y_ptr + 8 * y_stride,
|
||||
y_stride, blimit);
|
||||
vp9_loop_filter_simple_horizontal_edge_c(y_ptr + 12 * y_stride,
|
||||
y_stride, blimit);
|
||||
}
|
||||
|
||||
void vp9_loop_filter_bv8x8_c(unsigned char *y_ptr, unsigned char *u_ptr,
|
||||
|
||||
@@ -20,10 +20,13 @@
|
||||
#include <stdlib.h>
|
||||
#include <stdio.h>
|
||||
|
||||
#define RGB_TO_YUV(t) \
|
||||
( (0.257*(float)(t>>16)) + (0.504*(float)(t>>8&0xff)) + (0.098*(float)(t&0xff)) + 16), \
|
||||
(-(0.148*(float)(t>>16)) - (0.291*(float)(t>>8&0xff)) + (0.439*(float)(t&0xff)) + 128), \
|
||||
( (0.439*(float)(t>>16)) - (0.368*(float)(t>>8&0xff)) - (0.071*(float)(t&0xff)) + 128)
|
||||
#define RGB_TO_YUV(t) \
|
||||
( (0.257*(float)(t >> 16)) + (0.504*(float)(t >> 8 & 0xff)) + \
|
||||
(0.098*(float)(t & 0xff)) + 16), \
|
||||
(-(0.148*(float)(t >> 16)) - (0.291*(float)(t >> 8 & 0xff)) + \
|
||||
(0.439*(float)(t & 0xff)) + 128), \
|
||||
( (0.439*(float)(t >> 16)) - (0.368*(float)(t >> 8 & 0xff)) - \
|
||||
(0.071*(float)(t & 0xff)) + 128)
|
||||
|
||||
/* global constants */
|
||||
#if CONFIG_POSTPROC_VISUALIZER
|
||||
@@ -124,20 +127,19 @@ const short vp9_rv[] = {
|
||||
};
|
||||
|
||||
|
||||
extern void vp9_blit_text(const char *msg, unsigned char *address, const int pitch);
|
||||
extern void vp9_blit_line(int x0, int x1, int y0, int y1, unsigned char *image, const int pitch);
|
||||
/***********************************************************************************************************
|
||||
extern void vp9_blit_text(const char *msg, unsigned char *address,
|
||||
const int pitch);
|
||||
extern void vp9_blit_line(int x0, int x1, int y0, int y1,
|
||||
unsigned char *image, const int pitch);
|
||||
/****************************************************************************
|
||||
*/
|
||||
void vp9_post_proc_down_and_across_c
|
||||
(
|
||||
unsigned char *src_ptr,
|
||||
unsigned char *dst_ptr,
|
||||
int src_pixels_per_line,
|
||||
int dst_pixels_per_line,
|
||||
int rows,
|
||||
int cols,
|
||||
int flimit
|
||||
) {
|
||||
void vp9_post_proc_down_and_across_c(unsigned char *src_ptr,
|
||||
unsigned char *dst_ptr,
|
||||
int src_pixels_per_line,
|
||||
int dst_pixels_per_line,
|
||||
int rows,
|
||||
int cols,
|
||||
int flimit) {
|
||||
unsigned char *p_src, *p_dst;
|
||||
int row;
|
||||
int col;
|
||||
@@ -213,7 +215,9 @@ static int q2mbl(int x) {
|
||||
x = 50 + (x - 50) * 10 / 8;
|
||||
return x * x / 3;
|
||||
}
|
||||
void vp9_mbpost_proc_across_ip_c(unsigned char *src, int pitch, int rows, int cols, int flimit) {
|
||||
|
||||
void vp9_mbpost_proc_across_ip_c(unsigned char *src, int pitch,
|
||||
int rows, int cols, int flimit) {
|
||||
int r, c, i;
|
||||
|
||||
unsigned char *s = src;
|
||||
@@ -250,11 +254,8 @@ void vp9_mbpost_proc_across_ip_c(unsigned char *src, int pitch, int rows, int co
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
void vp9_mbpost_proc_down_c(unsigned char *dst, int pitch, int rows, int cols, int flimit) {
|
||||
void vp9_mbpost_proc_down_c(unsigned char *dst, int pitch,
|
||||
int rows, int cols, int flimit) {
|
||||
int r, c, i;
|
||||
const short *rv3 = &vp9_rv[63 & rand()];
|
||||
|
||||
@@ -296,13 +297,20 @@ static void deblock_and_de_macro_block(YV12_BUFFER_CONFIG *source,
|
||||
(void) low_var_thresh;
|
||||
(void) flag;
|
||||
|
||||
POSTPROC_INVOKE(rtcd, downacross)(source->y_buffer, post->y_buffer, source->y_stride, post->y_stride, source->y_height, source->y_width, ppl);
|
||||
POSTPROC_INVOKE(rtcd, across)(post->y_buffer, post->y_stride, post->y_height, post->y_width, q2mbl(q));
|
||||
POSTPROC_INVOKE(rtcd, down)(post->y_buffer, post->y_stride, post->y_height, post->y_width, q2mbl(q));
|
||||
|
||||
POSTPROC_INVOKE(rtcd, downacross)(source->u_buffer, post->u_buffer, source->uv_stride, post->uv_stride, source->uv_height, source->uv_width, ppl);
|
||||
POSTPROC_INVOKE(rtcd, downacross)(source->v_buffer, post->v_buffer, source->uv_stride, post->uv_stride, source->uv_height, source->uv_width, ppl);
|
||||
POSTPROC_INVOKE(rtcd, downacross)(source->y_buffer, post->y_buffer,
|
||||
source->y_stride, post->y_stride,
|
||||
source->y_height, source->y_width, ppl);
|
||||
POSTPROC_INVOKE(rtcd, across)(post->y_buffer, post->y_stride,
|
||||
post->y_height, post->y_width, q2mbl(q));
|
||||
POSTPROC_INVOKE(rtcd, down)(post->y_buffer, post->y_stride,
|
||||
post->y_height, post->y_width, q2mbl(q));
|
||||
|
||||
POSTPROC_INVOKE(rtcd, downacross)(source->u_buffer, post->u_buffer,
|
||||
source->uv_stride, post->uv_stride,
|
||||
source->uv_height, source->uv_width, ppl);
|
||||
POSTPROC_INVOKE(rtcd, downacross)(source->v_buffer, post->v_buffer,
|
||||
source->uv_stride, post->uv_stride,
|
||||
source->uv_height, source->uv_width, ppl);
|
||||
}
|
||||
|
||||
void vp9_deblock(YV12_BUFFER_CONFIG *source,
|
||||
@@ -316,12 +324,18 @@ void vp9_deblock(YV12_BUFFER_CONFIG *source,
|
||||
(void) low_var_thresh;
|
||||
(void) flag;
|
||||
|
||||
POSTPROC_INVOKE(rtcd, downacross)(source->y_buffer, post->y_buffer, source->y_stride, post->y_stride, source->y_height, source->y_width, ppl);
|
||||
POSTPROC_INVOKE(rtcd, downacross)(source->u_buffer, post->u_buffer, source->uv_stride, post->uv_stride, source->uv_height, source->uv_width, ppl);
|
||||
POSTPROC_INVOKE(rtcd, downacross)(source->v_buffer, post->v_buffer, source->uv_stride, post->uv_stride, source->uv_height, source->uv_width, ppl);
|
||||
POSTPROC_INVOKE(rtcd, downacross)(source->y_buffer, post->y_buffer,
|
||||
source->y_stride, post->y_stride,
|
||||
source->y_height, source->y_width, ppl);
|
||||
POSTPROC_INVOKE(rtcd, downacross)(source->u_buffer, post->u_buffer,
|
||||
source->uv_stride, post->uv_stride,
|
||||
source->uv_height, source->uv_width, ppl);
|
||||
POSTPROC_INVOKE(rtcd, downacross)(source->v_buffer, post->v_buffer,
|
||||
source->uv_stride, post->uv_stride,
|
||||
source->uv_height, source->uv_width, ppl);
|
||||
}
|
||||
|
||||
void vp9_de_noise(YV12_BUFFER_CONFIG *source,
|
||||
void vp9_de_noise(YV12_BUFFER_CONFIG *src,
|
||||
YV12_BUFFER_CONFIG *post,
|
||||
int q,
|
||||
int low_var_thresh,
|
||||
@@ -333,29 +347,25 @@ void vp9_de_noise(YV12_BUFFER_CONFIG *source,
|
||||
(void) low_var_thresh;
|
||||
(void) flag;
|
||||
|
||||
POSTPROC_INVOKE(rtcd, downacross)(
|
||||
source->y_buffer + 2 * source->y_stride + 2,
|
||||
source->y_buffer + 2 * source->y_stride + 2,
|
||||
source->y_stride,
|
||||
source->y_stride,
|
||||
source->y_height - 4,
|
||||
source->y_width - 4,
|
||||
ppl);
|
||||
POSTPROC_INVOKE(rtcd, downacross)(
|
||||
source->u_buffer + 2 * source->uv_stride + 2,
|
||||
source->u_buffer + 2 * source->uv_stride + 2,
|
||||
source->uv_stride,
|
||||
source->uv_stride,
|
||||
source->uv_height - 4,
|
||||
source->uv_width - 4, ppl);
|
||||
POSTPROC_INVOKE(rtcd, downacross)(
|
||||
source->v_buffer + 2 * source->uv_stride + 2,
|
||||
source->v_buffer + 2 * source->uv_stride + 2,
|
||||
source->uv_stride,
|
||||
source->uv_stride,
|
||||
source->uv_height - 4,
|
||||
source->uv_width - 4, ppl);
|
||||
|
||||
POSTPROC_INVOKE(rtcd, downacross)(src->y_buffer + 2 * src->y_stride + 2,
|
||||
src->y_buffer + 2 * src->y_stride + 2,
|
||||
src->y_stride,
|
||||
src->y_stride,
|
||||
src->y_height - 4,
|
||||
src->y_width - 4,
|
||||
ppl);
|
||||
POSTPROC_INVOKE(rtcd, downacross)(src->u_buffer + 2 * src->uv_stride + 2,
|
||||
src->u_buffer + 2 * src->uv_stride + 2,
|
||||
src->uv_stride,
|
||||
src->uv_stride,
|
||||
src->uv_height - 4,
|
||||
src->uv_width - 4, ppl);
|
||||
POSTPROC_INVOKE(rtcd, downacross)(src->v_buffer + 2 * src->uv_stride + 2,
|
||||
src->v_buffer + 2 * src->uv_stride + 2,
|
||||
src->uv_stride,
|
||||
src->uv_stride,
|
||||
src->uv_height - 4,
|
||||
src->uv_width - 4, ppl);
|
||||
}
|
||||
|
||||
double vp9_gaussian(double sigma, double mu, double x) {
|
||||
@@ -363,9 +373,6 @@ double vp9_gaussian(double sigma, double mu, double x) {
|
||||
(exp(-(x - mu) * (x - mu) / (2 * sigma * sigma)));
|
||||
}
|
||||
|
||||
extern void (*vp9_clear_system_state)(void);
|
||||
|
||||
|
||||
static void fillrd(struct postproc_state *state, int q, int a) {
|
||||
char char_dist[300];
|
||||
|
||||
@@ -374,7 +381,6 @@ static void fillrd(struct postproc_state *state, int q, int a) {
|
||||
|
||||
vp9_clear_system_state();
|
||||
|
||||
|
||||
sigma = ai + .5 + .6 * (63 - qi) / 63.0;
|
||||
|
||||
/* set up a lookup table of 256 entries that matches
|
||||
@@ -401,7 +407,6 @@ static void fillrd(struct postproc_state *state, int q, int a) {
|
||||
|
||||
for (next = next; next < 256; next++)
|
||||
char_dist[next] = 0;
|
||||
|
||||
}
|
||||
|
||||
for (i = 0; i < 3072; i++) {
|
||||
@@ -422,8 +427,8 @@ static void fillrd(struct postproc_state *state, int q, int a) {
|
||||
*
|
||||
* ROUTINE : plane_add_noise_c
|
||||
*
|
||||
* INPUTS : unsigned char *Start starting address of buffer to add gaussian
|
||||
* noise to
|
||||
* INPUTS : unsigned char *Start starting address of buffer to
|
||||
* add gaussian noise to
|
||||
* unsigned int Width width of plane
|
||||
* unsigned int Height height of plane
|
||||
* int Pitch distance between subsequent lines of frame
|
||||
@@ -580,7 +585,8 @@ void vp9_blend_b_c(unsigned char *y, unsigned char *u, unsigned char *v,
|
||||
}
|
||||
}
|
||||
|
||||
static void constrain_line(int x0, int *x1, int y0, int *y1, int width, int height) {
|
||||
static void constrain_line(int x0, int *x1, int y0, int *y1,
|
||||
int width, int height) {
|
||||
int dx;
|
||||
int dy;
|
||||
|
||||
@@ -625,7 +631,8 @@ static void constrain_line(int x0, int *x1, int y0, int *y1, int width, int heig
|
||||
#define RTCD_VTABLE(oci) NULL
|
||||
#endif
|
||||
|
||||
int vp9_post_proc_frame(VP9_COMMON *oci, YV12_BUFFER_CONFIG *dest, vp9_ppflags_t *ppflags) {
|
||||
int vp9_post_proc_frame(VP9_COMMON *oci, YV12_BUFFER_CONFIG *dest,
|
||||
vp9_ppflags_t *ppflags) {
|
||||
int q = oci->filter_level * 10 / 6;
|
||||
int flags = ppflags->post_proc_flag;
|
||||
int deblock_level = ppflags->deblocking_level;
|
||||
@@ -669,14 +676,14 @@ int vp9_post_proc_frame(VP9_COMMON *oci, YV12_BUFFER_CONFIG *dest, vp9_ppflags_t
|
||||
fillrd(&oci->postproc_state, 63 - q, noise_level);
|
||||
}
|
||||
|
||||
POSTPROC_INVOKE(RTCD_VTABLE(oci), addnoise)
|
||||
(oci->post_proc_buffer.y_buffer,
|
||||
oci->postproc_state.noise,
|
||||
oci->postproc_state.blackclamp,
|
||||
oci->postproc_state.whiteclamp,
|
||||
oci->postproc_state.bothclamp,
|
||||
oci->post_proc_buffer.y_width, oci->post_proc_buffer.y_height,
|
||||
oci->post_proc_buffer.y_stride);
|
||||
POSTPROC_INVOKE(RTCD_VTABLE(oci), addnoise)(oci->post_proc_buffer.y_buffer,
|
||||
oci->postproc_state.noise,
|
||||
oci->postproc_state.blackclamp,
|
||||
oci->postproc_state.whiteclamp,
|
||||
oci->postproc_state.bothclamp,
|
||||
oci->post_proc_buffer.y_width,
|
||||
oci->post_proc_buffer.y_height,
|
||||
oci->post_proc_buffer.y_stride);
|
||||
}
|
||||
|
||||
#if CONFIG_POSTPROC_VISUALIZER
|
||||
@@ -689,7 +696,8 @@ int vp9_post_proc_frame(VP9_COMMON *oci, YV12_BUFFER_CONFIG *dest, vp9_ppflags_t
|
||||
oci->filter_level,
|
||||
flags,
|
||||
oci->mb_cols, oci->mb_rows);
|
||||
vp9_blit_text(message, oci->post_proc_buffer.y_buffer, oci->post_proc_buffer.y_stride);
|
||||
vp9_blit_text(message, oci->post_proc_buffer.y_buffer,
|
||||
oci->post_proc_buffer.y_stride);
|
||||
}
|
||||
|
||||
if (flags & VP9D_DEBUG_TXT_MBLK_MODES) {
|
||||
@@ -758,8 +766,11 @@ int vp9_post_proc_frame(VP9_COMMON *oci, YV12_BUFFER_CONFIG *dest, vp9_ppflags_t
|
||||
|
||||
if (flags & VP9D_DEBUG_TXT_RATE_INFO) {
|
||||
char message[512];
|
||||
sprintf(message, "Bitrate: %10.2f frame_rate: %10.2f ", oci->bitrate, oci->framerate);
|
||||
vp9_blit_text(message, oci->post_proc_buffer.y_buffer, oci->post_proc_buffer.y_stride);
|
||||
snprintf(message, sizeof(message),
|
||||
"Bitrate: %10.2f frame_rate: %10.2f ",
|
||||
oci->bitrate, oci->framerate);
|
||||
vp9_blit_text(message, oci->post_proc_buffer.y_buffer,
|
||||
oci->post_proc_buffer.y_stride);
|
||||
}
|
||||
|
||||
/* Draw motion vectors */
|
||||
@@ -920,7 +931,8 @@ int vp9_post_proc_frame(VP9_COMMON *oci, YV12_BUFFER_CONFIG *dest, vp9_ppflags_t
|
||||
int Y = 0, U = 0, V = 0;
|
||||
|
||||
if (mi->mbmi.mode == B_PRED &&
|
||||
((ppflags->display_mb_modes_flag & B_PRED) || ppflags->display_b_modes_flag)) {
|
||||
((ppflags->display_mb_modes_flag & B_PRED) ||
|
||||
ppflags->display_b_modes_flag)) {
|
||||
int by, bx;
|
||||
unsigned char *yl, *ul, *vl;
|
||||
union b_mode_info *bmi = mi->bmi;
|
||||
@@ -937,8 +949,11 @@ int vp9_post_proc_frame(VP9_COMMON *oci, YV12_BUFFER_CONFIG *dest, vp9_ppflags_t
|
||||
U = B_PREDICTION_MODE_colors[bmi->as_mode.first][1];
|
||||
V = B_PREDICTION_MODE_colors[bmi->as_mode.first][2];
|
||||
|
||||
POSTPROC_INVOKE(RTCD_VTABLE(oci), blend_b)
|
||||
(yl + bx, ul + (bx >> 1), vl + (bx >> 1), Y, U, V, 0xc000, y_stride);
|
||||
POSTPROC_INVOKE(RTCD_VTABLE(oci), blend_b)(yl + bx,
|
||||
ul + (bx >> 1),
|
||||
vl + (bx >> 1),
|
||||
Y, U, V,
|
||||
0xc000, y_stride);
|
||||
}
|
||||
bmi++;
|
||||
}
|
||||
@@ -952,8 +967,11 @@ int vp9_post_proc_frame(VP9_COMMON *oci, YV12_BUFFER_CONFIG *dest, vp9_ppflags_t
|
||||
U = MB_PREDICTION_MODE_colors[mi->mbmi.mode][1];
|
||||
V = MB_PREDICTION_MODE_colors[mi->mbmi.mode][2];
|
||||
|
||||
POSTPROC_INVOKE(RTCD_VTABLE(oci), blend_mb_inner)
|
||||
(y_ptr + x, u_ptr + (x >> 1), v_ptr + (x >> 1), Y, U, V, 0xc000, y_stride);
|
||||
POSTPROC_INVOKE(RTCD_VTABLE(oci), blend_mb_inner)(y_ptr + x,
|
||||
u_ptr + (x >> 1),
|
||||
v_ptr + (x >> 1),
|
||||
Y, U, V,
|
||||
0xc000, y_stride);
|
||||
}
|
||||
|
||||
mi++;
|
||||
@@ -967,7 +985,8 @@ int vp9_post_proc_frame(VP9_COMMON *oci, YV12_BUFFER_CONFIG *dest, vp9_ppflags_t
|
||||
}
|
||||
|
||||
/* Color in frame reference blocks */
|
||||
if ((flags & VP9D_DEBUG_CLR_FRM_REF_BLKS) && ppflags->display_ref_frame_flag) {
|
||||
if ((flags & VP9D_DEBUG_CLR_FRM_REF_BLKS) &&
|
||||
ppflags->display_ref_frame_flag) {
|
||||
int y, x;
|
||||
YV12_BUFFER_CONFIG *post = &oci->post_proc_buffer;
|
||||
int width = post->y_width;
|
||||
@@ -987,8 +1006,11 @@ int vp9_post_proc_frame(VP9_COMMON *oci, YV12_BUFFER_CONFIG *dest, vp9_ppflags_t
|
||||
U = MV_REFERENCE_FRAME_colors[mi->mbmi.ref_frame][1];
|
||||
V = MV_REFERENCE_FRAME_colors[mi->mbmi.ref_frame][2];
|
||||
|
||||
POSTPROC_INVOKE(RTCD_VTABLE(oci), blend_mb_outer)
|
||||
(y_ptr + x, u_ptr + (x >> 1), v_ptr + (x >> 1), Y, U, V, 0xc000, y_stride);
|
||||
POSTPROC_INVOKE(RTCD_VTABLE(oci), blend_mb_outer)(y_ptr + x,
|
||||
u_ptr + (x >> 1),
|
||||
v_ptr + (x >> 1),
|
||||
Y, U, V,
|
||||
0xc000, y_stride);
|
||||
}
|
||||
|
||||
mi++;
|
||||
@@ -1008,5 +1030,6 @@ int vp9_post_proc_frame(VP9_COMMON *oci, YV12_BUFFER_CONFIG *dest, vp9_ppflags_t
|
||||
dest->y_width = oci->Width;
|
||||
dest->y_height = oci->Height;
|
||||
dest->uv_height = dest->y_height / 2;
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
@@ -13,28 +13,28 @@
|
||||
#define POSTPROC_H
|
||||
|
||||
#define prototype_postproc_inplace(sym)\
|
||||
void sym (unsigned char *dst, int pitch, int rows, int cols,int flimit)
|
||||
void sym(unsigned char *dst, int pitch, int rows, int cols, int flimit)
|
||||
|
||||
#define prototype_postproc(sym)\
|
||||
void sym (unsigned char *src, unsigned char *dst, int src_pitch,\
|
||||
int dst_pitch, int rows, int cols, int flimit)
|
||||
void sym(unsigned char *src, unsigned char *dst, int src_pitch, \
|
||||
int dst_pitch, int rows, int cols, int flimit)
|
||||
|
||||
#define prototype_postproc_addnoise(sym) \
|
||||
void sym (unsigned char *s, char *noise, char blackclamp[16],\
|
||||
char whiteclamp[16], char bothclamp[16],\
|
||||
unsigned int w, unsigned int h, int pitch)
|
||||
void sym(unsigned char *s, char *noise, char blackclamp[16], \
|
||||
char whiteclamp[16], char bothclamp[16], \
|
||||
unsigned int w, unsigned int h, int pitch)
|
||||
|
||||
#define prototype_postproc_blend_mb_inner(sym)\
|
||||
void sym (unsigned char *y, unsigned char *u, unsigned char *v,\
|
||||
int y1, int u1, int v1, int alpha, int stride)
|
||||
void sym(unsigned char *y, unsigned char *u, unsigned char *v, \
|
||||
int y1, int u1, int v1, int alpha, int stride)
|
||||
|
||||
#define prototype_postproc_blend_mb_outer(sym)\
|
||||
void sym (unsigned char *y, unsigned char *u, unsigned char *v,\
|
||||
int y1, int u1, int v1, int alpha, int stride)
|
||||
void sym(unsigned char *y, unsigned char *u, unsigned char *v, \
|
||||
int y1, int u1, int v1, int alpha, int stride)
|
||||
|
||||
#define prototype_postproc_blend_b(sym)\
|
||||
void sym (unsigned char *y, unsigned char *u, unsigned char *v,\
|
||||
int y1, int u1, int v1, int alpha, int stride)
|
||||
void sym(unsigned char *y, unsigned char *u, unsigned char *v, \
|
||||
int y1, int u1, int v1, int alpha, int stride)
|
||||
|
||||
#if ARCH_X86 || ARCH_X86_64
|
||||
#include "x86/postproc_x86.h"
|
||||
|
||||
@@ -8,8 +8,6 @@
|
||||
* be found in the AUTHORS file in the root of the source tree.
|
||||
*/
|
||||
|
||||
|
||||
#include "g_common.h"
|
||||
#include "subpixel.h"
|
||||
#include "loopfilter.h"
|
||||
#include "recon.h"
|
||||
|
||||
@@ -85,12 +85,10 @@ void vp9_setup_interp_filters(MACROBLOCKD *xd,
|
||||
}
|
||||
}
|
||||
|
||||
void vp9_copy_mem16x16_c(
|
||||
unsigned char *src,
|
||||
int src_stride,
|
||||
unsigned char *dst,
|
||||
int dst_stride) {
|
||||
|
||||
void vp9_copy_mem16x16_c(unsigned char *src,
|
||||
int src_stride,
|
||||
unsigned char *dst,
|
||||
int dst_stride) {
|
||||
int r;
|
||||
|
||||
for (r = 0; r < 16; r++) {
|
||||
@@ -121,16 +119,13 @@ void vp9_copy_mem16x16_c(
|
||||
#endif
|
||||
src += src_stride;
|
||||
dst += dst_stride;
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
void vp9_avg_mem16x16_c(
|
||||
unsigned char *src,
|
||||
int src_stride,
|
||||
unsigned char *dst,
|
||||
int dst_stride) {
|
||||
void vp9_avg_mem16x16_c(unsigned char *src,
|
||||
int src_stride,
|
||||
unsigned char *dst,
|
||||
int dst_stride) {
|
||||
int r;
|
||||
|
||||
for (r = 0; r < 16; r++) {
|
||||
@@ -145,11 +140,10 @@ void vp9_avg_mem16x16_c(
|
||||
}
|
||||
}
|
||||
|
||||
void vp9_copy_mem8x8_c(
|
||||
unsigned char *src,
|
||||
int src_stride,
|
||||
unsigned char *dst,
|
||||
int dst_stride) {
|
||||
void vp9_copy_mem8x8_c(unsigned char *src,
|
||||
int src_stride,
|
||||
unsigned char *dst,
|
||||
int dst_stride) {
|
||||
int r;
|
||||
|
||||
for (r = 0; r < 8; r++) {
|
||||
@@ -168,16 +162,13 @@ void vp9_copy_mem8x8_c(
|
||||
#endif
|
||||
src += src_stride;
|
||||
dst += dst_stride;
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
void vp9_avg_mem8x8_c(
|
||||
unsigned char *src,
|
||||
int src_stride,
|
||||
unsigned char *dst,
|
||||
int dst_stride) {
|
||||
void vp9_avg_mem8x8_c(unsigned char *src,
|
||||
int src_stride,
|
||||
unsigned char *dst,
|
||||
int dst_stride) {
|
||||
int r;
|
||||
|
||||
for (r = 0; r < 8; r++) {
|
||||
@@ -192,11 +183,10 @@ void vp9_avg_mem8x8_c(
|
||||
}
|
||||
}
|
||||
|
||||
void vp9_copy_mem8x4_c(
|
||||
unsigned char *src,
|
||||
int src_stride,
|
||||
unsigned char *dst,
|
||||
int dst_stride) {
|
||||
void vp9_copy_mem8x4_c(unsigned char *src,
|
||||
int src_stride,
|
||||
unsigned char *dst,
|
||||
int dst_stride) {
|
||||
int r;
|
||||
|
||||
for (r = 0; r < 4; r++) {
|
||||
@@ -215,13 +205,9 @@ void vp9_copy_mem8x4_c(
|
||||
#endif
|
||||
src += src_stride;
|
||||
dst += dst_stride;
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
void vp9_build_inter_predictors_b(BLOCKD *d, int pitch, vp9_subpix_fn_t sppf) {
|
||||
int r;
|
||||
unsigned char *ptr_base;
|
||||
@@ -233,10 +219,13 @@ void vp9_build_inter_predictors_b(BLOCKD *d, int pitch, vp9_subpix_fn_t sppf) {
|
||||
mv.as_int = d->bmi.as_mv.first.as_int;
|
||||
|
||||
if (mv.as_mv.row & 7 || mv.as_mv.col & 7) {
|
||||
ptr = ptr_base + d->pre + (mv.as_mv.row >> 3) * d->pre_stride + (mv.as_mv.col >> 3);
|
||||
sppf(ptr, d->pre_stride, (mv.as_mv.col & 7) << 1, (mv.as_mv.row & 7) << 1, pred_ptr, pitch);
|
||||
ptr = ptr_base + d->pre + (mv.as_mv.row >> 3) * d->pre_stride +
|
||||
(mv.as_mv.col >> 3);
|
||||
sppf(ptr, d->pre_stride, (mv.as_mv.col & 7) << 1, (mv.as_mv.row & 7) << 1,
|
||||
pred_ptr, pitch);
|
||||
} else {
|
||||
ptr_base += d->pre + (mv.as_mv.row >> 3) * d->pre_stride + (mv.as_mv.col >> 3);
|
||||
ptr_base += d->pre + (mv.as_mv.row >> 3) * d->pre_stride +
|
||||
(mv.as_mv.col >> 3);
|
||||
ptr = ptr_base;
|
||||
|
||||
for (r = 0; r < 4; r++) {
|
||||
@@ -260,7 +249,8 @@ void vp9_build_inter_predictors_b(BLOCKD *d, int pitch, vp9_subpix_fn_t sppf) {
|
||||
* come from an earlier call to vp9_build_inter_predictors_b()) with the
|
||||
* predictor of the second reference frame / motion vector.
|
||||
*/
|
||||
void vp9_build_2nd_inter_predictors_b(BLOCKD *d, int pitch, vp9_subpix_fn_t sppf) {
|
||||
void vp9_build_2nd_inter_predictors_b(BLOCKD *d, int pitch,
|
||||
vp9_subpix_fn_t sppf) {
|
||||
int r;
|
||||
unsigned char *ptr_base;
|
||||
unsigned char *ptr;
|
||||
@@ -271,10 +261,13 @@ void vp9_build_2nd_inter_predictors_b(BLOCKD *d, int pitch, vp9_subpix_fn_t sppf
|
||||
mv.as_int = d->bmi.as_mv.second.as_int;
|
||||
|
||||
if (mv.as_mv.row & 7 || mv.as_mv.col & 7) {
|
||||
ptr = ptr_base + d->pre + (mv.as_mv.row >> 3) * d->pre_stride + (mv.as_mv.col >> 3);
|
||||
sppf(ptr, d->pre_stride, (mv.as_mv.col & 7) << 1, (mv.as_mv.row & 7) << 1, pred_ptr, pitch);
|
||||
ptr = ptr_base + d->pre + (mv.as_mv.row >> 3) * d->pre_stride +
|
||||
(mv.as_mv.col >> 3);
|
||||
sppf(ptr, d->pre_stride, (mv.as_mv.col & 7) << 1, (mv.as_mv.row & 7) << 1,
|
||||
pred_ptr, pitch);
|
||||
} else {
|
||||
ptr_base += d->pre + (mv.as_mv.row >> 3) * d->pre_stride + (mv.as_mv.col >> 3);
|
||||
ptr_base += d->pre + (mv.as_mv.row >> 3) * d->pre_stride +
|
||||
(mv.as_mv.col >> 3);
|
||||
ptr = ptr_base;
|
||||
|
||||
for (r = 0; r < 4; r++) {
|
||||
|
||||
@@ -8,7 +8,6 @@
|
||||
* be found in the AUTHORS file in the root of the source tree.
|
||||
*/
|
||||
|
||||
|
||||
#ifndef __INC_RECONINTER_H
|
||||
#define __INC_RECONINTER_H
|
||||
|
||||
@@ -18,10 +17,12 @@ extern void vp9_build_1st_inter16x16_predictors_mby(MACROBLOCKD *xd,
|
||||
unsigned char *dst_y,
|
||||
int dst_ystride,
|
||||
int clamp_mvs);
|
||||
|
||||
extern void vp9_build_1st_inter16x16_predictors_mbuv(MACROBLOCKD *xd,
|
||||
unsigned char *dst_u,
|
||||
unsigned char *dst_v,
|
||||
int dst_uvstride);
|
||||
|
||||
extern void vp9_build_1st_inter16x16_predictors_mb(MACROBLOCKD *xd,
|
||||
unsigned char *dst_y,
|
||||
unsigned char *dst_u,
|
||||
@@ -32,10 +33,12 @@ extern void vp9_build_1st_inter16x16_predictors_mb(MACROBLOCKD *xd,
|
||||
extern void vp9_build_2nd_inter16x16_predictors_mby(MACROBLOCKD *xd,
|
||||
unsigned char *dst_y,
|
||||
int dst_ystride);
|
||||
|
||||
extern void vp9_build_2nd_inter16x16_predictors_mbuv(MACROBLOCKD *xd,
|
||||
unsigned char *dst_u,
|
||||
unsigned char *dst_v,
|
||||
int dst_uvstride);
|
||||
|
||||
extern void vp9_build_2nd_inter16x16_predictors_mb(MACROBLOCKD *xd,
|
||||
unsigned char *dst_y,
|
||||
unsigned char *dst_u,
|
||||
@@ -56,17 +59,20 @@ extern void vp9_build_inter_predictors_mb(MACROBLOCKD *xd);
|
||||
|
||||
extern void vp9_build_inter_predictors_b(BLOCKD *d, int pitch,
|
||||
vp9_subpix_fn_t sppf);
|
||||
|
||||
extern void vp9_build_2nd_inter_predictors_b(BLOCKD *d, int pitch,
|
||||
vp9_subpix_fn_t sppf);
|
||||
|
||||
extern void vp9_build_inter_predictors4b(MACROBLOCKD *xd, BLOCKD *d,
|
||||
int pitch);
|
||||
|
||||
extern void vp9_build_2nd_inter_predictors4b(MACROBLOCKD *xd,
|
||||
BLOCKD *d, int pitch);
|
||||
|
||||
extern void vp9_build_inter4x4_predictors_mbuv(MACROBLOCKD *xd);
|
||||
|
||||
extern void vp9_setup_interp_filters(MACROBLOCKD *xd,
|
||||
INTERPOLATIONFILTERTYPE filter,
|
||||
VP9_COMMON *cm);
|
||||
|
||||
#endif
|
||||
#endif // __INC_RECONINTER_H
|
||||
|
||||
@@ -201,7 +201,7 @@ void vp9_recon_intra_mbuv(MACROBLOCKD *xd) {
|
||||
|
||||
for (i = 16; i < 24; i += 2) {
|
||||
BLOCKD *b = &xd->block[i];
|
||||
vp9_recon2b(b->predictor, b->diff,*(b->base_dst) + b->dst, b->dst_stride);
|
||||
vp9_recon2b(b->predictor, b->diff, *(b->base_dst) + b->dst, b->dst_stride);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -8,7 +8,6 @@
|
||||
* be found in the AUTHORS file in the root of the source tree.
|
||||
*/
|
||||
|
||||
|
||||
#ifndef __INC_RECONINTRA_H
|
||||
#define __INC_RECONINTRA_H
|
||||
|
||||
@@ -16,4 +15,4 @@
|
||||
|
||||
extern void init_intra_left_above_pixels(MACROBLOCKD *xd);
|
||||
|
||||
#endif
|
||||
#endif // __INC_RECONINTRA_H
|
||||
|
||||
@@ -8,10 +8,10 @@
|
||||
* be found in the AUTHORS file in the root of the source tree.
|
||||
*/
|
||||
|
||||
|
||||
#include "swapyv12buffer.h"
|
||||
|
||||
void vp9_swap_yv12_buffer(YV12_BUFFER_CONFIG *new_frame, YV12_BUFFER_CONFIG *last_frame) {
|
||||
void vp9_swap_yv12_buffer(YV12_BUFFER_CONFIG *new_frame,
|
||||
YV12_BUFFER_CONFIG *last_frame) {
|
||||
unsigned char *temp;
|
||||
|
||||
temp = last_frame->buffer_alloc;
|
||||
@@ -29,5 +29,4 @@ void vp9_swap_yv12_buffer(YV12_BUFFER_CONFIG *new_frame, YV12_BUFFER_CONFIG *las
|
||||
temp = last_frame->v_buffer;
|
||||
last_frame->v_buffer = new_frame->v_buffer;
|
||||
new_frame->v_buffer = temp;
|
||||
|
||||
}
|
||||
|
||||
@@ -8,12 +8,12 @@
|
||||
* be found in the AUTHORS file in the root of the source tree.
|
||||
*/
|
||||
|
||||
|
||||
#ifndef SWAPYV12_BUFFER_H
|
||||
#define SWAPYV12_BUFFER_H
|
||||
#ifndef __SWAPYV12_BUFFER_H
|
||||
#define __SWAPYV12_BUFFER_H
|
||||
|
||||
#include "vpx_scale/yv12config.h"
|
||||
|
||||
void vp9_swap_yv12_buffer(YV12_BUFFER_CONFIG *new_frame, YV12_BUFFER_CONFIG *last_frame);
|
||||
void vp9_swap_yv12_buffer(YV12_BUFFER_CONFIG *new_frame,
|
||||
YV12_BUFFER_CONFIG *last_frame);
|
||||
|
||||
#endif
|
||||
#endif // __SWAPYV12_BUFFER_H
|
||||
|
||||
@@ -8,7 +8,6 @@
|
||||
* be found in the AUTHORS file in the root of the source tree.
|
||||
*/
|
||||
|
||||
|
||||
#include <emmintrin.h> // SSE2
|
||||
#include "vpx_config.h"
|
||||
#include "vp8/common/loopfilter.h"
|
||||
@@ -24,64 +23,73 @@ extern loop_filter_uvfunction vp9_loop_filter_vertical_edge_uv_sse2;
|
||||
|
||||
#if HAVE_MMX
|
||||
/* Horizontal MB filtering */
|
||||
void vp9_loop_filter_mbh_mmx(unsigned char *y_ptr, unsigned char *u_ptr, unsigned char *v_ptr,
|
||||
int y_stride, int uv_stride, struct loop_filter_info *lfi) {
|
||||
void vp9_loop_filter_mbh_mmx(unsigned char *y_ptr,
|
||||
unsigned char *u_ptr, unsigned char *v_ptr,
|
||||
int y_stride, int uv_stride,
|
||||
struct loop_filter_info *lfi) {
|
||||
}
|
||||
|
||||
|
||||
/* Vertical MB Filtering */
|
||||
void vp9_loop_filter_mbv_mmx(unsigned char *y_ptr, unsigned char *u_ptr, unsigned char *v_ptr,
|
||||
int y_stride, int uv_stride, struct loop_filter_info *lfi) {
|
||||
void vp9_loop_filter_mbv_mmx(unsigned char *y_ptr,
|
||||
unsigned char *u_ptr, unsigned char *v_ptr,
|
||||
int y_stride, int uv_stride,
|
||||
struct loop_filter_info *lfi) {
|
||||
}
|
||||
|
||||
|
||||
/* Horizontal B Filtering */
|
||||
void vp9_loop_filter_bh_mmx(unsigned char *y_ptr, unsigned char *u_ptr, unsigned char *v_ptr,
|
||||
int y_stride, int uv_stride, struct loop_filter_info *lfi) {
|
||||
void vp9_loop_filter_bh_mmx(unsigned char *y_ptr,
|
||||
unsigned char *u_ptr, unsigned char *v_ptr,
|
||||
int y_stride, int uv_stride,
|
||||
struct loop_filter_info *lfi) {
|
||||
|
||||
}
|
||||
|
||||
|
||||
void vp9_loop_filter_bhs_mmx(unsigned char *y_ptr, int y_stride, const unsigned char *blimit) {
|
||||
vp9_loop_filter_simple_horizontal_edge_mmx(y_ptr + 4 * y_stride, y_stride, blimit);
|
||||
vp9_loop_filter_simple_horizontal_edge_mmx(y_ptr + 8 * y_stride, y_stride, blimit);
|
||||
vp9_loop_filter_simple_horizontal_edge_mmx(y_ptr + 12 * y_stride, y_stride, blimit);
|
||||
void vp9_loop_filter_bhs_mmx(unsigned char *y_ptr, int y_stride,
|
||||
const unsigned char *blimit) {
|
||||
vp9_loop_filter_simple_horizontal_edge_mmx(y_ptr + 4 * y_stride,
|
||||
y_stride, blimit);
|
||||
vp9_loop_filter_simple_horizontal_edge_mmx(y_ptr + 8 * y_stride,
|
||||
y_stride, blimit);
|
||||
vp9_loop_filter_simple_horizontal_edge_mmx(y_ptr + 12 * y_stride,
|
||||
y_stride, blimit);
|
||||
}
|
||||
|
||||
|
||||
/* Vertical B Filtering */
|
||||
void vp9_loop_filter_bv_mmx(unsigned char *y_ptr, unsigned char *u_ptr, unsigned char *v_ptr,
|
||||
int y_stride, int uv_stride, struct loop_filter_info *lfi) {
|
||||
vp9_loop_filter_vertical_edge_mmx(y_ptr + 4, y_stride, lfi->blim, lfi->lim, lfi->hev_thr, 2);
|
||||
vp9_loop_filter_vertical_edge_mmx(y_ptr + 8, y_stride, lfi->blim, lfi->lim, lfi->hev_thr, 2);
|
||||
vp9_loop_filter_vertical_edge_mmx(y_ptr + 12, y_stride, lfi->blim, lfi->lim, lfi->hev_thr, 2);
|
||||
void vp9_loop_filter_bv_mmx(unsigned char *y_ptr,
|
||||
unsigned char *u_ptr, unsigned char *v_ptr,
|
||||
int y_stride, int uv_stride,
|
||||
struct loop_filter_info *lfi) {
|
||||
vp9_loop_filter_vertical_edge_mmx(y_ptr + 4, y_stride,
|
||||
lfi->blim, lfi->lim, lfi->hev_thr, 2);
|
||||
vp9_loop_filter_vertical_edge_mmx(y_ptr + 8, y_stride,
|
||||
lfi->blim, lfi->lim, lfi->hev_thr, 2);
|
||||
vp9_loop_filter_vertical_edge_mmx(y_ptr + 12, y_stride,
|
||||
lfi->blim, lfi->lim, lfi->hev_thr, 2);
|
||||
|
||||
if (u_ptr)
|
||||
vp9_loop_filter_vertical_edge_mmx(u_ptr + 4, uv_stride, lfi->blim, lfi->lim, lfi->hev_thr, 1);
|
||||
vp9_loop_filter_vertical_edge_mmx(u_ptr + 4, uv_stride,
|
||||
lfi->blim, lfi->lim, lfi->hev_thr, 1);
|
||||
|
||||
if (v_ptr)
|
||||
vp9_loop_filter_vertical_edge_mmx(v_ptr + 4, uv_stride, lfi->blim, lfi->lim, lfi->hev_thr, 1);
|
||||
vp9_loop_filter_vertical_edge_mmx(v_ptr + 4, uv_stride,
|
||||
lfi->blim, lfi->lim, lfi->hev_thr, 1);
|
||||
}
|
||||
|
||||
|
||||
void vp9_loop_filter_bvs_mmx(unsigned char *y_ptr, int y_stride, const unsigned char *blimit) {
|
||||
void vp9_loop_filter_bvs_mmx(unsigned char *y_ptr, int y_stride,
|
||||
const unsigned char *blimit) {
|
||||
vp9_loop_filter_simple_vertical_edge_mmx(y_ptr + 4, y_stride, blimit);
|
||||
vp9_loop_filter_simple_vertical_edge_mmx(y_ptr + 8, y_stride, blimit);
|
||||
vp9_loop_filter_simple_vertical_edge_mmx(y_ptr + 12, y_stride, blimit);
|
||||
}
|
||||
#endif
|
||||
|
||||
|
||||
#if HAVE_SSE2
|
||||
void vp9_mbloop_filter_horizontal_edge_c_sse2
|
||||
(
|
||||
unsigned char *s,
|
||||
int p,
|
||||
const unsigned char *_blimit,
|
||||
const unsigned char *_limit,
|
||||
const unsigned char *_thresh,
|
||||
int count
|
||||
) {
|
||||
void vp9_mbloop_filter_horizontal_edge_c_sse2(unsigned char *s,
|
||||
int p,
|
||||
const unsigned char *_blimit,
|
||||
const unsigned char *_limit,
|
||||
const unsigned char *_thresh,
|
||||
int count) {
|
||||
DECLARE_ALIGNED(16, unsigned char, flat_op2[16]);
|
||||
DECLARE_ALIGNED(16, unsigned char, flat_op1[16]);
|
||||
DECLARE_ALIGNED(16, unsigned char, flat_op0[16]);
|
||||
@@ -330,6 +338,7 @@ void vp9_mbloop_filter_horizontal_edge_c_sse2
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
static __inline void transpose(unsigned char *src[], int in_p,
|
||||
unsigned char *dst[], int out_p,
|
||||
int num_8x8_to_transpose) {
|
||||
@@ -392,15 +401,13 @@ static __inline void transpose(unsigned char *src[], int in_p,
|
||||
_mm_castsi128_pd(x7)); // 07 17 27 37 47 57 67 77
|
||||
} while (++idx8x8 < num_8x8_to_transpose);
|
||||
}
|
||||
void vp9_mbloop_filter_vertical_edge_c_sse2
|
||||
(
|
||||
unsigned char *s,
|
||||
int p,
|
||||
const unsigned char *blimit,
|
||||
const unsigned char *limit,
|
||||
const unsigned char *thresh,
|
||||
int count
|
||||
) {
|
||||
|
||||
void vp9_mbloop_filter_vertical_edge_c_sse2(unsigned char *s,
|
||||
int p,
|
||||
const unsigned char *blimit,
|
||||
const unsigned char *limit,
|
||||
const unsigned char *thresh,
|
||||
int count) {
|
||||
DECLARE_ALIGNED(16, unsigned char, t_dst[16 * 16]);
|
||||
unsigned char *src[4];
|
||||
unsigned char *dst[4];
|
||||
@@ -432,9 +439,10 @@ void vp9_mbloop_filter_vertical_edge_c_sse2
|
||||
}
|
||||
|
||||
/* Horizontal MB filtering */
|
||||
void vp9_loop_filter_mbh_sse2(unsigned char *y_ptr, unsigned char *u_ptr, unsigned char *v_ptr,
|
||||
int y_stride, int uv_stride, struct loop_filter_info *lfi) {
|
||||
|
||||
void vp9_loop_filter_mbh_sse2(unsigned char *y_ptr,
|
||||
unsigned char *u_ptr, unsigned char *v_ptr,
|
||||
int y_stride, int uv_stride,
|
||||
struct loop_filter_info *lfi) {
|
||||
vp9_mbloop_filter_horizontal_edge_c_sse2(y_ptr, y_stride, lfi->mblim,
|
||||
lfi->lim, lfi->hev_thr, 2);
|
||||
|
||||
@@ -480,37 +488,53 @@ void vp9_loop_filter_bv8x8_sse2(unsigned char *y_ptr, unsigned char *u_ptr,
|
||||
}
|
||||
|
||||
/* Horizontal B Filtering */
|
||||
void vp9_loop_filter_bh_sse2(unsigned char *y_ptr, unsigned char *u_ptr, unsigned char *v_ptr,
|
||||
int y_stride, int uv_stride, struct loop_filter_info *lfi) {
|
||||
vp9_loop_filter_horizontal_edge_sse2(y_ptr + 4 * y_stride, y_stride, lfi->blim, lfi->lim, lfi->hev_thr, 2);
|
||||
vp9_loop_filter_horizontal_edge_sse2(y_ptr + 8 * y_stride, y_stride, lfi->blim, lfi->lim, lfi->hev_thr, 2);
|
||||
vp9_loop_filter_horizontal_edge_sse2(y_ptr + 12 * y_stride, y_stride, lfi->blim, lfi->lim, lfi->hev_thr, 2);
|
||||
void vp9_loop_filter_bh_sse2(unsigned char *y_ptr,
|
||||
unsigned char *u_ptr, unsigned char *v_ptr,
|
||||
int y_stride, int uv_stride,
|
||||
struct loop_filter_info *lfi) {
|
||||
vp9_loop_filter_horizontal_edge_sse2(y_ptr + 4 * y_stride, y_stride,
|
||||
lfi->blim, lfi->lim, lfi->hev_thr, 2);
|
||||
vp9_loop_filter_horizontal_edge_sse2(y_ptr + 8 * y_stride, y_stride,
|
||||
lfi->blim, lfi->lim, lfi->hev_thr, 2);
|
||||
vp9_loop_filter_horizontal_edge_sse2(y_ptr + 12 * y_stride, y_stride,
|
||||
lfi->blim, lfi->lim, lfi->hev_thr, 2);
|
||||
|
||||
if (u_ptr)
|
||||
vp9_loop_filter_horizontal_edge_uv_sse2(u_ptr + 4 * uv_stride, uv_stride, lfi->blim, lfi->lim, lfi->hev_thr, v_ptr + 4 * uv_stride);
|
||||
vp9_loop_filter_horizontal_edge_uv_sse2(u_ptr + 4 * uv_stride, uv_stride,
|
||||
lfi->blim, lfi->lim, lfi->hev_thr,
|
||||
v_ptr + 4 * uv_stride);
|
||||
}
|
||||
|
||||
|
||||
void vp9_loop_filter_bhs_sse2(unsigned char *y_ptr, int y_stride, const unsigned char *blimit) {
|
||||
vp9_loop_filter_simple_horizontal_edge_sse2(y_ptr + 4 * y_stride, y_stride, blimit);
|
||||
vp9_loop_filter_simple_horizontal_edge_sse2(y_ptr + 8 * y_stride, y_stride, blimit);
|
||||
vp9_loop_filter_simple_horizontal_edge_sse2(y_ptr + 12 * y_stride, y_stride, blimit);
|
||||
void vp9_loop_filter_bhs_sse2(unsigned char *y_ptr, int y_stride,
|
||||
const unsigned char *blimit) {
|
||||
vp9_loop_filter_simple_horizontal_edge_sse2(y_ptr + 4 * y_stride,
|
||||
y_stride, blimit);
|
||||
vp9_loop_filter_simple_horizontal_edge_sse2(y_ptr + 8 * y_stride,
|
||||
y_stride, blimit);
|
||||
vp9_loop_filter_simple_horizontal_edge_sse2(y_ptr + 12 * y_stride,
|
||||
y_stride, blimit);
|
||||
}
|
||||
|
||||
|
||||
/* Vertical B Filtering */
|
||||
void vp9_loop_filter_bv_sse2(unsigned char *y_ptr, unsigned char *u_ptr, unsigned char *v_ptr,
|
||||
int y_stride, int uv_stride, struct loop_filter_info *lfi) {
|
||||
vp9_loop_filter_vertical_edge_sse2(y_ptr + 4, y_stride, lfi->blim, lfi->lim, lfi->hev_thr, 2);
|
||||
vp9_loop_filter_vertical_edge_sse2(y_ptr + 8, y_stride, lfi->blim, lfi->lim, lfi->hev_thr, 2);
|
||||
vp9_loop_filter_vertical_edge_sse2(y_ptr + 12, y_stride, lfi->blim, lfi->lim, lfi->hev_thr, 2);
|
||||
void vp9_loop_filter_bv_sse2(unsigned char *y_ptr,
|
||||
unsigned char *u_ptr, unsigned char *v_ptr,
|
||||
int y_stride, int uv_stride,
|
||||
struct loop_filter_info *lfi) {
|
||||
vp9_loop_filter_vertical_edge_sse2(y_ptr + 4, y_stride,
|
||||
lfi->blim, lfi->lim, lfi->hev_thr, 2);
|
||||
vp9_loop_filter_vertical_edge_sse2(y_ptr + 8, y_stride,
|
||||
lfi->blim, lfi->lim, lfi->hev_thr, 2);
|
||||
vp9_loop_filter_vertical_edge_sse2(y_ptr + 12, y_stride,
|
||||
lfi->blim, lfi->lim, lfi->hev_thr, 2);
|
||||
|
||||
if (u_ptr)
|
||||
vp9_loop_filter_vertical_edge_uv_sse2(u_ptr + 4, uv_stride, lfi->blim, lfi->lim, lfi->hev_thr, v_ptr + 4);
|
||||
vp9_loop_filter_vertical_edge_uv_sse2(u_ptr + 4, uv_stride,
|
||||
lfi->blim, lfi->lim, lfi->hev_thr,
|
||||
v_ptr + 4);
|
||||
}
|
||||
|
||||
|
||||
void vp9_loop_filter_bvs_sse2(unsigned char *y_ptr, int y_stride, const unsigned char *blimit) {
|
||||
void vp9_loop_filter_bvs_sse2(unsigned char *y_ptr, int y_stride,
|
||||
const unsigned char *blimit) {
|
||||
vp9_loop_filter_simple_vertical_edge_sse2(y_ptr + 4, y_stride, blimit);
|
||||
vp9_loop_filter_simple_vertical_edge_sse2(y_ptr + 8, y_stride, blimit);
|
||||
vp9_loop_filter_simple_vertical_edge_sse2(y_ptr + 12, y_stride, blimit);
|
||||
|
||||
@@ -8,7 +8,6 @@
|
||||
* be found in the AUTHORS file in the root of the source tree.
|
||||
*/
|
||||
|
||||
|
||||
#ifndef LOOPFILTER_X86_H
|
||||
#define LOOPFILTER_X86_H
|
||||
|
||||
@@ -30,7 +29,6 @@ extern prototype_simple_loopfilter(vp9_loop_filter_simple_horizontal_edge_mmx);
|
||||
extern prototype_simple_loopfilter(vp9_loop_filter_bhs_mmx);
|
||||
#endif
|
||||
|
||||
|
||||
#if HAVE_SSE2
|
||||
extern prototype_loopfilter_block(vp9_loop_filter_mbv_sse2);
|
||||
extern prototype_loopfilter_block(vp9_loop_filter_bv_sse2);
|
||||
@@ -42,5 +40,4 @@ extern prototype_simple_loopfilter(vp9_loop_filter_simple_horizontal_edge_sse2);
|
||||
extern prototype_simple_loopfilter(vp9_loop_filter_bhs_sse2);
|
||||
#endif
|
||||
|
||||
|
||||
#endif
|
||||
#endif // LOOPFILTER_X86_H
|
||||
|
||||
@@ -14,516 +14,489 @@
|
||||
#include "vp8/common/subpixel.h"
|
||||
|
||||
extern const short vp9_six_tap_mmx[16][6 * 8];
|
||||
|
||||
extern const short vp9_bilinear_filters_8x_mmx[16][2 * 8];
|
||||
|
||||
extern void vp9_filter_block1d_h6_mmx
|
||||
(
|
||||
unsigned char *src_ptr,
|
||||
unsigned short *output_ptr,
|
||||
unsigned int src_pixels_per_line,
|
||||
unsigned int pixel_step,
|
||||
unsigned int output_height,
|
||||
unsigned int output_width,
|
||||
const short *vp9_filter
|
||||
);
|
||||
extern void vp9_filter_block1dc_v6_mmx
|
||||
(
|
||||
unsigned short *src_ptr,
|
||||
unsigned char *output_ptr,
|
||||
int output_pitch,
|
||||
unsigned int pixels_per_line,
|
||||
unsigned int pixel_step,
|
||||
unsigned int output_height,
|
||||
unsigned int output_width,
|
||||
const short *vp9_filter
|
||||
);
|
||||
extern void vp9_filter_block1d8_h6_sse2
|
||||
(
|
||||
unsigned char *src_ptr,
|
||||
unsigned short *output_ptr,
|
||||
unsigned int src_pixels_per_line,
|
||||
unsigned int pixel_step,
|
||||
unsigned int output_height,
|
||||
unsigned int output_width,
|
||||
const short *vp9_filter
|
||||
);
|
||||
extern void vp9_filter_block1d16_h6_sse2
|
||||
(
|
||||
unsigned char *src_ptr,
|
||||
unsigned short *output_ptr,
|
||||
unsigned int src_pixels_per_line,
|
||||
unsigned int pixel_step,
|
||||
unsigned int output_height,
|
||||
unsigned int output_width,
|
||||
const short *vp9_filter
|
||||
);
|
||||
extern void vp9_filter_block1d8_v6_sse2
|
||||
(
|
||||
unsigned short *src_ptr,
|
||||
unsigned char *output_ptr,
|
||||
int dst_ptich,
|
||||
unsigned int pixels_per_line,
|
||||
unsigned int pixel_step,
|
||||
unsigned int output_height,
|
||||
unsigned int output_width,
|
||||
const short *vp9_filter
|
||||
);
|
||||
extern void vp9_filter_block1d16_v6_sse2
|
||||
(
|
||||
unsigned short *src_ptr,
|
||||
unsigned char *output_ptr,
|
||||
int dst_ptich,
|
||||
unsigned int pixels_per_line,
|
||||
unsigned int pixel_step,
|
||||
unsigned int output_height,
|
||||
unsigned int output_width,
|
||||
const short *vp9_filter
|
||||
);
|
||||
extern void vp9_unpack_block1d16_h6_sse2
|
||||
(
|
||||
unsigned char *src_ptr,
|
||||
unsigned short *output_ptr,
|
||||
unsigned int src_pixels_per_line,
|
||||
unsigned int output_height,
|
||||
unsigned int output_width
|
||||
);
|
||||
extern void vp9_filter_block1d8_h6_only_sse2
|
||||
(
|
||||
unsigned char *src_ptr,
|
||||
unsigned int src_pixels_per_line,
|
||||
unsigned char *output_ptr,
|
||||
int dst_ptich,
|
||||
unsigned int output_height,
|
||||
const short *vp9_filter
|
||||
);
|
||||
extern void vp9_filter_block1d16_h6_only_sse2
|
||||
(
|
||||
unsigned char *src_ptr,
|
||||
unsigned int src_pixels_per_line,
|
||||
unsigned char *output_ptr,
|
||||
int dst_ptich,
|
||||
unsigned int output_height,
|
||||
const short *vp9_filter
|
||||
);
|
||||
extern void vp9_filter_block1d8_v6_only_sse2
|
||||
(
|
||||
unsigned char *src_ptr,
|
||||
unsigned int src_pixels_per_line,
|
||||
unsigned char *output_ptr,
|
||||
int dst_ptich,
|
||||
unsigned int output_height,
|
||||
const short *vp9_filter
|
||||
);
|
||||
extern void vp9_filter_block1d_h6_mmx(unsigned char *src_ptr,
|
||||
unsigned short *output_ptr,
|
||||
unsigned int src_pixels_per_line,
|
||||
unsigned int pixel_step,
|
||||
unsigned int output_height,
|
||||
unsigned int output_width,
|
||||
const short *vp9_filter);
|
||||
|
||||
extern void vp9_filter_block1dc_v6_mmx(unsigned short *src_ptr,
|
||||
unsigned char *output_ptr,
|
||||
int output_pitch,
|
||||
unsigned int pixels_per_line,
|
||||
unsigned int pixel_step,
|
||||
unsigned int output_height,
|
||||
unsigned int output_width,
|
||||
const short *vp9_filter);
|
||||
|
||||
extern void vp9_filter_block1d8_h6_sse2(unsigned char *src_ptr,
|
||||
unsigned short *output_ptr,
|
||||
unsigned int src_pixels_per_line,
|
||||
unsigned int pixel_step,
|
||||
unsigned int output_height,
|
||||
unsigned int output_width,
|
||||
const short *vp9_filter);
|
||||
|
||||
extern void vp9_filter_block1d16_h6_sse2(unsigned char *src_ptr,
|
||||
unsigned short *output_ptr,
|
||||
unsigned int src_pixels_per_line,
|
||||
unsigned int pixel_step,
|
||||
unsigned int output_height,
|
||||
unsigned int output_width,
|
||||
const short *vp9_filter);
|
||||
|
||||
extern void vp9_filter_block1d8_v6_sse2(unsigned short *src_ptr,
|
||||
unsigned char *output_ptr,
|
||||
int dst_ptich,
|
||||
unsigned int pixels_per_line,
|
||||
unsigned int pixel_step,
|
||||
unsigned int output_height,
|
||||
unsigned int output_width,
|
||||
const short *vp9_filter);
|
||||
|
||||
extern void vp9_filter_block1d16_v6_sse2(unsigned short *src_ptr,
|
||||
unsigned char *output_ptr,
|
||||
int dst_ptich,
|
||||
unsigned int pixels_per_line,
|
||||
unsigned int pixel_step,
|
||||
unsigned int output_height,
|
||||
unsigned int output_width,
|
||||
const short *vp9_filter);
|
||||
|
||||
extern void vp9_unpack_block1d16_h6_sse2(unsigned char *src_ptr,
|
||||
unsigned short *output_ptr,
|
||||
unsigned int src_pixels_per_line,
|
||||
unsigned int output_height,
|
||||
unsigned int output_width);
|
||||
|
||||
extern void vp9_filter_block1d8_h6_only_sse2(unsigned char *src_ptr,
|
||||
unsigned int src_pixels_per_line,
|
||||
unsigned char *output_ptr,
|
||||
int dst_pitch,
|
||||
unsigned int output_height,
|
||||
const short *vp9_filter);
|
||||
|
||||
extern void vp9_filter_block1d16_h6_only_sse2(unsigned char *src_ptr,
|
||||
unsigned int src_pixels_per_lin,
|
||||
unsigned char *output_ptr,
|
||||
int dst_pitch,
|
||||
unsigned int output_height,
|
||||
const short *vp9_filter);
|
||||
|
||||
extern void vp9_filter_block1d8_v6_only_sse2(unsigned char *src_ptr,
|
||||
unsigned int src_pixels_per_line,
|
||||
unsigned char *output_ptr,
|
||||
int dst_pitch,
|
||||
unsigned int output_height,
|
||||
const short *vp9_filter);
|
||||
|
||||
extern prototype_subpixel_predict(vp9_bilinear_predict8x8_mmx);
|
||||
|
||||
|
||||
#if HAVE_MMX
|
||||
void vp9_sixtap_predict4x4_mmx
|
||||
(
|
||||
unsigned char *src_ptr,
|
||||
int src_pixels_per_line,
|
||||
int xoffset,
|
||||
int yoffset,
|
||||
unsigned char *dst_ptr,
|
||||
int dst_pitch
|
||||
) {
|
||||
void vp9_sixtap_predict4x4_mmx(unsigned char *src_ptr,
|
||||
int src_pixels_per_line,
|
||||
int xoffset,
|
||||
int yoffset,
|
||||
unsigned char *dst_ptr,
|
||||
int dst_pitch) {
|
||||
#ifdef ANNOUNCE_FUNCTION
|
||||
printf("vp9_sixtap_predict4x4_mmx\n");
|
||||
#endif
|
||||
DECLARE_ALIGNED_ARRAY(16, unsigned short, FData2, 16 * 16); /* Temp data bufffer used in filtering */
|
||||
const short *HFilter, *VFilter;
|
||||
HFilter = vp9_six_tap_mmx[xoffset];
|
||||
vp9_filter_block1d_h6_mmx(src_ptr - (2 * src_pixels_per_line), FData2, src_pixels_per_line, 1, 9, 8, HFilter);
|
||||
VFilter = vp9_six_tap_mmx[yoffset];
|
||||
vp9_filter_block1dc_v6_mmx(FData2 + 8, dst_ptr, dst_pitch, 8, 4, 4, 4, VFilter);
|
||||
|
||||
/* Temp data bufffer used in filtering */
|
||||
DECLARE_ALIGNED_ARRAY(16, unsigned short, fdata2, 16 * 16);
|
||||
const short *hfilter, *vfilter;
|
||||
hfilter = vp9_six_tap_mmx[xoffset];
|
||||
vp9_filter_block1d_h6_mmx(src_ptr - (2 * src_pixels_per_line), fdata2,
|
||||
src_pixels_per_line, 1, 9, 8, hfilter);
|
||||
vfilter = vp9_six_tap_mmx[yoffset];
|
||||
vp9_filter_block1dc_v6_mmx(fdata2 + 8, dst_ptr, dst_pitch,
|
||||
8, 4, 4, 4, vfilter);
|
||||
}
|
||||
|
||||
|
||||
void vp9_sixtap_predict16x16_mmx
|
||||
(
|
||||
unsigned char *src_ptr,
|
||||
int src_pixels_per_line,
|
||||
int xoffset,
|
||||
int yoffset,
|
||||
unsigned char *dst_ptr,
|
||||
int dst_pitch
|
||||
) {
|
||||
|
||||
void vp9_sixtap_predict16x16_mmx(unsigned char *src_ptr,
|
||||
int src_pixels_per_line,
|
||||
int xoffset,
|
||||
int yoffset,
|
||||
unsigned char *dst_ptr,
|
||||
int dst_pitch) {
|
||||
#ifdef ANNOUNCE_FUNCTION
|
||||
printf("vp9_sixtap_predict16x16_mmx\n");
|
||||
#endif
|
||||
DECLARE_ALIGNED_ARRAY(16, unsigned short, FData2, 24 * 24); /* Temp data bufffer used in filtering */
|
||||
/* Temp data bufffer used in filtering */
|
||||
DECLARE_ALIGNED_ARRAY(16, unsigned short, fdata2, 24 * 24);
|
||||
const short *hfilter, *vfilter;
|
||||
|
||||
const short *HFilter, *VFilter;
|
||||
|
||||
|
||||
HFilter = vp9_six_tap_mmx[xoffset];
|
||||
|
||||
vp9_filter_block1d_h6_mmx(src_ptr - (2 * src_pixels_per_line), FData2, src_pixels_per_line, 1, 21, 32, HFilter);
|
||||
vp9_filter_block1d_h6_mmx(src_ptr - (2 * src_pixels_per_line) + 4, FData2 + 4, src_pixels_per_line, 1, 21, 32, HFilter);
|
||||
vp9_filter_block1d_h6_mmx(src_ptr - (2 * src_pixels_per_line) + 8, FData2 + 8, src_pixels_per_line, 1, 21, 32, HFilter);
|
||||
vp9_filter_block1d_h6_mmx(src_ptr - (2 * src_pixels_per_line) + 12, FData2 + 12, src_pixels_per_line, 1, 21, 32, HFilter);
|
||||
|
||||
VFilter = vp9_six_tap_mmx[yoffset];
|
||||
vp9_filter_block1dc_v6_mmx(FData2 + 32, dst_ptr, dst_pitch, 32, 16, 16, 16, VFilter);
|
||||
vp9_filter_block1dc_v6_mmx(FData2 + 36, dst_ptr + 4, dst_pitch, 32, 16, 16, 16, VFilter);
|
||||
vp9_filter_block1dc_v6_mmx(FData2 + 40, dst_ptr + 8, dst_pitch, 32, 16, 16, 16, VFilter);
|
||||
vp9_filter_block1dc_v6_mmx(FData2 + 44, dst_ptr + 12, dst_pitch, 32, 16, 16, 16, VFilter);
|
||||
hfilter = vp9_six_tap_mmx[xoffset];
|
||||
vp9_filter_block1d_h6_mmx(src_ptr - (2 * src_pixels_per_line),
|
||||
fdata2, src_pixels_per_line, 1, 21, 32,
|
||||
hfilter);
|
||||
vp9_filter_block1d_h6_mmx(src_ptr - (2 * src_pixels_per_line) + 4,
|
||||
fdata2 + 4, src_pixels_per_line, 1, 21, 32,
|
||||
hfilter);
|
||||
vp9_filter_block1d_h6_mmx(src_ptr - (2 * src_pixels_per_line) + 8,
|
||||
fdata2 + 8, src_pixels_per_line, 1, 21, 32,
|
||||
hfilter);
|
||||
vp9_filter_block1d_h6_mmx(src_ptr - (2 * src_pixels_per_line) + 12,
|
||||
fdata2 + 12, src_pixels_per_line, 1, 21, 32,
|
||||
hfilter);
|
||||
|
||||
vfilter = vp9_six_tap_mmx[yoffset];
|
||||
vp9_filter_block1dc_v6_mmx(fdata2 + 32, dst_ptr, dst_pitch,
|
||||
32, 16, 16, 16, vfilter);
|
||||
vp9_filter_block1dc_v6_mmx(fdata2 + 36, dst_ptr + 4, dst_pitch,
|
||||
32, 16, 16, 16, vfilter);
|
||||
vp9_filter_block1dc_v6_mmx(fdata2 + 40, dst_ptr + 8, dst_pitch,
|
||||
32, 16, 16, 16, vfilter);
|
||||
vp9_filter_block1dc_v6_mmx(fdata2 + 44, dst_ptr + 12, dst_pitch,
|
||||
32, 16, 16, 16, vfilter);
|
||||
}
|
||||
|
||||
|
||||
void vp9_sixtap_predict8x8_mmx
|
||||
(
|
||||
unsigned char *src_ptr,
|
||||
int src_pixels_per_line,
|
||||
int xoffset,
|
||||
int yoffset,
|
||||
unsigned char *dst_ptr,
|
||||
int dst_pitch
|
||||
) {
|
||||
|
||||
void vp9_sixtap_predict8x8_mmx(unsigned char *src_ptr,
|
||||
int src_pixels_per_line,
|
||||
int xoffset,
|
||||
int yoffset,
|
||||
unsigned char *dst_ptr,
|
||||
int dst_pitch) {
|
||||
#ifdef ANNOUNCE_FUNCTION
|
||||
printf("vp9_sixtap_predict8x8_mmx\n");
|
||||
#endif
|
||||
DECLARE_ALIGNED_ARRAY(16, unsigned short, FData2, 256); /* Temp data bufffer used in filtering */
|
||||
/* Temp data bufffer used in filtering */
|
||||
DECLARE_ALIGNED_ARRAY(16, unsigned short, fdata2, 256);
|
||||
const short *hfilter, *vfilter;
|
||||
|
||||
const short *HFilter, *VFilter;
|
||||
|
||||
HFilter = vp9_six_tap_mmx[xoffset];
|
||||
vp9_filter_block1d_h6_mmx(src_ptr - (2 * src_pixels_per_line), FData2, src_pixels_per_line, 1, 13, 16, HFilter);
|
||||
vp9_filter_block1d_h6_mmx(src_ptr - (2 * src_pixels_per_line) + 4, FData2 + 4, src_pixels_per_line, 1, 13, 16, HFilter);
|
||||
|
||||
VFilter = vp9_six_tap_mmx[yoffset];
|
||||
vp9_filter_block1dc_v6_mmx(FData2 + 16, dst_ptr, dst_pitch, 16, 8, 8, 8, VFilter);
|
||||
vp9_filter_block1dc_v6_mmx(FData2 + 20, dst_ptr + 4, dst_pitch, 16, 8, 8, 8, VFilter);
|
||||
hfilter = vp9_six_tap_mmx[xoffset];
|
||||
vp9_filter_block1d_h6_mmx(src_ptr - (2 * src_pixels_per_line),
|
||||
fdata2, src_pixels_per_line, 1, 13, 16,
|
||||
hfilter);
|
||||
vp9_filter_block1d_h6_mmx(src_ptr - (2 * src_pixels_per_line) + 4,
|
||||
fdata2 + 4, src_pixels_per_line, 1, 13, 16,
|
||||
hfilter);
|
||||
|
||||
vfilter = vp9_six_tap_mmx[yoffset];
|
||||
vp9_filter_block1dc_v6_mmx(fdata2 + 16, dst_ptr, dst_pitch,
|
||||
16, 8, 8, 8, vfilter);
|
||||
vp9_filter_block1dc_v6_mmx(fdata2 + 20, dst_ptr + 4, dst_pitch,
|
||||
16, 8, 8, 8, vfilter);
|
||||
}
|
||||
|
||||
|
||||
void vp9_sixtap_predict8x4_mmx
|
||||
(
|
||||
unsigned char *src_ptr,
|
||||
int src_pixels_per_line,
|
||||
int xoffset,
|
||||
int yoffset,
|
||||
unsigned char *dst_ptr,
|
||||
int dst_pitch
|
||||
) {
|
||||
void vp9_sixtap_predict8x4_mmx(unsigned char *src_ptr,
|
||||
int src_pixels_per_line,
|
||||
int xoffset,
|
||||
int yoffset,
|
||||
unsigned char *dst_ptr,
|
||||
int dst_pitch) {
|
||||
#ifdef ANNOUNCE_FUNCTION
|
||||
printf("vp9_sixtap_predict8x4_mmx\n");
|
||||
#endif
|
||||
DECLARE_ALIGNED_ARRAY(16, unsigned short, FData2, 256); /* Temp data bufffer used in filtering */
|
||||
/* Temp data bufffer used in filtering */
|
||||
DECLARE_ALIGNED_ARRAY(16, unsigned short, fdata2, 256);
|
||||
const short *hfilter, *vfilter;
|
||||
|
||||
const short *HFilter, *VFilter;
|
||||
|
||||
HFilter = vp9_six_tap_mmx[xoffset];
|
||||
vp9_filter_block1d_h6_mmx(src_ptr - (2 * src_pixels_per_line), FData2, src_pixels_per_line, 1, 9, 16, HFilter);
|
||||
vp9_filter_block1d_h6_mmx(src_ptr - (2 * src_pixels_per_line) + 4, FData2 + 4, src_pixels_per_line, 1, 9, 16, HFilter);
|
||||
|
||||
VFilter = vp9_six_tap_mmx[yoffset];
|
||||
vp9_filter_block1dc_v6_mmx(FData2 + 16, dst_ptr, dst_pitch, 16, 8, 4, 8, VFilter);
|
||||
vp9_filter_block1dc_v6_mmx(FData2 + 20, dst_ptr + 4, dst_pitch, 16, 8, 4, 8, VFilter);
|
||||
hfilter = vp9_six_tap_mmx[xoffset];
|
||||
vp9_filter_block1d_h6_mmx(src_ptr - (2 * src_pixels_per_line),
|
||||
fdata2, src_pixels_per_line, 1, 9, 16, hfilter);
|
||||
vp9_filter_block1d_h6_mmx(src_ptr - (2 * src_pixels_per_line) + 4,
|
||||
fdata2 + 4, src_pixels_per_line, 1, 9, 16, hfilter);
|
||||
|
||||
vfilter = vp9_six_tap_mmx[yoffset];
|
||||
vp9_filter_block1dc_v6_mmx(fdata2 + 16, dst_ptr, dst_pitch,
|
||||
16, 8, 4, 8, vfilter);
|
||||
vp9_filter_block1dc_v6_mmx(fdata2 + 20, dst_ptr + 4, dst_pitch,
|
||||
16, 8, 4, 8, vfilter);
|
||||
}
|
||||
|
||||
|
||||
|
||||
void vp9_bilinear_predict16x16_mmx
|
||||
(
|
||||
unsigned char *src_ptr,
|
||||
int src_pixels_per_line,
|
||||
int xoffset,
|
||||
int yoffset,
|
||||
unsigned char *dst_ptr,
|
||||
int dst_pitch
|
||||
) {
|
||||
vp9_bilinear_predict8x8_mmx(src_ptr, src_pixels_per_line, xoffset, yoffset, dst_ptr, dst_pitch);
|
||||
vp9_bilinear_predict8x8_mmx(src_ptr + 8, src_pixels_per_line, xoffset, yoffset, dst_ptr + 8, dst_pitch);
|
||||
vp9_bilinear_predict8x8_mmx(src_ptr + 8 * src_pixels_per_line, src_pixels_per_line, xoffset, yoffset, dst_ptr + dst_pitch * 8, dst_pitch);
|
||||
vp9_bilinear_predict8x8_mmx(src_ptr + 8 * src_pixels_per_line + 8, src_pixels_per_line, xoffset, yoffset, dst_ptr + dst_pitch * 8 + 8, dst_pitch);
|
||||
void vp9_bilinear_predict16x16_mmx(unsigned char *src_ptr,
|
||||
int src_pixels_per_line,
|
||||
int xoffset,
|
||||
int yoffset,
|
||||
unsigned char *dst_ptr,
|
||||
int dst_pitch) {
|
||||
vp9_bilinear_predict8x8_mmx(src_ptr,
|
||||
src_pixels_per_line, xoffset, yoffset,
|
||||
dst_ptr, dst_pitch);
|
||||
vp9_bilinear_predict8x8_mmx(src_ptr + 8,
|
||||
src_pixels_per_line, xoffset, yoffset,
|
||||
dst_ptr + 8, dst_pitch);
|
||||
vp9_bilinear_predict8x8_mmx(src_ptr + 8 * src_pixels_per_line,
|
||||
src_pixels_per_line, xoffset, yoffset,
|
||||
dst_ptr + dst_pitch * 8, dst_pitch);
|
||||
vp9_bilinear_predict8x8_mmx(src_ptr + 8 * src_pixels_per_line + 8,
|
||||
src_pixels_per_line, xoffset, yoffset,
|
||||
dst_ptr + dst_pitch * 8 + 8, dst_pitch);
|
||||
}
|
||||
#endif
|
||||
|
||||
|
||||
#if HAVE_SSE2
|
||||
void vp9_sixtap_predict16x16_sse2
|
||||
(
|
||||
unsigned char *src_ptr,
|
||||
int src_pixels_per_line,
|
||||
int xoffset,
|
||||
int yoffset,
|
||||
unsigned char *dst_ptr,
|
||||
int dst_pitch
|
||||
|
||||
) {
|
||||
DECLARE_ALIGNED_ARRAY(16, unsigned short, FData2, 24 * 24); /* Temp data bufffer used in filtering */
|
||||
|
||||
const short *HFilter, *VFilter;
|
||||
void vp9_sixtap_predict16x16_sse2(unsigned char *src_ptr,
|
||||
int src_pixels_per_line,
|
||||
int xoffset,
|
||||
int yoffset,
|
||||
unsigned char *dst_ptr,
|
||||
int dst_pitch) {
|
||||
/* Temp data bufffer used in filtering */
|
||||
DECLARE_ALIGNED_ARRAY(16, unsigned short, fdata2, 24 * 24);
|
||||
const short *hfilter, *vfilter;
|
||||
#ifdef ANNOUNCE_FUNCTION
|
||||
printf("vp9_sixtap_predict16x16_sse2\n");
|
||||
#endif
|
||||
|
||||
if (xoffset) {
|
||||
if (yoffset) {
|
||||
HFilter = vp9_six_tap_mmx[xoffset];
|
||||
vp9_filter_block1d16_h6_sse2(src_ptr - (2 * src_pixels_per_line), FData2, src_pixels_per_line, 1, 21, 32, HFilter);
|
||||
VFilter = vp9_six_tap_mmx[yoffset];
|
||||
vp9_filter_block1d16_v6_sse2(FData2 + 32, dst_ptr, dst_pitch, 32, 16, 16, dst_pitch, VFilter);
|
||||
hfilter = vp9_six_tap_mmx[xoffset];
|
||||
vp9_filter_block1d16_h6_sse2(src_ptr - (2 * src_pixels_per_line), fdata2,
|
||||
src_pixels_per_line, 1, 21, 32, hfilter);
|
||||
vfilter = vp9_six_tap_mmx[yoffset];
|
||||
vp9_filter_block1d16_v6_sse2(fdata2 + 32, dst_ptr, dst_pitch,
|
||||
32, 16, 16, dst_pitch, vfilter);
|
||||
} else {
|
||||
/* First-pass only */
|
||||
HFilter = vp9_six_tap_mmx[xoffset];
|
||||
vp9_filter_block1d16_h6_only_sse2(src_ptr, src_pixels_per_line, dst_ptr, dst_pitch, 16, HFilter);
|
||||
hfilter = vp9_six_tap_mmx[xoffset];
|
||||
vp9_filter_block1d16_h6_only_sse2(src_ptr, src_pixels_per_line,
|
||||
dst_ptr, dst_pitch, 16, hfilter);
|
||||
}
|
||||
} else {
|
||||
/* Second-pass only */
|
||||
VFilter = vp9_six_tap_mmx[yoffset];
|
||||
vp9_unpack_block1d16_h6_sse2(src_ptr - (2 * src_pixels_per_line), FData2, src_pixels_per_line, 21, 32);
|
||||
vp9_filter_block1d16_v6_sse2(FData2 + 32, dst_ptr, dst_pitch, 32, 16, 16, dst_pitch, VFilter);
|
||||
vfilter = vp9_six_tap_mmx[yoffset];
|
||||
vp9_unpack_block1d16_h6_sse2(src_ptr - (2 * src_pixels_per_line), fdata2,
|
||||
src_pixels_per_line, 21, 32);
|
||||
vp9_filter_block1d16_v6_sse2(fdata2 + 32, dst_ptr, dst_pitch,
|
||||
32, 16, 16, dst_pitch, vfilter);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
void vp9_sixtap_predict8x8_sse2
|
||||
(
|
||||
unsigned char *src_ptr,
|
||||
int src_pixels_per_line,
|
||||
int xoffset,
|
||||
int yoffset,
|
||||
unsigned char *dst_ptr,
|
||||
int dst_pitch
|
||||
) {
|
||||
DECLARE_ALIGNED_ARRAY(16, unsigned short, FData2, 256); /* Temp data bufffer used in filtering */
|
||||
const short *HFilter, *VFilter;
|
||||
void vp9_sixtap_predict8x8_sse2(unsigned char *src_ptr,
|
||||
int src_pixels_per_line,
|
||||
int xoffset,
|
||||
int yoffset,
|
||||
unsigned char *dst_ptr,
|
||||
int dst_pitch) {
|
||||
/* Temp data bufffer used in filtering */
|
||||
DECLARE_ALIGNED_ARRAY(16, unsigned short, fdata2, 256);
|
||||
const short *hfilter, *vfilter;
|
||||
#ifdef ANNOUNCE_FUNCTION
|
||||
printf("vp9_sixtap_predict8x8_sse2\n");
|
||||
#endif
|
||||
|
||||
if (xoffset) {
|
||||
if (yoffset) {
|
||||
HFilter = vp9_six_tap_mmx[xoffset];
|
||||
vp9_filter_block1d8_h6_sse2(src_ptr - (2 * src_pixels_per_line), FData2, src_pixels_per_line, 1, 13, 16, HFilter);
|
||||
VFilter = vp9_six_tap_mmx[yoffset];
|
||||
vp9_filter_block1d8_v6_sse2(FData2 + 16, dst_ptr, dst_pitch, 16, 8, 8, dst_pitch, VFilter);
|
||||
hfilter = vp9_six_tap_mmx[xoffset];
|
||||
vp9_filter_block1d8_h6_sse2(src_ptr - (2 * src_pixels_per_line), fdata2,
|
||||
src_pixels_per_line, 1, 13, 16, hfilter);
|
||||
vfilter = vp9_six_tap_mmx[yoffset];
|
||||
vp9_filter_block1d8_v6_sse2(fdata2 + 16, dst_ptr, dst_pitch,
|
||||
16, 8, 8, dst_pitch, vfilter);
|
||||
} else {
|
||||
/* First-pass only */
|
||||
HFilter = vp9_six_tap_mmx[xoffset];
|
||||
vp9_filter_block1d8_h6_only_sse2(src_ptr, src_pixels_per_line, dst_ptr, dst_pitch, 8, HFilter);
|
||||
hfilter = vp9_six_tap_mmx[xoffset];
|
||||
vp9_filter_block1d8_h6_only_sse2(src_ptr, src_pixels_per_line,
|
||||
dst_ptr, dst_pitch, 8, hfilter);
|
||||
}
|
||||
} else {
|
||||
/* Second-pass only */
|
||||
VFilter = vp9_six_tap_mmx[yoffset];
|
||||
vp9_filter_block1d8_v6_only_sse2(src_ptr - (2 * src_pixels_per_line), src_pixels_per_line, dst_ptr, dst_pitch, 8, VFilter);
|
||||
vfilter = vp9_six_tap_mmx[yoffset];
|
||||
vp9_filter_block1d8_v6_only_sse2(src_ptr - (2 * src_pixels_per_line),
|
||||
src_pixels_per_line,
|
||||
dst_ptr, dst_pitch, 8, vfilter);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
void vp9_sixtap_predict8x4_sse2
|
||||
(
|
||||
unsigned char *src_ptr,
|
||||
int src_pixels_per_line,
|
||||
int xoffset,
|
||||
int yoffset,
|
||||
unsigned char *dst_ptr,
|
||||
int dst_pitch
|
||||
) {
|
||||
DECLARE_ALIGNED_ARRAY(16, unsigned short, FData2, 256); /* Temp data bufffer used in filtering */
|
||||
const short *HFilter, *VFilter;
|
||||
void vp9_sixtap_predict8x4_sse2(unsigned char *src_ptr,
|
||||
int src_pixels_per_line,
|
||||
int xoffset,
|
||||
int yoffset,
|
||||
unsigned char *dst_ptr,
|
||||
int dst_pitch) {
|
||||
/* Temp data bufffer used in filtering */
|
||||
DECLARE_ALIGNED_ARRAY(16, unsigned short, fdata2, 256);
|
||||
const short *hfilter, *vfilter;
|
||||
#ifdef ANNOUNCE_FUNCTION
|
||||
printf("vp9_sixtap_predict8x4_sse2\n");
|
||||
#endif
|
||||
|
||||
if (xoffset) {
|
||||
if (yoffset) {
|
||||
HFilter = vp9_six_tap_mmx[xoffset];
|
||||
vp9_filter_block1d8_h6_sse2(src_ptr - (2 * src_pixels_per_line), FData2, src_pixels_per_line, 1, 9, 16, HFilter);
|
||||
VFilter = vp9_six_tap_mmx[yoffset];
|
||||
vp9_filter_block1d8_v6_sse2(FData2 + 16, dst_ptr, dst_pitch, 16, 8, 4, dst_pitch, VFilter);
|
||||
hfilter = vp9_six_tap_mmx[xoffset];
|
||||
vp9_filter_block1d8_h6_sse2(src_ptr - (2 * src_pixels_per_line), fdata2,
|
||||
src_pixels_per_line, 1, 9, 16, hfilter);
|
||||
vfilter = vp9_six_tap_mmx[yoffset];
|
||||
vp9_filter_block1d8_v6_sse2(fdata2 + 16, dst_ptr, dst_pitch,
|
||||
16, 8, 4, dst_pitch, vfilter);
|
||||
} else {
|
||||
/* First-pass only */
|
||||
HFilter = vp9_six_tap_mmx[xoffset];
|
||||
vp9_filter_block1d8_h6_only_sse2(src_ptr, src_pixels_per_line, dst_ptr, dst_pitch, 4, HFilter);
|
||||
hfilter = vp9_six_tap_mmx[xoffset];
|
||||
vp9_filter_block1d8_h6_only_sse2(src_ptr, src_pixels_per_line,
|
||||
dst_ptr, dst_pitch, 4, hfilter);
|
||||
}
|
||||
} else {
|
||||
/* Second-pass only */
|
||||
VFilter = vp9_six_tap_mmx[yoffset];
|
||||
vp9_filter_block1d8_v6_only_sse2(src_ptr - (2 * src_pixels_per_line), src_pixels_per_line, dst_ptr, dst_pitch, 4, VFilter);
|
||||
vfilter = vp9_six_tap_mmx[yoffset];
|
||||
vp9_filter_block1d8_v6_only_sse2(src_ptr - (2 * src_pixels_per_line),
|
||||
src_pixels_per_line,
|
||||
dst_ptr, dst_pitch, 4, vfilter);
|
||||
}
|
||||
}
|
||||
|
||||
#endif
|
||||
|
||||
#if HAVE_SSSE3
|
||||
extern void vp9_filter_block1d8_h6_ssse3(unsigned char *src_ptr,
|
||||
unsigned int src_pixels_per_line,
|
||||
unsigned char *output_ptr,
|
||||
unsigned int output_pitch,
|
||||
unsigned int output_height,
|
||||
unsigned int vp9_filter_index);
|
||||
|
||||
extern void vp9_filter_block1d8_h6_ssse3
|
||||
(
|
||||
unsigned char *src_ptr,
|
||||
unsigned int src_pixels_per_line,
|
||||
unsigned char *output_ptr,
|
||||
unsigned int output_pitch,
|
||||
unsigned int output_height,
|
||||
unsigned int vp9_filter_index
|
||||
);
|
||||
extern void vp9_filter_block1d16_h6_ssse3(unsigned char *src_ptr,
|
||||
unsigned int src_pixels_per_line,
|
||||
unsigned char *output_ptr,
|
||||
unsigned int output_pitch,
|
||||
unsigned int output_height,
|
||||
unsigned int vp9_filter_index);
|
||||
|
||||
extern void vp9_filter_block1d16_h6_ssse3
|
||||
(
|
||||
unsigned char *src_ptr,
|
||||
unsigned int src_pixels_per_line,
|
||||
unsigned char *output_ptr,
|
||||
unsigned int output_pitch,
|
||||
unsigned int output_height,
|
||||
unsigned int vp9_filter_index
|
||||
);
|
||||
extern void vp9_filter_block1d16_v6_ssse3(unsigned char *src_ptr,
|
||||
unsigned int src_pitch,
|
||||
unsigned char *output_ptr,
|
||||
unsigned int out_pitch,
|
||||
unsigned int output_height,
|
||||
unsigned int vp9_filter_index);
|
||||
|
||||
extern void vp9_filter_block1d16_v6_ssse3
|
||||
(
|
||||
unsigned char *src_ptr,
|
||||
unsigned int src_pitch,
|
||||
unsigned char *output_ptr,
|
||||
unsigned int out_pitch,
|
||||
unsigned int output_height,
|
||||
unsigned int vp9_filter_index
|
||||
);
|
||||
extern void vp9_filter_block1d8_v6_ssse3(unsigned char *src_ptr,
|
||||
unsigned int src_pitch,
|
||||
unsigned char *output_ptr,
|
||||
unsigned int out_pitch,
|
||||
unsigned int output_height,
|
||||
unsigned int vp9_filter_index);
|
||||
|
||||
extern void vp9_filter_block1d8_v6_ssse3
|
||||
(
|
||||
unsigned char *src_ptr,
|
||||
unsigned int src_pitch,
|
||||
unsigned char *output_ptr,
|
||||
unsigned int out_pitch,
|
||||
unsigned int output_height,
|
||||
unsigned int vp9_filter_index
|
||||
);
|
||||
extern void vp9_filter_block1d4_h6_ssse3(unsigned char *src_ptr,
|
||||
unsigned int src_pixels_per_line,
|
||||
unsigned char *output_ptr,
|
||||
unsigned int output_pitch,
|
||||
unsigned int output_height,
|
||||
unsigned int vp9_filter_index);
|
||||
|
||||
extern void vp9_filter_block1d4_h6_ssse3
|
||||
(
|
||||
unsigned char *src_ptr,
|
||||
unsigned int src_pixels_per_line,
|
||||
unsigned char *output_ptr,
|
||||
unsigned int output_pitch,
|
||||
unsigned int output_height,
|
||||
unsigned int vp9_filter_index
|
||||
);
|
||||
extern void vp9_filter_block1d4_v6_ssse3(unsigned char *src_ptr,
|
||||
unsigned int src_pitch,
|
||||
unsigned char *output_ptr,
|
||||
unsigned int out_pitch,
|
||||
unsigned int output_height,
|
||||
unsigned int vp9_filter_index);
|
||||
|
||||
extern void vp9_filter_block1d4_v6_ssse3
|
||||
(
|
||||
unsigned char *src_ptr,
|
||||
unsigned int src_pitch,
|
||||
unsigned char *output_ptr,
|
||||
unsigned int out_pitch,
|
||||
unsigned int output_height,
|
||||
unsigned int vp9_filter_index
|
||||
);
|
||||
|
||||
void vp9_sixtap_predict16x16_ssse3
|
||||
(
|
||||
unsigned char *src_ptr,
|
||||
int src_pixels_per_line,
|
||||
int xoffset,
|
||||
int yoffset,
|
||||
unsigned char *dst_ptr,
|
||||
int dst_pitch
|
||||
|
||||
) {
|
||||
DECLARE_ALIGNED_ARRAY(16, unsigned char, FData2, 24 * 24);
|
||||
void vp9_sixtap_predict16x16_ssse3(unsigned char *src_ptr,
|
||||
int src_pixels_per_line,
|
||||
int xoffset,
|
||||
int yoffset,
|
||||
unsigned char *dst_ptr,
|
||||
int dst_pitch) {
|
||||
DECLARE_ALIGNED_ARRAY(16, unsigned char, fdata2, 24 * 24);
|
||||
#ifdef ANNOUNCE_FUNCTION
|
||||
printf("vp9_sixtap_predict16x16_ssse3\n");
|
||||
#endif
|
||||
|
||||
if (xoffset) {
|
||||
if (yoffset) {
|
||||
vp9_filter_block1d16_h6_ssse3(src_ptr - (2 * src_pixels_per_line), src_pixels_per_line, FData2, 16, 21, xoffset);
|
||||
vp9_filter_block1d16_v6_ssse3(FData2, 16, dst_ptr, dst_pitch, 16, yoffset);
|
||||
vp9_filter_block1d16_h6_ssse3(src_ptr - (2 * src_pixels_per_line),
|
||||
src_pixels_per_line,
|
||||
fdata2, 16, 21, xoffset);
|
||||
vp9_filter_block1d16_v6_ssse3(fdata2, 16, dst_ptr, dst_pitch,
|
||||
16, yoffset);
|
||||
} else {
|
||||
/* First-pass only */
|
||||
vp9_filter_block1d16_h6_ssse3(src_ptr, src_pixels_per_line, dst_ptr, dst_pitch, 16, xoffset);
|
||||
vp9_filter_block1d16_h6_ssse3(src_ptr, src_pixels_per_line,
|
||||
dst_ptr, dst_pitch, 16, xoffset);
|
||||
}
|
||||
} else {
|
||||
/* Second-pass only */
|
||||
vp9_filter_block1d16_v6_ssse3(src_ptr - (2 * src_pixels_per_line), src_pixels_per_line, dst_ptr, dst_pitch, 16, yoffset);
|
||||
vp9_filter_block1d16_v6_ssse3(src_ptr - (2 * src_pixels_per_line),
|
||||
src_pixels_per_line,
|
||||
dst_ptr, dst_pitch, 16, yoffset);
|
||||
}
|
||||
}
|
||||
|
||||
void vp9_sixtap_predict8x8_ssse3
|
||||
(
|
||||
unsigned char *src_ptr,
|
||||
int src_pixels_per_line,
|
||||
int xoffset,
|
||||
int yoffset,
|
||||
unsigned char *dst_ptr,
|
||||
int dst_pitch
|
||||
) {
|
||||
DECLARE_ALIGNED_ARRAY(16, unsigned char, FData2, 256);
|
||||
void vp9_sixtap_predict8x8_ssse3(unsigned char *src_ptr,
|
||||
int src_pixels_per_line,
|
||||
int xoffset,
|
||||
int yoffset,
|
||||
unsigned char *dst_ptr,
|
||||
int dst_pitch) {
|
||||
DECLARE_ALIGNED_ARRAY(16, unsigned char, fdata2, 256);
|
||||
#ifdef ANNOUNCE_FUNCTION
|
||||
printf("vp9_sixtap_predict8x8_ssse3\n");
|
||||
#endif
|
||||
|
||||
if (xoffset) {
|
||||
if (yoffset) {
|
||||
vp9_filter_block1d8_h6_ssse3(src_ptr - (2 * src_pixels_per_line), src_pixels_per_line, FData2, 8, 13, xoffset);
|
||||
vp9_filter_block1d8_v6_ssse3(FData2, 8, dst_ptr, dst_pitch, 8, yoffset);
|
||||
vp9_filter_block1d8_h6_ssse3(src_ptr - (2 * src_pixels_per_line),
|
||||
src_pixels_per_line, fdata2, 8, 13, xoffset);
|
||||
vp9_filter_block1d8_v6_ssse3(fdata2, 8, dst_ptr, dst_pitch, 8, yoffset);
|
||||
} else {
|
||||
vp9_filter_block1d8_h6_ssse3(src_ptr, src_pixels_per_line, dst_ptr, dst_pitch, 8, xoffset);
|
||||
vp9_filter_block1d8_h6_ssse3(src_ptr, src_pixels_per_line,
|
||||
dst_ptr, dst_pitch, 8, xoffset);
|
||||
}
|
||||
} else {
|
||||
/* Second-pass only */
|
||||
vp9_filter_block1d8_v6_ssse3(src_ptr - (2 * src_pixels_per_line), src_pixels_per_line, dst_ptr, dst_pitch, 8, yoffset);
|
||||
vp9_filter_block1d8_v6_ssse3(src_ptr - (2 * src_pixels_per_line),
|
||||
src_pixels_per_line,
|
||||
dst_ptr, dst_pitch, 8, yoffset);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
void vp9_sixtap_predict8x4_ssse3
|
||||
(
|
||||
unsigned char *src_ptr,
|
||||
int src_pixels_per_line,
|
||||
int xoffset,
|
||||
int yoffset,
|
||||
unsigned char *dst_ptr,
|
||||
int dst_pitch
|
||||
) {
|
||||
DECLARE_ALIGNED_ARRAY(16, unsigned char, FData2, 256);
|
||||
void vp9_sixtap_predict8x4_ssse3(unsigned char *src_ptr,
|
||||
int src_pixels_per_line,
|
||||
int xoffset,
|
||||
int yoffset,
|
||||
unsigned char *dst_ptr,
|
||||
int dst_pitch) {
|
||||
DECLARE_ALIGNED_ARRAY(16, unsigned char, fdata2, 256);
|
||||
#ifdef ANNOUNCE_FUNCTION
|
||||
printf("vp9_sixtap_predict8x4_ssse3\n");
|
||||
#endif
|
||||
|
||||
if (xoffset) {
|
||||
if (yoffset) {
|
||||
vp9_filter_block1d8_h6_ssse3(src_ptr - (2 * src_pixels_per_line), src_pixels_per_line, FData2, 8, 9, xoffset);
|
||||
vp9_filter_block1d8_v6_ssse3(FData2, 8, dst_ptr, dst_pitch, 4, yoffset);
|
||||
vp9_filter_block1d8_h6_ssse3(src_ptr - (2 * src_pixels_per_line),
|
||||
src_pixels_per_line, fdata2, 8, 9, xoffset);
|
||||
vp9_filter_block1d8_v6_ssse3(fdata2, 8, dst_ptr, dst_pitch, 4, yoffset);
|
||||
} else {
|
||||
/* First-pass only */
|
||||
vp9_filter_block1d8_h6_ssse3(src_ptr, src_pixels_per_line, dst_ptr, dst_pitch, 4, xoffset);
|
||||
vp9_filter_block1d8_h6_ssse3(src_ptr, src_pixels_per_line,
|
||||
dst_ptr, dst_pitch, 4, xoffset);
|
||||
}
|
||||
} else {
|
||||
/* Second-pass only */
|
||||
vp9_filter_block1d8_v6_ssse3(src_ptr - (2 * src_pixels_per_line), src_pixels_per_line, dst_ptr, dst_pitch, 4, yoffset);
|
||||
vp9_filter_block1d8_v6_ssse3(src_ptr - (2 * src_pixels_per_line),
|
||||
src_pixels_per_line,
|
||||
dst_ptr, dst_pitch, 4, yoffset);
|
||||
}
|
||||
}
|
||||
|
||||
void vp9_sixtap_predict4x4_ssse3
|
||||
(
|
||||
unsigned char *src_ptr,
|
||||
int src_pixels_per_line,
|
||||
int xoffset,
|
||||
int yoffset,
|
||||
unsigned char *dst_ptr,
|
||||
int dst_pitch
|
||||
) {
|
||||
DECLARE_ALIGNED_ARRAY(16, unsigned char, FData2, 4 * 9);
|
||||
void vp9_sixtap_predict4x4_ssse3(unsigned char *src_ptr,
|
||||
int src_pixels_per_line,
|
||||
int xoffset,
|
||||
int yoffset,
|
||||
unsigned char *dst_ptr,
|
||||
int dst_pitch) {
|
||||
DECLARE_ALIGNED_ARRAY(16, unsigned char, fdata2, 4 * 9);
|
||||
#ifdef ANNOUNCE_FUNCTION
|
||||
printf("vp9_sixtap_predict4x4_ssse3\n");
|
||||
#endif
|
||||
|
||||
if (xoffset) {
|
||||
if (yoffset) {
|
||||
vp9_filter_block1d4_h6_ssse3(src_ptr - (2 * src_pixels_per_line), src_pixels_per_line, FData2, 4, 9, xoffset);
|
||||
vp9_filter_block1d4_v6_ssse3(FData2, 4, dst_ptr, dst_pitch, 4, yoffset);
|
||||
vp9_filter_block1d4_h6_ssse3(src_ptr - (2 * src_pixels_per_line),
|
||||
src_pixels_per_line, fdata2, 4, 9, xoffset);
|
||||
vp9_filter_block1d4_v6_ssse3(fdata2, 4, dst_ptr, dst_pitch, 4, yoffset);
|
||||
} else {
|
||||
vp9_filter_block1d4_h6_ssse3(src_ptr, src_pixels_per_line, dst_ptr, dst_pitch, 4, xoffset);
|
||||
vp9_filter_block1d4_h6_ssse3(src_ptr, src_pixels_per_line,
|
||||
dst_ptr, dst_pitch, 4, xoffset);
|
||||
}
|
||||
} else {
|
||||
vp9_filter_block1d4_v6_ssse3(src_ptr - (2 * src_pixels_per_line), src_pixels_per_line, dst_ptr, dst_pitch, 4, yoffset);
|
||||
vp9_filter_block1d4_v6_ssse3(src_ptr - (2 * src_pixels_per_line),
|
||||
src_pixels_per_line,
|
||||
dst_ptr, dst_pitch, 4, yoffset);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -533,6 +506,7 @@ void vp9_filter_block1d16_v8_ssse3(const unsigned char *src_ptr,
|
||||
unsigned int out_pitch,
|
||||
unsigned int output_height,
|
||||
const short *filter);
|
||||
|
||||
void vp9_filter_block1d16_h8_ssse3(const unsigned char *src_ptr,
|
||||
const unsigned int src_pitch,
|
||||
unsigned char *output_ptr,
|
||||
@@ -540,25 +514,26 @@ void vp9_filter_block1d16_h8_ssse3(const unsigned char *src_ptr,
|
||||
unsigned int output_height,
|
||||
const short *filter);
|
||||
|
||||
void vp9_filter_block2d_16x16_8_ssse3
|
||||
(
|
||||
const unsigned char *src_ptr, const unsigned int src_stride,
|
||||
const short *HFilter_aligned16, const short *VFilter_aligned16,
|
||||
unsigned char *dst_ptr, unsigned int dst_stride
|
||||
) {
|
||||
if (HFilter_aligned16[3] !=128 && VFilter_aligned16[3] != 128) {
|
||||
DECLARE_ALIGNED_ARRAY(16, unsigned char, FData2, 23 * 16);
|
||||
void vp9_filter_block2d_16x16_8_ssse3(const unsigned char *src_ptr,
|
||||
const unsigned int src_stride,
|
||||
const short *hfilter_aligned16,
|
||||
const short *vfilter_aligned16,
|
||||
unsigned char *dst_ptr,
|
||||
unsigned int dst_stride) {
|
||||
if (hfilter_aligned16[3] != 128 && vfilter_aligned16[3] != 128) {
|
||||
DECLARE_ALIGNED_ARRAY(16, unsigned char, fdata2, 23 * 16);
|
||||
|
||||
vp9_filter_block1d16_h8_ssse3(src_ptr - (3 * src_stride), src_stride,
|
||||
FData2, 16, 23, HFilter_aligned16);
|
||||
vp9_filter_block1d16_v8_ssse3(FData2, 16, dst_ptr, dst_stride, 16,
|
||||
VFilter_aligned16);
|
||||
fdata2, 16, 23, hfilter_aligned16);
|
||||
vp9_filter_block1d16_v8_ssse3(fdata2, 16, dst_ptr, dst_stride, 16,
|
||||
vfilter_aligned16);
|
||||
} else {
|
||||
if (HFilter_aligned16[3] !=128) {
|
||||
if (hfilter_aligned16[3] != 128) {
|
||||
vp9_filter_block1d16_h8_ssse3(src_ptr, src_stride, dst_ptr, dst_stride,
|
||||
16, HFilter_aligned16);
|
||||
16, hfilter_aligned16);
|
||||
} else {
|
||||
vp9_filter_block1d16_v8_ssse3(src_ptr - (3 * src_stride), src_stride,
|
||||
dst_ptr, dst_stride, 16, VFilter_aligned16);
|
||||
dst_ptr, dst_stride, 16, vfilter_aligned16);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -569,54 +544,58 @@ void vp9_filter_block1d8_v8_ssse3(const unsigned char *src_ptr,
|
||||
unsigned int out_pitch,
|
||||
unsigned int output_height,
|
||||
const short *filter);
|
||||
|
||||
void vp9_filter_block1d8_h8_ssse3(const unsigned char *src_ptr,
|
||||
const unsigned int src_pitch,
|
||||
unsigned char *output_ptr,
|
||||
unsigned int out_pitch,
|
||||
unsigned int output_height,
|
||||
const short *filter);
|
||||
void vp9_filter_block2d_8x8_8_ssse3
|
||||
(
|
||||
const unsigned char *src_ptr, const unsigned int src_stride,
|
||||
const short *HFilter_aligned16, const short *VFilter_aligned16,
|
||||
unsigned char *dst_ptr, unsigned int dst_stride
|
||||
) {
|
||||
if (HFilter_aligned16[3] !=128 && VFilter_aligned16[3] != 128) {
|
||||
DECLARE_ALIGNED_ARRAY(16, unsigned char, FData2, 23 * 16);
|
||||
|
||||
void vp9_filter_block2d_8x8_8_ssse3(const unsigned char *src_ptr,
|
||||
const unsigned int src_stride,
|
||||
const short *hfilter_aligned16,
|
||||
const short *vfilter_aligned16,
|
||||
unsigned char *dst_ptr,
|
||||
unsigned int dst_stride) {
|
||||
if (hfilter_aligned16[3] != 128 && vfilter_aligned16[3] != 128) {
|
||||
DECLARE_ALIGNED_ARRAY(16, unsigned char, fdata2, 23 * 16);
|
||||
|
||||
vp9_filter_block1d8_h8_ssse3(src_ptr - (3 * src_stride), src_stride,
|
||||
FData2, 16, 15, HFilter_aligned16);
|
||||
vp9_filter_block1d8_v8_ssse3(FData2, 16, dst_ptr, dst_stride, 8,
|
||||
VFilter_aligned16);
|
||||
fdata2, 16, 15, hfilter_aligned16);
|
||||
vp9_filter_block1d8_v8_ssse3(fdata2, 16, dst_ptr, dst_stride, 8,
|
||||
vfilter_aligned16);
|
||||
} else {
|
||||
if (HFilter_aligned16[3] !=128) {
|
||||
if (hfilter_aligned16[3] != 128) {
|
||||
vp9_filter_block1d8_h8_ssse3(src_ptr, src_stride, dst_ptr, dst_stride, 8,
|
||||
HFilter_aligned16);
|
||||
hfilter_aligned16);
|
||||
} else {
|
||||
vp9_filter_block1d8_v8_ssse3(src_ptr - (3 * src_stride), src_stride,
|
||||
dst_ptr, dst_stride, 8, VFilter_aligned16);
|
||||
dst_ptr, dst_stride, 8, vfilter_aligned16);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void vp9_filter_block2d_8x4_8_ssse3
|
||||
(
|
||||
const unsigned char *src_ptr, const unsigned int src_stride,
|
||||
const short *HFilter_aligned16, const short *VFilter_aligned16,
|
||||
unsigned char *dst_ptr, unsigned int dst_stride
|
||||
) {
|
||||
if (HFilter_aligned16[3] !=128 && VFilter_aligned16[3] != 128) {
|
||||
DECLARE_ALIGNED_ARRAY(16, unsigned char, FData2, 23 * 16);
|
||||
void vp9_filter_block2d_8x4_8_ssse3(const unsigned char *src_ptr,
|
||||
const unsigned int src_stride,
|
||||
const short *hfilter_aligned16,
|
||||
const short *vfilter_aligned16,
|
||||
unsigned char *dst_ptr,
|
||||
unsigned int dst_stride) {
|
||||
if (hfilter_aligned16[3] !=128 && vfilter_aligned16[3] != 128) {
|
||||
DECLARE_ALIGNED_ARRAY(16, unsigned char, fdata2, 23 * 16);
|
||||
|
||||
vp9_filter_block1d8_h8_ssse3(src_ptr - (3 * src_stride), src_stride,
|
||||
FData2, 16, 11, HFilter_aligned16);
|
||||
vp9_filter_block1d8_v8_ssse3(FData2, 16, dst_ptr, dst_stride, 4,
|
||||
VFilter_aligned16);
|
||||
fdata2, 16, 11, hfilter_aligned16);
|
||||
vp9_filter_block1d8_v8_ssse3(fdata2, 16, dst_ptr, dst_stride, 4,
|
||||
vfilter_aligned16);
|
||||
} else {
|
||||
if (HFilter_aligned16[3] !=128) {
|
||||
if (hfilter_aligned16[3] != 128) {
|
||||
vp9_filter_block1d8_h8_ssse3(src_ptr, src_stride, dst_ptr, dst_stride, 4,
|
||||
HFilter_aligned16);
|
||||
hfilter_aligned16);
|
||||
} else {
|
||||
vp9_filter_block1d8_v8_ssse3(src_ptr - (3 * src_stride), src_stride,
|
||||
dst_ptr, dst_stride, 4, VFilter_aligned16);
|
||||
dst_ptr, dst_stride, 4, vfilter_aligned16);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -8,10 +8,8 @@
|
||||
* be found in the AUTHORS file in the root of the source tree.
|
||||
*/
|
||||
|
||||
|
||||
#include "vpx_config.h"
|
||||
#include "vpx_ports/x86.h"
|
||||
#include "vp8/common/g_common.h"
|
||||
#include "vp8/common/subpixel.h"
|
||||
#include "vp8/common/loopfilter.h"
|
||||
#include "vp8/common/idct.h"
|
||||
|
||||
@@ -20,7 +20,6 @@
|
||||
#include "vpx_scale/yv12extend.h"
|
||||
#include "vp8/common/loopfilter.h"
|
||||
#include "vp8/common/swapyv12buffer.h"
|
||||
#include "vp8/common/g_common.h"
|
||||
#include <stdio.h>
|
||||
#include <assert.h>
|
||||
|
||||
|
||||
@@ -12,9 +12,10 @@
|
||||
#include "vp8/common/idct.h"
|
||||
#include "vp8/decoder/dequantize.h"
|
||||
|
||||
void vp9_dequant_dc_idct_add_y_block_mmx
|
||||
(short *q, short *dq, unsigned char *pre,
|
||||
unsigned char *dst, int stride, char *eobs, short *dc) {
|
||||
void vp9_dequant_dc_idct_add_y_block_mmx(short *q, short *dq,
|
||||
unsigned char *pre,
|
||||
unsigned char *dst,
|
||||
int stride, char *eobs, short *dc) {
|
||||
int i;
|
||||
|
||||
for (i = 0; i < 4; i++) {
|
||||
@@ -49,9 +50,10 @@ void vp9_dequant_dc_idct_add_y_block_mmx
|
||||
}
|
||||
}
|
||||
|
||||
void vp9_dequant_idct_add_y_block_mmx
|
||||
(short *q, short *dq, unsigned char *pre,
|
||||
unsigned char *dst, int stride, char *eobs) {
|
||||
void vp9_dequant_idct_add_y_block_mmx(short *q, short *dq,
|
||||
unsigned char *pre,
|
||||
unsigned char *dst,
|
||||
int stride, char *eobs) {
|
||||
int i;
|
||||
|
||||
for (i = 0; i < 4; i++) {
|
||||
@@ -90,9 +92,11 @@ void vp9_dequant_idct_add_y_block_mmx
|
||||
}
|
||||
}
|
||||
|
||||
void vp9_dequant_idct_add_uv_block_mmx
|
||||
(short *q, short *dq, unsigned char *pre,
|
||||
unsigned char *dstu, unsigned char *dstv, int stride, char *eobs) {
|
||||
void vp9_dequant_idct_add_uv_block_mmx(short *q, short *dq,
|
||||
unsigned char *pre,
|
||||
unsigned char *dstu,
|
||||
unsigned char *dstv,
|
||||
int stride, char *eobs) {
|
||||
int i;
|
||||
|
||||
for (i = 0; i < 2; i++) {
|
||||
|
||||
@@ -12,23 +12,26 @@
|
||||
#include "vp8/common/idct.h"
|
||||
#include "vp8/decoder/dequantize.h"
|
||||
|
||||
void vp9_idct_dequant_dc_0_2x_sse2
|
||||
(short *q, short *dq, unsigned char *pre,
|
||||
unsigned char *dst, int dst_stride, short *dc);
|
||||
void vp9_idct_dequant_dc_full_2x_sse2
|
||||
(short *q, short *dq, unsigned char *pre,
|
||||
unsigned char *dst, int dst_stride, short *dc);
|
||||
void vp9_idct_dequant_dc_0_2x_sse2(short *q, short *dq,
|
||||
unsigned char *pre, unsigned char *dst,
|
||||
int dst_stride, short *dc);
|
||||
|
||||
void vp9_idct_dequant_0_2x_sse2
|
||||
(short *q, short *dq, unsigned char *pre,
|
||||
unsigned char *dst, int dst_stride, int blk_stride);
|
||||
void vp9_idct_dequant_full_2x_sse2
|
||||
(short *q, short *dq, unsigned char *pre,
|
||||
unsigned char *dst, int dst_stride, int blk_stride);
|
||||
void vp9_idct_dequant_dc_full_2x_sse2(short *q, short *dq,
|
||||
unsigned char *pre, unsigned char *dst,
|
||||
int dst_stride, short *dc);
|
||||
|
||||
void vp9_dequant_dc_idct_add_y_block_sse2
|
||||
(short *q, short *dq, unsigned char *pre,
|
||||
unsigned char *dst, int stride, char *eobs, short *dc) {
|
||||
void vp9_idct_dequant_0_2x_sse2(short *q, short *dq,
|
||||
unsigned char *pre, unsigned char *dst,
|
||||
int dst_stride, int blk_stride);
|
||||
|
||||
void vp9_idct_dequant_full_2x_sse2(short *q, short *dq,
|
||||
unsigned char *pre, unsigned char *dst,
|
||||
int dst_stride, int blk_stride);
|
||||
|
||||
void vp9_dequant_dc_idct_add_y_block_sse2(short *q, short *dq,
|
||||
unsigned char *pre,
|
||||
unsigned char *dst,
|
||||
int stride, char *eobs, short *dc) {
|
||||
int i;
|
||||
|
||||
for (i = 0; i < 4; i++) {
|
||||
@@ -38,9 +41,11 @@ void vp9_dequant_dc_idct_add_y_block_sse2
|
||||
vp9_idct_dequant_dc_0_2x_sse2(q, dq, pre, dst, stride, dc);
|
||||
|
||||
if (((short *)(eobs))[1] & 0xfefe)
|
||||
vp9_idct_dequant_dc_full_2x_sse2(q + 32, dq, pre + 8, dst + 8, stride, dc + 2);
|
||||
vp9_idct_dequant_dc_full_2x_sse2(q + 32, dq, pre + 8, dst + 8,
|
||||
stride, dc + 2);
|
||||
else
|
||||
vp9_idct_dequant_dc_0_2x_sse2(q + 32, dq, pre + 8, dst + 8, stride, dc + 2);
|
||||
vp9_idct_dequant_dc_0_2x_sse2(q + 32, dq, pre + 8, dst + 8,
|
||||
stride, dc + 2);
|
||||
|
||||
q += 64;
|
||||
dc += 4;
|
||||
@@ -50,9 +55,9 @@ void vp9_dequant_dc_idct_add_y_block_sse2
|
||||
}
|
||||
}
|
||||
|
||||
void vp9_dequant_idct_add_y_block_sse2
|
||||
(short *q, short *dq, unsigned char *pre,
|
||||
unsigned char *dst, int stride, char *eobs) {
|
||||
void vp9_dequant_idct_add_y_block_sse2(short *q, short *dq,
|
||||
unsigned char *pre, unsigned char *dst,
|
||||
int stride, char *eobs) {
|
||||
int i;
|
||||
|
||||
for (i = 0; i < 4; i++) {
|
||||
@@ -73,9 +78,11 @@ void vp9_dequant_idct_add_y_block_sse2
|
||||
}
|
||||
}
|
||||
|
||||
void vp9_dequant_idct_add_uv_block_sse2
|
||||
(short *q, short *dq, unsigned char *pre,
|
||||
unsigned char *dstu, unsigned char *dstv, int stride, char *eobs) {
|
||||
void vp9_dequant_idct_add_uv_block_sse2(short *q, short *dq,
|
||||
unsigned char *pre,
|
||||
unsigned char *dstu,
|
||||
unsigned char *dstv,
|
||||
int stride, char *eobs) {
|
||||
if (((short *)(eobs))[0] & 0xfefe)
|
||||
vp9_idct_dequant_full_2x_sse2(q, dq, pre, dstu, stride, 8);
|
||||
else
|
||||
|
||||
@@ -8,12 +8,10 @@
|
||||
* be found in the AUTHORS file in the root of the source tree.
|
||||
*/
|
||||
|
||||
|
||||
#include "vpx_ports/config.h"
|
||||
#include "vpx_ports/x86.h"
|
||||
#include "vp8/decoder/onyxd_int.h"
|
||||
|
||||
|
||||
#if HAVE_MMX
|
||||
void vp9_dequantize_b_impl_mmx(short *sq, short *dq, short *q);
|
||||
|
||||
|
||||
@@ -2296,7 +2296,7 @@ void vp9_encode_inter_superblock(VP9_COMP *cpi, MACROBLOCK *x, TOKENEXTRA **t,
|
||||
vp9_optimize_mbuv_8x8(x, rtcd);
|
||||
}
|
||||
vp9_inverse_transform_mb_8x8(IF_RTCD(&rtcd->common->idct), &x->e_mbd);
|
||||
vp9_recon_mby_s_c( &x->e_mbd,
|
||||
vp9_recon_mby_s_c(&x->e_mbd,
|
||||
dst + x_idx * 16 + y_idx * 16 * dst_y_stride);
|
||||
vp9_recon_mbuv_s_c(&x->e_mbd,
|
||||
udst + x_idx * 8 + y_idx * 8 * dst_uv_stride,
|
||||
|
||||
@@ -16,7 +16,6 @@
|
||||
#include "vp8/common/reconintra4x4.h"
|
||||
#include "encodemb.h"
|
||||
#include "vp8/common/invtrans.h"
|
||||
#include "vp8/common/g_common.h"
|
||||
#include "encodeintra.h"
|
||||
|
||||
#if CONFIG_RUNTIME_CPU_DETECT
|
||||
@@ -79,7 +78,7 @@ void vp9_encode_intra4x4block(const VP9_ENCODER_RTCD *rtcd,
|
||||
} else {
|
||||
x->vp9_short_fdct4x4(be->src_diff, be->coeff, 32);
|
||||
x->quantize_b_4x4(be, b) ;
|
||||
vp9_inverse_transform_b_4x4(IF_RTCD(&rtcd->common->idct), b, 32) ;
|
||||
vp9_inverse_transform_b_4x4(IF_RTCD(&rtcd->common->idct), b, 32);
|
||||
}
|
||||
|
||||
vp9_recon_b(b->predictor, b->diff, *(b->base_dst) + b->dst, b->dst_stride);
|
||||
@@ -265,7 +264,8 @@ void vp9_encode_intra_uv4x4(const VP9_ENCODER_RTCD *rtcd,
|
||||
x->quantize_b_4x4(be, b);
|
||||
vp9_inverse_transform_b_4x4(IF_RTCD(&rtcd->common->idct), b, 16);
|
||||
|
||||
vp9_recon_uv_b_c(b->predictor,b->diff, *(b->base_dst) + b->dst, b->dst_stride);
|
||||
vp9_recon_uv_b_c(b->predictor, b->diff, *(b->base_dst) + b->dst,
|
||||
b->dst_stride);
|
||||
}
|
||||
|
||||
void vp9_encode_intra8x8mbuv(const VP9_ENCODER_RTCD *rtcd, MACROBLOCK *x) {
|
||||
|
||||
@@ -8,9 +8,9 @@
|
||||
* be found in the AUTHORS file in the root of the source tree.
|
||||
*/
|
||||
|
||||
#ifndef __ENCODEINTRA_H_
|
||||
#define __ENCODEINTRA_H_
|
||||
|
||||
#ifndef _ENCODEINTRA_H_
|
||||
#define _ENCODEINTRA_H_
|
||||
#include "onyx_int.h"
|
||||
|
||||
int vp9_encode_intra(VP9_COMP *cpi, MACROBLOCK *x, int use_16x16_pred);
|
||||
@@ -24,4 +24,4 @@ void vp9_encode_intra8x8mbuv(const VP9_ENCODER_RTCD *rtcd, MACROBLOCK *x);
|
||||
void vp9_encode_intra8x8(const VP9_ENCODER_RTCD *rtcd,
|
||||
MACROBLOCK *x, int ib);
|
||||
|
||||
#endif
|
||||
#endif // __ENCODEINTRA_H_
|
||||
|
||||
@@ -692,7 +692,8 @@ void vp9_first_pass(VP9_COMP *cpi) {
|
||||
x->src.v_buffer += 8 * x->src.uv_stride - 8 * cm->mb_cols;
|
||||
|
||||
// extend the recon for intra prediction
|
||||
vp9_extend_mb_row(new_yv12, xd->dst.y_buffer + 16, xd->dst.u_buffer + 8, xd->dst.v_buffer + 8);
|
||||
vp9_extend_mb_row(new_yv12, xd->dst.y_buffer + 16,
|
||||
xd->dst.u_buffer + 8, xd->dst.v_buffer + 8);
|
||||
vp9_clear_system_state(); // __asm emms;
|
||||
}
|
||||
|
||||
|
||||
@@ -18,12 +18,9 @@
|
||||
#include <vpx_mem/vpx_mem.h>
|
||||
#include <vp8/encoder/segmentation.h>
|
||||
|
||||
static unsigned int do_16x16_motion_iteration
|
||||
(
|
||||
VP9_COMP *cpi,
|
||||
int_mv *ref_mv,
|
||||
int_mv *dst_mv
|
||||
) {
|
||||
static unsigned int do_16x16_motion_iteration(VP9_COMP *cpi,
|
||||
int_mv *ref_mv,
|
||||
int_mv *dst_mv) {
|
||||
MACROBLOCK *const x = &cpi->mb;
|
||||
MACROBLOCKD *const xd = &x->e_mbd;
|
||||
BLOCK *b = &x->block[0];
|
||||
|
||||
@@ -23,7 +23,6 @@
|
||||
#include "ratectrl.h"
|
||||
#include "vp8/common/quant_common.h"
|
||||
#include "segmentation.h"
|
||||
#include "vp8/common/g_common.h"
|
||||
#include "vpx_scale/yv12extend.h"
|
||||
#if CONFIG_POSTPROC
|
||||
#include "vp8/common/postproc.h"
|
||||
|
||||
@@ -29,7 +29,6 @@
|
||||
#include "encodemb.h"
|
||||
#include "quantize.h"
|
||||
#include "vp8/common/idct.h"
|
||||
#include "vp8/common/g_common.h"
|
||||
#include "variance.h"
|
||||
#include "mcomp.h"
|
||||
#include "rdopt.h"
|
||||
|
||||
@@ -22,7 +22,6 @@
|
||||
#include "ratectrl.h"
|
||||
#include "vp8/common/quant_common.h"
|
||||
#include "segmentation.h"
|
||||
#include "vp8/common/g_common.h"
|
||||
#include "vpx_scale/yv12extend.h"
|
||||
#include "vpx_mem/vpx_mem.h"
|
||||
#include "vp8/common/swapyv12buffer.h"
|
||||
|
||||
@@ -37,7 +37,6 @@ VP8_COMMON_SRCS-yes += common/entropymode.h
|
||||
VP8_COMMON_SRCS-yes += common/entropymv.h
|
||||
VP8_COMMON_SRCS-yes += common/extend.h
|
||||
VP8_COMMON_SRCS-yes += common/findnearmv.h
|
||||
VP8_COMMON_SRCS-yes += common/g_common.h
|
||||
VP8_COMMON_SRCS-yes += common/header.h
|
||||
VP8_COMMON_SRCS-yes += common/idct.h
|
||||
VP8_COMMON_SRCS-yes += common/invtrans.h
|
||||
|
||||
Reference in New Issue
Block a user