Use standard integer types for pixel values and coefficients.

For coefficients, use int16_t (instead of short); for pixel values in
16-bit intermediates, use uint16_t (instead of unsigned short); for all
others, use uint8_t (instead of unsigned char).

Change-Id: I3619cd9abf106c3742eccc2e2f5e89a62774f7da
This commit is contained in:
Ronald S. Bultje 2012-12-18 15:31:19 -08:00
parent d47828ed59
commit 4cca47b538
108 changed files with 1884 additions and 1969 deletions

View File

@ -23,4 +23,4 @@ void vp9_setup_version(VP9_COMMON *oci);
void vp9_update_mode_info_border(VP9_COMMON *cpi, MODE_INFO *mi_base); void vp9_update_mode_info_border(VP9_COMMON *cpi, MODE_INFO *mi_base);
void vp9_update_mode_info_in_image(VP9_COMMON *cpi, MODE_INFO *mi); void vp9_update_mode_info_in_image(VP9_COMMON *cpi, MODE_INFO *mi);
#endif #endif // VP9_COMMON_VP9_ALLOCCOMMON_H_

View File

@ -12,7 +12,7 @@
#include "vp9/common/vp9_blockd.h" #include "vp9/common/vp9_blockd.h"
#include "vpx_mem/vpx_mem.h" #include "vpx_mem/vpx_mem.h"
const unsigned char vp9_block2left[TX_SIZE_MAX_SB][25] = { const uint8_t vp9_block2left[TX_SIZE_MAX_SB][25] = {
{0, 0, 0, 0, 1, 1, 1, 1, 2, 2, 2, 2, 3, 3, 3, 3, 4, 4, 5, 5, 6, 6, 7, 7, 8}, {0, 0, 0, 0, 1, 1, 1, 1, 2, 2, 2, 2, 3, 3, 3, 3, 4, 4, 5, 5, 6, 6, 7, 7, 8},
{0, 0, 0, 0, 0, 0, 0, 0, 2, 2, 2, 2, 2, 2, 2, 2, 4, 4, 4, 4, 6, 6, 6, 6, 8}, {0, 0, 0, 0, 0, 0, 0, 0, 2, 2, 2, 2, 2, 2, 2, 2, 4, 4, 4, 4, 6, 6, 6, 6, 8},
{0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 4, 4, 4, 4, 6, 6, 6, 6, 8}, {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 4, 4, 4, 4, 6, 6, 6, 6, 8},
@ -20,7 +20,7 @@ const unsigned char vp9_block2left[TX_SIZE_MAX_SB][25] = {
{0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 4, 4, 4, 4, 6, 6, 6, 6, 8} {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 4, 4, 4, 4, 6, 6, 6, 6, 8}
#endif #endif
}; };
const unsigned char vp9_block2above[TX_SIZE_MAX_SB][25] = { const uint8_t vp9_block2above[TX_SIZE_MAX_SB][25] = {
{0, 1, 2, 3, 0, 1, 2, 3, 0, 1, 2, 3, 0, 1, 2, 3, 4, 5, 4, 5, 6, 7, 6, 7, 8}, {0, 1, 2, 3, 0, 1, 2, 3, 0, 1, 2, 3, 0, 1, 2, 3, 4, 5, 4, 5, 6, 7, 6, 7, 8},
{0, 0, 0, 0, 2, 2, 2, 2, 0, 0, 0, 0, 2, 2, 2, 2, 4, 4, 4, 4, 6, 6, 6, 6, 8}, {0, 0, 0, 0, 2, 2, 2, 2, 0, 0, 0, 0, 2, 2, 2, 2, 4, 4, 4, 4, 6, 6, 6, 6, 8},
{0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 4, 4, 4, 4, 6, 6, 6, 6, 8}, {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 4, 4, 4, 4, 6, 6, 6, 6, 8},

View File

@ -279,19 +279,19 @@ typedef struct {
} MODE_INFO; } MODE_INFO;
typedef struct blockd { typedef struct blockd {
short *qcoeff; int16_t *qcoeff;
short *dqcoeff; int16_t *dqcoeff;
unsigned char *predictor; uint8_t *predictor;
short *diff; int16_t *diff;
short *dequant; int16_t *dequant;
/* 16 Y blocks, 4 U blocks, 4 V blocks each with 16 entries */ /* 16 Y blocks, 4 U blocks, 4 V blocks each with 16 entries */
unsigned char **base_pre; uint8_t **base_pre;
unsigned char **base_second_pre; uint8_t **base_second_pre;
int pre; int pre;
int pre_stride; int pre_stride;
unsigned char **base_dst; uint8_t **base_dst;
int dst; int dst;
int dst_stride; int dst_stride;
@ -303,18 +303,18 @@ typedef struct blockd {
#if CONFIG_TX32X32 && CONFIG_SUPERBLOCKS #if CONFIG_TX32X32 && CONFIG_SUPERBLOCKS
typedef struct superblockd { typedef struct superblockd {
/* 32x32 Y and 16x16 U/V. No 2nd order transform yet. */ /* 32x32 Y and 16x16 U/V. No 2nd order transform yet. */
DECLARE_ALIGNED(16, short, diff[32*32+16*16*2]); DECLARE_ALIGNED(16, int16_t, diff[32*32+16*16*2]);
DECLARE_ALIGNED(16, short, qcoeff[32*32+16*16*2]); DECLARE_ALIGNED(16, int16_t, qcoeff[32*32+16*16*2]);
DECLARE_ALIGNED(16, short, dqcoeff[32*32+16*16*2]); DECLARE_ALIGNED(16, int16_t, dqcoeff[32*32+16*16*2]);
} SUPERBLOCKD; } SUPERBLOCKD;
#endif #endif
typedef struct macroblockd { typedef struct macroblockd {
DECLARE_ALIGNED(16, short, diff[400]); /* from idct diff */ DECLARE_ALIGNED(16, int16_t, diff[400]); /* from idct diff */
DECLARE_ALIGNED(16, unsigned char, predictor[384]); DECLARE_ALIGNED(16, uint8_t, predictor[384]);
DECLARE_ALIGNED(16, short, qcoeff[400]); DECLARE_ALIGNED(16, int16_t, qcoeff[400]);
DECLARE_ALIGNED(16, short, dqcoeff[400]); DECLARE_ALIGNED(16, int16_t, dqcoeff[400]);
DECLARE_ALIGNED(16, unsigned short, eobs[25]); DECLARE_ALIGNED(16, uint16_t, eobs[25]);
#if CONFIG_TX32X32 && CONFIG_SUPERBLOCKS #if CONFIG_TX32X32 && CONFIG_SUPERBLOCKS
SUPERBLOCKD sb_coeff_data; SUPERBLOCKD sb_coeff_data;
@ -389,10 +389,10 @@ typedef struct macroblockd {
unsigned int frames_till_alt_ref_frame; unsigned int frames_till_alt_ref_frame;
/* Inverse transform function pointers. */ /* Inverse transform function pointers. */
void (*inv_xform4x4_1_x8)(short *input, short *output, int pitch); void (*inv_xform4x4_1_x8)(int16_t *input, int16_t *output, int pitch);
void (*inv_xform4x4_x8)(short *input, short *output, int pitch); void (*inv_xform4x4_x8)(int16_t *input, int16_t *output, int pitch);
void (*inv_walsh4x4_1)(short *in, short *out); void (*inv_walsh4x4_1)(int16_t *in, int16_t *out);
void (*inv_walsh4x4_lossless)(short *in, short *out); void (*inv_walsh4x4_lossless)(int16_t *in, int16_t *out);
vp9_subpix_fn_t subpixel_predict; vp9_subpix_fn_t subpixel_predict;
@ -412,7 +412,7 @@ typedef struct macroblockd {
* to keep a copy of the reference area. This buffer can be used for other * to keep a copy of the reference area. This buffer can be used for other
* purpose. * purpose.
*/ */
DECLARE_ALIGNED(32, unsigned char, y_buf[22 * 32]); DECLARE_ALIGNED(32, uint8_t, y_buf[22 * 32]);
#endif #endif
int mb_index; // Index of the MB in the SB (0..3) int mb_index; // Index of the MB in the SB (0..3)
@ -502,8 +502,8 @@ static TX_TYPE txfm_map(B_PREDICTION_MODE bmode) {
return tx_type; return tx_type;
} }
extern const unsigned char vp9_block2left[TX_SIZE_MAX_SB][25]; extern const uint8_t vp9_block2left[TX_SIZE_MAX_SB][25];
extern const unsigned char vp9_block2above[TX_SIZE_MAX_SB][25]; extern const uint8_t vp9_block2above[TX_SIZE_MAX_SB][25];
#define USE_ADST_FOR_I16X16_8X8 0 #define USE_ADST_FOR_I16X16_8X8 0
#define USE_ADST_FOR_I16X16_4X4 0 #define USE_ADST_FOR_I16X16_4X4 0
@ -665,4 +665,4 @@ static void update_blockd_bmi(MACROBLOCKD *xd) {
} }
} }
} }
#endif /* __INC_BLOCKD_H */ #endif // VP9_COMMON_VP9_BLOCKD_H_

View File

@ -8,9 +8,13 @@
* be found in the AUTHORS file in the root of the source tree. * be found in the AUTHORS file in the root of the source tree.
*/ */
#ifndef VP9_COMMON_VP9_COEFUPDATEPROBS_H_
#define VP9_COMMON_VP9_COEFUPDATEPROBS_H__
/* Update probabilities for the nodes in the token entropy tree. /* Update probabilities for the nodes in the token entropy tree.
Generated file included by vp9_entropy.c */ Generated file included by vp9_entropy.c */
#define COEF_UPDATE_PROB 252 #define COEF_UPDATE_PROB 252
#define COEF_UPDATE_PROB_8X8 252 #define COEF_UPDATE_PROB_8X8 252
#define COEF_UPDATE_PROB_16X16 252 #define COEF_UPDATE_PROB_16X16 252
#endif // VP9_COMMON_VP9_COEFUPDATEPROBS_H__

View File

@ -8,7 +8,6 @@
* be found in the AUTHORS file in the root of the source tree. * be found in the AUTHORS file in the root of the source tree.
*/ */
#ifndef VP9_COMMON_VP9_COMMON_H_ #ifndef VP9_COMMON_VP9_COMMON_H_
#define VP9_COMMON_VP9_COMMON_H_ #define VP9_COMMON_VP9_COMMON_H_
@ -18,28 +17,30 @@
#include "vpx_mem/vpx_mem.h" #include "vpx_mem/vpx_mem.h"
#include "vpx/vpx_integer.h" #include "vpx/vpx_integer.h"
#include "vp9/common/vp9_common_types.h"
#define TRUE 1
#define FALSE 0
/* Only need this for fixed-size arrays, for structs just assign. */ /* Only need this for fixed-size arrays, for structs just assign. */
#define vp9_copy( Dest, Src) { \ #define vp9_copy(Dest, Src) { \
assert( sizeof( Dest) == sizeof( Src)); \ assert(sizeof(Dest) == sizeof(Src)); \
vpx_memcpy( Dest, Src, sizeof( Src)); \ vpx_memcpy(Dest, Src, sizeof(Src)); \
} }
/* Use this for variably-sized arrays. */ /* Use this for variably-sized arrays. */
#define vp9_copy_array( Dest, Src, N) { \ #define vp9_copy_array(Dest, Src, N) { \
assert( sizeof( *Dest) == sizeof( *Src)); \ assert(sizeof(*Dest) == sizeof(*Src)); \
vpx_memcpy( Dest, Src, N * sizeof( *Src)); \ vpx_memcpy(Dest, Src, N * sizeof(*Src)); \
} }
#define vp9_zero( Dest) vpx_memset( &Dest, 0, sizeof( Dest)); #define vp9_zero(Dest) vpx_memset(&Dest, 0, sizeof(Dest));
#define vp9_zero_array( Dest, N) vpx_memset( Dest, 0, N * sizeof( *Dest)); #define vp9_zero_array(Dest, N) vpx_memset(Dest, 0, N * sizeof(*Dest));
static __inline uint8_t clip_pixel(int val) { static __inline uint8_t clip_pixel(int val) {
return (val > 255) ? 255u : (val < 0) ? 0u : val; return (val > 255) ? 255u : (val < 0) ? 0u : val;
} }
#endif /* common_h */ #endif // VP9_COMMON_VP9_COMMON_H_

View File

@ -1,18 +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.
*/
#ifndef VP9_COMMON_VP9_COMMON_TYPES_H_
#define VP9_COMMON_VP9_COMMON_TYPES_H_
#define TRUE 1
#define FALSE 0
#endif

View File

@ -1210,4 +1210,4 @@ static const vp9_coeff_probs default_coef_probs_32x32[BLOCK_TYPES_32X32] = {
} }
} }
}; };
#endif #endif // CONFIG_SUPERBLOCKS && CONFIG_TX32X32

View File

@ -17,18 +17,12 @@
#include "vp9/common/vp9_onyxc_int.h" #include "vp9/common/vp9_onyxc_int.h"
#include "vp9/common/vp9_entropymode.h" #include "vp9/common/vp9_entropymode.h"
#include "vpx_mem/vpx_mem.h" #include "vpx_mem/vpx_mem.h"
#include "vpx/vpx_integer.h"
#define uchar unsigned char /* typedefs can clash */
#define uint unsigned int
typedef const uchar cuchar;
typedef const uint cuint;
#include "vp9/common/vp9_coefupdateprobs.h" #include "vp9/common/vp9_coefupdateprobs.h"
const int vp9_i8x8_block[4] = {0, 2, 8, 10}; const int vp9_i8x8_block[4] = {0, 2, 8, 10};
DECLARE_ALIGNED(16, const unsigned char, vp9_norm[256]) = { DECLARE_ALIGNED(16, const uint8_t, vp9_norm[256]) = {
0, 7, 6, 6, 5, 5, 5, 5, 4, 4, 4, 4, 4, 4, 4, 4, 0, 7, 6, 6, 5, 5, 5, 5, 4, 4, 4, 4, 4, 4, 4, 4,
3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3,
2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
@ -51,7 +45,7 @@ DECLARE_ALIGNED(16, const int, vp9_coef_bands_4x4[16]) = {
0, 1, 2, 3, 6, 4, 5, 6, 6, 6, 6, 6, 6, 7, 7, 7 0, 1, 2, 3, 6, 4, 5, 6, 6, 6, 6, 6, 6, 7, 7, 7
}; };
DECLARE_ALIGNED(16, cuchar, vp9_prev_token_class[MAX_ENTROPY_TOKENS]) = { DECLARE_ALIGNED(16, const uint8_t, vp9_prev_token_class[MAX_ENTROPY_TOKENS]) = {
0, 1, 2, 2, 3, 3, 3, 3, 3, 3, 3, 0 0, 1, 2, 2, 3, 3, 3, 3, 3, 3, 3, 0
}; };

View File

@ -8,10 +8,10 @@
* be found in the AUTHORS file in the root of the source tree. * be found in the AUTHORS file in the root of the source tree.
*/ */
#ifndef VP9_COMMON_VP9_ENTROPY_H_ #ifndef VP9_COMMON_VP9_ENTROPY_H_
#define VP9_COMMON_VP9_ENTROPY_H_ #define VP9_COMMON_VP9_ENTROPY_H_
#include "vpx/vpx_integer.h"
#include "vp9/common/vp9_treecoder.h" #include "vp9/common/vp9_treecoder.h"
#include "vp9/common/vp9_blockd.h" #include "vp9/common/vp9_blockd.h"
#include "vp9/common/vp9_common.h" #include "vp9/common/vp9_common.h"
@ -110,7 +110,8 @@ typedef vp9_prob vp9_coeff_probs[COEF_BANDS][PREV_COEF_CONTEXTS]
#define SUBEXP_PARAM 4 /* Subexponential code parameter */ #define SUBEXP_PARAM 4 /* Subexponential code parameter */
#define MODULUS_PARAM 13 /* Modulus parameter */ #define MODULUS_PARAM 13 /* Modulus parameter */
extern DECLARE_ALIGNED(16, const unsigned char, vp9_prev_token_class[MAX_ENTROPY_TOKENS]); extern DECLARE_ALIGNED(16, const uint8_t,
vp9_prev_token_class[MAX_ENTROPY_TOKENS]);
struct VP9Common; struct VP9Common;
void vp9_default_coef_probs(struct VP9Common *); void vp9_default_coef_probs(struct VP9Common *);
@ -135,4 +136,4 @@ static void vp9_reset_mb_tokens_context(MACROBLOCKD* const xd) {
vpx_memset(xd->left_context, 0, sizeof(ENTROPY_CONTEXT_PLANES)); vpx_memset(xd->left_context, 0, sizeof(ENTROPY_CONTEXT_PLANES));
} }
#endif #endif // VP9_COMMON_VP9_ENTROPY_H_

View File

@ -8,7 +8,6 @@
* be found in the AUTHORS file in the root of the source tree. * be found in the AUTHORS file in the root of the source tree.
*/ */
#ifndef VP9_COMMON_VP9_ENTROPYMODE_H_ #ifndef VP9_COMMON_VP9_ENTROPYMODE_H_
#define VP9_COMMON_VP9_ENTROPYMODE_H_ #define VP9_COMMON_VP9_ENTROPYMODE_H_
@ -114,4 +113,4 @@ extern struct vp9_token_struct vp9_switchable_interp_encodings
extern const vp9_prob vp9_switchable_interp_prob[VP9_SWITCHABLE_FILTERS + 1] extern const vp9_prob vp9_switchable_interp_prob[VP9_SWITCHABLE_FILTERS + 1]
[VP9_SWITCHABLE_FILTERS - 1]; [VP9_SWITCHABLE_FILTERS - 1];
#endif #endif // VP9_COMMON_VP9_ENTROPYMODE_H_

View File

@ -126,4 +126,5 @@ void vp9_counts_to_nmv_context(
unsigned int (*branch_ct_class0_hp)[2], unsigned int (*branch_ct_class0_hp)[2],
unsigned int (*branch_ct_hp)[2]); unsigned int (*branch_ct_hp)[2]);
void vp9_counts_process(nmv_context_counts *NMVcount, int usehp); void vp9_counts_process(nmv_context_counts *NMVcount, int usehp);
#endif
#endif // VP9_COMMON_VP9_ENTROPYMV_H_

View File

@ -11,9 +11,9 @@
#include "vp9/common/vp9_extend.h" #include "vp9/common/vp9_extend.h"
#include "vpx_mem/vpx_mem.h" #include "vpx_mem/vpx_mem.h"
static void copy_and_extend_plane(unsigned char *s, /* source */ static void copy_and_extend_plane(uint8_t *s, /* source */
int sp, /* source pitch */ int sp, /* source pitch */
unsigned char *d, /* destination */ uint8_t *d, /* destination */
int dp, /* destination pitch */ int dp, /* destination pitch */
int h, /* height */ int h, /* height */
int w, /* width */ int w, /* width */
@ -22,8 +22,8 @@ static void copy_and_extend_plane(unsigned char *s, /* source */
int eb, /* extend bottom border */ int eb, /* extend bottom border */
int er) { /* extend right border */ int er) { /* extend right border */
int i; int i;
unsigned char *src_ptr1, *src_ptr2; uint8_t *src_ptr1, *src_ptr2;
unsigned char *dest_ptr1, *dest_ptr2; uint8_t *dest_ptr1, *dest_ptr2;
int linesize; int linesize;
/* copy the left and right most columns out */ /* copy the left and right most columns out */
@ -143,8 +143,8 @@ void vp9_copy_and_extend_frame_with_rect(YV12_BUFFER_CONFIG *src,
} }
/* note the extension is only for the last row, for intra prediction purpose */ /* 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, void vp9_extend_mb_row(YV12_BUFFER_CONFIG *ybf, uint8_t *YPtr,
unsigned char *UPtr, unsigned char *VPtr) { uint8_t *UPtr, uint8_t *VPtr) {
int i; int i;
YPtr += ybf->y_stride * 14; YPtr += ybf->y_stride * 14;

View File

@ -12,9 +12,10 @@
#define VP9_COMMON_VP9_EXTEND_H_ #define VP9_COMMON_VP9_EXTEND_H_
#include "vpx_scale/yv12config.h" #include "vpx_scale/yv12config.h"
#include "vpx/vpx_integer.h"
void vp9_extend_mb_row(YV12_BUFFER_CONFIG *ybf, unsigned char *YPtr, void vp9_extend_mb_row(YV12_BUFFER_CONFIG *ybf, uint8_t *YPtr,
unsigned char *UPtr, unsigned char *VPtr); uint8_t *UPtr, uint8_t *VPtr);
void vp9_copy_and_extend_frame(YV12_BUFFER_CONFIG *src, void vp9_copy_and_extend_frame(YV12_BUFFER_CONFIG *src,
YV12_BUFFER_CONFIG *dst); YV12_BUFFER_CONFIG *dst);
@ -24,4 +25,4 @@ void vp9_copy_and_extend_frame_with_rect(YV12_BUFFER_CONFIG *src,
int srcy, int srcx, int srcy, int srcx,
int srch, int srcw); int srch, int srcw);
#endif // __INC_EXTEND_H #endif // VP9_COMMON_VP9_EXTEND_H_

View File

@ -15,7 +15,7 @@
#include "vp9_rtcd.h" #include "vp9_rtcd.h"
#include "vp9/common/vp9_common.h" #include "vp9/common/vp9_common.h"
DECLARE_ALIGNED(16, const short, vp9_bilinear_filters[SUBPEL_SHIFTS][2]) = { DECLARE_ALIGNED(16, const int16_t, vp9_bilinear_filters[SUBPEL_SHIFTS][2]) = {
{ 128, 0 }, { 128, 0 },
{ 120, 8 }, { 120, 8 },
{ 112, 16 }, { 112, 16 },
@ -36,7 +36,7 @@ DECLARE_ALIGNED(16, const short, vp9_bilinear_filters[SUBPEL_SHIFTS][2]) = {
#define FILTER_ALPHA 0 #define FILTER_ALPHA 0
#define FILTER_ALPHA_SHARP 1 #define FILTER_ALPHA_SHARP 1
DECLARE_ALIGNED(16, const short, vp9_sub_pel_filters_8[SUBPEL_SHIFTS][8]) = { DECLARE_ALIGNED(16, const int16_t, vp9_sub_pel_filters_8[SUBPEL_SHIFTS][8]) = {
#if FILTER_ALPHA == 0 #if FILTER_ALPHA == 0
/* Lagrangian interpolation filter */ /* Lagrangian interpolation filter */
{ 0, 0, 0, 128, 0, 0, 0, 0}, { 0, 0, 0, 128, 0, 0, 0, 0},
@ -82,7 +82,7 @@ DECLARE_ALIGNED(16, const short, vp9_sub_pel_filters_8[SUBPEL_SHIFTS][8]) = {
#endif /* FILTER_ALPHA */ #endif /* FILTER_ALPHA */
}; };
DECLARE_ALIGNED(16, const short, vp9_sub_pel_filters_8s[SUBPEL_SHIFTS][8]) = { DECLARE_ALIGNED(16, const int16_t, vp9_sub_pel_filters_8s[SUBPEL_SHIFTS][8]) = {
#if FILTER_ALPHA_SHARP == 1 #if FILTER_ALPHA_SHARP == 1
/* dct based filter */ /* dct based filter */
{0, 0, 0, 128, 0, 0, 0, 0}, {0, 0, 0, 128, 0, 0, 0, 0},
@ -122,7 +122,7 @@ DECLARE_ALIGNED(16, const short, vp9_sub_pel_filters_8s[SUBPEL_SHIFTS][8]) = {
#endif /* FILTER_ALPHA_SHARP */ #endif /* FILTER_ALPHA_SHARP */
}; };
DECLARE_ALIGNED(16, const short, vp9_sub_pel_filters_6[SUBPEL_SHIFTS][6]) = { DECLARE_ALIGNED(16, const int16_t, vp9_sub_pel_filters_6[SUBPEL_SHIFTS][6]) = {
{0, 0, 128, 0, 0, 0}, {0, 0, 128, 0, 0, 0},
{1, -5, 125, 8, -2, 1}, {1, -5, 125, 8, -2, 1},
{1, -8, 122, 17, -5, 1}, {1, -8, 122, 17, -5, 1},
@ -141,13 +141,13 @@ DECLARE_ALIGNED(16, const short, vp9_sub_pel_filters_6[SUBPEL_SHIFTS][6]) = {
{1, -2, 8, 125, -5, 1} {1, -2, 8, 125, -5, 1}
}; };
static void filter_block2d_first_pass_6(unsigned char *src_ptr, static void filter_block2d_first_pass_6(uint8_t *src_ptr,
int *output_ptr, int *output_ptr,
unsigned int src_pixels_per_line, unsigned int src_pixels_per_line,
unsigned int pixel_step, unsigned int pixel_step,
unsigned int output_height, unsigned int output_height,
unsigned int output_width, unsigned int output_width,
const short *vp9_filter) { const int16_t *vp9_filter) {
unsigned int i, j; unsigned int i, j;
int temp; int temp;
@ -173,13 +173,13 @@ static void filter_block2d_first_pass_6(unsigned char *src_ptr,
} }
static void filter_block2d_second_pass_6(int *src_ptr, static void filter_block2d_second_pass_6(int *src_ptr,
unsigned char *output_ptr, uint8_t *output_ptr,
int output_pitch, int output_pitch,
unsigned int src_pixels_per_line, unsigned int src_pixels_per_line,
unsigned int pixel_step, unsigned int pixel_step,
unsigned int output_height, unsigned int output_height,
unsigned int output_width, unsigned int output_width,
const short *vp9_filter) { const int16_t *vp9_filter) {
unsigned int i, j; unsigned int i, j;
int temp; int temp;
@ -214,13 +214,13 @@ static void filter_block2d_second_pass_6(int *src_ptr,
* ((filter_result + dest + 1) >> 1) and stores that 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, static void filter_block2d_second_pass_avg_6(int *src_ptr,
unsigned char *output_ptr, uint8_t *output_ptr,
int output_pitch, int output_pitch,
unsigned int src_pixels_per_line, unsigned int src_pixels_per_line,
unsigned int pixel_step, unsigned int pixel_step,
unsigned int output_height, unsigned int output_height,
unsigned int output_width, unsigned int output_width,
const short *vp9_filter) { const int16_t *vp9_filter) {
unsigned int i, j; unsigned int i, j;
int temp; int temp;
@ -248,12 +248,12 @@ static void filter_block2d_second_pass_avg_6(int *src_ptr,
} }
#define Interp_Extend 3 #define Interp_Extend 3
static void filter_block2d_6(unsigned char *src_ptr, static void filter_block2d_6(uint8_t *src_ptr,
unsigned char *output_ptr, uint8_t *output_ptr,
unsigned int src_pixels_per_line, unsigned int src_pixels_per_line,
int output_pitch, int output_pitch,
const short *HFilter, const int16_t *HFilter,
const short *VFilter) { const int16_t *VFilter) {
int FData[(3 + Interp_Extend * 2) * 4]; /* Temp data buffer used in filtering */ int FData[(3 + Interp_Extend * 2) * 4]; /* Temp data buffer used in filtering */
/* First filter 1-D horizontally... */ /* First filter 1-D horizontally... */
@ -265,14 +265,14 @@ static void filter_block2d_6(unsigned char *src_ptr,
} }
void vp9_sixtap_predict_c(unsigned char *src_ptr, void vp9_sixtap_predict_c(uint8_t *src_ptr,
int src_pixels_per_line, int src_pixels_per_line,
int xoffset, int xoffset,
int yoffset, int yoffset,
unsigned char *dst_ptr, uint8_t *dst_ptr,
int dst_pitch) { int dst_pitch) {
const short *HFilter; const int16_t *HFilter;
const short *VFilter; const int16_t *VFilter;
HFilter = vp9_sub_pel_filters_6[xoffset]; /* 6 tap */ HFilter = vp9_sub_pel_filters_6[xoffset]; /* 6 tap */
VFilter = vp9_sub_pel_filters_6[yoffset]; /* 6 tap */ VFilter = vp9_sub_pel_filters_6[yoffset]; /* 6 tap */
@ -287,12 +287,12 @@ void vp9_sixtap_predict_c(unsigned char *src_ptr,
* then averages that with the content already present in the output * then averages that with the content already present in the output
* ((filter_result + dest + 1) >> 1) and stores that in the output. * ((filter_result + dest + 1) >> 1) and stores that in the output.
*/ */
static void filter_block2d_avg_6(unsigned char *src_ptr, static void filter_block2d_avg_6(uint8_t *src_ptr,
unsigned char *output_ptr, uint8_t *output_ptr,
unsigned int src_pixels_per_line, unsigned int src_pixels_per_line,
int output_pitch, int output_pitch,
const short *HFilter, const int16_t *HFilter,
const short *VFilter) { const int16_t *VFilter) {
int FData[(3 + Interp_Extend * 2) * 4]; /* Temp data buffer used in filtering */ int FData[(3 + Interp_Extend * 2) * 4]; /* Temp data buffer used in filtering */
/* First filter 1-D horizontally... */ /* First filter 1-D horizontally... */
@ -305,17 +305,14 @@ static void filter_block2d_avg_6(unsigned char *src_ptr,
output_pitch, 4, 4, 4, 4, VFilter); output_pitch, 4, 4, 4, 4, VFilter);
} }
void vp9_sixtap_predict_avg_c void vp9_sixtap_predict_avg_c(uint8_t *src_ptr,
( int src_pixels_per_line,
unsigned char *src_ptr, int xoffset,
int src_pixels_per_line, int yoffset,
int xoffset, uint8_t *dst_ptr,
int yoffset, int dst_pitch) {
unsigned char *dst_ptr, const int16_t *HFilter;
int dst_pitch const int16_t *VFilter;
) {
const short *HFilter;
const short *VFilter;
HFilter = vp9_sub_pel_filters_6[xoffset]; /* 6 tap */ HFilter = vp9_sub_pel_filters_6[xoffset]; /* 6 tap */
VFilter = vp9_sub_pel_filters_6[yoffset]; /* 6 tap */ VFilter = vp9_sub_pel_filters_6[yoffset]; /* 6 tap */
@ -324,17 +321,14 @@ void vp9_sixtap_predict_avg_c
dst_pitch, HFilter, VFilter); dst_pitch, HFilter, VFilter);
} }
void vp9_sixtap_predict8x8_c void vp9_sixtap_predict8x8_c(uint8_t *src_ptr,
( int src_pixels_per_line,
unsigned char *src_ptr, int xoffset,
int src_pixels_per_line, int yoffset,
int xoffset, uint8_t *dst_ptr,
int yoffset, int dst_pitch) {
unsigned char *dst_ptr, const int16_t *HFilter;
int dst_pitch const int16_t *VFilter;
) {
const short *HFilter;
const short *VFilter;
// int FData[(7+Interp_Extend*2)*16]; /* Temp data buffer used in filtering */ // int FData[(7+Interp_Extend*2)*16]; /* Temp data buffer used in filtering */
int FData[(7 + Interp_Extend * 2) * 8]; /* Temp data buffer used in filtering */ int FData[(7 + Interp_Extend * 2) * 8]; /* Temp data buffer used in filtering */
@ -351,17 +345,14 @@ void vp9_sixtap_predict8x8_c
} }
void vp9_sixtap_predict_avg8x8_c void vp9_sixtap_predict_avg8x8_c(uint8_t *src_ptr,
( int src_pixels_per_line,
unsigned char *src_ptr, int xoffset,
int src_pixels_per_line, int yoffset,
int xoffset, uint8_t *dst_ptr,
int yoffset, int dst_pitch) {
unsigned char *dst_ptr, const int16_t *HFilter;
int dst_pitch const int16_t *VFilter;
) {
const short *HFilter;
const short *VFilter;
// int FData[(7+Interp_Extend*2)*16]; /* Temp data buffer used in filtering */ // int FData[(7+Interp_Extend*2)*16]; /* Temp data buffer used in filtering */
int FData[(7 + Interp_Extend * 2) * 8]; /* Temp data buffer used in filtering */ int FData[(7 + Interp_Extend * 2) * 8]; /* Temp data buffer used in filtering */
@ -376,17 +367,14 @@ void vp9_sixtap_predict_avg8x8_c
filter_block2d_second_pass_avg_6(FData + 8 * (Interp_Extend - 1), dst_ptr, dst_pitch, 8, 8, 8, 8, VFilter); filter_block2d_second_pass_avg_6(FData + 8 * (Interp_Extend - 1), dst_ptr, dst_pitch, 8, 8, 8, 8, VFilter);
} }
void vp9_sixtap_predict8x4_c void vp9_sixtap_predict8x4_c(uint8_t *src_ptr,
( int src_pixels_per_line,
unsigned char *src_ptr, int xoffset,
int src_pixels_per_line, int yoffset,
int xoffset, uint8_t *dst_ptr,
int yoffset, int dst_pitch) {
unsigned char *dst_ptr, const int16_t *HFilter;
int dst_pitch const int16_t *VFilter;
) {
const short *HFilter;
const short *VFilter;
// int FData[(7+Interp_Extend*2)*16]; /* Temp data buffer used in filtering */ // int FData[(7+Interp_Extend*2)*16]; /* Temp data buffer used in filtering */
int FData[(3 + Interp_Extend * 2) * 8]; /* Temp data buffer used in filtering */ int FData[(3 + Interp_Extend * 2) * 8]; /* Temp data buffer used in filtering */
@ -403,17 +391,14 @@ void vp9_sixtap_predict8x4_c
} }
void vp9_sixtap_predict16x16_c void vp9_sixtap_predict16x16_c(uint8_t *src_ptr,
( int src_pixels_per_line,
unsigned char *src_ptr, int xoffset,
int src_pixels_per_line, int yoffset,
int xoffset, uint8_t *dst_ptr,
int yoffset, int dst_pitch) {
unsigned char *dst_ptr, const int16_t *HFilter;
int dst_pitch const int16_t *VFilter;
) {
const short *HFilter;
const short *VFilter;
// int FData[(15+Interp_Extend*2)*24]; /* Temp data buffer used in filtering */ // int FData[(15+Interp_Extend*2)*24]; /* Temp data buffer used in filtering */
int FData[(15 + Interp_Extend * 2) * 16]; /* Temp data buffer used in filtering */ int FData[(15 + Interp_Extend * 2) * 16]; /* Temp data buffer used in filtering */
@ -430,17 +415,14 @@ void vp9_sixtap_predict16x16_c
} }
void vp9_sixtap_predict_avg16x16_c void vp9_sixtap_predict_avg16x16_c(uint8_t *src_ptr,
( int src_pixels_per_line,
unsigned char *src_ptr, int xoffset,
int src_pixels_per_line, int yoffset,
int xoffset, uint8_t *dst_ptr,
int yoffset, int dst_pitch) {
unsigned char *dst_ptr, const int16_t *HFilter;
int dst_pitch const int16_t *VFilter;
) {
const short *HFilter;
const short *VFilter;
// int FData[(15+Interp_Extend*2)*24]; /* Temp data buffer used in filtering */ // int FData[(15+Interp_Extend*2)*24]; /* Temp data buffer used in filtering */
int FData[(15 + Interp_Extend * 2) * 16]; /* Temp data buffer used in filtering */ int FData[(15 + Interp_Extend * 2) * 16]; /* Temp data buffer used in filtering */
@ -470,13 +452,13 @@ static const unsigned int filter_size_to_wh[][2] = {
{16,16}, {16,16},
}; };
static void filter_block2d_8_c(const unsigned char *src_ptr, static void filter_block2d_8_c(const uint8_t *src_ptr,
const unsigned int src_stride, const unsigned int src_stride,
const short *HFilter, const int16_t *HFilter,
const short *VFilter, const int16_t *VFilter,
const filter_size_t filter_size, const filter_size_t filter_size,
unsigned char *dst_ptr, uint8_t *dst_ptr,
unsigned int dst_stride) { unsigned int dst_stride) {
const unsigned int output_width = filter_size_to_wh[filter_size][0]; const unsigned int output_width = filter_size_to_wh[filter_size][0];
const unsigned int output_height = filter_size_to_wh[filter_size][1]; const unsigned int output_height = filter_size_to_wh[filter_size][1];
@ -495,12 +477,12 @@ static void filter_block2d_8_c(const unsigned char *src_ptr,
* = 23 * = 23
* and filter_max_width = 16 * and filter_max_width = 16
*/ */
unsigned char intermediate_buffer[23 * 16]; uint8_t intermediate_buffer[23 * 16];
const int intermediate_next_stride = 1 - intermediate_height * output_width; const int intermediate_next_stride = 1 - intermediate_height * output_width;
// Horizontal pass (src -> transposed intermediate). // Horizontal pass (src -> transposed intermediate).
{ {
unsigned char *output_ptr = intermediate_buffer; uint8_t *output_ptr = intermediate_buffer;
const int src_next_row_stride = src_stride - output_width; const int src_next_row_stride = src_stride - output_width;
unsigned int i, j; unsigned int i, j;
src_ptr -= (kInterp_Extend - 1) * src_stride + (kInterp_Extend - 1); src_ptr -= (kInterp_Extend - 1) * src_stride + (kInterp_Extend - 1);
@ -529,7 +511,7 @@ static void filter_block2d_8_c(const unsigned char *src_ptr,
// Vertical pass (transposed intermediate -> dst). // Vertical pass (transposed intermediate -> dst).
{ {
unsigned char *src_ptr = intermediate_buffer; uint8_t *src_ptr = intermediate_buffer;
const int dst_next_row_stride = dst_stride - output_width; const int dst_next_row_stride = dst_stride - output_width;
unsigned int i, j; unsigned int i, j;
for (i = 0; i < output_height; i++) { for (i = 0; i < output_height; i++) {
@ -555,53 +537,53 @@ static void filter_block2d_8_c(const unsigned char *src_ptr,
} }
} }
void vp9_filter_block2d_4x4_8_c(const unsigned char *src_ptr, void vp9_filter_block2d_4x4_8_c(const uint8_t *src_ptr,
const unsigned int src_stride, const unsigned int src_stride,
const short *HFilter_aligned16, const int16_t *HFilter_aligned16,
const short *VFilter_aligned16, const int16_t *VFilter_aligned16,
unsigned char *dst_ptr, uint8_t *dst_ptr,
unsigned int dst_stride) { unsigned int dst_stride) {
filter_block2d_8_c(src_ptr, src_stride, filter_block2d_8_c(src_ptr, src_stride,
HFilter_aligned16, VFilter_aligned16, HFilter_aligned16, VFilter_aligned16,
VPX_FILTER_4x4, dst_ptr, dst_stride); VPX_FILTER_4x4, dst_ptr, dst_stride);
} }
void vp9_filter_block2d_8x4_8_c(const unsigned char *src_ptr, void vp9_filter_block2d_8x4_8_c(const uint8_t *src_ptr,
const unsigned int src_stride, const unsigned int src_stride,
const short *HFilter_aligned16, const int16_t *HFilter_aligned16,
const short *VFilter_aligned16, const int16_t *VFilter_aligned16,
unsigned char *dst_ptr, uint8_t *dst_ptr,
unsigned int dst_stride) { unsigned int dst_stride) {
filter_block2d_8_c(src_ptr, src_stride, filter_block2d_8_c(src_ptr, src_stride,
HFilter_aligned16, VFilter_aligned16, HFilter_aligned16, VFilter_aligned16,
VPX_FILTER_8x4, dst_ptr, dst_stride); VPX_FILTER_8x4, dst_ptr, dst_stride);
} }
void vp9_filter_block2d_8x8_8_c(const unsigned char *src_ptr, void vp9_filter_block2d_8x8_8_c(const uint8_t *src_ptr,
const unsigned int src_stride, const unsigned int src_stride,
const short *HFilter_aligned16, const int16_t *HFilter_aligned16,
const short *VFilter_aligned16, const int16_t *VFilter_aligned16,
unsigned char *dst_ptr, uint8_t *dst_ptr,
unsigned int dst_stride) { unsigned int dst_stride) {
filter_block2d_8_c(src_ptr, src_stride, filter_block2d_8_c(src_ptr, src_stride,
HFilter_aligned16, VFilter_aligned16, HFilter_aligned16, VFilter_aligned16,
VPX_FILTER_8x8, dst_ptr, dst_stride); VPX_FILTER_8x8, dst_ptr, dst_stride);
} }
void vp9_filter_block2d_16x16_8_c(const unsigned char *src_ptr, void vp9_filter_block2d_16x16_8_c(const uint8_t *src_ptr,
const unsigned int src_stride, const unsigned int src_stride,
const short *HFilter_aligned16, const int16_t *HFilter_aligned16,
const short *VFilter_aligned16, const int16_t *VFilter_aligned16,
unsigned char *dst_ptr, uint8_t *dst_ptr,
unsigned int dst_stride) { unsigned int dst_stride) {
filter_block2d_8_c(src_ptr, src_stride, filter_block2d_8_c(src_ptr, src_stride,
HFilter_aligned16, VFilter_aligned16, HFilter_aligned16, VFilter_aligned16,
VPX_FILTER_16x16, dst_ptr, dst_stride); VPX_FILTER_16x16, dst_ptr, dst_stride);
} }
static void block2d_average_c(unsigned char *src, static void block2d_average_c(uint8_t *src,
unsigned int src_stride, unsigned int src_stride,
unsigned char *output_ptr, uint8_t *output_ptr,
unsigned int output_stride, unsigned int output_stride,
const filter_size_t filter_size) { const filter_size_t filter_size) {
const unsigned int output_width = filter_size_to_wh[filter_size][0]; const unsigned int output_width = filter_size_to_wh[filter_size][0];
@ -618,14 +600,14 @@ static void block2d_average_c(unsigned char *src,
#define block2d_average block2d_average_c #define block2d_average block2d_average_c
void vp9_eighttap_predict_c(unsigned char *src_ptr, void vp9_eighttap_predict_c(uint8_t *src_ptr,
int src_pixels_per_line, int src_pixels_per_line,
int xoffset, int xoffset,
int yoffset, int yoffset,
unsigned char *dst_ptr, uint8_t *dst_ptr,
int dst_pitch) { int dst_pitch) {
const short *HFilter; const int16_t *HFilter;
const short *VFilter; const int16_t *VFilter;
HFilter = vp9_sub_pel_filters_8[xoffset]; HFilter = vp9_sub_pel_filters_8[xoffset];
VFilter = vp9_sub_pel_filters_8[yoffset]; VFilter = vp9_sub_pel_filters_8[yoffset];
@ -635,15 +617,15 @@ void vp9_eighttap_predict_c(unsigned char *src_ptr,
dst_ptr, dst_pitch); dst_ptr, dst_pitch);
} }
void vp9_eighttap_predict_avg4x4_c(unsigned char *src_ptr, void vp9_eighttap_predict_avg4x4_c(uint8_t *src_ptr,
int src_pixels_per_line, int src_pixels_per_line,
int xoffset, int xoffset,
int yoffset, int yoffset,
unsigned char *dst_ptr, uint8_t *dst_ptr,
int dst_pitch) { int dst_pitch) {
const short *HFilter = vp9_sub_pel_filters_8[xoffset]; const int16_t *HFilter = vp9_sub_pel_filters_8[xoffset];
const short *VFilter = vp9_sub_pel_filters_8[yoffset]; const int16_t *VFilter = vp9_sub_pel_filters_8[yoffset];
unsigned char tmp[4 * 4]; uint8_t tmp[4 * 4];
vp9_filter_block2d_4x4_8(src_ptr, src_pixels_per_line, vp9_filter_block2d_4x4_8(src_ptr, src_pixels_per_line,
HFilter, VFilter, HFilter, VFilter,
@ -651,14 +633,14 @@ void vp9_eighttap_predict_avg4x4_c(unsigned char *src_ptr,
block2d_average(tmp, 4, dst_ptr, dst_pitch, VPX_FILTER_4x4); block2d_average(tmp, 4, dst_ptr, dst_pitch, VPX_FILTER_4x4);
} }
void vp9_eighttap_predict_sharp_c(unsigned char *src_ptr, void vp9_eighttap_predict_sharp_c(uint8_t *src_ptr,
int src_pixels_per_line, int src_pixels_per_line,
int xoffset, int xoffset,
int yoffset, int yoffset,
unsigned char *dst_ptr, uint8_t *dst_ptr,
int dst_pitch) { int dst_pitch) {
const short *HFilter; const int16_t *HFilter;
const short *VFilter; const int16_t *VFilter;
HFilter = vp9_sub_pel_filters_8s[xoffset]; HFilter = vp9_sub_pel_filters_8s[xoffset];
VFilter = vp9_sub_pel_filters_8s[yoffset]; VFilter = vp9_sub_pel_filters_8s[yoffset];
@ -668,15 +650,15 @@ void vp9_eighttap_predict_sharp_c(unsigned char *src_ptr,
dst_ptr, dst_pitch); dst_ptr, dst_pitch);
} }
void vp9_eighttap_predict_avg4x4_sharp_c(unsigned char *src_ptr, void vp9_eighttap_predict_avg4x4_sharp_c(uint8_t *src_ptr,
int src_pixels_per_line, int src_pixels_per_line,
int xoffset, int xoffset,
int yoffset, int yoffset,
unsigned char *dst_ptr, uint8_t *dst_ptr,
int dst_pitch) { int dst_pitch) {
const short *HFilter = vp9_sub_pel_filters_8s[xoffset]; const int16_t *HFilter = vp9_sub_pel_filters_8s[xoffset];
const short *VFilter = vp9_sub_pel_filters_8s[yoffset]; const int16_t *VFilter = vp9_sub_pel_filters_8s[yoffset];
unsigned char tmp[4 * 4]; uint8_t tmp[4 * 4];
vp9_filter_block2d_4x4_8(src_ptr, src_pixels_per_line, vp9_filter_block2d_4x4_8(src_ptr, src_pixels_per_line,
HFilter, VFilter, HFilter, VFilter,
@ -684,43 +666,43 @@ void vp9_eighttap_predict_avg4x4_sharp_c(unsigned char *src_ptr,
block2d_average(tmp, 4, dst_ptr, dst_pitch, VPX_FILTER_4x4); block2d_average(tmp, 4, dst_ptr, dst_pitch, VPX_FILTER_4x4);
} }
void vp9_eighttap_predict8x8_c(unsigned char *src_ptr, void vp9_eighttap_predict8x8_c(uint8_t *src_ptr,
int src_pixels_per_line, int src_pixels_per_line,
int xoffset, int xoffset,
int yoffset, int yoffset,
unsigned char *dst_ptr, uint8_t *dst_ptr,
int dst_pitch) { int dst_pitch) {
const short *HFilter = vp9_sub_pel_filters_8[xoffset]; const int16_t *HFilter = vp9_sub_pel_filters_8[xoffset];
const short *VFilter = vp9_sub_pel_filters_8[yoffset]; const int16_t *VFilter = vp9_sub_pel_filters_8[yoffset];
vp9_filter_block2d_8x8_8(src_ptr, src_pixels_per_line, vp9_filter_block2d_8x8_8(src_ptr, src_pixels_per_line,
HFilter, VFilter, HFilter, VFilter,
dst_ptr, dst_pitch); dst_ptr, dst_pitch);
} }
void vp9_eighttap_predict8x8_sharp_c(unsigned char *src_ptr, void vp9_eighttap_predict8x8_sharp_c(uint8_t *src_ptr,
int src_pixels_per_line, int src_pixels_per_line,
int xoffset, int xoffset,
int yoffset, int yoffset,
unsigned char *dst_ptr, uint8_t *dst_ptr,
int dst_pitch) { int dst_pitch) {
const short *HFilter = vp9_sub_pel_filters_8s[xoffset]; const int16_t *HFilter = vp9_sub_pel_filters_8s[xoffset];
const short *VFilter = vp9_sub_pel_filters_8s[yoffset]; const int16_t *VFilter = vp9_sub_pel_filters_8s[yoffset];
vp9_filter_block2d_8x8_8(src_ptr, src_pixels_per_line, vp9_filter_block2d_8x8_8(src_ptr, src_pixels_per_line,
HFilter, VFilter, HFilter, VFilter,
dst_ptr, dst_pitch); dst_ptr, dst_pitch);
} }
void vp9_eighttap_predict_avg8x8_c(unsigned char *src_ptr, void vp9_eighttap_predict_avg8x8_c(uint8_t *src_ptr,
int src_pixels_per_line, int src_pixels_per_line,
int xoffset, int xoffset,
int yoffset, int yoffset,
unsigned char *dst_ptr, uint8_t *dst_ptr,
int dst_pitch) { int dst_pitch) {
unsigned char tmp[8 * 8]; uint8_t tmp[8 * 8];
const short *HFilter = vp9_sub_pel_filters_8[xoffset]; const int16_t *HFilter = vp9_sub_pel_filters_8[xoffset];
const short *VFilter = vp9_sub_pel_filters_8[yoffset]; const int16_t *VFilter = vp9_sub_pel_filters_8[yoffset];
vp9_filter_block2d_8x8_8(src_ptr, src_pixels_per_line, vp9_filter_block2d_8x8_8(src_ptr, src_pixels_per_line,
HFilter, VFilter, HFilter, VFilter,
@ -728,15 +710,15 @@ void vp9_eighttap_predict_avg8x8_c(unsigned char *src_ptr,
block2d_average(tmp, 8, dst_ptr, dst_pitch, VPX_FILTER_8x8); block2d_average(tmp, 8, dst_ptr, dst_pitch, VPX_FILTER_8x8);
} }
void vp9_eighttap_predict_avg8x8_sharp_c(unsigned char *src_ptr, void vp9_eighttap_predict_avg8x8_sharp_c(uint8_t *src_ptr,
int src_pixels_per_line, int src_pixels_per_line,
int xoffset, int xoffset,
int yoffset, int yoffset,
unsigned char *dst_ptr, uint8_t *dst_ptr,
int dst_pitch) { int dst_pitch) {
unsigned char tmp[8 * 8]; uint8_t tmp[8 * 8];
const short *HFilter = vp9_sub_pel_filters_8s[xoffset]; const int16_t *HFilter = vp9_sub_pel_filters_8s[xoffset];
const short *VFilter = vp9_sub_pel_filters_8s[yoffset]; const int16_t *VFilter = vp9_sub_pel_filters_8s[yoffset];
vp9_filter_block2d_8x8_8(src_ptr, src_pixels_per_line, vp9_filter_block2d_8x8_8(src_ptr, src_pixels_per_line,
HFilter, VFilter, HFilter, VFilter,
@ -744,71 +726,71 @@ void vp9_eighttap_predict_avg8x8_sharp_c(unsigned char *src_ptr,
block2d_average(tmp, 8, dst_ptr, dst_pitch, VPX_FILTER_8x8); block2d_average(tmp, 8, dst_ptr, dst_pitch, VPX_FILTER_8x8);
} }
void vp9_eighttap_predict8x4_c(unsigned char *src_ptr, void vp9_eighttap_predict8x4_c(uint8_t *src_ptr,
int src_pixels_per_line, int src_pixels_per_line,
int xoffset, int xoffset,
int yoffset, int yoffset,
unsigned char *dst_ptr, uint8_t *dst_ptr,
int dst_pitch) { int dst_pitch) {
const short *HFilter = vp9_sub_pel_filters_8[xoffset]; const int16_t *HFilter = vp9_sub_pel_filters_8[xoffset];
const short *VFilter = vp9_sub_pel_filters_8[yoffset]; const int16_t *VFilter = vp9_sub_pel_filters_8[yoffset];
vp9_filter_block2d_8x4_8(src_ptr, src_pixels_per_line, vp9_filter_block2d_8x4_8(src_ptr, src_pixels_per_line,
HFilter, VFilter, HFilter, VFilter,
dst_ptr, dst_pitch); dst_ptr, dst_pitch);
} }
void vp9_eighttap_predict8x4_sharp_c(unsigned char *src_ptr, void vp9_eighttap_predict8x4_sharp_c(uint8_t *src_ptr,
int src_pixels_per_line, int src_pixels_per_line,
int xoffset, int xoffset,
int yoffset, int yoffset,
unsigned char *dst_ptr, uint8_t *dst_ptr,
int dst_pitch) { int dst_pitch) {
const short *HFilter = vp9_sub_pel_filters_8s[xoffset]; const int16_t *HFilter = vp9_sub_pel_filters_8s[xoffset];
const short *VFilter = vp9_sub_pel_filters_8s[yoffset]; const int16_t *VFilter = vp9_sub_pel_filters_8s[yoffset];
vp9_filter_block2d_8x4_8(src_ptr, src_pixels_per_line, vp9_filter_block2d_8x4_8(src_ptr, src_pixels_per_line,
HFilter, VFilter, HFilter, VFilter,
dst_ptr, dst_pitch); dst_ptr, dst_pitch);
} }
void vp9_eighttap_predict16x16_c(unsigned char *src_ptr, void vp9_eighttap_predict16x16_c(uint8_t *src_ptr,
int src_pixels_per_line, int src_pixels_per_line,
int xoffset, int xoffset,
int yoffset, int yoffset,
unsigned char *dst_ptr, uint8_t *dst_ptr,
int dst_pitch) { int dst_pitch) {
const short *HFilter = vp9_sub_pel_filters_8[xoffset]; const int16_t *HFilter = vp9_sub_pel_filters_8[xoffset];
const short *VFilter = vp9_sub_pel_filters_8[yoffset]; const int16_t *VFilter = vp9_sub_pel_filters_8[yoffset];
vp9_filter_block2d_16x16_8(src_ptr, src_pixels_per_line, vp9_filter_block2d_16x16_8(src_ptr, src_pixels_per_line,
HFilter, VFilter, HFilter, VFilter,
dst_ptr, dst_pitch); dst_ptr, dst_pitch);
} }
void vp9_eighttap_predict16x16_sharp_c(unsigned char *src_ptr, void vp9_eighttap_predict16x16_sharp_c(uint8_t *src_ptr,
int src_pixels_per_line, int src_pixels_per_line,
int xoffset, int xoffset,
int yoffset, int yoffset,
unsigned char *dst_ptr, uint8_t *dst_ptr,
int dst_pitch) { int dst_pitch) {
const short *HFilter = vp9_sub_pel_filters_8s[xoffset]; const int16_t *HFilter = vp9_sub_pel_filters_8s[xoffset];
const short *VFilter = vp9_sub_pel_filters_8s[yoffset]; const int16_t *VFilter = vp9_sub_pel_filters_8s[yoffset];
vp9_filter_block2d_16x16_8(src_ptr, src_pixels_per_line, vp9_filter_block2d_16x16_8(src_ptr, src_pixels_per_line,
HFilter, VFilter, HFilter, VFilter,
dst_ptr, dst_pitch); dst_ptr, dst_pitch);
} }
void vp9_eighttap_predict_avg16x16_c(unsigned char *src_ptr, void vp9_eighttap_predict_avg16x16_c(uint8_t *src_ptr,
int src_pixels_per_line, int src_pixels_per_line,
int xoffset, int xoffset,
int yoffset, int yoffset,
unsigned char *dst_ptr, uint8_t *dst_ptr,
int dst_pitch) { int dst_pitch) {
DECLARE_ALIGNED_ARRAY(16, unsigned char, tmp, 16 * 16); DECLARE_ALIGNED_ARRAY(16, uint8_t, tmp, 16 * 16);
const short *HFilter = vp9_sub_pel_filters_8[xoffset]; const int16_t *HFilter = vp9_sub_pel_filters_8[xoffset];
const short *VFilter = vp9_sub_pel_filters_8[yoffset]; const int16_t *VFilter = vp9_sub_pel_filters_8[yoffset];
vp9_filter_block2d_16x16_8(src_ptr, src_pixels_per_line, vp9_filter_block2d_16x16_8(src_ptr, src_pixels_per_line,
HFilter, VFilter, HFilter, VFilter,
@ -816,15 +798,15 @@ void vp9_eighttap_predict_avg16x16_c(unsigned char *src_ptr,
block2d_average(tmp, 16, dst_ptr, dst_pitch, VPX_FILTER_16x16); block2d_average(tmp, 16, dst_ptr, dst_pitch, VPX_FILTER_16x16);
} }
void vp9_eighttap_predict_avg16x16_sharp_c(unsigned char *src_ptr, void vp9_eighttap_predict_avg16x16_sharp_c(uint8_t *src_ptr,
int src_pixels_per_line, int src_pixels_per_line,
int xoffset, int xoffset,
int yoffset, int yoffset,
unsigned char *dst_ptr, uint8_t *dst_ptr,
int dst_pitch) { int dst_pitch) {
DECLARE_ALIGNED_ARRAY(16, unsigned char, tmp, 16 * 16); DECLARE_ALIGNED_ARRAY(16, uint8_t, tmp, 16 * 16);
const short *HFilter = vp9_sub_pel_filters_8s[xoffset]; const int16_t *HFilter = vp9_sub_pel_filters_8s[xoffset];
const short *VFilter = vp9_sub_pel_filters_8s[yoffset]; const int16_t *VFilter = vp9_sub_pel_filters_8s[yoffset];
vp9_filter_block2d_16x16_8(src_ptr, src_pixels_per_line, vp9_filter_block2d_16x16_8(src_ptr, src_pixels_per_line,
HFilter, VFilter, HFilter, VFilter,
@ -854,12 +836,12 @@ void vp9_eighttap_predict_avg16x16_sharp_c(unsigned char *src_ptr,
* Two filter taps should sum to VP9_FILTER_WEIGHT. * Two filter taps should sum to VP9_FILTER_WEIGHT.
* *
****************************************************************************/ ****************************************************************************/
static void filter_block2d_bil_first_pass(unsigned char *src_ptr, static void filter_block2d_bil_first_pass(uint8_t *src_ptr,
unsigned short *dst_ptr, uint16_t *dst_ptr,
unsigned int src_stride, unsigned int src_stride,
unsigned int height, unsigned int height,
unsigned int width, unsigned int width,
const short *vp9_filter) { const int16_t *vp9_filter) {
unsigned int i, j; unsigned int i, j;
for (i = 0; i < height; i++) { for (i = 0; i < height; i++) {
@ -899,13 +881,13 @@ static void filter_block2d_bil_first_pass(unsigned char *src_ptr,
* Two filter taps should sum to VP9_FILTER_WEIGHT. * Two filter taps should sum to VP9_FILTER_WEIGHT.
* *
****************************************************************************/ ****************************************************************************/
static void filter_block2d_bil_second_pass(unsigned short *src_ptr, static void filter_block2d_bil_second_pass(uint16_t *src_ptr,
unsigned char *dst_ptr, uint8_t *dst_ptr,
int dst_pitch, int dst_pitch,
unsigned int height, unsigned int height,
unsigned int width, unsigned int width,
const short *vp9_filter) { const int16_t *vp9_filter) {
unsigned int i, j; unsigned int i, j;
int temp; int temp;
for (i = 0; i < height; i++) { for (i = 0; i < height; i++) {
@ -932,13 +914,13 @@ static void filter_block2d_bil_second_pass(unsigned short *src_ptr,
* with the values already present in the output and stores the result of * with the values already present in the output and stores the result of
* that back into the output ((filter_result + dest + 1) >> 1). * that back into the output ((filter_result + dest + 1) >> 1).
*/ */
static void filter_block2d_bil_second_pass_avg(unsigned short *src_ptr, static void filter_block2d_bil_second_pass_avg(uint16_t *src_ptr,
unsigned char *dst_ptr, uint8_t *dst_ptr,
int dst_pitch, int dst_pitch,
unsigned int height, unsigned int height,
unsigned int width, unsigned int width,
const short *vp9_filter) { const int16_t *vp9_filter) {
unsigned int i, j; unsigned int i, j;
int temp; int temp;
for (i = 0; i < height; i++) { for (i = 0; i < height; i++) {
@ -979,16 +961,16 @@ static void filter_block2d_bil_second_pass_avg(unsigned short *src_ptr,
* SPECIAL NOTES : The largest block size can be handled here is 16x16 * SPECIAL NOTES : The largest block size can be handled here is 16x16
* *
****************************************************************************/ ****************************************************************************/
static void filter_block2d_bil(unsigned char *src_ptr, static void filter_block2d_bil(uint8_t *src_ptr,
unsigned char *dst_ptr, uint8_t *dst_ptr,
unsigned int src_pitch, unsigned int src_pitch,
unsigned int dst_pitch, unsigned int dst_pitch,
const short *HFilter, const int16_t *HFilter,
const short *VFilter, const int16_t *VFilter,
int Width, int Width,
int Height) { int Height) {
unsigned short FData[17 * 16]; /* Temp data buffer used in filtering */ uint16_t FData[17 * 16]; /* Temp data buffer used in filtering */
/* First filter 1-D horizontally... */ /* First filter 1-D horizontally... */
filter_block2d_bil_first_pass(src_ptr, FData, src_pitch, Height + 1, Width, HFilter); filter_block2d_bil_first_pass(src_ptr, FData, src_pitch, Height + 1, Width, HFilter);
@ -997,15 +979,15 @@ static void filter_block2d_bil(unsigned char *src_ptr,
filter_block2d_bil_second_pass(FData, dst_ptr, dst_pitch, Height, Width, VFilter); filter_block2d_bil_second_pass(FData, dst_ptr, dst_pitch, Height, Width, VFilter);
} }
static void filter_block2d_bil_avg(unsigned char *src_ptr, static void filter_block2d_bil_avg(uint8_t *src_ptr,
unsigned char *dst_ptr, uint8_t *dst_ptr,
unsigned int src_pitch, unsigned int src_pitch,
unsigned int dst_pitch, unsigned int dst_pitch,
const short *HFilter, const int16_t *HFilter,
const short *VFilter, const int16_t *VFilter,
int Width, int Width,
int Height) { int Height) {
unsigned short FData[17 * 16]; /* Temp data buffer used in filtering */ uint16_t FData[17 * 16]; /* Temp data buffer used in filtering */
/* First filter 1-D horizontally... */ /* First filter 1-D horizontally... */
filter_block2d_bil_first_pass(src_ptr, FData, src_pitch, Height + 1, Width, HFilter); filter_block2d_bil_first_pass(src_ptr, FData, src_pitch, Height + 1, Width, HFilter);
@ -1014,14 +996,14 @@ static void filter_block2d_bil_avg(unsigned char *src_ptr,
filter_block2d_bil_second_pass_avg(FData, dst_ptr, dst_pitch, Height, Width, VFilter); filter_block2d_bil_second_pass_avg(FData, dst_ptr, dst_pitch, Height, Width, VFilter);
} }
void vp9_bilinear_predict4x4_c(unsigned char *src_ptr, void vp9_bilinear_predict4x4_c(uint8_t *src_ptr,
int src_pixels_per_line, int src_pixels_per_line,
int xoffset, int xoffset,
int yoffset, int yoffset,
unsigned char *dst_ptr, uint8_t *dst_ptr,
int dst_pitch) { int dst_pitch) {
const short *HFilter; const int16_t *HFilter;
const short *VFilter; const int16_t *VFilter;
HFilter = vp9_bilinear_filters[xoffset]; HFilter = vp9_bilinear_filters[xoffset];
VFilter = vp9_bilinear_filters[yoffset]; VFilter = vp9_bilinear_filters[yoffset];
@ -1029,14 +1011,14 @@ void vp9_bilinear_predict4x4_c(unsigned char *src_ptr,
filter_block2d_bil(src_ptr, dst_ptr, src_pixels_per_line, dst_pitch, HFilter, VFilter, 4, 4); 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, void vp9_bilinear_predict_avg4x4_c(uint8_t *src_ptr,
int src_pixels_per_line, int src_pixels_per_line,
int xoffset, int xoffset,
int yoffset, int yoffset,
unsigned char *dst_ptr, uint8_t *dst_ptr,
int dst_pitch) { int dst_pitch) {
const short *HFilter; const int16_t *HFilter;
const short *VFilter; const int16_t *VFilter;
HFilter = vp9_bilinear_filters[xoffset]; HFilter = vp9_bilinear_filters[xoffset];
VFilter = vp9_bilinear_filters[yoffset]; VFilter = vp9_bilinear_filters[yoffset];
@ -1045,14 +1027,14 @@ void vp9_bilinear_predict_avg4x4_c(unsigned char *src_ptr,
dst_pitch, HFilter, VFilter, 4, 4); dst_pitch, HFilter, VFilter, 4, 4);
} }
void vp9_bilinear_predict8x8_c(unsigned char *src_ptr, void vp9_bilinear_predict8x8_c(uint8_t *src_ptr,
int src_pixels_per_line, int src_pixels_per_line,
int xoffset, int xoffset,
int yoffset, int yoffset,
unsigned char *dst_ptr, uint8_t *dst_ptr,
int dst_pitch) { int dst_pitch) {
const short *HFilter; const int16_t *HFilter;
const short *VFilter; const int16_t *VFilter;
HFilter = vp9_bilinear_filters[xoffset]; HFilter = vp9_bilinear_filters[xoffset];
VFilter = vp9_bilinear_filters[yoffset]; VFilter = vp9_bilinear_filters[yoffset];
@ -1061,14 +1043,14 @@ void vp9_bilinear_predict8x8_c(unsigned char *src_ptr,
} }
void vp9_bilinear_predict_avg8x8_c(unsigned char *src_ptr, void vp9_bilinear_predict_avg8x8_c(uint8_t *src_ptr,
int src_pixels_per_line, int src_pixels_per_line,
int xoffset, int xoffset,
int yoffset, int yoffset,
unsigned char *dst_ptr, uint8_t *dst_ptr,
int dst_pitch) { int dst_pitch) {
const short *HFilter; const int16_t *HFilter;
const short *VFilter; const int16_t *VFilter;
HFilter = vp9_bilinear_filters[xoffset]; HFilter = vp9_bilinear_filters[xoffset];
VFilter = vp9_bilinear_filters[yoffset]; VFilter = vp9_bilinear_filters[yoffset];
@ -1077,14 +1059,14 @@ void vp9_bilinear_predict_avg8x8_c(unsigned char *src_ptr,
dst_pitch, HFilter, VFilter, 8, 8); dst_pitch, HFilter, VFilter, 8, 8);
} }
void vp9_bilinear_predict8x4_c(unsigned char *src_ptr, void vp9_bilinear_predict8x4_c(uint8_t *src_ptr,
int src_pixels_per_line, int src_pixels_per_line,
int xoffset, int xoffset,
int yoffset, int yoffset,
unsigned char *dst_ptr, uint8_t *dst_ptr,
int dst_pitch) { int dst_pitch) {
const short *HFilter; const int16_t *HFilter;
const short *VFilter; const int16_t *VFilter;
HFilter = vp9_bilinear_filters[xoffset]; HFilter = vp9_bilinear_filters[xoffset];
VFilter = vp9_bilinear_filters[yoffset]; VFilter = vp9_bilinear_filters[yoffset];
@ -1093,14 +1075,14 @@ void vp9_bilinear_predict8x4_c(unsigned char *src_ptr,
} }
void vp9_bilinear_predict16x16_c(unsigned char *src_ptr, void vp9_bilinear_predict16x16_c(uint8_t *src_ptr,
int src_pixels_per_line, int src_pixels_per_line,
int xoffset, int xoffset,
int yoffset, int yoffset,
unsigned char *dst_ptr, uint8_t *dst_ptr,
int dst_pitch) { int dst_pitch) {
const short *HFilter; const int16_t *HFilter;
const short *VFilter; const int16_t *VFilter;
HFilter = vp9_bilinear_filters[xoffset]; HFilter = vp9_bilinear_filters[xoffset];
VFilter = vp9_bilinear_filters[yoffset]; VFilter = vp9_bilinear_filters[yoffset];
@ -1108,14 +1090,14 @@ void vp9_bilinear_predict16x16_c(unsigned char *src_ptr,
filter_block2d_bil(src_ptr, dst_ptr, src_pixels_per_line, dst_pitch, HFilter, VFilter, 16, 16); 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, void vp9_bilinear_predict_avg16x16_c(uint8_t *src_ptr,
int src_pixels_per_line, int src_pixels_per_line,
int xoffset, int xoffset,
int yoffset, int yoffset,
unsigned char *dst_ptr, uint8_t *dst_ptr,
int dst_pitch) { int dst_pitch) {
const short *HFilter; const int16_t *HFilter;
const short *VFilter; const int16_t *VFilter;
HFilter = vp9_bilinear_filters[xoffset]; HFilter = vp9_bilinear_filters[xoffset];
VFilter = vp9_bilinear_filters[yoffset]; VFilter = vp9_bilinear_filters[yoffset];

View File

@ -13,6 +13,7 @@
#include "vpx_config.h" #include "vpx_config.h"
#include "vpx_scale/yv12config.h" #include "vpx_scale/yv12config.h"
#include "vpx/vpx_integer.h"
#define BLOCK_HEIGHT_WIDTH 4 #define BLOCK_HEIGHT_WIDTH 4
#define VP9_FILTER_WEIGHT 128 #define VP9_FILTER_WEIGHT 128
@ -20,9 +21,9 @@
#define SUBPEL_SHIFTS 16 #define SUBPEL_SHIFTS 16
extern const short vp9_bilinear_filters[SUBPEL_SHIFTS][2]; extern const int16_t vp9_bilinear_filters[SUBPEL_SHIFTS][2];
extern const short vp9_sub_pel_filters_6[SUBPEL_SHIFTS][6]; extern const int16_t vp9_sub_pel_filters_6[SUBPEL_SHIFTS][6];
extern const short vp9_sub_pel_filters_8[SUBPEL_SHIFTS][8]; extern const int16_t vp9_sub_pel_filters_8[SUBPEL_SHIFTS][8];
extern const short vp9_sub_pel_filters_8s[SUBPEL_SHIFTS][8]; extern const int16_t vp9_sub_pel_filters_8s[SUBPEL_SHIFTS][8];
#endif // FILTER_H #endif // VP9_COMMON_VP9_FILTER_H_

View File

@ -14,7 +14,7 @@
#include "vp9/common/vp9_subpelvar.h" #include "vp9/common/vp9_subpelvar.h"
#include <limits.h> #include <limits.h>
const unsigned char vp9_mbsplit_offset[4][16] = { const uint8_t vp9_mbsplit_offset[4][16] = {
{ 0, 8, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}, { 0, 8, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
{ 0, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}, { 0, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
{ 0, 2, 8, 10, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}, { 0, 2, 8, 10, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
@ -42,23 +42,23 @@ vp9_prob *vp9_mv_ref_probs(VP9_COMMON *pc,
} }
#define SP(x) (((x) & 7) << 1) #define SP(x) (((x) & 7) << 1)
unsigned int vp9_sad3x16_c(const unsigned char *src_ptr, unsigned int vp9_sad3x16_c(const uint8_t *src_ptr,
int src_stride, int src_stride,
const unsigned char *ref_ptr, const uint8_t *ref_ptr,
int ref_stride) { int ref_stride) {
return sad_mx_n_c(src_ptr, src_stride, ref_ptr, ref_stride, 3, 16); return sad_mx_n_c(src_ptr, src_stride, ref_ptr, ref_stride, 3, 16);
} }
unsigned int vp9_sad16x3_c(const unsigned char *src_ptr, unsigned int vp9_sad16x3_c(const uint8_t *src_ptr,
int src_stride, int src_stride,
const unsigned char *ref_ptr, const uint8_t *ref_ptr,
int ref_stride) { int ref_stride) {
return sad_mx_n_c(src_ptr, src_stride, ref_ptr, ref_stride, 16, 3); return sad_mx_n_c(src_ptr, src_stride, ref_ptr, ref_stride, 16, 3);
} }
#if CONFIG_SUBPELREFMV #if CONFIG_SUBPELREFMV
unsigned int vp9_variance2x16_c(const unsigned char *src_ptr, unsigned int vp9_variance2x16_c(const uint8_t *src_ptr,
const int source_stride, const int source_stride,
const unsigned char *ref_ptr, const uint8_t *ref_ptr,
const int recon_stride, const int recon_stride,
unsigned int *sse) { unsigned int *sse) {
int sum; int sum;
@ -66,9 +66,9 @@ unsigned int vp9_variance2x16_c(const unsigned char *src_ptr,
return (*sse - (((unsigned int)sum * sum) >> 5)); return (*sse - (((unsigned int)sum * sum) >> 5));
} }
unsigned int vp9_variance16x2_c(const unsigned char *src_ptr, unsigned int vp9_variance16x2_c(const uint8_t *src_ptr,
const int source_stride, const int source_stride,
const unsigned char *ref_ptr, const uint8_t *ref_ptr,
const int recon_stride, const int recon_stride,
unsigned int *sse) { unsigned int *sse) {
int sum; int sum;
@ -76,16 +76,16 @@ unsigned int vp9_variance16x2_c(const unsigned char *src_ptr,
return (*sse - (((unsigned int)sum * sum) >> 5)); return (*sse - (((unsigned int)sum * sum) >> 5));
} }
unsigned int vp9_sub_pixel_variance16x2_c(const unsigned char *src_ptr, unsigned int vp9_sub_pixel_variance16x2_c(const uint8_t *src_ptr,
const int src_pixels_per_line, const int src_pixels_per_line,
const int xoffset, const int xoffset,
const int yoffset, const int yoffset,
const unsigned char *dst_ptr, const uint8_t *dst_ptr,
const int dst_pixels_per_line, const int dst_pixels_per_line,
unsigned int *sse) { unsigned int *sse) {
unsigned short FData3[16 * 3]; // Temp data buffer used in filtering uint16_t FData3[16 * 3]; // Temp data buffer used in filtering
unsigned char temp2[2 * 16]; uint8_t temp2[2 * 16];
const short *HFilter, *VFilter; const int16_t *HFilter, *VFilter;
HFilter = vp9_bilinear_filters[xoffset]; HFilter = vp9_bilinear_filters[xoffset];
VFilter = vp9_bilinear_filters[yoffset]; VFilter = vp9_bilinear_filters[yoffset];
@ -97,16 +97,16 @@ unsigned int vp9_sub_pixel_variance16x2_c(const unsigned char *src_ptr,
return vp9_variance16x2_c(temp2, 16, dst_ptr, dst_pixels_per_line, sse); return vp9_variance16x2_c(temp2, 16, dst_ptr, dst_pixels_per_line, sse);
} }
unsigned int vp9_sub_pixel_variance2x16_c(const unsigned char *src_ptr, unsigned int vp9_sub_pixel_variance2x16_c(const uint8_t *src_ptr,
const int src_pixels_per_line, const int src_pixels_per_line,
const int xoffset, const int xoffset,
const int yoffset, const int yoffset,
const unsigned char *dst_ptr, const uint8_t *dst_ptr,
const int dst_pixels_per_line, const int dst_pixels_per_line,
unsigned int *sse) { unsigned int *sse) {
unsigned short FData3[2 * 17]; // Temp data buffer used in filtering uint16_t FData3[2 * 17]; // Temp data buffer used in filtering
unsigned char temp2[2 * 16]; uint8_t temp2[2 * 16];
const short *HFilter, *VFilter; const int16_t *HFilter, *VFilter;
HFilter = vp9_bilinear_filters[xoffset]; HFilter = vp9_bilinear_filters[xoffset];
VFilter = vp9_bilinear_filters[yoffset]; VFilter = vp9_bilinear_filters[yoffset];
@ -124,16 +124,16 @@ unsigned int vp9_sub_pixel_variance2x16_c(const unsigned char *src_ptr,
* score to use as ref motion vector * score to use as ref motion vector
*/ */
void vp9_find_best_ref_mvs(MACROBLOCKD *xd, void vp9_find_best_ref_mvs(MACROBLOCKD *xd,
unsigned char *ref_y_buffer, uint8_t *ref_y_buffer,
int ref_y_stride, int ref_y_stride,
int_mv *mvlist, int_mv *mvlist,
int_mv *nearest, int_mv *nearest,
int_mv *near) { int_mv *near) {
int i, j; int i, j;
unsigned char *above_src; uint8_t *above_src;
unsigned char *left_src; uint8_t *left_src;
unsigned char *above_ref; uint8_t *above_ref;
unsigned char *left_ref; uint8_t *left_ref;
unsigned int score; unsigned int score;
#if CONFIG_SUBPELREFMV #if CONFIG_SUBPELREFMV
unsigned int sse; unsigned int sse;

View File

@ -22,7 +22,7 @@
* score to use as ref motion vector * score to use as ref motion vector
*/ */
void vp9_find_best_ref_mvs(MACROBLOCKD *xd, void vp9_find_best_ref_mvs(MACROBLOCKD *xd,
unsigned char *ref_y_buffer, uint8_t *ref_y_buffer,
int ref_y_stride, int ref_y_stride,
int_mv *mvlist, int_mv *mvlist,
int_mv *nearest, int_mv *nearest,
@ -81,7 +81,7 @@ vp9_prob *vp9_mv_ref_probs(VP9_COMMON *pc,
vp9_prob p[VP9_MVREFS - 1], vp9_prob p[VP9_MVREFS - 1],
const int context); const int context);
extern const unsigned char vp9_mbsplit_offset[4][16]; extern const uint8_t vp9_mbsplit_offset[4][16];
static int left_block_mv(const MODE_INFO *cur_mb, int b) { static int left_block_mv(const MODE_INFO *cur_mb, int b) {
if (!(b & 3)) { if (!(b & 3)) {
@ -181,4 +181,4 @@ static B_PREDICTION_MODE above_block_mode(const MODE_INFO *cur_mb,
return (cur_mb->bmi + b - 4)->as_mode.first; return (cur_mb->bmi + b - 4)->as_mode.first;
} }
#endif #endif // VP9_COMMON_VP9_FINDNEARMV_H_

View File

@ -8,7 +8,6 @@
* be found in the AUTHORS file in the root of the source tree. * be found in the AUTHORS file in the root of the source tree.
*/ */
#ifndef VP9_COMMON_VP9_HEADER_H_ #ifndef VP9_COMMON_VP9_HEADER_H_
#define VP9_COMMON_VP9_HEADER_H_ #define VP9_COMMON_VP9_HEADER_H_
@ -38,5 +37,4 @@ typedef struct {
#define VP9_HEADER_SIZE 3 #define VP9_HEADER_SIZE 3
#endif #endif
#endif // VP9_COMMON_VP9_HEADER_H_
#endif

View File

@ -483,12 +483,12 @@ void vp9_ihtllm_c(const int16_t *input, int16_t *output, int pitch,
} }
} }
void vp9_short_idct4x4llm_c(short *input, short *output, int pitch) { void vp9_short_idct4x4llm_c(int16_t *input, int16_t *output, int pitch) {
int i; int i;
int a1, b1, c1, d1; int a1, b1, c1, d1;
short *ip = input; int16_t *ip = input;
short *op = output; int16_t *op = output;
int temp1, temp2; int temp1, temp2;
int shortpitch = pitch >> 1; int shortpitch = pitch >> 1;
@ -540,10 +540,10 @@ void vp9_short_idct4x4llm_c(short *input, short *output, int pitch) {
} }
} }
void vp9_short_idct4x4llm_1_c(short *input, short *output, int pitch) { void vp9_short_idct4x4llm_1_c(int16_t *input, int16_t *output, int pitch) {
int i; int i;
int a1; int a1;
short *op = output; int16_t *op = output;
int shortpitch = pitch >> 1; int shortpitch = pitch >> 1;
a1 = ((input[0] + 16) >> 5); a1 = ((input[0] + 16) >> 5);
for (i = 0; i < 4; i++) { for (i = 0; i < 4; i++) {
@ -555,8 +555,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, void vp9_dc_only_idct_add_c(int input_dc, uint8_t *pred_ptr,
unsigned char *dst_ptr, int pitch, int stride) { uint8_t *dst_ptr, int pitch, int stride) {
int a1 = ((input_dc + 16) >> 5); int a1 = ((input_dc + 16) >> 5);
int r, c; int r, c;
@ -570,11 +570,11 @@ void vp9_dc_only_idct_add_c(short input_dc, unsigned char *pred_ptr,
} }
} }
void vp9_short_inv_walsh4x4_c(short *input, short *output) { void vp9_short_inv_walsh4x4_c(int16_t *input, int16_t *output) {
int i; int i;
int a1, b1, c1, d1; int a1, b1, c1, d1;
short *ip = input; int16_t *ip = input;
short *op = output; int16_t *op = output;
for (i = 0; i < 4; i++) { for (i = 0; i < 4; i++) {
a1 = ((ip[0] + ip[3])); a1 = ((ip[0] + ip[3]));
@ -607,11 +607,11 @@ void vp9_short_inv_walsh4x4_c(short *input, short *output) {
} }
} }
void vp9_short_inv_walsh4x4_1_c(short *in, short *out) { void vp9_short_inv_walsh4x4_1_c(int16_t *in, int16_t *out) {
int i; int i;
short tmp[4]; int16_t tmp[4];
short *ip = in; int16_t *ip = in;
short *op = tmp; int16_t *op = tmp;
op[0] = (ip[0] + 1) >> 1; op[0] = (ip[0] + 1) >> 1;
op[1] = op[2] = op[3] = (ip[0] >> 1); op[1] = op[2] = op[3] = (ip[0] >> 1);
@ -627,11 +627,11 @@ void vp9_short_inv_walsh4x4_1_c(short *in, short *out) {
} }
#if CONFIG_LOSSLESS #if CONFIG_LOSSLESS
void vp9_short_inv_walsh4x4_lossless_c(short *input, short *output) { void vp9_short_inv_walsh4x4_lossless_c(int16_t *input, int16_t *output) {
int i; int i;
int a1, b1, c1, d1; int a1, b1, c1, d1;
short *ip = input; int16_t *ip = input;
short *op = output; int16_t *op = output;
for (i = 0; i < 4; i++) { for (i = 0; i < 4; i++) {
a1 = ((ip[0] + ip[3])) >> Y2_WHT_UPSCALE_FACTOR; a1 = ((ip[0] + ip[3])) >> Y2_WHT_UPSCALE_FACTOR;
@ -667,11 +667,11 @@ void vp9_short_inv_walsh4x4_lossless_c(short *input, short *output) {
} }
} }
void vp9_short_inv_walsh4x4_1_lossless_c(short *in, short *out) { void vp9_short_inv_walsh4x4_1_lossless_c(int16_t *in, int16_t *out) {
int i; int i;
short tmp[4]; int16_t tmp[4];
short *ip = in; int16_t *ip = in;
short *op = tmp; int16_t *op = tmp;
op[0] = ((ip[0] >> Y2_WHT_UPSCALE_FACTOR) + 1) >> 1; op[0] = ((ip[0] >> Y2_WHT_UPSCALE_FACTOR) + 1) >> 1;
op[1] = op[2] = op[3] = ((ip[0] >> Y2_WHT_UPSCALE_FACTOR) >> 1); op[1] = op[2] = op[3] = ((ip[0] >> Y2_WHT_UPSCALE_FACTOR) >> 1);
@ -686,11 +686,11 @@ void vp9_short_inv_walsh4x4_1_lossless_c(short *in, short *out) {
} }
} }
void vp9_short_inv_walsh4x4_x8_c(short *input, short *output, int pitch) { void vp9_short_inv_walsh4x4_x8_c(int16_t *input, int16_t *output, int pitch) {
int i; int i;
int a1, b1, c1, d1; int a1, b1, c1, d1;
short *ip = input; int16_t *ip = input;
short *op = output; int16_t *op = output;
int shortpitch = pitch >> 1; int shortpitch = pitch >> 1;
for (i = 0; i < 4; i++) { for (i = 0; i < 4; i++) {
@ -727,11 +727,11 @@ void vp9_short_inv_walsh4x4_x8_c(short *input, short *output, int pitch) {
} }
} }
void vp9_short_inv_walsh4x4_1_x8_c(short *in, short *out, int pitch) { void vp9_short_inv_walsh4x4_1_x8_c(int16_t *in, int16_t *out, int pitch) {
int i; int i;
short tmp[4]; int16_t tmp[4];
short *ip = in; int16_t *ip = in;
short *op = tmp; int16_t *op = tmp;
int shortpitch = pitch >> 1; int shortpitch = pitch >> 1;
op[0] = ((ip[0] >> WHT_UPSCALE_FACTOR) + 1) >> 1; op[0] = ((ip[0] >> WHT_UPSCALE_FACTOR) + 1) >> 1;
@ -748,8 +748,8 @@ 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, void vp9_dc_only_inv_walsh_add_c(short input_dc, uint8_t *pred_ptr,
unsigned char *dst_ptr, uint8_t *dst_ptr,
int pitch, int stride) { int pitch, int stride) {
int r, c; int r, c;
short tmp[16]; short tmp[16];
@ -767,13 +767,13 @@ void vp9_dc_only_inv_walsh_add_c(short input_dc, unsigned char *pred_ptr,
#endif #endif
void vp9_dc_only_idct_add_8x8_c(short input_dc, void vp9_dc_only_idct_add_8x8_c(short input_dc,
unsigned char *pred_ptr, uint8_t *pred_ptr,
unsigned char *dst_ptr, uint8_t *dst_ptr,
int pitch, int stride) { int pitch, int stride) {
int a1 = ((input_dc + 16) >> 5); int a1 = ((input_dc + 16) >> 5);
int r, c, b; int r, c, b;
unsigned char *orig_pred = pred_ptr; uint8_t *orig_pred = pred_ptr;
unsigned char *orig_dst = dst_ptr; uint8_t *orig_dst = dst_ptr;
for (b = 0; b < 4; b++) { for (b = 0; b < 4; b++) {
for (r = 0; r < 4; r++) { for (r = 0; r < 4; r++) {
for (c = 0; c < 4; c++) { for (c = 0; c < 4; c++) {
@ -911,7 +911,7 @@ static void idctcol(int *blk) {
} }
#define TX_DIM 8 #define TX_DIM 8
void vp9_short_idct8x8_c(short *coefs, short *block, int pitch) { void vp9_short_idct8x8_c(int16_t *coefs, int16_t *block, int pitch) {
int X[TX_DIM * TX_DIM]; int X[TX_DIM * TX_DIM];
int i, j; int i, j;
int shortpitch = pitch >> 1; int shortpitch = pitch >> 1;
@ -1030,7 +1030,7 @@ static void idctcol10(int *blk) {
blk[8 * 7] = (x7 - x1) >> 14; blk[8 * 7] = (x7 - x1) >> 14;
} }
void vp9_short_idct10_8x8_c(short *coefs, short *block, int pitch) { void vp9_short_idct10_8x8_c(int16_t *coefs, int16_t *block, int pitch) {
int X[TX_DIM * TX_DIM]; int X[TX_DIM * TX_DIM];
int i, j; int i, j;
int shortpitch = pitch >> 1; int shortpitch = pitch >> 1;
@ -1043,7 +1043,7 @@ void vp9_short_idct10_8x8_c(short *coefs, short *block, int pitch) {
} }
/* Do first 4 row idct only since non-zero dct coefficients are all in /* Do first 4 row idct only since non-zero dct coefficients are all in
* upper-left 4x4 area. */ * upper-left 4x4 area. */
for (i = 0; i < 4; i++) for (i = 0; i < 4; i++)
idctrow10(X + 8 * i); idctrow10(X + 8 * i);
@ -1057,10 +1057,10 @@ void vp9_short_idct10_8x8_c(short *coefs, short *block, int pitch) {
} }
} }
void vp9_short_ihaar2x2_c(short *input, short *output, int pitch) { void vp9_short_ihaar2x2_c(int16_t *input, int16_t *output, int pitch) {
int i; int i;
short *ip = input; // 0,1, 4, 8 int16_t *ip = input; // 0, 1, 4, 8
short *op = output; int16_t *op = output;
for (i = 0; i < 16; i++) { for (i = 0; i < 16; i++) {
op[i] = 0; op[i] = 0;
} }
@ -1074,7 +1074,7 @@ void vp9_short_ihaar2x2_c(short *input, short *output, int pitch) {
#if 0 #if 0
// Keep a really bad float version as reference for now. // Keep a really bad float version as reference for now.
void vp9_short_idct16x16_c(short *input, short *output, int pitch) { void vp9_short_idct16x16_c(int16_t *input, int16_t *output, int pitch) {
vp9_clear_system_state(); // Make it simd safe : __asm emms; vp9_clear_system_state(); // Make it simd safe : __asm emms;
{ {
@ -1334,7 +1334,7 @@ void reference_16x16_idct_1d(double input[16], double output[16]) {
} }
#endif #endif
void vp9_short_idct16x16_c(short *input, short *output, int pitch) { void vp9_short_idct16x16_c(int16_t *input, int16_t *output, int pitch) {
vp9_clear_system_state(); // Make it simd safe : __asm emms; vp9_clear_system_state(); // Make it simd safe : __asm emms;
{ {
@ -2069,7 +2069,7 @@ static void butterfly_32_idct_1d(double *input, double *output, int stride) {
output[stride*31] = step2[ 0] - step2[(31 - 15)]; output[stride*31] = step2[ 0] - step2[(31 - 15)];
} }
void vp9_short_idct32x32_c(short *input, short *output, int pitch) { void vp9_short_idct32x32_c(int16_t *input, int16_t *output, int pitch) {
vp9_clear_system_state(); // Make it simd safe : __asm emms; vp9_clear_system_state(); // Make it simd safe : __asm emms;
{ {
double out[32*32], out2[32*32]; double out[32*32], out2[32*32];
@ -2109,9 +2109,9 @@ void vp9_short_idct32x32_c(short *input, short *output, int pitch) {
#if DWT_TYPE == 53 #if DWT_TYPE == 53
// Note: block length must be even for this implementation // Note: block length must be even for this implementation
static void synthesis_53_row(int length, short *lowpass, short *highpass, static void synthesis_53_row(int length, int16_t *lowpass, int16_t *highpass,
short *x) { int16_t *x) {
short r, *a, *b; int16_t r, *a, *b;
int n; int n;
n = length >> 1; n = length >> 1;
@ -2134,9 +2134,9 @@ static void synthesis_53_row(int length, short *lowpass, short *highpass,
*x++ = *b + ((r + 1) >> 1); *x++ = *b + ((r + 1) >> 1);
} }
static void synthesis_53_col(int length, short *lowpass, short *highpass, static void synthesis_53_col(int length, int16_t *lowpass, int16_t *highpass,
short *x) { int16_t *x) {
short r, *a, *b; int16_t r, *a, *b;
int n; int n;
n = length >> 1; n = length >> 1;
@ -2160,8 +2160,8 @@ static void synthesis_53_col(int length, short *lowpass, short *highpass,
*x++ = ((*b) << 1) + *a; *x++ = ((*b) << 1) + *a;
} }
void dyadic_synthesize_53(int levels, int width, int height, short *c, void dyadic_synthesize_53(int levels, int width, int height, int16_t *c,
int pitch_c, short *x, int pitch_x) { int pitch_c, int16_t *x, int pitch_x) {
int th[16], tw[16], lv, i, j, nh, nw, hh = height, hw = width; int th[16], tw[16], lv, i, j, nh, nw, hh = height, hw = width;
short buffer[2 * DWT_MAX_LENGTH]; short buffer[2 * DWT_MAX_LENGTH];
@ -2201,9 +2201,9 @@ void dyadic_synthesize_53(int levels, int width, int height, short *c,
#elif DWT_TYPE == 26 #elif DWT_TYPE == 26
// Note: block length must be even for this implementation // Note: block length must be even for this implementation
static void synthesis_26_row(int length, short *lowpass, short *highpass, static void synthesis_26_row(int length, int16_t *lowpass, int16_t *highpass,
short *x) { int16_t *x) {
short r, s, *a, *b; int16_t r, s, *a, *b;
int i, n = length >> 1; int i, n = length >> 1;
if (n >= 4) { if (n >= 4) {
@ -2226,9 +2226,9 @@ static void synthesis_26_row(int length, short *lowpass, short *highpass,
} }
} }
static void synthesis_26_col(int length, short *lowpass, short *highpass, static void synthesis_26_col(int length, int16_t *lowpass, int16_t *highpass,
short *x) { int16_t *x) {
short r, s, *a, *b; int16_t r, s, *a, *b;
int i, n = length >> 1; int i, n = length >> 1;
if (n >= 4) { if (n >= 4) {
@ -2251,10 +2251,10 @@ static void synthesis_26_col(int length, short *lowpass, short *highpass,
} }
} }
void dyadic_synthesize_26(int levels, int width, int height, short *c, void dyadic_synthesize_26(int levels, int width, int height, int16_t *c,
int pitch_c, short *x, int pitch_x) { int pitch_c, int16_t *x, int pitch_x) {
int th[16], tw[16], lv, i, j, nh, nw, hh = height, hw = width; int th[16], tw[16], lv, i, j, nh, nw, hh = height, hw = width;
short buffer[2 * DWT_MAX_LENGTH]; int16_t buffer[2 * DWT_MAX_LENGTH];
th[0] = hh; th[0] = hh;
tw[0] = hw; tw[0] = hw;
@ -2331,8 +2331,8 @@ static void synthesis_97(int length, double *lowpass, double *highpass,
x[length - 1] -= 2 * a_predict1 * x[length - 2]; x[length - 1] -= 2 * a_predict1 * x[length - 2];
} }
void dyadic_synthesize_97(int levels, int width, int height, short *c, void dyadic_synthesize_97(int levels, int width, int height, int16_t *c,
int pitch_c, short *x, int pitch_x) { int pitch_c, int16_t *x, int pitch_x) {
int th[16], tw[16], lv, i, j, nh, nw, hh = height, hw = width; int th[16], tw[16], lv, i, j, nh, nw, hh = height, hw = width;
double buffer[2 * DWT_MAX_LENGTH]; double buffer[2 * DWT_MAX_LENGTH];
double y[DWT_MAX_LENGTH * DWT_MAX_LENGTH]; double y[DWT_MAX_LENGTH * DWT_MAX_LENGTH];
@ -2578,7 +2578,7 @@ static void butterfly_16x16_idct_1d_f(double input[16], double output[16]) {
vp9_clear_system_state(); // Make it simd safe : __asm emms; vp9_clear_system_state(); // Make it simd safe : __asm emms;
} }
void vp9_short_idct16x16_c_f(short *input, short *output, int pitch) { void vp9_short_idct16x16_c_f(int16_t *input, int16_t *output, int pitch) {
vp9_clear_system_state(); // Make it simd safe : __asm emms; vp9_clear_system_state(); // Make it simd safe : __asm emms;
{ {
double out[16*16], out2[16*16]; double out[16*16], out2[16*16];
@ -2608,12 +2608,12 @@ void vp9_short_idct16x16_c_f(short *input, short *output, int pitch) {
vp9_clear_system_state(); // Make it simd safe : __asm emms; vp9_clear_system_state(); // Make it simd safe : __asm emms;
} }
void vp9_short_idct32x32_c(short *input, short *output, int pitch) { void vp9_short_idct32x32_c(int16_t *input, int16_t *output, int pitch) {
// assume out is a 32x32 buffer // assume out is a 32x32 buffer
// Temporary buffer to hold a 16x16 block for 16x16 inverse dct // Temporary buffer to hold a 16x16 block for 16x16 inverse dct
short buffer[16 * 16]; int16_t buffer[16 * 16];
// Temporary buffer to hold a 32x32 block for inverse 32x32 dwt // Temporary buffer to hold a 32x32 block for inverse 32x32 dwt
short buffer2[32 * 32]; int16_t buffer2[32 * 32];
// Note: pitch is in bytes, short_pitch is in short units // Note: pitch is in bytes, short_pitch is in short units
const int short_pitch = pitch >> 1; const int short_pitch = pitch >> 1;
int i; int i;

View File

@ -72,7 +72,7 @@ void vp9_inverse_transform_mb_4x4(MACROBLOCKD *xd) {
vp9_inverse_transform_mbuv_4x4(xd); vp9_inverse_transform_mbuv_4x4(xd);
} }
void vp9_inverse_transform_b_8x8(short *input_dqcoeff, short *output_coeff, void vp9_inverse_transform_b_8x8(int16_t *input_dqcoeff, int16_t *output_coeff,
int pitch) { int pitch) {
vp9_short_idct8x8(input_dqcoeff, output_coeff, pitch); vp9_short_idct8x8(input_dqcoeff, output_coeff, pitch);
} }
@ -123,8 +123,8 @@ void vp9_inverse_transform_mb_8x8(MACROBLOCKD *xd) {
vp9_inverse_transform_mbuv_8x8(xd); vp9_inverse_transform_mbuv_8x8(xd);
} }
void vp9_inverse_transform_b_16x16(short *input_dqcoeff, void vp9_inverse_transform_b_16x16(int16_t *input_dqcoeff,
short *output_coeff, int pitch) { int16_t *output_coeff, int pitch) {
vp9_short_idct16x16(input_dqcoeff, output_coeff, pitch); vp9_short_idct16x16(input_dqcoeff, output_coeff, pitch);
} }

View File

@ -12,6 +12,7 @@
#define VP9_COMMON_VP9_INVTRANS_H_ #define VP9_COMMON_VP9_INVTRANS_H_
#include "vpx_ports/config.h" #include "vpx_ports/config.h"
#include "vpx/vpx_integer.h"
#include "vp9/common/vp9_blockd.h" #include "vp9/common/vp9_blockd.h"
extern void vp9_inverse_transform_b_4x4(MACROBLOCKD *xd, int block, int pitch); extern void vp9_inverse_transform_b_4x4(MACROBLOCKD *xd, int block, int pitch);
@ -22,8 +23,8 @@ extern void vp9_inverse_transform_mby_4x4(MACROBLOCKD *xd);
extern void vp9_inverse_transform_mbuv_4x4(MACROBLOCKD *xd); extern void vp9_inverse_transform_mbuv_4x4(MACROBLOCKD *xd);
extern void vp9_inverse_transform_b_8x8(short *input_dqcoeff, extern void vp9_inverse_transform_b_8x8(int16_t *input_dqcoeff,
short *output_coeff, int pitch); int16_t *output_coeff, int pitch);
extern void vp9_inverse_transform_mb_8x8(MACROBLOCKD *xd); extern void vp9_inverse_transform_mb_8x8(MACROBLOCKD *xd);
@ -31,8 +32,8 @@ extern void vp9_inverse_transform_mby_8x8(MACROBLOCKD *xd);
extern void vp9_inverse_transform_mbuv_8x8(MACROBLOCKD *xd); extern void vp9_inverse_transform_mbuv_8x8(MACROBLOCKD *xd);
extern void vp9_inverse_transform_b_16x16(short *input_dqcoeff, extern void vp9_inverse_transform_b_16x16(int16_t *input_dqcoeff,
short *output_coeff, int pitch); int16_t *output_coeff, int pitch);
extern void vp9_inverse_transform_mb_16x16(MACROBLOCKD *xd); extern void vp9_inverse_transform_mb_16x16(MACROBLOCKD *xd);
@ -43,4 +44,4 @@ extern void vp9_inverse_transform_sby_32x32(SUPERBLOCKD *xd_sb);
extern void vp9_inverse_transform_sbuv_16x16(SUPERBLOCKD *xd_sb); extern void vp9_inverse_transform_sbuv_16x16(SUPERBLOCKD *xd_sb);
#endif #endif
#endif // __INC_INVTRANS_H #endif // VP9_COMMON_VP9_INVTRANS_H_

View File

@ -188,7 +188,7 @@ void vp9_loop_filter_frame(VP9_COMMON *cm, MACROBLOCKD *xd) {
int filter_level; int filter_level;
unsigned char *y_ptr, *u_ptr, *v_ptr; uint8_t *y_ptr, *u_ptr, *v_ptr;
/* Point at base of Mb MODE_INFO list */ /* Point at base of Mb MODE_INFO list */
const MODE_INFO *mode_info_context = cm->mi; const MODE_INFO *mode_info_context = cm->mi;
@ -325,7 +325,7 @@ void vp9_loop_filter_frame_yonly(VP9_COMMON *cm, MACROBLOCKD *xd,
int default_filt_lvl) { int default_filt_lvl) {
YV12_BUFFER_CONFIG *post = cm->frame_to_show; YV12_BUFFER_CONFIG *post = cm->frame_to_show;
unsigned char *y_ptr; uint8_t *y_ptr;
int mb_row; int mb_row;
int mb_col; int mb_col;
@ -425,7 +425,7 @@ void vp9_loop_filter_partial_frame(VP9_COMMON *cm, MACROBLOCKD *xd,
int default_filt_lvl) { int default_filt_lvl) {
YV12_BUFFER_CONFIG *post = cm->frame_to_show; YV12_BUFFER_CONFIG *post = cm->frame_to_show;
unsigned char *y_ptr; uint8_t *y_ptr;
int mb_row; int mb_row;
int mb_col; int mb_col;
int mb_cols = post->y_width >> 4; int mb_cols = post->y_width >> 4;

View File

@ -49,26 +49,26 @@ struct loop_filter_info {
}; };
#define prototype_loopfilter(sym) \ #define prototype_loopfilter(sym) \
void sym(unsigned char *src, int pitch, const unsigned char *blimit,\ void sym(uint8_t *src, int pitch, const unsigned char *blimit, \
const unsigned char *limit, const unsigned char *thresh, int count) const unsigned char *limit, const unsigned char *thresh, int count)
#define prototype_loopfilter_block(sym) \ #define prototype_loopfilter_block(sym) \
void sym(unsigned char *y, unsigned char *u, unsigned char *v, \ void sym(uint8_t *y, uint8_t *u, uint8_t *v, \
int ystride, int uv_stride, struct loop_filter_info *lfi) int ystride, int uv_stride, struct loop_filter_info *lfi)
#define prototype_simple_loopfilter(sym) \ #define prototype_simple_loopfilter(sym) \
void sym(unsigned char *y, int ystride, const unsigned char *blimit) void sym(uint8_t *y, int ystride, const unsigned char *blimit)
#if ARCH_X86 || ARCH_X86_64 #if ARCH_X86 || ARCH_X86_64
#include "x86/vp9_loopfilter_x86.h" #include "x86/vp9_loopfilter_x86.h"
#endif #endif
typedef void loop_filter_uvfunction(unsigned char *u, /* source pointer */ typedef void loop_filter_uvfunction(uint8_t *u, /* source pointer */
int p, /* pitch */ int p, /* pitch */
const unsigned char *blimit, const unsigned char *blimit,
const unsigned char *limit, const unsigned char *limit,
const unsigned char *thresh, const unsigned char *thresh,
unsigned char *v); uint8_t *v);
/* assorted loopfilter functions which get used elsewhere */ /* assorted loopfilter functions which get used elsewhere */
struct VP9Common; struct VP9Common;
@ -93,4 +93,4 @@ void vp9_loop_filter_frame_yonly(struct VP9Common *cm,
void vp9_loop_filter_update_sharpness(loop_filter_info_n *lfi, void vp9_loop_filter_update_sharpness(loop_filter_info_n *lfi,
int sharpness_lvl); int sharpness_lvl);
#endif // loopfilter_h #endif // VP9_COMMON_VP9_LOOPFILTER_H_

View File

@ -13,20 +13,20 @@
#include "vp9/common/vp9_loopfilter.h" #include "vp9/common/vp9_loopfilter.h"
#include "vp9/common/vp9_onyxc_int.h" #include "vp9/common/vp9_onyxc_int.h"
typedef unsigned char uc; static __inline int8_t signed_char_clamp(int t) {
static __inline signed char signed_char_clamp(int t) {
t = (t < -128 ? -128 : t); t = (t < -128 ? -128 : t);
t = (t > 127 ? 127 : t); t = (t > 127 ? 127 : t);
return (signed char) t; return (int8_t) t;
} }
/* should we apply any filter at all ( 11111111 yes, 00000000 no) */ /* should we apply any filter at all ( 11111111 yes, 00000000 no) */
static __inline signed char filter_mask(uc limit, uc blimit, static __inline int8_t filter_mask(uint8_t limit, uint8_t blimit,
uc p3, uc p2, uc p1, uc p0, uint8_t p3, uint8_t p2,
uc q0, uc q1, uc q2, uc q3) { uint8_t p1, uint8_t p0,
signed char mask = 0; uint8_t q0, uint8_t q1,
uint8_t q2, uint8_t q3) {
int8_t mask = 0;
mask |= (abs(p3 - p2) > limit) * -1; mask |= (abs(p3 - p2) > limit) * -1;
mask |= (abs(p2 - p1) > limit) * -1; mask |= (abs(p2 - p1) > limit) * -1;
mask |= (abs(p1 - p0) > limit) * -1; mask |= (abs(p1 - p0) > limit) * -1;
@ -39,26 +39,25 @@ static __inline signed char filter_mask(uc limit, uc blimit,
} }
/* is there high variance internal edge ( 11111111 yes, 00000000 no) */ /* is there high variance internal edge ( 11111111 yes, 00000000 no) */
static __inline signed char hevmask(uc thresh, uc p1, uc p0, uc q0, uc q1) { static __inline int8_t hevmask(uint8_t thresh, uint8_t p1, uint8_t p0,
signed char hev = 0; uint8_t q0, uint8_t q1) {
int8_t hev = 0;
hev |= (abs(p1 - p0) > thresh) * -1; hev |= (abs(p1 - p0) > thresh) * -1;
hev |= (abs(q1 - q0) > thresh) * -1; hev |= (abs(q1 - q0) > thresh) * -1;
return hev; return hev;
} }
static __inline void filter(signed char mask, uc hev, uc *op1, static __inline void filter(int8_t mask, uint8_t hev, uint8_t *op1,
uc *op0, uc *oq0, uc *oq1) uint8_t *op0, uint8_t *oq0, uint8_t *oq1) {
int8_t ps0, qs0;
int8_t ps1, qs1;
int8_t filter, Filter1, Filter2;
int8_t u;
{ ps1 = (int8_t) *op1 ^ 0x80;
signed char ps0, qs0; ps0 = (int8_t) *op0 ^ 0x80;
signed char ps1, qs1; qs0 = (int8_t) *oq0 ^ 0x80;
signed char filter, Filter1, Filter2; qs1 = (int8_t) *oq1 ^ 0x80;
signed char u;
ps1 = (signed char) * op1 ^ 0x80;
ps0 = (signed char) * op0 ^ 0x80;
qs0 = (signed char) * oq0 ^ 0x80;
qs1 = (signed char) * oq1 ^ 0x80;
/* add outer taps if we have high edge variance */ /* add outer taps if we have high edge variance */
filter = signed_char_clamp(ps1 - qs1); filter = signed_char_clamp(ps1 - qs1);
@ -91,20 +90,16 @@ static __inline void filter(signed char mask, uc hev, uc *op1,
*oq1 = u ^ 0x80; *oq1 = u ^ 0x80;
u = signed_char_clamp(ps1 + filter); u = signed_char_clamp(ps1 + filter);
*op1 = u ^ 0x80; *op1 = u ^ 0x80;
} }
void vp9_loop_filter_horizontal_edge_c void vp9_loop_filter_horizontal_edge_c(uint8_t *s,
( int p, /* pitch */
unsigned char *s, const unsigned char *blimit,
int p, /* pitch */ const unsigned char *limit,
const unsigned char *blimit, const unsigned char *thresh,
const unsigned char *limit, int count) {
const unsigned char *thresh, int hev = 0; /* high edge variance */
int count int8_t mask = 0;
) {
int hev = 0; /* high edge variance */
signed char mask = 0;
int i = 0; int i = 0;
/* loop filter designed to work using chars so that we can make maximum use /* loop filter designed to work using chars so that we can make maximum use
@ -123,14 +118,14 @@ void vp9_loop_filter_horizontal_edge_c
} while (++i < count * 8); } while (++i < count * 8);
} }
void vp9_loop_filter_vertical_edge_c(unsigned char *s, void vp9_loop_filter_vertical_edge_c(uint8_t *s,
int p, int p,
const unsigned char *blimit, const unsigned char *blimit,
const unsigned char *limit, const unsigned char *limit,
const unsigned char *thresh, const unsigned char *thresh,
int count) { int count) {
int hev = 0; /* high edge variance */ int hev = 0; /* high edge variance */
signed char mask = 0; int8_t mask = 0;
int i = 0; int i = 0;
/* loop filter designed to work using chars so that we can make maximum use /* loop filter designed to work using chars so that we can make maximum use
@ -148,10 +143,12 @@ void vp9_loop_filter_vertical_edge_c(unsigned char *s,
s += p; s += p;
} while (++i < count * 8); } while (++i < count * 8);
} }
static __inline signed char flatmask(uc thresh, static __inline signed char flatmask(uint8_t thresh,
uc p4, uc p3, uc p2, uc p1, uc p0, uint8_t p4, uint8_t p3, uint8_t p2,
uc q0, uc q1, uc q2, uc q3, uc q4) { uint8_t p1, uint8_t p0,
signed char flat = 0; uint8_t q0, uint8_t q1, uint8_t q2,
uint8_t q3, uint8_t q4) {
int8_t flat = 0;
flat |= (abs(p1 - p0) > 1) * -1; flat |= (abs(p1 - p0) > 1) * -1;
flat |= (abs(q1 - q0) > 1) * -1; flat |= (abs(q1 - q0) > 1) * -1;
flat |= (abs(p0 - p2) > 1) * -1; flat |= (abs(p0 - p2) > 1) * -1;
@ -164,16 +161,18 @@ static __inline signed char flatmask(uc thresh,
return flat; return flat;
} }
static __inline void mbfilter(signed char mask, uc hev, uc flat, static __inline void mbfilter(int8_t mask, uint8_t hev, uint8_t flat,
uc *op4, uc *op3, uc *op2, uc *op1, uc *op0, uint8_t *op4, uint8_t *op3, uint8_t *op2,
uc *oq0, uc *oq1, uc *oq2, uc *oq3, uc *oq4) { uint8_t *op1, uint8_t *op0,
uint8_t *oq0, uint8_t *oq1, uint8_t *oq2,
uint8_t *oq3, uint8_t *oq4) {
/* use a 7 tap filter [1, 1, 1, 2, 1, 1, 1] for flat line */ /* use a 7 tap filter [1, 1, 1, 2, 1, 1, 1] for flat line */
if (flat && mask) { if (flat && mask) {
unsigned char p0, q0; uint8_t p0, q0;
unsigned char p1, q1; uint8_t p1, q1;
unsigned char p2, q2; uint8_t p2, q2;
unsigned char p3, q3; uint8_t p3, q3;
unsigned char p4, q4; uint8_t p4, q4;
p4 = *op4; p4 = *op4;
p3 = *op3; p3 = *op3;
@ -193,15 +192,15 @@ static __inline void mbfilter(signed char mask, uc hev, uc flat,
*oq1 = (p1 + p0 + q0 + q1 + q1 + q2 + q3 + q4 + 4) >> 3; *oq1 = (p1 + p0 + q0 + q1 + q1 + q2 + q3 + q4 + 4) >> 3;
*oq2 = (p0 + q0 + q1 + q2 + q2 + q3 + q4 + q4 + 4) >> 3; *oq2 = (p0 + q0 + q1 + q2 + q2 + q3 + q4 + q4 + 4) >> 3;
} else { } else {
signed char ps0, qs0; int8_t ps0, qs0;
signed char ps1, qs1; int8_t ps1, qs1;
signed char filter, Filter1, Filter2; int8_t filter, Filter1, Filter2;
signed char u; int8_t u;
ps1 = (signed char) * op1 ^ 0x80; ps1 = (int8_t) *op1 ^ 0x80;
ps0 = (signed char) * op0 ^ 0x80; ps0 = (int8_t) *op0 ^ 0x80;
qs0 = (signed char) * oq0 ^ 0x80; qs0 = (int8_t) *oq0 ^ 0x80;
qs1 = (signed char) * oq1 ^ 0x80; qs1 = (int8_t) *oq1 ^ 0x80;
/* add outer taps if we have high edge variance */ /* add outer taps if we have high edge variance */
filter = signed_char_clamp(ps1 - qs1); filter = signed_char_clamp(ps1 - qs1);
@ -233,25 +232,22 @@ static __inline void mbfilter(signed char mask, uc hev, uc flat,
*op1 = u ^ 0x80; *op1 = u ^ 0x80;
} }
} }
void vp9_mbloop_filter_horizontal_edge_c
( void vp9_mbloop_filter_horizontal_edge_c(uint8_t *s,
unsigned char *s, int p,
int p, const unsigned char *blimit,
const unsigned char *blimit, const unsigned char *limit,
const unsigned char *limit, const unsigned char *thresh,
const unsigned char *thresh, int count) {
int count int8_t hev = 0; /* high edge variance */
) { int8_t mask = 0;
signed char hev = 0; /* high edge variance */ int8_t flat = 0;
signed char mask = 0;
signed char flat = 0;
int i = 0; int i = 0;
/* loop filter designed to work using chars so that we can make maximum use /* loop filter designed to work using chars so that we can make maximum use
* of 8 bit simd instructions. * of 8 bit simd instructions.
*/ */
do { do {
mask = filter_mask(limit[0], blimit[0], mask = filter_mask(limit[0], blimit[0],
s[-4 * p], s[-3 * p], s[-2 * p], s[-1 * p], s[-4 * p], s[-3 * p], s[-2 * p], s[-1 * p],
s[ 0 * p], s[ 1 * p], s[ 2 * p], s[ 3 * p]); s[ 0 * p], s[ 1 * p], s[ 2 * p], s[ 3 * p]);
@ -269,22 +265,19 @@ void vp9_mbloop_filter_horizontal_edge_c
} while (++i < count * 8); } while (++i < count * 8);
} }
void vp9_mbloop_filter_vertical_edge_c
( void vp9_mbloop_filter_vertical_edge_c(uint8_t *s,
unsigned char *s, int p,
int p, const unsigned char *blimit,
const unsigned char *blimit, const unsigned char *limit,
const unsigned char *limit, const unsigned char *thresh,
const unsigned char *thresh, int count) {
int count int8_t hev = 0; /* high edge variance */
) { int8_t mask = 0;
signed char hev = 0; /* high edge variance */ int8_t flat = 0;
signed char mask = 0;
signed char flat = 0;
int i = 0; int i = 0;
do { do {
mask = filter_mask(limit[0], blimit[0], mask = filter_mask(limit[0], blimit[0],
s[-4], s[-3], s[-2], s[-1], s[-4], s[-3], s[-2], s[-1],
s[0], s[1], s[2], s[3]); s[0], s[1], s[2], s[3]);
@ -302,26 +295,26 @@ void vp9_mbloop_filter_vertical_edge_c
} }
/* should we apply any filter at all ( 11111111 yes, 00000000 no) */ /* should we apply any filter at all ( 11111111 yes, 00000000 no) */
static __inline signed char simple_filter_mask(uc blimit, static __inline int8_t simple_filter_mask(uint8_t blimit,
uc p1, uc p0, uint8_t p1, uint8_t p0,
uc q0, uc q1) { uint8_t q0, uint8_t q1) {
/* Why does this cause problems for win32? /* Why does this cause problems for win32?
* error C2143: syntax error : missing ';' before 'type' * error C2143: syntax error : missing ';' before 'type'
* (void) limit; * (void) limit;
*/ */
signed char mask = (abs(p0 - q0) * 2 + abs(p1 - q1) / 2 <= blimit) * -1; int8_t mask = (abs(p0 - q0) * 2 + abs(p1 - q1) / 2 <= blimit) * -1;
return mask; return mask;
} }
static __inline void simple_filter(signed char mask, static __inline void simple_filter(int8_t mask,
uc *op1, uc *op0, uint8_t *op1, uint8_t *op0,
uc *oq0, uc *oq1) { uint8_t *oq0, uint8_t *oq1) {
signed char filter, Filter1, Filter2; int8_t filter, Filter1, Filter2;
signed char p1 = (signed char) * op1 ^ 0x80; int8_t p1 = (int8_t) *op1 ^ 0x80;
signed char p0 = (signed char) * op0 ^ 0x80; int8_t p0 = (int8_t) *op0 ^ 0x80;
signed char q0 = (signed char) * oq0 ^ 0x80; int8_t q0 = (int8_t) *oq0 ^ 0x80;
signed char q1 = (signed char) * oq1 ^ 0x80; int8_t q1 = (int8_t) *oq1 ^ 0x80;
signed char u; int8_t u;
filter = signed_char_clamp(p1 - q1); filter = signed_char_clamp(p1 - q1);
filter = signed_char_clamp(filter + 3 * (q0 - p0)); filter = signed_char_clamp(filter + 3 * (q0 - p0));
@ -339,13 +332,10 @@ static __inline void simple_filter(signed char mask,
*op0 = u ^ 0x80; *op0 = u ^ 0x80;
} }
void vp9_loop_filter_simple_horizontal_edge_c void vp9_loop_filter_simple_horizontal_edge_c(uint8_t *s,
( int p,
unsigned char *s, const unsigned char *blimit) {
int p, int8_t mask = 0;
const unsigned char *blimit
) {
signed char mask = 0;
int i = 0; int i = 0;
do { do {
@ -359,13 +349,10 @@ void vp9_loop_filter_simple_horizontal_edge_c
} while (++i < 16); } while (++i < 16);
} }
void vp9_loop_filter_simple_vertical_edge_c void vp9_loop_filter_simple_vertical_edge_c(uint8_t *s,
( int p,
unsigned char *s, const unsigned char *blimit) {
int p, int8_t mask = 0;
const unsigned char *blimit
) {
signed char mask = 0;
int i = 0; int i = 0;
do { do {
@ -373,12 +360,11 @@ void vp9_loop_filter_simple_vertical_edge_c
simple_filter(mask, s - 2, s - 1, s, s + 1); simple_filter(mask, s - 2, s - 1, s, s + 1);
s += p; s += p;
} while (++i < 16); } while (++i < 16);
} }
/* Vertical MB Filtering */ /* Vertical MB Filtering */
void vp9_loop_filter_mbv_c(unsigned char *y_ptr, unsigned char *u_ptr, void vp9_loop_filter_mbv_c(uint8_t *y_ptr, uint8_t *u_ptr,
unsigned char *v_ptr, int y_stride, int uv_stride, uint8_t *v_ptr, int y_stride, int uv_stride,
struct loop_filter_info *lfi) { struct loop_filter_info *lfi) {
vp9_mbloop_filter_vertical_edge_c(y_ptr, y_stride, vp9_mbloop_filter_vertical_edge_c(y_ptr, y_stride,
lfi->mblim, lfi->lim, lfi->hev_thr, 2); lfi->mblim, lfi->lim, lfi->hev_thr, 2);
@ -393,8 +379,8 @@ void vp9_loop_filter_mbv_c(unsigned char *y_ptr, unsigned char *u_ptr,
} }
/* Vertical B Filtering */ /* Vertical B Filtering */
void vp9_loop_filter_bv_c(unsigned char *y_ptr, unsigned char *u_ptr, void vp9_loop_filter_bv_c(uint8_t*y_ptr, uint8_t *u_ptr,
unsigned char *v_ptr, int y_stride, int uv_stride, uint8_t *v_ptr, int y_stride, int uv_stride,
struct loop_filter_info *lfi) { struct loop_filter_info *lfi) {
vp9_loop_filter_vertical_edge_c(y_ptr + 4, y_stride, vp9_loop_filter_vertical_edge_c(y_ptr + 4, y_stride,
lfi->blim, lfi->lim, lfi->hev_thr, 2); lfi->blim, lfi->lim, lfi->hev_thr, 2);
@ -413,8 +399,8 @@ void vp9_loop_filter_bv_c(unsigned char *y_ptr, unsigned char *u_ptr,
} }
/* Horizontal MB filtering */ /* Horizontal MB filtering */
void vp9_loop_filter_mbh_c(unsigned char *y_ptr, unsigned char *u_ptr, void vp9_loop_filter_mbh_c(uint8_t *y_ptr, uint8_t *u_ptr,
unsigned char *v_ptr, int y_stride, int uv_stride, uint8_t *v_ptr, int y_stride, int uv_stride,
struct loop_filter_info *lfi) { struct loop_filter_info *lfi) {
vp9_mbloop_filter_horizontal_edge_c(y_ptr, y_stride, vp9_mbloop_filter_horizontal_edge_c(y_ptr, y_stride,
lfi->mblim, lfi->lim, lfi->hev_thr, 2); lfi->mblim, lfi->lim, lfi->hev_thr, 2);
@ -429,8 +415,8 @@ void vp9_loop_filter_mbh_c(unsigned char *y_ptr, unsigned char *u_ptr,
} }
/* Horizontal B Filtering */ /* Horizontal B Filtering */
void vp9_loop_filter_bh_c(unsigned char *y_ptr, unsigned char *u_ptr, void vp9_loop_filter_bh_c(uint8_t *y_ptr, uint8_t *u_ptr,
unsigned char *v_ptr, int y_stride, int uv_stride, uint8_t *v_ptr, int y_stride, int uv_stride,
struct loop_filter_info *lfi) { struct loop_filter_info *lfi) {
vp9_loop_filter_horizontal_edge_c(y_ptr + 4 * y_stride, y_stride, vp9_loop_filter_horizontal_edge_c(y_ptr + 4 * y_stride, y_stride,
lfi->blim, lfi->lim, lfi->hev_thr, 2); lfi->blim, lfi->lim, lfi->hev_thr, 2);
@ -448,14 +434,14 @@ void vp9_loop_filter_bh_c(unsigned char *y_ptr, unsigned char *u_ptr,
lfi->blim, lfi->lim, lfi->hev_thr, 1); lfi->blim, lfi->lim, lfi->hev_thr, 1);
} }
void vp9_loop_filter_bh8x8_c(unsigned char *y_ptr, unsigned char *u_ptr, void vp9_loop_filter_bh8x8_c(uint8_t *y_ptr, uint8_t *u_ptr,
unsigned char *v_ptr, int y_stride, int uv_stride, uint8_t *v_ptr, int y_stride, int uv_stride,
struct loop_filter_info *lfi) { struct loop_filter_info *lfi) {
vp9_mbloop_filter_horizontal_edge_c( vp9_mbloop_filter_horizontal_edge_c(
y_ptr + 8 * y_stride, y_stride, lfi->blim, lfi->lim, lfi->hev_thr, 2); y_ptr + 8 * y_stride, y_stride, lfi->blim, lfi->lim, lfi->hev_thr, 2);
} }
void vp9_loop_filter_bhs_c(unsigned char *y_ptr, int y_stride, void vp9_loop_filter_bhs_c(uint8_t *y_ptr, int y_stride,
const unsigned char *blimit) { const unsigned char *blimit) {
vp9_loop_filter_simple_horizontal_edge_c(y_ptr + 4 * y_stride, vp9_loop_filter_simple_horizontal_edge_c(y_ptr + 4 * y_stride,
y_stride, blimit); y_stride, blimit);
@ -465,14 +451,14 @@ void vp9_loop_filter_bhs_c(unsigned char *y_ptr, int y_stride,
y_stride, blimit); y_stride, blimit);
} }
void vp9_loop_filter_bv8x8_c(unsigned char *y_ptr, unsigned char *u_ptr, void vp9_loop_filter_bv8x8_c(uint8_t *y_ptr, uint8_t *u_ptr,
unsigned char *v_ptr, int y_stride, int uv_stride, uint8_t *v_ptr, int y_stride, int uv_stride,
struct loop_filter_info *lfi) { struct loop_filter_info *lfi) {
vp9_mbloop_filter_vertical_edge_c( vp9_mbloop_filter_vertical_edge_c(
y_ptr + 8, y_stride, lfi->blim, lfi->lim, lfi->hev_thr, 2); y_ptr + 8, y_stride, lfi->blim, lfi->lim, lfi->hev_thr, 2);
} }
void vp9_loop_filter_bvs_c(unsigned char *y_ptr, int y_stride, void vp9_loop_filter_bvs_c(uint8_t *y_ptr, int y_stride,
const unsigned char *blimit) { const unsigned char *blimit) {
vp9_loop_filter_simple_vertical_edge_c(y_ptr + 4, y_stride, blimit); vp9_loop_filter_simple_vertical_edge_c(y_ptr + 4, y_stride, blimit);
vp9_loop_filter_simple_vertical_edge_c(y_ptr + 8, y_stride, blimit); vp9_loop_filter_simple_vertical_edge_c(y_ptr + 8, y_stride, blimit);

View File

@ -16,17 +16,13 @@ typedef enum {
DEST = 1 DEST = 1
} BLOCKSET; } BLOCKSET;
static void setup_block static void setup_block(BLOCKD *b,
( int mv_stride,
BLOCKD *b, uint8_t **base,
int mv_stride, uint8_t **base2,
unsigned char **base, int Stride,
unsigned char **base2, int offset,
int Stride, BLOCKSET bs) {
int offset,
BLOCKSET bs
) {
if (bs == DEST) { if (bs == DEST) {
b->dst_stride = Stride; b->dst_stride = Stride;
b->dst = offset; b->dst = offset;
@ -37,15 +33,13 @@ static void setup_block
b->base_pre = base; b->base_pre = base;
b->base_second_pre = base2; b->base_second_pre = base2;
} }
} }
static void setup_macroblock(MACROBLOCKD *xd, BLOCKSET bs) { static void setup_macroblock(MACROBLOCKD *xd, BLOCKSET bs) {
int block; int block;
unsigned char **y, **u, **v; uint8_t **y, **u, **v;
unsigned char **y2, **u2, **v2; uint8_t **y2, **u2, **v2;
BLOCKD *blockd = xd->block; BLOCKD *blockd = xd->block;
int stride; int stride;
@ -117,7 +111,6 @@ void vp9_setup_block_dptrs(MACROBLOCKD *xd) {
} }
void vp9_build_block_doffsets(MACROBLOCKD *xd) { void vp9_build_block_doffsets(MACROBLOCKD *xd) {
/* handle the destination pitch features */ /* handle the destination pitch features */
setup_macroblock(xd, DEST); setup_macroblock(xd, DEST);
setup_macroblock(xd, PRED); setup_macroblock(xd, PRED);

View File

@ -8,9 +8,9 @@
* be found in the AUTHORS file in the root of the source tree. * be found in the AUTHORS file in the root of the source tree.
*/ */
#ifndef VP9_COMMON_VP9_MODECONT_H_ #ifndef VP9_COMMON_VP9_MODECONT_H_
#define VP9_COMMON_VP9_MODECONT_H_ #define VP9_COMMON_VP9_MODECONT_H_
extern const int vp9_default_mode_contexts[INTER_MODE_CONTEXTS][4]; extern const int vp9_default_mode_contexts[INTER_MODE_CONTEXTS][4];
#endif
#endif // VP9_COMMON_VP9_MODECONT_H_

View File

@ -8,14 +8,14 @@
* be found in the AUTHORS file in the root of the source tree. * be found in the AUTHORS file in the root of the source tree.
*/ */
#ifndef VP9_COMMON_VP9_MV_H_ #ifndef VP9_COMMON_VP9_MV_H_
#define VP9_COMMON_VP9_MV_H_ #define VP9_COMMON_VP9_MV_H_
#include "vpx/vpx_integer.h" #include "vpx/vpx_integer.h"
typedef struct { typedef struct {
short row; int16_t row;
short col; int16_t col;
} MV; } MV;
typedef union int_mv { typedef union int_mv {
@ -23,4 +23,4 @@ typedef union int_mv {
MV as_mv; MV as_mv;
} int_mv; /* facilitates faster equality tests and copies */ } int_mv; /* facilitates faster equality tests and copies */
#endif #endif // VP9_COMMON_VP9_MV_H_

View File

@ -11,18 +11,14 @@
#include "vp9/common/vp9_onyxc_int.h" #include "vp9/common/vp9_onyxc_int.h"
#include "vp9/common/vp9_blockd.h" #include "vp9/common/vp9_blockd.h"
#ifndef VP9_COMMON_VP9_MVREF_COMMON_H_ #ifndef VP9_COMMON_VP9_MVREF_COMMON_H_
#define VP9_COMMON_VP9_MVREF_COMMON_H_ #define VP9_COMMON_VP9_MVREF_COMMON_H_
void vp9_find_mv_refs( void vp9_find_mv_refs(MACROBLOCKD *xd,
MACROBLOCKD *xd, MODE_INFO *here,
MODE_INFO *here, MODE_INFO *lf_here,
MODE_INFO *lf_here, MV_REFERENCE_FRAME ref_frame,
MV_REFERENCE_FRAME ref_frame, int_mv *mv_ref_list,
int_mv * mv_ref_list, int *ref_sign_bias);
int *ref_sign_bias
);
#endif
#endif // VP9_COMMON_VP9_MVREF_COMMON_H_

View File

@ -8,7 +8,6 @@
* be found in the AUTHORS file in the root of the source tree. * be found in the AUTHORS file in the root of the source tree.
*/ */
#ifndef VP9_COMMON_VP9_ONYX_H_ #ifndef VP9_COMMON_VP9_ONYX_H_
#define VP9_COMMON_VP9_ONYX_H_ #define VP9_COMMON_VP9_ONYX_H_
@ -221,4 +220,4 @@ extern "C"
} }
#endif #endif
#endif // __INC_ONYX_H #endif // VP9_COMMON_VP9_ONYX_H_

View File

@ -8,7 +8,6 @@
* be found in the AUTHORS file in the root of the source tree. * be found in the AUTHORS file in the root of the source tree.
*/ */
#ifndef VP9_COMMON_VP9_ONYXC_INT_H_ #ifndef VP9_COMMON_VP9_ONYXC_INT_H_
#define VP9_COMMON_VP9_ONYXC_INT_H_ #define VP9_COMMON_VP9_ONYXC_INT_H_
@ -142,9 +141,9 @@ typedef enum {
typedef struct VP9Common { typedef struct VP9Common {
struct vpx_internal_error_info error; struct vpx_internal_error_info error;
DECLARE_ALIGNED(16, short, Y1dequant[QINDEX_RANGE][16]); DECLARE_ALIGNED(16, int16_t, Y1dequant[QINDEX_RANGE][16]);
DECLARE_ALIGNED(16, short, Y2dequant[QINDEX_RANGE][16]); DECLARE_ALIGNED(16, int16_t, Y2dequant[QINDEX_RANGE][16]);
DECLARE_ALIGNED(16, short, UVdequant[QINDEX_RANGE][16]); DECLARE_ALIGNED(16, int16_t, UVdequant[QINDEX_RANGE][16]);
int Width; int Width;
int Height; int Height;
@ -299,4 +298,4 @@ typedef struct VP9Common {
} VP9_COMMON; } VP9_COMMON;
#endif // __INC_ONYX_INT_H #endif // VP9_COMMON_VP9_ONYXC_INT_H_

View File

@ -132,20 +132,20 @@ const short vp9_rv[] = {
/**************************************************************************** /****************************************************************************
*/ */
void vp9_post_proc_down_and_across_c(unsigned char *src_ptr, void vp9_post_proc_down_and_across_c(uint8_t *src_ptr,
unsigned char *dst_ptr, uint8_t *dst_ptr,
int src_pixels_per_line, int src_pixels_per_line,
int dst_pixels_per_line, int dst_pixels_per_line,
int rows, int rows,
int cols, int cols,
int flimit) { int flimit) {
unsigned char *p_src, *p_dst; uint8_t *p_src, *p_dst;
int row; int row;
int col; int col;
int i; int i;
int v; int v;
int pitch = src_pixels_per_line; int pitch = src_pixels_per_line;
unsigned char d[8]; uint8_t d[8];
(void)dst_pixels_per_line; (void)dst_pixels_per_line;
for (row = 0; row < rows; row++) { for (row = 0; row < rows; row++) {
@ -215,12 +215,12 @@ static int q2mbl(int x) {
return x * x / 3; return x * x / 3;
} }
void vp9_mbpost_proc_across_ip_c(unsigned char *src, int pitch, void vp9_mbpost_proc_across_ip_c(uint8_t *src, int pitch,
int rows, int cols, int flimit) { int rows, int cols, int flimit) {
int r, c, i; int r, c, i;
unsigned char *s = src; uint8_t *s = src;
unsigned char d[16]; uint8_t d[16];
for (r = 0; r < rows; r++) { for (r = 0; r < rows; r++) {
@ -253,16 +253,16 @@ void vp9_mbpost_proc_across_ip_c(unsigned char *src, int pitch,
} }
} }
void vp9_mbpost_proc_down_c(unsigned char *dst, int pitch, void vp9_mbpost_proc_down_c(uint8_t *dst, int pitch,
int rows, int cols, int flimit) { int rows, int cols, int flimit) {
int r, c, i; int r, c, i;
const short *rv3 = &vp9_rv[63 & rand()]; const short *rv3 = &vp9_rv[63 & rand()];
for (c = 0; c < cols; c++) { for (c = 0; c < cols; c++) {
unsigned char *s = &dst[c]; uint8_t *s = &dst[c];
int sumsq = 0; int sumsq = 0;
int sum = 0; int sum = 0;
unsigned char d[16]; uint8_t d[16];
const short *rv2 = rv3 + ((c * 17) & 127); const short *rv2 = rv3 + ((c * 17) & 127);
for (i = -8; i <= 6; i++) { for (i = -8; i <= 6; i++) {
@ -439,7 +439,7 @@ static void fillrd(struct postproc_state *state, int q, int a) {
* SPECIAL NOTES : None. * SPECIAL NOTES : None.
* *
****************************************************************************/ ****************************************************************************/
void vp9_plane_add_noise_c(unsigned char *Start, char *noise, void vp9_plane_add_noise_c(uint8_t *Start, char *noise,
char blackclamp[16], char blackclamp[16],
char whiteclamp[16], char whiteclamp[16],
char bothclamp[16], char bothclamp[16],
@ -447,7 +447,7 @@ void vp9_plane_add_noise_c(unsigned char *Start, char *noise,
unsigned int i, j; unsigned int i, j;
for (i = 0; i < Height; i++) { for (i = 0; i < Height; i++) {
unsigned char *Pos = Start + i * Pitch; uint8_t *Pos = Start + i * Pitch;
char *Ref = (char *)(noise + (rand() & 0xff)); char *Ref = (char *)(noise + (rand() & 0xff));
for (j = 0; j < Width; j++) { for (j = 0; j < Width; j++) {
@ -466,7 +466,7 @@ void vp9_plane_add_noise_c(unsigned char *Start, char *noise,
* edges unblended to give distinction to macro blocks in areas * edges unblended to give distinction to macro blocks in areas
* filled with the same color block. * filled with the same color block.
*/ */
void vp9_blend_mb_inner_c(unsigned char *y, unsigned char *u, unsigned char *v, void vp9_blend_mb_inner_c(uint8_t *y, uint8_t *u, uint8_t *v,
int y1, int u1, int v1, int alpha, int stride) { int y1, int u1, int v1, int alpha, int stride) {
int i, j; int i, j;
int y1_const = y1 * ((1 << 16) - alpha); int y1_const = y1 * ((1 << 16) - alpha);
@ -499,7 +499,7 @@ void vp9_blend_mb_inner_c(unsigned char *y, unsigned char *u, unsigned char *v,
/* Blend only the edge of the macro block. Leave center /* Blend only the edge of the macro block. Leave center
* unblended to allow for other visualizations to be layered. * unblended to allow for other visualizations to be layered.
*/ */
void vp9_blend_mb_outer_c(unsigned char *y, unsigned char *u, unsigned char *v, void vp9_blend_mb_outer_c(uint8_t *y, uint8_t *u, uint8_t *v,
int y1, int u1, int v1, int alpha, int stride) { int y1, int u1, int v1, int alpha, int stride) {
int i, j; int i, j;
int y1_const = y1 * ((1 << 16) - alpha); int y1_const = y1 * ((1 << 16) - alpha);
@ -554,7 +554,7 @@ void vp9_blend_mb_outer_c(unsigned char *y, unsigned char *u, unsigned char *v,
} }
} }
void vp9_blend_b_c(unsigned char *y, unsigned char *u, unsigned char *v, void vp9_blend_b_c(uint8_t *y, uint8_t *u, uint8_t *v,
int y1, int u1, int v1, int alpha, int stride) { int y1, int u1, int v1, int alpha, int stride) {
int i, j; int i, j;
int y1_const = y1 * ((1 << 16) - alpha); int y1_const = y1 * ((1 << 16) - alpha);
@ -688,7 +688,7 @@ int vp9_post_proc_frame(VP9_COMMON *oci, YV12_BUFFER_CONFIG *dest,
if (flags & VP9D_DEBUG_TXT_MBLK_MODES) { if (flags & VP9D_DEBUG_TXT_MBLK_MODES) {
int i, j; int i, j;
unsigned char *y_ptr; uint8_t *y_ptr;
YV12_BUFFER_CONFIG *post = &oci->post_proc_buffer; YV12_BUFFER_CONFIG *post = &oci->post_proc_buffer;
int mb_rows = post->y_height >> 4; int mb_rows = post->y_height >> 4;
int mb_cols = post->y_width >> 4; int mb_cols = post->y_width >> 4;
@ -717,7 +717,7 @@ int vp9_post_proc_frame(VP9_COMMON *oci, YV12_BUFFER_CONFIG *dest,
if (flags & VP9D_DEBUG_TXT_DC_DIFF) { if (flags & VP9D_DEBUG_TXT_DC_DIFF) {
int i, j; int i, j;
unsigned char *y_ptr; uint8_t *y_ptr;
YV12_BUFFER_CONFIG *post = &oci->post_proc_buffer; YV12_BUFFER_CONFIG *post = &oci->post_proc_buffer;
int mb_rows = post->y_height >> 4; int mb_rows = post->y_height >> 4;
int mb_cols = post->y_width >> 4; int mb_cols = post->y_width >> 4;
@ -764,7 +764,7 @@ int vp9_post_proc_frame(VP9_COMMON *oci, YV12_BUFFER_CONFIG *dest,
YV12_BUFFER_CONFIG *post = &oci->post_proc_buffer; YV12_BUFFER_CONFIG *post = &oci->post_proc_buffer;
int width = post->y_width; int width = post->y_width;
int height = post->y_height; int height = post->y_height;
unsigned char *y_buffer = oci->post_proc_buffer.y_buffer; uint8_t *y_buffer = oci->post_proc_buffer.y_buffer;
int y_stride = oci->post_proc_buffer.y_stride; int y_stride = oci->post_proc_buffer.y_stride;
MODE_INFO *mi = oci->mi; MODE_INFO *mi = oci->mi;
int x0, y0; int x0, y0;
@ -906,9 +906,9 @@ int vp9_post_proc_frame(VP9_COMMON *oci, YV12_BUFFER_CONFIG *dest,
YV12_BUFFER_CONFIG *post = &oci->post_proc_buffer; YV12_BUFFER_CONFIG *post = &oci->post_proc_buffer;
int width = post->y_width; int width = post->y_width;
int height = post->y_height; int height = post->y_height;
unsigned char *y_ptr = oci->post_proc_buffer.y_buffer; uint8_t *y_ptr = oci->post_proc_buffer.y_buffer;
unsigned char *u_ptr = oci->post_proc_buffer.u_buffer; uint8_t *u_ptr = oci->post_proc_buffer.u_buffer;
unsigned char *v_ptr = oci->post_proc_buffer.v_buffer; uint8_t *v_ptr = oci->post_proc_buffer.v_buffer;
int y_stride = oci->post_proc_buffer.y_stride; int y_stride = oci->post_proc_buffer.y_stride;
MODE_INFO *mi = oci->mi; MODE_INFO *mi = oci->mi;
@ -920,7 +920,7 @@ int vp9_post_proc_frame(VP9_COMMON *oci, YV12_BUFFER_CONFIG *dest,
((ppflags->display_mb_modes_flag & B_PRED) || ((ppflags->display_mb_modes_flag & B_PRED) ||
ppflags->display_b_modes_flag)) { ppflags->display_b_modes_flag)) {
int by, bx; int by, bx;
unsigned char *yl, *ul, *vl; uint8_t *yl, *ul, *vl;
union b_mode_info *bmi = mi->bmi; union b_mode_info *bmi = mi->bmi;
yl = y_ptr + x; yl = y_ptr + x;
@ -971,9 +971,9 @@ int vp9_post_proc_frame(VP9_COMMON *oci, YV12_BUFFER_CONFIG *dest,
YV12_BUFFER_CONFIG *post = &oci->post_proc_buffer; YV12_BUFFER_CONFIG *post = &oci->post_proc_buffer;
int width = post->y_width; int width = post->y_width;
int height = post->y_height; int height = post->y_height;
unsigned char *y_ptr = oci->post_proc_buffer.y_buffer; uint8_t *y_ptr = oci->post_proc_buffer.y_buffer;
unsigned char *u_ptr = oci->post_proc_buffer.u_buffer; uint8_t *u_ptr = oci->post_proc_buffer.u_buffer;
unsigned char *v_ptr = oci->post_proc_buffer.v_buffer; uint8_t *v_ptr = oci->post_proc_buffer.v_buffer;
int y_stride = oci->post_proc_buffer.y_stride; int y_stride = oci->post_proc_buffer.y_stride;
MODE_INFO *mi = oci->mi; MODE_INFO *mi = oci->mi;

View File

@ -38,4 +38,5 @@ void vp9_deblock(YV12_BUFFER_CONFIG *source,
int q, int q,
int low_var_thresh, int low_var_thresh,
int flag); int flag);
#endif
#endif // VP9_COMMON_VP9_POSTPROC_H_

View File

@ -8,9 +8,9 @@
* be found in the AUTHORS file in the root of the source tree. * be found in the AUTHORS file in the root of the source tree.
*/ */
#ifndef VP9_COMMON_VP9_PPFLAGS_H_ #ifndef VP9_COMMON_VP9_PPFLAGS_H_
#define VP9_COMMON_VP9_PPFLAGS_H_ #define VP9_COMMON_VP9_PPFLAGS_H_
enum { enum {
VP9D_NOFILTERING = 0, VP9D_NOFILTERING = 0,
VP9D_DEBLOCK = 1 << 0, VP9D_DEBLOCK = 1 << 0,
@ -35,4 +35,4 @@ typedef struct {
int display_mv_flag; int display_mv_flag;
} vp9_ppflags_t; } vp9_ppflags_t;
#endif #endif // VP9_COMMON_VP9_PPFLAGS_H_

View File

@ -8,8 +8,8 @@
* be found in the AUTHORS file in the root of the source tree. * be found in the AUTHORS file in the root of the source tree.
*/ */
#ifndef VP9_COMMON_VP9_PRAGMAS_H_
#define VP9_COMMON_VP9_PRAGMAS_H_
#ifdef __INTEL_COMPILER #ifdef __INTEL_COMPILER
#pragma warning(disable:997 1011 170) #pragma warning(disable:997 1011 170)
@ -17,3 +17,5 @@
#ifdef _MSC_VER #ifdef _MSC_VER
#pragma warning(disable:4799) #pragma warning(disable:4799)
#endif #endif
#endif // VP9_COMMON_VP9_PRAGMAS_H_

View File

@ -52,4 +52,4 @@ extern MV_REFERENCE_FRAME vp9_get_pred_ref(const VP9_COMMON *const cm,
const MACROBLOCKD *const xd); const MACROBLOCKD *const xd);
extern void vp9_compute_mod_refprobs(VP9_COMMON *const cm); extern void vp9_compute_mod_refprobs(VP9_COMMON *const cm);
#endif /* __INC_PRED_COMMON_H__ */ #endif // VP9_COMMON_VP9_PRED_COMMON_H_

View File

@ -8,15 +8,19 @@
* be found in the AUTHORS file in the root of the source tree. * be found in the AUTHORS file in the root of the source tree.
*/ */
#ifndef VP9_COMMON_VP9_QUANT_COMMON_H_
#define VP9_COMMON_VP9_QUANT_COMMON_H_
#include "string.h" #include "string.h"
#include "vp9/common/vp9_blockd.h" #include "vp9/common/vp9_blockd.h"
#include "vp9/common/vp9_onyxc_int.h" #include "vp9/common/vp9_onyxc_int.h"
extern void vp9_init_quant_tables(); extern void vp9_init_quant_tables(void);
extern int vp9_ac_yquant(int QIndex); extern int vp9_ac_yquant(int QIndex);
extern int vp9_dc_quant(int QIndex, int Delta); extern int vp9_dc_quant(int QIndex, int Delta);
extern int vp9_dc2quant(int QIndex, int Delta); extern int vp9_dc2quant(int QIndex, int Delta);
extern int vp9_ac2quant(int QIndex, int Delta); extern int vp9_ac2quant(int QIndex, int Delta);
extern int vp9_dc_uv_quant(int QIndex, int Delta); extern int vp9_dc_uv_quant(int QIndex, int Delta);
extern int vp9_ac_uv_quant(int QIndex, int Delta); extern int vp9_ac_uv_quant(int QIndex, int Delta);
#endif // VP9_COMMON_VP9_QUANT_COMMON_H_

View File

@ -13,13 +13,10 @@
#include "vp9_rtcd.h" #include "vp9_rtcd.h"
#include "vp9/common/vp9_blockd.h" #include "vp9/common/vp9_blockd.h"
void vp9_recon_b_c void vp9_recon_b_c(uint8_t *pred_ptr,
( int16_t *diff_ptr,
unsigned char *pred_ptr, uint8_t *dst_ptr,
short *diff_ptr, int stride) {
unsigned char *dst_ptr,
int stride
) {
int r, c; int r, c;
for (r = 0; r < 4; r++) { for (r = 0; r < 4; r++) {
@ -33,13 +30,10 @@ void vp9_recon_b_c
} }
} }
void vp9_recon_uv_b_c void vp9_recon_uv_b_c(uint8_t *pred_ptr,
( int16_t *diff_ptr,
unsigned char *pred_ptr, uint8_t *dst_ptr,
short *diff_ptr, int stride) {
unsigned char *dst_ptr,
int stride
) {
int r, c; int r, c;
for (r = 0; r < 4; r++) { for (r = 0; r < 4; r++) {
@ -52,13 +46,11 @@ void vp9_recon_uv_b_c
pred_ptr += 8; pred_ptr += 8;
} }
} }
void vp9_recon4b_c
( void vp9_recon4b_c(uint8_t *pred_ptr,
unsigned char *pred_ptr, int16_t *diff_ptr,
short *diff_ptr, uint8_t *dst_ptr,
unsigned char *dst_ptr, int stride) {
int stride
) {
int r, c; int r, c;
for (r = 0; r < 4; r++) { for (r = 0; r < 4; r++) {
@ -72,13 +64,10 @@ void vp9_recon4b_c
} }
} }
void vp9_recon2b_c void vp9_recon2b_c(uint8_t *pred_ptr,
( int16_t *diff_ptr,
unsigned char *pred_ptr, uint8_t *dst_ptr,
short *diff_ptr, int stride) {
unsigned char *dst_ptr,
int stride
) {
int r, c; int r, c;
for (r = 0; r < 4; r++) { for (r = 0; r < 4; r++) {
@ -97,7 +86,7 @@ void vp9_recon_mby_s_c(MACROBLOCKD *xd, uint8_t *dst) {
int x, y; int x, y;
BLOCKD *b = &xd->block[0]; BLOCKD *b = &xd->block[0];
int stride = b->dst_stride; int stride = b->dst_stride;
short *diff = b->diff; int16_t *diff = b->diff;
for (y = 0; y < 16; y++) { for (y = 0; y < 16; y++) {
for (x = 0; x < 16; x++) { for (x = 0; x < 16; x++) {
@ -115,7 +104,7 @@ void vp9_recon_mbuv_s_c(MACROBLOCKD *xd, uint8_t *udst, uint8_t *vdst) {
for (i = 0; i < 2; i++, dst = vdst) { for (i = 0; i < 2; i++, dst = vdst) {
BLOCKD *b = &xd->block[16 + 4 * i]; BLOCKD *b = &xd->block[16 + 4 * i];
int stride = b->dst_stride; int stride = b->dst_stride;
short *diff = b->diff; int16_t *diff = b->diff;
for (y = 0; y < 8; y++) { for (y = 0; y < 8; y++) {
for (x = 0; x < 8; x++) { for (x = 0; x < 8; x++) {
@ -130,7 +119,7 @@ void vp9_recon_mbuv_s_c(MACROBLOCKD *xd, uint8_t *udst, uint8_t *vdst) {
#if CONFIG_TX32X32 #if CONFIG_TX32X32
void vp9_recon_sby_s_c(MACROBLOCKD *xd, uint8_t *dst) { void vp9_recon_sby_s_c(MACROBLOCKD *xd, uint8_t *dst) {
int x, y, stride = xd->block[0].dst_stride; int x, y, stride = xd->block[0].dst_stride;
short *diff = xd->sb_coeff_data.diff; int16_t *diff = xd->sb_coeff_data.diff;
for (y = 0; y < 32; y++) { for (y = 0; y < 32; y++) {
for (x = 0; x < 32; x++) { for (x = 0; x < 32; x++) {
@ -143,8 +132,8 @@ void vp9_recon_sby_s_c(MACROBLOCKD *xd, uint8_t *dst) {
void vp9_recon_sbuv_s_c(MACROBLOCKD *xd, uint8_t *udst, uint8_t *vdst) { void vp9_recon_sbuv_s_c(MACROBLOCKD *xd, uint8_t *udst, uint8_t *vdst) {
int x, y, stride = xd->block[16].dst_stride; int x, y, stride = xd->block[16].dst_stride;
short *udiff = xd->sb_coeff_data.diff + 1024; int16_t *udiff = xd->sb_coeff_data.diff + 1024;
short *vdiff = xd->sb_coeff_data.diff + 1280; int16_t *vdiff = xd->sb_coeff_data.diff + 1280;
for (y = 0; y < 16; y++) { for (y = 0; y < 16; y++) {
for (x = 0; x < 16; x++) { for (x = 0; x < 16; x++) {

View File

@ -42,8 +42,7 @@ void vp9_setup_interp_filters(MACROBLOCKD *xd,
xd->subpixel_predict_avg = vp9_eighttap_predict_avg4x4_sharp; xd->subpixel_predict_avg = vp9_eighttap_predict_avg4x4_sharp;
xd->subpixel_predict_avg8x8 = vp9_eighttap_predict_avg8x8_sharp; xd->subpixel_predict_avg8x8 = vp9_eighttap_predict_avg8x8_sharp;
xd->subpixel_predict_avg16x16 = vp9_eighttap_predict_avg16x16_sharp_c; xd->subpixel_predict_avg16x16 = vp9_eighttap_predict_avg16x16_sharp_c;
} } else {
else {
xd->subpixel_predict = vp9_bilinear_predict4x4; xd->subpixel_predict = vp9_bilinear_predict4x4;
xd->subpixel_predict8x4 = vp9_bilinear_predict8x4; xd->subpixel_predict8x4 = vp9_bilinear_predict8x4;
xd->subpixel_predict8x8 = vp9_bilinear_predict8x8; xd->subpixel_predict8x8 = vp9_bilinear_predict8x8;
@ -54,9 +53,9 @@ void vp9_setup_interp_filters(MACROBLOCKD *xd,
} }
} }
void vp9_copy_mem16x16_c(unsigned char *src, void vp9_copy_mem16x16_c(uint8_t *src,
int src_stride, int src_stride,
unsigned char *dst, uint8_t *dst,
int dst_stride) { int dst_stride) {
int r; int r;
@ -91,9 +90,9 @@ void vp9_copy_mem16x16_c(unsigned char *src,
} }
} }
void vp9_avg_mem16x16_c(unsigned char *src, void vp9_avg_mem16x16_c(uint8_t *src,
int src_stride, int src_stride,
unsigned char *dst, uint8_t *dst,
int dst_stride) { int dst_stride) {
int r; int r;
@ -109,9 +108,9 @@ void vp9_avg_mem16x16_c(unsigned char *src,
} }
} }
void vp9_copy_mem8x8_c(unsigned char *src, void vp9_copy_mem8x8_c(uint8_t *src,
int src_stride, int src_stride,
unsigned char *dst, uint8_t *dst,
int dst_stride) { int dst_stride) {
int r; int r;
@ -134,9 +133,9 @@ void vp9_copy_mem8x8_c(unsigned char *src,
} }
} }
void vp9_avg_mem8x8_c(unsigned char *src, void vp9_avg_mem8x8_c(uint8_t *src,
int src_stride, int src_stride,
unsigned char *dst, uint8_t *dst,
int dst_stride) { int dst_stride) {
int r; int r;
@ -152,9 +151,9 @@ void vp9_avg_mem8x8_c(unsigned char *src,
} }
} }
void vp9_copy_mem8x4_c(unsigned char *src, void vp9_copy_mem8x4_c(uint8_t *src,
int src_stride, int src_stride,
unsigned char *dst, uint8_t *dst,
int dst_stride) { int dst_stride) {
int r; int r;
@ -179,9 +178,9 @@ void vp9_copy_mem8x4_c(unsigned char *src,
void vp9_build_inter_predictors_b(BLOCKD *d, int pitch, vp9_subpix_fn_t sppf) { void vp9_build_inter_predictors_b(BLOCKD *d, int pitch, vp9_subpix_fn_t sppf) {
int r; int r;
unsigned char *ptr_base; uint8_t *ptr_base;
unsigned char *ptr; uint8_t *ptr;
unsigned char *pred_ptr = d->predictor; uint8_t *pred_ptr = d->predictor;
int_mv mv; int_mv mv;
ptr_base = *(d->base_pre); ptr_base = *(d->base_pre);
@ -221,9 +220,9 @@ void vp9_build_inter_predictors_b(BLOCKD *d, int pitch, vp9_subpix_fn_t sppf) {
void vp9_build_2nd_inter_predictors_b(BLOCKD *d, int pitch, void vp9_build_2nd_inter_predictors_b(BLOCKD *d, int pitch,
vp9_subpix_fn_t sppf) { vp9_subpix_fn_t sppf) {
int r; int r;
unsigned char *ptr_base; uint8_t *ptr_base;
unsigned char *ptr; uint8_t *ptr;
unsigned char *pred_ptr = d->predictor; uint8_t *pred_ptr = d->predictor;
int_mv mv; int_mv mv;
ptr_base = *(d->base_second_pre); ptr_base = *(d->base_second_pre);
@ -251,9 +250,9 @@ void vp9_build_2nd_inter_predictors_b(BLOCKD *d, int pitch,
} }
void vp9_build_inter_predictors4b(MACROBLOCKD *xd, BLOCKD *d, int pitch) { void vp9_build_inter_predictors4b(MACROBLOCKD *xd, BLOCKD *d, int pitch) {
unsigned char *ptr_base; uint8_t *ptr_base;
unsigned char *ptr; uint8_t *ptr;
unsigned char *pred_ptr = d->predictor; uint8_t *pred_ptr = d->predictor;
int_mv mv; int_mv mv;
ptr_base = *(d->base_pre); ptr_base = *(d->base_pre);
@ -277,9 +276,9 @@ void vp9_build_inter_predictors4b(MACROBLOCKD *xd, BLOCKD *d, int pitch) {
*/ */
void vp9_build_2nd_inter_predictors4b(MACROBLOCKD *xd, void vp9_build_2nd_inter_predictors4b(MACROBLOCKD *xd,
BLOCKD *d, int pitch) { BLOCKD *d, int pitch) {
unsigned char *ptr_base; uint8_t *ptr_base;
unsigned char *ptr; uint8_t *ptr;
unsigned char *pred_ptr = d->predictor; uint8_t *pred_ptr = d->predictor;
int_mv mv; int_mv mv;
ptr_base = *(d->base_second_pre); ptr_base = *(d->base_second_pre);
@ -296,9 +295,9 @@ void vp9_build_2nd_inter_predictors4b(MACROBLOCKD *xd,
} }
static void build_inter_predictors2b(MACROBLOCKD *xd, BLOCKD *d, int pitch) { static void build_inter_predictors2b(MACROBLOCKD *xd, BLOCKD *d, int pitch) {
unsigned char *ptr_base; uint8_t *ptr_base;
unsigned char *ptr; uint8_t *ptr;
unsigned char *pred_ptr = d->predictor; uint8_t *pred_ptr = d->predictor;
int_mv mv; int_mv mv;
ptr_base = *(d->base_pre); ptr_base = *(d->base_pre);
@ -328,13 +327,13 @@ static const int pred_filter[PRED_FILT_LEN] = {1, 2, 10, 2, 1};
// Alternative filter {1, 1, 4, 1, 1} // Alternative filter {1, 1, 4, 1, 1}
#if !USE_THRESH_FILTER #if !USE_THRESH_FILTER
void filter_mb(unsigned char *src, int src_stride, void filter_mb(uint8_t *src, int src_stride,
unsigned char *dst, int dst_stride, uint8_t *dst, int dst_stride,
int width, int height) { int width, int height) {
int i, j, k; int i, j, k;
unsigned int temp[32 * 32]; unsigned int temp[32 * 32];
unsigned int *pTmp = temp; unsigned int *pTmp = temp;
unsigned char *pSrc = src - (1 + src_stride) * (PRED_FILT_LEN / 2); uint8_t *pSrc = src - (1 + src_stride) * (PRED_FILT_LEN / 2);
// Horizontal // Horizontal
for (i = 0; i < height + PRED_FILT_LEN - 1; i++) { for (i = 0; i < height + PRED_FILT_LEN - 1; i++) {
@ -352,7 +351,7 @@ void filter_mb(unsigned char *src, int src_stride,
// Vertical // Vertical
pTmp = temp; pTmp = temp;
for (i = 0; i < width; i++) { for (i = 0; i < width; i++) {
unsigned char *pDst = dst + i; uint8_t *pDst = dst + i;
for (j = 0; j < height; j++) { for (j = 0; j < height; j++) {
int sum = 0; int sum = 0;
for (k = 0; k < PRED_FILT_LEN; k++) for (k = 0; k < PRED_FILT_LEN; k++)
@ -366,15 +365,15 @@ void filter_mb(unsigned char *src, int src_stride,
} }
#else #else
// Based on vp9_post_proc_down_and_across_c (vp9_postproc.c) // Based on vp9_post_proc_down_and_across_c (vp9_postproc.c)
void filter_mb(unsigned char *src, int src_stride, void filter_mb(uint8_t *src, int src_stride,
unsigned char *dst, int dst_stride, uint8_t *dst, int dst_stride,
int width, int height) { int width, int height) {
unsigned char *pSrc, *pDst; uint8_t *pSrc, *pDst;
int row; int row;
int col; int col;
int i; int i;
int v; int v;
unsigned char d[8]; uint8_t d[8];
/* TODO flimit should be linked to the quantizer value */ /* TODO flimit should be linked to the quantizer value */
int flimit = 7; int flimit = 7;
@ -573,11 +572,11 @@ static void clamp_uvmv_to_umv_border(MV *mv, const MACROBLOCKD *xd) {
/*encoder only*/ /*encoder only*/
void vp9_build_1st_inter16x16_predictors_mby(MACROBLOCKD *xd, void vp9_build_1st_inter16x16_predictors_mby(MACROBLOCKD *xd,
unsigned char *dst_y, uint8_t *dst_y,
int dst_ystride, int dst_ystride,
int clamp_mvs) { int clamp_mvs) {
unsigned char *ptr_base = xd->pre.y_buffer; uint8_t *ptr_base = xd->pre.y_buffer;
unsigned char *ptr; uint8_t *ptr;
int pre_stride = xd->block[0].pre_stride; int pre_stride = xd->block[0].pre_stride;
int_mv ymv; int_mv ymv;
@ -593,8 +592,8 @@ void vp9_build_1st_inter16x16_predictors_mby(MACROBLOCKD *xd,
if ((ymv.as_mv.row | ymv.as_mv.col) & 7) { if ((ymv.as_mv.row | ymv.as_mv.col) & 7) {
// Sub-pel filter needs extended input // Sub-pel filter needs extended input
int len = 15 + (VP9_INTERP_EXTEND << 1); int len = 15 + (VP9_INTERP_EXTEND << 1);
unsigned char Temp[32 * 32]; // Data required by sub-pel filter uint8_t Temp[32 * 32]; // Data required by sub-pel filter
unsigned char *pTemp = Temp + (VP9_INTERP_EXTEND - 1) * (len + 1); uint8_t *pTemp = Temp + (VP9_INTERP_EXTEND - 1) * (len + 1);
// Copy extended MB into Temp array, applying the spatial filter // Copy extended MB into Temp array, applying the spatial filter
filter_mb(ptr - (VP9_INTERP_EXTEND - 1) * (pre_stride + 1), pre_stride, filter_mb(ptr - (VP9_INTERP_EXTEND - 1) * (pre_stride + 1), pre_stride,
@ -622,11 +621,11 @@ void vp9_build_1st_inter16x16_predictors_mby(MACROBLOCKD *xd,
} }
void vp9_build_1st_inter16x16_predictors_mbuv(MACROBLOCKD *xd, void vp9_build_1st_inter16x16_predictors_mbuv(MACROBLOCKD *xd,
unsigned char *dst_u, uint8_t *dst_u,
unsigned char *dst_v, uint8_t *dst_v,
int dst_uvstride) { int dst_uvstride) {
int offset; int offset;
unsigned char *uptr, *vptr; uint8_t *uptr, *vptr;
int pre_stride = xd->block[0].pre_stride; int pre_stride = xd->block[0].pre_stride;
int_mv _o16x16mv; int_mv _o16x16mv;
int_mv _16x16mv; int_mv _16x16mv;
@ -662,11 +661,11 @@ void vp9_build_1st_inter16x16_predictors_mbuv(MACROBLOCKD *xd,
#if CONFIG_PRED_FILTER #if CONFIG_PRED_FILTER
if (xd->mode_info_context->mbmi.pred_filter_enabled) { if (xd->mode_info_context->mbmi.pred_filter_enabled) {
int i; int i;
unsigned char *pSrc = uptr; uint8_t *pSrc = uptr;
unsigned char *pDst = dst_u; uint8_t *pDst = dst_u;
int len = 7 + (VP9_INTERP_EXTEND << 1); int len = 7 + (VP9_INTERP_EXTEND << 1);
unsigned char Temp[32 * 32]; // Data required by the sub-pel filter uint8_t Temp[32 * 32]; // Data required by the sub-pel filter
unsigned char *pTemp = Temp + (VP9_INTERP_EXTEND - 1) * (len + 1); uint8_t *pTemp = Temp + (VP9_INTERP_EXTEND - 1) * (len + 1);
// U & V // U & V
for (i = 0; i < 2; i++) { for (i = 0; i < 2; i++) {
@ -703,9 +702,9 @@ void vp9_build_1st_inter16x16_predictors_mbuv(MACROBLOCKD *xd,
void vp9_build_1st_inter16x16_predictors_mb(MACROBLOCKD *xd, void vp9_build_1st_inter16x16_predictors_mb(MACROBLOCKD *xd,
unsigned char *dst_y, uint8_t *dst_y,
unsigned char *dst_u, uint8_t *dst_u,
unsigned char *dst_v, uint8_t *dst_v,
int dst_ystride, int dst_uvstride) { int dst_ystride, int dst_uvstride) {
vp9_build_1st_inter16x16_predictors_mby(xd, dst_y, dst_ystride, vp9_build_1st_inter16x16_predictors_mby(xd, dst_y, dst_ystride,
xd->mode_info_context->mbmi.need_to_clamp_mvs); xd->mode_info_context->mbmi.need_to_clamp_mvs);
@ -714,9 +713,9 @@ void vp9_build_1st_inter16x16_predictors_mb(MACROBLOCKD *xd,
#if CONFIG_SUPERBLOCKS #if CONFIG_SUPERBLOCKS
void vp9_build_inter32x32_predictors_sb(MACROBLOCKD *x, void vp9_build_inter32x32_predictors_sb(MACROBLOCKD *x,
unsigned char *dst_y, uint8_t *dst_y,
unsigned char *dst_u, uint8_t *dst_u,
unsigned char *dst_v, uint8_t *dst_v,
int dst_ystride, int dst_ystride,
int dst_uvstride) { int dst_uvstride) {
uint8_t *y1 = x->pre.y_buffer, *u1 = x->pre.u_buffer, *v1 = x->pre.v_buffer; uint8_t *y1 = x->pre.y_buffer, *u1 = x->pre.u_buffer, *v1 = x->pre.v_buffer;
@ -798,15 +797,15 @@ void vp9_build_inter32x32_predictors_sb(MACROBLOCKD *x,
* single reference framer. * single reference framer.
*/ */
void vp9_build_2nd_inter16x16_predictors_mby(MACROBLOCKD *xd, void vp9_build_2nd_inter16x16_predictors_mby(MACROBLOCKD *xd,
unsigned char *dst_y, uint8_t *dst_y,
int dst_ystride) { int dst_ystride) {
unsigned char *ptr; uint8_t *ptr;
int_mv _16x16mv; int_mv _16x16mv;
int mv_row; int mv_row;
int mv_col; int mv_col;
unsigned char *ptr_base = xd->second_pre.y_buffer; uint8_t *ptr_base = xd->second_pre.y_buffer;
int pre_stride = xd->block[0].pre_stride; int pre_stride = xd->block[0].pre_stride;
_16x16mv.as_int = xd->mode_info_context->mbmi.mv[1].as_int; _16x16mv.as_int = xd->mode_info_context->mbmi.mv[1].as_int;
@ -824,8 +823,8 @@ void vp9_build_2nd_inter16x16_predictors_mby(MACROBLOCKD *xd,
if ((mv_row | mv_col) & 7) { if ((mv_row | mv_col) & 7) {
// Sub-pel filter needs extended input // Sub-pel filter needs extended input
int len = 15 + (VP9_INTERP_EXTEND << 1); int len = 15 + (VP9_INTERP_EXTEND << 1);
unsigned char Temp[32 * 32]; // Data required by sub-pel filter uint8_t Temp[32 * 32]; // Data required by sub-pel filter
unsigned char *pTemp = Temp + (VP9_INTERP_EXTEND - 1) * (len + 1); uint8_t *pTemp = Temp + (VP9_INTERP_EXTEND - 1) * (len + 1);
// Copy extended MB into Temp array, applying the spatial filter // Copy extended MB into Temp array, applying the spatial filter
filter_mb(ptr - (VP9_INTERP_EXTEND - 1) * (pre_stride + 1), pre_stride, filter_mb(ptr - (VP9_INTERP_EXTEND - 1) * (pre_stride + 1), pre_stride,
@ -852,11 +851,11 @@ void vp9_build_2nd_inter16x16_predictors_mby(MACROBLOCKD *xd,
} }
void vp9_build_2nd_inter16x16_predictors_mbuv(MACROBLOCKD *xd, void vp9_build_2nd_inter16x16_predictors_mbuv(MACROBLOCKD *xd,
unsigned char *dst_u, uint8_t *dst_u,
unsigned char *dst_v, uint8_t *dst_v,
int dst_uvstride) { int dst_uvstride) {
int offset; int offset;
unsigned char *uptr, *vptr; uint8_t *uptr, *vptr;
int_mv _16x16mv; int_mv _16x16mv;
int mv_row; int mv_row;
@ -891,10 +890,10 @@ void vp9_build_2nd_inter16x16_predictors_mbuv(MACROBLOCKD *xd,
if (xd->mode_info_context->mbmi.pred_filter_enabled) { if (xd->mode_info_context->mbmi.pred_filter_enabled) {
int i; int i;
int len = 7 + (VP9_INTERP_EXTEND << 1); int len = 7 + (VP9_INTERP_EXTEND << 1);
unsigned char Temp[32 * 32]; // Data required by sub-pel filter uint8_t Temp[32 * 32]; // Data required by sub-pel filter
unsigned char *pTemp = Temp + (VP9_INTERP_EXTEND - 1) * (len + 1); uint8_t *pTemp = Temp + (VP9_INTERP_EXTEND - 1) * (len + 1);
unsigned char *pSrc = uptr; uint8_t *pSrc = uptr;
unsigned char *pDst = dst_u; uint8_t *pDst = dst_u;
// U & V // U & V
for (i = 0; i < 2; i++) { for (i = 0; i < 2; i++) {
@ -930,9 +929,9 @@ void vp9_build_2nd_inter16x16_predictors_mbuv(MACROBLOCKD *xd,
} }
void vp9_build_2nd_inter16x16_predictors_mb(MACROBLOCKD *xd, void vp9_build_2nd_inter16x16_predictors_mb(MACROBLOCKD *xd,
unsigned char *dst_y, uint8_t *dst_y,
unsigned char *dst_u, uint8_t *dst_u,
unsigned char *dst_v, uint8_t *dst_v,
int dst_ystride, int dst_ystride,
int dst_uvstride) { int dst_uvstride) {
vp9_build_2nd_inter16x16_predictors_mby(xd, dst_y, dst_ystride); vp9_build_2nd_inter16x16_predictors_mby(xd, dst_y, dst_ystride);

View File

@ -11,46 +11,47 @@
#ifndef VP9_COMMON_VP9_RECONINTER_H_ #ifndef VP9_COMMON_VP9_RECONINTER_H_
#define VP9_COMMON_VP9_RECONINTER_H_ #define VP9_COMMON_VP9_RECONINTER_H_
#include "vpx/vpx_integer.h"
#include "vp9/common/vp9_onyxc_int.h" #include "vp9/common/vp9_onyxc_int.h"
extern void vp9_build_1st_inter16x16_predictors_mby(MACROBLOCKD *xd, extern void vp9_build_1st_inter16x16_predictors_mby(MACROBLOCKD *xd,
unsigned char *dst_y, uint8_t *dst_y,
int dst_ystride, int dst_ystride,
int clamp_mvs); int clamp_mvs);
extern void vp9_build_1st_inter16x16_predictors_mbuv(MACROBLOCKD *xd, extern void vp9_build_1st_inter16x16_predictors_mbuv(MACROBLOCKD *xd,
unsigned char *dst_u, uint8_t *dst_u,
unsigned char *dst_v, uint8_t *dst_v,
int dst_uvstride); int dst_uvstride);
extern void vp9_build_1st_inter16x16_predictors_mb(MACROBLOCKD *xd, extern void vp9_build_1st_inter16x16_predictors_mb(MACROBLOCKD *xd,
unsigned char *dst_y, uint8_t *dst_y,
unsigned char *dst_u, uint8_t *dst_u,
unsigned char *dst_v, uint8_t *dst_v,
int dst_ystride, int dst_ystride,
int dst_uvstride); int dst_uvstride);
extern void vp9_build_2nd_inter16x16_predictors_mby(MACROBLOCKD *xd, extern void vp9_build_2nd_inter16x16_predictors_mby(MACROBLOCKD *xd,
unsigned char *dst_y, uint8_t *dst_y,
int dst_ystride); int dst_ystride);
extern void vp9_build_2nd_inter16x16_predictors_mbuv(MACROBLOCKD *xd, extern void vp9_build_2nd_inter16x16_predictors_mbuv(MACROBLOCKD *xd,
unsigned char *dst_u, uint8_t *dst_u,
unsigned char *dst_v, uint8_t *dst_v,
int dst_uvstride); int dst_uvstride);
extern void vp9_build_2nd_inter16x16_predictors_mb(MACROBLOCKD *xd, extern void vp9_build_2nd_inter16x16_predictors_mb(MACROBLOCKD *xd,
unsigned char *dst_y, uint8_t *dst_y,
unsigned char *dst_u, uint8_t *dst_u,
unsigned char *dst_v, uint8_t *dst_v,
int dst_ystride, int dst_ystride,
int dst_uvstride); int dst_uvstride);
#if CONFIG_SUPERBLOCKS #if CONFIG_SUPERBLOCKS
extern void vp9_build_inter32x32_predictors_sb(MACROBLOCKD *x, extern void vp9_build_inter32x32_predictors_sb(MACROBLOCKD *x,
unsigned char *dst_y, uint8_t *dst_y,
unsigned char *dst_u, uint8_t *dst_u,
unsigned char *dst_v, uint8_t *dst_v,
int dst_ystride, int dst_ystride,
int dst_uvstride); int dst_uvstride);
#endif #endif
@ -75,4 +76,4 @@ extern void vp9_setup_interp_filters(MACROBLOCKD *xd,
INTERPOLATIONFILTERTYPE filter, INTERPOLATIONFILTERTYPE filter,
VP9_COMMON *cm); VP9_COMMON *cm);
#endif // __INC_RECONINTER_H #endif // VP9_COMMON_VP9_RECONINTER_H_

View File

@ -198,9 +198,9 @@ static void d153_predictor(uint8_t *ypred_ptr, int y_stride, int n,
} }
} }
static void corner_predictor(unsigned char *ypred_ptr, int y_stride, int n, static void corner_predictor(uint8_t *ypred_ptr, int y_stride, int n,
unsigned char *yabove_row, uint8_t *yabove_row,
unsigned char *yleft_col) { uint8_t *yleft_col) {
int mh, mv, maxgradh, maxgradv, x, y, nx, ny; int mh, mv, maxgradh, maxgradv, x, y, nx, ny;
int i, j; int i, j;
int top_left = yabove_row[-1]; int top_left = yabove_row[-1];
@ -248,14 +248,14 @@ void vp9_recon_intra_mbuv(MACROBLOCKD *xd) {
} }
} }
void vp9_build_intra_predictors_internal(unsigned char *src, int src_stride, void vp9_build_intra_predictors_internal(uint8_t *src, int src_stride,
unsigned char *ypred_ptr, uint8_t *ypred_ptr,
int y_stride, int mode, int bsize, int y_stride, int mode, int bsize,
int up_available, int left_available) { int up_available, int left_available) {
unsigned char *yabove_row = src - src_stride; uint8_t *yabove_row = src - src_stride;
unsigned char yleft_col[32]; uint8_t yleft_col[32];
unsigned char ytop_left = yabove_row[-1]; uint8_t ytop_left = yabove_row[-1];
int r, c, i; int r, c, i;
for (i = 0; i < bsize; i++) { for (i = 0; i < bsize; i++) {
@ -368,9 +368,9 @@ void vp9_build_intra_predictors_internal(unsigned char *src, int src_stride,
#if CONFIG_COMP_INTERINTRA_PRED #if CONFIG_COMP_INTERINTRA_PRED
static void combine_interintra(MB_PREDICTION_MODE mode, static void combine_interintra(MB_PREDICTION_MODE mode,
unsigned char *interpred, uint8_t *interpred,
int interstride, int interstride,
unsigned char *intrapred, uint8_t *intrapred,
int intrastride, int intrastride,
int size) { int size) {
// TODO(debargha): Explore different ways of combining predictors // TODO(debargha): Explore different ways of combining predictors
@ -607,18 +607,18 @@ static void combine_interintra(MB_PREDICTION_MODE mode,
} }
void vp9_build_interintra_16x16_predictors_mb(MACROBLOCKD *xd, void vp9_build_interintra_16x16_predictors_mb(MACROBLOCKD *xd,
unsigned char *ypred, uint8_t *ypred,
unsigned char *upred, uint8_t *upred,
unsigned char *vpred, uint8_t *vpred,
int ystride, int uvstride) { int ystride, int uvstride) {
vp9_build_interintra_16x16_predictors_mby(xd, ypred, ystride); vp9_build_interintra_16x16_predictors_mby(xd, ypred, ystride);
vp9_build_interintra_16x16_predictors_mbuv(xd, upred, vpred, uvstride); vp9_build_interintra_16x16_predictors_mbuv(xd, upred, vpred, uvstride);
} }
void vp9_build_interintra_16x16_predictors_mby(MACROBLOCKD *xd, void vp9_build_interintra_16x16_predictors_mby(MACROBLOCKD *xd,
unsigned char *ypred, uint8_t *ypred,
int ystride) { int ystride) {
unsigned char intrapredictor[256]; uint8_t intrapredictor[256];
vp9_build_intra_predictors_internal( vp9_build_intra_predictors_internal(
xd->dst.y_buffer, xd->dst.y_stride, xd->dst.y_buffer, xd->dst.y_stride,
intrapredictor, 16, intrapredictor, 16,
@ -629,11 +629,11 @@ void vp9_build_interintra_16x16_predictors_mby(MACROBLOCKD *xd,
} }
void vp9_build_interintra_16x16_predictors_mbuv(MACROBLOCKD *xd, void vp9_build_interintra_16x16_predictors_mbuv(MACROBLOCKD *xd,
unsigned char *upred, uint8_t *upred,
unsigned char *vpred, uint8_t *vpred,
int uvstride) { int uvstride) {
unsigned char uintrapredictor[64]; uint8_t uintrapredictor[64];
unsigned char vintrapredictor[64]; uint8_t vintrapredictor[64];
vp9_build_intra_predictors_internal( vp9_build_intra_predictors_internal(
xd->dst.u_buffer, xd->dst.uv_stride, xd->dst.u_buffer, xd->dst.uv_stride,
uintrapredictor, 8, uintrapredictor, 8,
@ -652,9 +652,9 @@ void vp9_build_interintra_16x16_predictors_mbuv(MACROBLOCKD *xd,
#if CONFIG_SUPERBLOCKS #if CONFIG_SUPERBLOCKS
void vp9_build_interintra_32x32_predictors_sby(MACROBLOCKD *xd, void vp9_build_interintra_32x32_predictors_sby(MACROBLOCKD *xd,
unsigned char *ypred, uint8_t *ypred,
int ystride) { int ystride) {
unsigned char intrapredictor[1024]; uint8_t intrapredictor[1024];
vp9_build_intra_predictors_internal( vp9_build_intra_predictors_internal(
xd->dst.y_buffer, xd->dst.y_stride, xd->dst.y_buffer, xd->dst.y_stride,
intrapredictor, 32, intrapredictor, 32,
@ -665,11 +665,11 @@ void vp9_build_interintra_32x32_predictors_sby(MACROBLOCKD *xd,
} }
void vp9_build_interintra_32x32_predictors_sbuv(MACROBLOCKD *xd, void vp9_build_interintra_32x32_predictors_sbuv(MACROBLOCKD *xd,
unsigned char *upred, uint8_t *upred,
unsigned char *vpred, uint8_t *vpred,
int uvstride) { int uvstride) {
unsigned char uintrapredictor[256]; uint8_t uintrapredictor[256];
unsigned char vintrapredictor[256]; uint8_t vintrapredictor[256];
vp9_build_intra_predictors_internal( vp9_build_intra_predictors_internal(
xd->dst.u_buffer, xd->dst.uv_stride, xd->dst.u_buffer, xd->dst.uv_stride,
uintrapredictor, 16, uintrapredictor, 16,
@ -687,9 +687,9 @@ void vp9_build_interintra_32x32_predictors_sbuv(MACROBLOCKD *xd,
} }
void vp9_build_interintra_32x32_predictors_sb(MACROBLOCKD *xd, void vp9_build_interintra_32x32_predictors_sb(MACROBLOCKD *xd,
unsigned char *ypred, uint8_t *ypred,
unsigned char *upred, uint8_t *upred,
unsigned char *vpred, uint8_t *vpred,
int ystride, int ystride,
int uvstride) { int uvstride) {
vp9_build_interintra_32x32_predictors_sby(xd, ypred, ystride); vp9_build_interintra_32x32_predictors_sby(xd, ypred, ystride);
@ -723,7 +723,7 @@ void vp9_build_intra_predictors_sby_s(MACROBLOCKD *xd) {
#if CONFIG_COMP_INTRA_PRED #if CONFIG_COMP_INTRA_PRED
void vp9_build_comp_intra_predictors_mby(MACROBLOCKD *xd) { void vp9_build_comp_intra_predictors_mby(MACROBLOCKD *xd) {
unsigned char predictor[2][256]; uint8_t predictor[2][256];
int i; int i;
vp9_build_intra_predictors_internal(xd->dst.y_buffer, xd->dst.y_stride, vp9_build_intra_predictors_internal(xd->dst.y_buffer, xd->dst.y_stride,
@ -744,8 +744,8 @@ void vp9_build_comp_intra_predictors_mby(MACROBLOCKD *xd) {
#endif #endif
void vp9_build_intra_predictors_mbuv_internal(MACROBLOCKD *xd, void vp9_build_intra_predictors_mbuv_internal(MACROBLOCKD *xd,
unsigned char *upred_ptr, uint8_t *upred_ptr,
unsigned char *vpred_ptr, uint8_t *vpred_ptr,
int uv_stride, int uv_stride,
int mode, int bsize) { int mode, int bsize) {
vp9_build_intra_predictors_internal(xd->dst.u_buffer, xd->dst.uv_stride, vp9_build_intra_predictors_internal(xd->dst.u_buffer, xd->dst.uv_stride,
@ -782,7 +782,7 @@ void vp9_build_intra_predictors_sbuv_s(MACROBLOCKD *xd) {
#if CONFIG_COMP_INTRA_PRED #if CONFIG_COMP_INTRA_PRED
void vp9_build_comp_intra_predictors_mbuv(MACROBLOCKD *xd) { void vp9_build_comp_intra_predictors_mbuv(MACROBLOCKD *xd) {
unsigned char predictor[2][2][64]; uint8_t predictor[2][2][64];
int i; int i;
vp9_build_intra_predictors_mbuv_internal( vp9_build_intra_predictors_mbuv_internal(
@ -801,7 +801,7 @@ void vp9_build_comp_intra_predictors_mbuv(MACROBLOCKD *xd) {
void vp9_intra8x8_predict(BLOCKD *xd, void vp9_intra8x8_predict(BLOCKD *xd,
int mode, int mode,
unsigned char *predictor) { uint8_t *predictor) {
vp9_build_intra_predictors_internal(*(xd->base_dst) + xd->dst, vp9_build_intra_predictors_internal(*(xd->base_dst) + xd->dst,
xd->dst_stride, predictor, 16, xd->dst_stride, predictor, 16,
mode, 8, 1, 1); mode, 8, 1, 1);
@ -810,8 +810,8 @@ void vp9_intra8x8_predict(BLOCKD *xd,
#if CONFIG_COMP_INTRA_PRED #if CONFIG_COMP_INTRA_PRED
void vp9_comp_intra8x8_predict(BLOCKD *xd, void vp9_comp_intra8x8_predict(BLOCKD *xd,
int mode, int second_mode, int mode, int second_mode,
unsigned char *out_predictor) { uint8_t *out_predictor) {
unsigned char predictor[2][8 * 16]; uint8_t predictor[2][8 * 16];
int i, j; int i, j;
vp9_intra8x8_predict(xd, mode, predictor[0]); vp9_intra8x8_predict(xd, mode, predictor[0]);
@ -827,7 +827,7 @@ void vp9_comp_intra8x8_predict(BLOCKD *xd,
void vp9_intra_uv4x4_predict(BLOCKD *xd, void vp9_intra_uv4x4_predict(BLOCKD *xd,
int mode, int mode,
unsigned char *predictor) { uint8_t *predictor) {
vp9_build_intra_predictors_internal(*(xd->base_dst) + xd->dst, vp9_build_intra_predictors_internal(*(xd->base_dst) + xd->dst,
xd->dst_stride, predictor, 8, xd->dst_stride, predictor, 8,
mode, 4, 1, 1); mode, 4, 1, 1);
@ -836,8 +836,8 @@ void vp9_intra_uv4x4_predict(BLOCKD *xd,
#if CONFIG_COMP_INTRA_PRED #if CONFIG_COMP_INTRA_PRED
void vp9_comp_intra_uv4x4_predict(BLOCKD *xd, void vp9_comp_intra_uv4x4_predict(BLOCKD *xd,
int mode, int mode2, int mode, int mode2,
unsigned char *out_predictor) { uint8_t *out_predictor) {
unsigned char predictor[2][8 * 4]; uint8_t predictor[2][8 * 4];
int i, j; int i, j;
vp9_intra_uv4x4_predict(xd, mode, predictor[0]); vp9_intra_uv4x4_predict(xd, mode, predictor[0]);

View File

@ -11,34 +11,36 @@
#ifndef VP9_COMMON_VP9_RECONINTRA_H_ #ifndef VP9_COMMON_VP9_RECONINTRA_H_
#define VP9_COMMON_VP9_RECONINTRA_H_ #define VP9_COMMON_VP9_RECONINTRA_H_
#include "vpx/vpx_integer.h"
#include "vp9/common/vp9_blockd.h" #include "vp9/common/vp9_blockd.h"
extern void vp9_recon_intra_mbuv(MACROBLOCKD *xd); extern void vp9_recon_intra_mbuv(MACROBLOCKD *xd);
extern B_PREDICTION_MODE vp9_find_dominant_direction(unsigned char *ptr, extern B_PREDICTION_MODE vp9_find_dominant_direction(uint8_t *ptr,
int stride, int n); int stride, int n);
extern B_PREDICTION_MODE vp9_find_bpred_context(BLOCKD *x); extern B_PREDICTION_MODE vp9_find_bpred_context(BLOCKD *x);
#if CONFIG_COMP_INTERINTRA_PRED #if CONFIG_COMP_INTERINTRA_PRED
extern void vp9_build_interintra_16x16_predictors_mb(MACROBLOCKD *xd, extern void vp9_build_interintra_16x16_predictors_mb(MACROBLOCKD *xd,
unsigned char *ypred, uint8_t *ypred,
unsigned char *upred, uint8_t *upred,
unsigned char *vpred, uint8_t *vpred,
int ystride, int ystride,
int uvstride); int uvstride);
extern void vp9_build_interintra_16x16_predictors_mby(MACROBLOCKD *xd, extern void vp9_build_interintra_16x16_predictors_mby(MACROBLOCKD *xd,
unsigned char *ypred, uint8_t *ypred,
int ystride); int ystride);
extern void vp9_build_interintra_16x16_predictors_mbuv(MACROBLOCKD *xd, extern void vp9_build_interintra_16x16_predictors_mbuv(MACROBLOCKD *xd,
unsigned char *upred, uint8_t *upred,
unsigned char *vpred, uint8_t *vpred,
int uvstride); int uvstride);
#endif // CONFIG_COMP_INTERINTRA_PRED
#if CONFIG_SUPERBLOCKS #if CONFIG_SUPERBLOCKS
extern void vp9_build_interintra_32x32_predictors_sb(MACROBLOCKD *xd, extern void vp9_build_interintra_32x32_predictors_sb(MACROBLOCKD *xd,
unsigned char *ypred, uint8_t *ypred,
unsigned char *upred, uint8_t *upred,
unsigned char *vpred, uint8_t *vpred,
int ystride, int ystride,
int uvstride); int uvstride);
#endif #endif // CONFIG_SUPERBLOCKS
#endif
#endif // __INC_RECONINTRA_H #endif // VP9_COMMON_VP9_RECONINTRA_H_

View File

@ -15,7 +15,7 @@
#include "vp9_rtcd.h" #include "vp9_rtcd.h"
#if CONFIG_NEWBINTRAMODES #if CONFIG_NEWBINTRAMODES
static int find_grad_measure(unsigned char *x, int stride, int n, int t, static int find_grad_measure(uint8_t *x, int stride, int n, int t,
int dx, int dy) { int dx, int dy) {
int i, j; int i, j;
int count = 0, gsum = 0, gdiv; int count = 0, gsum = 0, gdiv;
@ -35,8 +35,8 @@ static int find_grad_measure(unsigned char *x, int stride, int n, int t,
} }
#if CONTEXT_PRED_REPLACEMENTS == 6 #if CONTEXT_PRED_REPLACEMENTS == 6
B_PREDICTION_MODE vp9_find_dominant_direction( B_PREDICTION_MODE vp9_find_dominant_direction(uint8_t *ptr,
unsigned char *ptr, int stride, int n) { int stride, int n) {
int g[8], i, imin, imax; int g[8], i, imin, imax;
g[1] = find_grad_measure(ptr, stride, n, 4, 2, 1); g[1] = find_grad_measure(ptr, stride, n, 4, 2, 1);
g[2] = find_grad_measure(ptr, stride, n, 4, 1, 1); g[2] = find_grad_measure(ptr, stride, n, 4, 1, 1);
@ -72,8 +72,8 @@ B_PREDICTION_MODE vp9_find_dominant_direction(
} }
} }
#elif CONTEXT_PRED_REPLACEMENTS == 4 #elif CONTEXT_PRED_REPLACEMENTS == 4
B_PREDICTION_MODE vp9_find_dominant_direction( B_PREDICTION_MODE vp9_find_dominant_direction(uint8_t *ptr,
unsigned char *ptr, int stride, int n) { int stride, int n) {
int g[8], i, imin, imax; int g[8], i, imin, imax;
g[1] = find_grad_measure(ptr, stride, n, 4, 2, 1); g[1] = find_grad_measure(ptr, stride, n, 4, 2, 1);
g[3] = find_grad_measure(ptr, stride, n, 4, 1, 2); g[3] = find_grad_measure(ptr, stride, n, 4, 1, 2);
@ -103,8 +103,8 @@ B_PREDICTION_MODE vp9_find_dominant_direction(
} }
} }
#elif CONTEXT_PRED_REPLACEMENTS == 0 #elif CONTEXT_PRED_REPLACEMENTS == 0
B_PREDICTION_MODE vp9_find_dominant_direction( B_PREDICTION_MODE vp9_find_dominant_direction(uint8_t *ptr,
unsigned char *ptr, int stride, int n) { int stride, int n) {
int g[8], i, imin, imax; int g[8], i, imin, imax;
g[0] = find_grad_measure(ptr, stride, n, 4, 1, 0); g[0] = find_grad_measure(ptr, stride, n, 4, 1, 0);
g[1] = find_grad_measure(ptr, stride, n, 4, 2, 1); g[1] = find_grad_measure(ptr, stride, n, 4, 2, 1);
@ -145,7 +145,7 @@ B_PREDICTION_MODE vp9_find_dominant_direction(
#endif #endif
B_PREDICTION_MODE vp9_find_bpred_context(BLOCKD *x) { B_PREDICTION_MODE vp9_find_bpred_context(BLOCKD *x) {
unsigned char *ptr = *(x->base_dst) + x->dst; uint8_t *ptr = *(x->base_dst) + x->dst;
int stride = x->dst_stride; int stride = x->dst_stride;
return vp9_find_dominant_direction(ptr, stride, 4); return vp9_find_dominant_direction(ptr, stride, 4);
} }
@ -153,12 +153,12 @@ B_PREDICTION_MODE vp9_find_bpred_context(BLOCKD *x) {
void vp9_intra4x4_predict(BLOCKD *x, void vp9_intra4x4_predict(BLOCKD *x,
int b_mode, int b_mode,
unsigned char *predictor) { uint8_t *predictor) {
int i, r, c; int i, r, c;
unsigned char *above = *(x->base_dst) + x->dst - x->dst_stride; uint8_t *above = *(x->base_dst) + x->dst - x->dst_stride;
unsigned char left[4]; uint8_t left[4];
unsigned char top_left = above[-1]; uint8_t top_left = above[-1];
left[0] = (*(x->base_dst))[x->dst - 1]; left[0] = (*(x->base_dst))[x->dst - 1];
left[1] = (*(x->base_dst))[x->dst - 1 + x->dst_stride]; left[1] = (*(x->base_dst))[x->dst - 1 + x->dst_stride];
@ -203,8 +203,8 @@ void vp9_intra4x4_predict(BLOCKD *x,
break; break;
case B_VE_PRED: { case B_VE_PRED: {
unsigned int ap[4]; unsigned int ap[4];
ap[0] = above[0]; ap[0] = above[0];
ap[1] = above[1]; ap[1] = above[1];
ap[2] = above[2]; ap[2] = above[2];
@ -212,20 +212,17 @@ void vp9_intra4x4_predict(BLOCKD *x,
for (r = 0; r < 4; r++) { for (r = 0; r < 4; r++) {
for (c = 0; c < 4; c++) { for (c = 0; c < 4; c++) {
predictor[c] = ap[c]; predictor[c] = ap[c];
} }
predictor += 16; predictor += 16;
} }
} }
break; break;
case B_HE_PRED: { case B_HE_PRED: {
unsigned int lp[4]; unsigned int lp[4];
lp[0] = left[0]; lp[0] = left[0];
lp[1] = left[1]; lp[1] = left[1];
lp[2] = left[2]; lp[2] = left[2];
@ -241,7 +238,8 @@ void vp9_intra4x4_predict(BLOCKD *x,
} }
break; break;
case B_LD_PRED: { case B_LD_PRED: {
unsigned char *ptr = above; uint8_t *ptr = above;
predictor[0 * 16 + 0] = (ptr[0] + ptr[1] * 2 + ptr[2] + 2) >> 2; predictor[0 * 16 + 0] = (ptr[0] + ptr[1] * 2 + ptr[2] + 2) >> 2;
predictor[0 * 16 + 1] = predictor[0 * 16 + 1] =
predictor[1 * 16 + 0] = (ptr[1] + ptr[2] * 2 + ptr[3] + 2) >> 2; predictor[1 * 16 + 0] = (ptr[1] + ptr[2] * 2 + ptr[3] + 2) >> 2;
@ -262,8 +260,7 @@ void vp9_intra4x4_predict(BLOCKD *x,
} }
break; break;
case B_RD_PRED: { case B_RD_PRED: {
uint8_t pp[9];
unsigned char pp[9];
pp[0] = left[3]; pp[0] = left[3];
pp[1] = left[2]; pp[1] = left[2];
@ -295,8 +292,7 @@ void vp9_intra4x4_predict(BLOCKD *x,
} }
break; break;
case B_VR_PRED: { case B_VR_PRED: {
uint8_t pp[9];
unsigned char pp[9];
pp[0] = left[3]; pp[0] = left[3];
pp[1] = left[2]; pp[1] = left[2];
@ -308,7 +304,6 @@ void vp9_intra4x4_predict(BLOCKD *x,
pp[7] = above[2]; pp[7] = above[2];
pp[8] = above[3]; pp[8] = above[3];
predictor[3 * 16 + 0] = (pp[1] + pp[2] * 2 + pp[3] + 2) >> 2; predictor[3 * 16 + 0] = (pp[1] + pp[2] * 2 + pp[3] + 2) >> 2;
predictor[2 * 16 + 0] = (pp[2] + pp[3] * 2 + pp[4] + 2) >> 2; predictor[2 * 16 + 0] = (pp[2] + pp[3] * 2 + pp[4] + 2) >> 2;
predictor[3 * 16 + 1] = predictor[3 * 16 + 1] =
@ -329,8 +324,7 @@ void vp9_intra4x4_predict(BLOCKD *x,
} }
break; break;
case B_VL_PRED: { case B_VL_PRED: {
uint8_t *pp = above;
unsigned char *pp = above;
predictor[0 * 16 + 0] = (pp[0] + pp[1] + 1) >> 1; predictor[0 * 16 + 0] = (pp[0] + pp[1] + 1) >> 1;
predictor[1 * 16 + 0] = (pp[0] + pp[1] * 2 + pp[2] + 2) >> 2; predictor[1 * 16 + 0] = (pp[0] + pp[1] * 2 + pp[2] + 2) >> 2;
@ -352,7 +346,8 @@ void vp9_intra4x4_predict(BLOCKD *x,
break; break;
case B_HD_PRED: { case B_HD_PRED: {
unsigned char pp[9]; uint8_t pp[9];
pp[0] = left[3]; pp[0] = left[3];
pp[1] = left[2]; pp[1] = left[2];
pp[2] = left[1]; pp[2] = left[1];
@ -385,7 +380,7 @@ void vp9_intra4x4_predict(BLOCKD *x,
case B_HU_PRED: { case B_HU_PRED: {
unsigned char *pp = left; uint8_t *pp = left;
predictor[0 * 16 + 0] = (pp[0] + pp[1] + 1) >> 1; predictor[0 * 16 + 0] = (pp[0] + pp[1] + 1) >> 1;
predictor[0 * 16 + 1] = (pp[0] + pp[1] * 2 + pp[2] + 2) >> 2; predictor[0 * 16 + 1] = (pp[0] + pp[1] * 2 + pp[2] + 2) >> 2;
predictor[0 * 16 + 2] = predictor[0 * 16 + 2] =
@ -419,9 +414,9 @@ void vp9_intra4x4_predict(BLOCKD *x,
#if CONFIG_COMP_INTRA_PRED #if CONFIG_COMP_INTRA_PRED
void vp9_comp_intra4x4_predict_c(BLOCKD *x, void vp9_comp_intra4x4_predict_c(BLOCKD *x,
int b_mode, int b_mode2, int b_mode, int b_mode2,
unsigned char *out_predictor) { uint8_t *out_predictor) {
unsigned char predictor[2][4 * 16]; uint8_t predictor[2][4 * 16];
int i, j; int i, j;
vp9_intra4x4_predict(x, b_mode, predictor[0]); vp9_intra4x4_predict(x, b_mode, predictor[0]);
@ -440,18 +435,18 @@ void vp9_comp_intra4x4_predict_c(BLOCKD *x,
*/ */
void vp9_intra_prediction_down_copy(MACROBLOCKD *xd) { void vp9_intra_prediction_down_copy(MACROBLOCKD *xd) {
int extend_edge = (xd->mb_to_right_edge == 0 && xd->mb_index < 2); int extend_edge = (xd->mb_to_right_edge == 0 && xd->mb_index < 2);
unsigned char *above_right = *(xd->block[0].base_dst) + xd->block[0].dst - uint8_t *above_right = *(xd->block[0].base_dst) + xd->block[0].dst -
xd->block[0].dst_stride + 16; xd->block[0].dst_stride + 16;
unsigned int *src_ptr = (unsigned int *) uint32_t *src_ptr = (uint32_t *)
(above_right - (xd->mb_index == 3 ? 16 * xd->block[0].dst_stride : 0)); (above_right - (xd->mb_index == 3 ? 16 * xd->block[0].dst_stride : 0));
unsigned int *dst_ptr0 = (unsigned int *)above_right; uint32_t *dst_ptr0 = (uint32_t *)above_right;
unsigned int *dst_ptr1 = uint32_t *dst_ptr1 =
(unsigned int *)(above_right + 4 * xd->block[0].dst_stride); (uint32_t *)(above_right + 4 * xd->block[0].dst_stride);
unsigned int *dst_ptr2 = uint32_t *dst_ptr2 =
(unsigned int *)(above_right + 8 * xd->block[0].dst_stride); (uint32_t *)(above_right + 8 * xd->block[0].dst_stride);
unsigned int *dst_ptr3 = uint32_t *dst_ptr3 =
(unsigned int *)(above_right + 12 * xd->block[0].dst_stride); (uint32_t *)(above_right + 12 * xd->block[0].dst_stride);
if (extend_edge) { if (extend_edge) {
*src_ptr = ((uint8_t *) src_ptr)[-1] * 0x01010101U; *src_ptr = ((uint8_t *) src_ptr)[-1] * 0x01010101U;

View File

@ -14,4 +14,4 @@
extern void vp9_intra_prediction_down_copy(MACROBLOCKD *xd); extern void vp9_intra_prediction_down_copy(MACROBLOCKD *xd);
#endif #endif // VP9_COMMON_VP9_RECONINTRA4X4_H_

View File

@ -4,6 +4,8 @@ cat <<EOF
* VP9 * VP9
*/ */
#include "vpx/vpx_integer.h"
struct loop_filter_info; struct loop_filter_info;
struct blockd; struct blockd;
struct macroblockd; struct macroblockd;
@ -21,10 +23,10 @@ EOF
} }
forward_decls vp9_common_forward_decls forward_decls vp9_common_forward_decls
prototype void vp9_filter_block2d_4x4_8 "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" prototype void vp9_filter_block2d_4x4_8 "const uint8_t *src_ptr, const unsigned int src_stride, const int16_t *HFilter_aligned16, const int16_t *VFilter_aligned16, uint8_t *dst_ptr, unsigned int dst_stride"
prototype void vp9_filter_block2d_8x4_8 "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" prototype void vp9_filter_block2d_8x4_8 "const uint8_t *src_ptr, const unsigned int src_stride, const int16_t *HFilter_aligned16, const int16_t *VFilter_aligned16, uint8_t *dst_ptr, unsigned int dst_stride"
prototype void vp9_filter_block2d_8x8_8 "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" prototype void vp9_filter_block2d_8x8_8 "const uint8_t *src_ptr, const unsigned int src_stride, const int16_t *HFilter_aligned16, const int16_t *VFilter_aligned16, uint8_t *dst_ptr, unsigned int dst_stride"
prototype void vp9_filter_block2d_16x16_8 "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" prototype void vp9_filter_block2d_16x16_8 "const uint8_t *src_ptr, const unsigned int src_stride, const int16_t *HFilter_aligned16, const int16_t *VFilter_aligned16, uint8_t *dst_ptr, unsigned int dst_stride"
# At the very least, MSVC 2008 has compiler bug exhibited by this code; code # At the very least, MSVC 2008 has compiler bug exhibited by this code; code
# compiles warning free but a dissassembly of generated code show bugs. To be # compiles warning free but a dissassembly of generated code show bugs. To be
@ -45,70 +47,70 @@ specialize vp9_dequantize_b mmx
prototype void vp9_dequantize_b_2x2 "struct blockd *x" prototype void vp9_dequantize_b_2x2 "struct blockd *x"
specialize vp9_dequantize_b_2x2 specialize vp9_dequantize_b_2x2
prototype void vp9_dequant_dc_idct_add_y_block_8x8 "short *q, const short *dq, unsigned char *pre, unsigned char *dst, int stride, unsigned short *eobs, const short *dc, struct macroblockd *xd" prototype void vp9_dequant_dc_idct_add_y_block_8x8 "int16_t *q, const int16_t *dq, uint8_t *pre, uint8_t *dst, int stride, uint16_t *eobs, const int16_t *dc, struct macroblockd *xd"
specialize vp9_dequant_dc_idct_add_y_block_8x8 specialize vp9_dequant_dc_idct_add_y_block_8x8
prototype void vp9_dequant_idct_add_y_block_8x8 "short *q, const short *dq, unsigned char *pre, unsigned char *dst, int stride, unsigned short *eobs, struct macroblockd *xd" prototype void vp9_dequant_idct_add_y_block_8x8 "int16_t *q, const int16_t *dq, uint8_t *pre, uint8_t *dst, int stride, uint16_t *eobs, struct macroblockd *xd"
specialize vp9_dequant_idct_add_y_block_8x8 specialize vp9_dequant_idct_add_y_block_8x8
prototype void vp9_dequant_idct_add_uv_block_8x8 "short *q, const short *dq, unsigned char *pre, unsigned char *dstu, unsigned char *dstv, int stride, unsigned short *eobs, struct macroblockd *xd" prototype void vp9_dequant_idct_add_uv_block_8x8 "int16_t *q, const int16_t *dq, uint8_t *pre, uint8_t *dstu, uint8_t *dstv, int stride, uint16_t *eobs, struct macroblockd *xd"
specialize vp9_dequant_idct_add_uv_block_8x8 specialize vp9_dequant_idct_add_uv_block_8x8
prototype void vp9_dequant_idct_add_16x16 "short *input, const short *dq, unsigned char *pred, unsigned char *dest, int pitch, int stride, unsigned short eobs" prototype void vp9_dequant_idct_add_16x16 "int16_t *input, const int16_t *dq, uint8_t *pred, uint8_t *dest, int pitch, int stride, int eob"
specialize vp9_dequant_idct_add_16x16 specialize vp9_dequant_idct_add_16x16
prototype void vp9_dequant_idct_add_8x8 "short *input, const short *dq, unsigned char *pred, unsigned char *dest, int pitch, int stride, int dc, unsigned short eobs" prototype void vp9_dequant_idct_add_8x8 "int16_t *input, const int16_t *dq, uint8_t *pred, uint8_t *dest, int pitch, int stride, int dc, int eob"
specialize vp9_dequant_idct_add_8x8 specialize vp9_dequant_idct_add_8x8
prototype void vp9_dequant_idct_add "short *input, const short *dq, unsigned char *pred, unsigned char *dest, int pitch, int stride" prototype void vp9_dequant_idct_add "int16_t *input, const int16_t *dq, uint8_t *pred, uint8_t *dest, int pitch, int stride"
specialize vp9_dequant_idct_add specialize vp9_dequant_idct_add
prototype void vp9_dequant_dc_idct_add "short *input, const short *dq, unsigned char *pred, unsigned char *dest, int pitch, int stride, int Dc" prototype void vp9_dequant_dc_idct_add "int16_t *input, const int16_t *dq, uint8_t *pred, uint8_t *dest, int pitch, int stride, int dc"
specialize vp9_dequant_dc_idct_add specialize vp9_dequant_dc_idct_add
prototype void vp9_dequant_dc_idct_add_y_block "short *q, const short *dq, unsigned char *pre, unsigned char *dst, int stride, unsigned short *eobs, const short *dc" prototype void vp9_dequant_dc_idct_add_y_block "int16_t *q, const int16_t *dq, uint8_t *pre, uint8_t *dst, int stride, uint16_t *eobs, const int16_t *dcs"
specialize vp9_dequant_dc_idct_add_y_block mmx specialize vp9_dequant_dc_idct_add_y_block mmx
prototype void vp9_dequant_idct_add_y_block "short *q, const short *dq, unsigned char *pre, unsigned char *dst, int stride, unsigned short *eobs" prototype void vp9_dequant_idct_add_y_block "int16_t *q, const int16_t *dq, uint8_t *pre, uint8_t *dst, int stride, uint16_t *eobs"
specialize vp9_dequant_idct_add_y_block mmx specialize vp9_dequant_idct_add_y_block mmx
prototype void vp9_dequant_idct_add_uv_block "short *q, const short *dq, unsigned char *pre, unsigned char *dstu, unsigned char *dstv, int stride, unsigned short *eobs" prototype void vp9_dequant_idct_add_uv_block "int16_t *q, const int16_t *dq, uint8_t *pre, uint8_t *dstu, uint8_t *dstv, int stride, uint16_t *eobs"
specialize vp9_dequant_idct_add_uv_block mmx specialize vp9_dequant_idct_add_uv_block mmx
# #
# RECON # RECON
# #
prototype void vp9_copy_mem16x16 "unsigned char *src, int src_pitch, unsigned char *dst, int dst_pitch" prototype void vp9_copy_mem16x16 "uint8_t *src, int src_pitch, uint8_t *dst, int dst_pitch"
specialize vp9_copy_mem16x16 mmx sse2 dspr2 specialize vp9_copy_mem16x16 mmx sse2 dspr2
vp9_copy_mem16x16_dspr2=vp9_copy_mem16x16_dspr2 vp9_copy_mem16x16_dspr2=vp9_copy_mem16x16_dspr2
prototype void vp9_copy_mem8x8 "unsigned char *src, int src_pitch, unsigned char *dst, int dst_pitch" prototype void vp9_copy_mem8x8 "uint8_t *src, int src_pitch, uint8_t *dst, int dst_pitch"
specialize vp9_copy_mem8x8 mmx dspr2 specialize vp9_copy_mem8x8 mmx dspr2
vp9_copy_mem8x8_dspr2=vp9_copy_mem8x8_dspr2 vp9_copy_mem8x8_dspr2=vp9_copy_mem8x8_dspr2
prototype void vp9_copy_mem8x4 "unsigned char *src, int src_pitch, unsigned char *dst, int dst_pitch" prototype void vp9_copy_mem8x4 "uint8_t *src, int src_pitch, uint8_t *dst, int dst_pitch"
specialize vp9_copy_mem8x4 mmx specialize vp9_copy_mem8x4 mmx
prototype void vp9_avg_mem16x16 "unsigned char *src, int src_pitch, unsigned char *dst, int dst_pitch" prototype void vp9_avg_mem16x16 "uint8_t *src, int src_pitch, uint8_t *dst, int dst_pitch"
specialize vp9_avg_mem16x16 specialize vp9_avg_mem16x16
prototype void vp9_avg_mem8x8 "unsigned char *src, int src_pitch, unsigned char *dst, int dst_pitch" prototype void vp9_avg_mem8x8 "uint8_t *src, int src_pitch, uint8_t *dst, int dst_pitch"
specialize vp9_avg_mem8x8 specialize vp9_avg_mem8x8
prototype void vp9_copy_mem8x4 "unsigned char *src, int src_pitch, unsigned char *dst, int dst_pitch" prototype void vp9_copy_mem8x4 "uint8_t *src, int src_pitch, uint8_t *dst, int dst_pitch"
specialize vp9_copy_mem8x4 mmx dspr2 specialize vp9_copy_mem8x4 mmx dspr2
vp9_copy_mem8x4_dspr2=vp9_copy_mem8x4_dspr2 vp9_copy_mem8x4_dspr2=vp9_copy_mem8x4_dspr2
prototype void vp9_recon_b "unsigned char *pred_ptr, short *diff_ptr, unsigned char *dst_ptr, int stride" prototype void vp9_recon_b "uint8_t *pred_ptr, int16_t *diff_ptr, uint8_t *dst_ptr, int stride"
specialize vp9_recon_b specialize vp9_recon_b
prototype void vp9_recon_uv_b "unsigned char *pred_ptr, short *diff_ptr, unsigned char *dst_ptr, int stride" prototype void vp9_recon_uv_b "uint8_t *pred_ptr, int16_t *diff_ptr, uint8_t *dst_ptr, int stride"
specialize vp9_recon_uv_b specialize vp9_recon_uv_b
prototype void vp9_recon2b "unsigned char *pred_ptr, short *diff_ptr, unsigned char *dst_ptr, int stride" prototype void vp9_recon2b "uint8_t *pred_ptr, int16_t *diff_ptr, uint8_t *dst_ptr, int stride"
specialize vp9_recon2b sse2 specialize vp9_recon2b sse2
prototype void vp9_recon4b "unsigned char *pred_ptr, short *diff_ptr, unsigned char *dst_ptr, int stride" prototype void vp9_recon4b "uint8_t *pred_ptr, int16_t *diff_ptr, uint8_t *dst_ptr, int stride"
specialize vp9_recon4b sse2 specialize vp9_recon4b sse2
prototype void vp9_recon_mb "struct macroblockd *x" prototype void vp9_recon_mb "struct macroblockd *x"
@ -117,10 +119,10 @@ specialize vp9_recon_mb
prototype void vp9_recon_mby "struct macroblockd *x" prototype void vp9_recon_mby "struct macroblockd *x"
specialize vp9_recon_mby specialize vp9_recon_mby
prototype void vp9_recon_mby_s "struct macroblockd *x, unsigned char *dst" prototype void vp9_recon_mby_s "struct macroblockd *x, uint8_t *dst"
specialize vp9_recon_mby_s specialize vp9_recon_mby_s
prototype void vp9_recon_mbuv_s "struct macroblockd *x, unsigned char *udst, unsigned char *vdst" prototype void vp9_recon_mbuv_s "struct macroblockd *x, uint8_t *udst, uint8_t *vdst"
specialize void vp9_recon_mbuv_s specialize void vp9_recon_mbuv_s
prototype void vp9_build_intra_predictors_mby_s "struct macroblockd *x" prototype void vp9_build_intra_predictors_mby_s "struct macroblockd *x"
@ -150,64 +152,64 @@ specialize vp9_build_intra_predictors_mbuv_s;
prototype void vp9_build_comp_intra_predictors_mbuv "struct macroblockd *x" prototype void vp9_build_comp_intra_predictors_mbuv "struct macroblockd *x"
specialize vp9_build_comp_intra_predictors_mbuv; specialize vp9_build_comp_intra_predictors_mbuv;
prototype void vp9_intra4x4_predict "struct blockd *x, int b_mode, unsigned char *predictor" prototype void vp9_intra4x4_predict "struct blockd *x, int b_mode, uint8_t *predictor"
specialize vp9_intra4x4_predict; specialize vp9_intra4x4_predict;
prototype void vp9_comp_intra4x4_predict "struct blockd *x, int b_mode, int second_mode, unsigned char *predictor" prototype void vp9_comp_intra4x4_predict "struct blockd *x, int b_mode, int second_mode, uint8_t *predictor"
specialize vp9_comp_intra4x4_predict; specialize vp9_comp_intra4x4_predict;
prototype void vp9_intra8x8_predict "struct blockd *x, int b_mode, unsigned char *predictor" prototype void vp9_intra8x8_predict "struct blockd *x, int b_mode, uint8_t *predictor"
specialize vp9_intra8x8_predict; specialize vp9_intra8x8_predict;
prototype void vp9_comp_intra8x8_predict "struct blockd *x, int b_mode, int second_mode, unsigned char *predictor" prototype void vp9_comp_intra8x8_predict "struct blockd *x, int b_mode, int second_mode, uint8_t *predictor"
specialize vp9_comp_intra8x8_predict; specialize vp9_comp_intra8x8_predict;
prototype void vp9_intra_uv4x4_predict "struct blockd *x, int b_mode, unsigned char *predictor" prototype void vp9_intra_uv4x4_predict "struct blockd *x, int b_mode, uint8_t *predictor"
specialize vp9_intra_uv4x4_predict; specialize vp9_intra_uv4x4_predict;
prototype void vp9_comp_intra_uv4x4_predict "struct blockd *x, int b_mode, int second_mode, unsigned char *predictor" prototype void vp9_comp_intra_uv4x4_predict "struct blockd *x, int b_mode, int second_mode, uint8_t *predictor"
specialize vp9_comp_intra_uv4x4_predict; specialize vp9_comp_intra_uv4x4_predict;
# #
# Loopfilter # Loopfilter
# #
prototype void vp9_loop_filter_mbv "unsigned char *y, unsigned char *u, unsigned char *v, int ystride, int uv_stride, struct loop_filter_info *lfi" prototype void vp9_loop_filter_mbv "uint8_t *y, uint8_t *u, uint8_t *v, int ystride, int uv_stride, struct loop_filter_info *lfi"
specialize vp9_loop_filter_mbv sse2 specialize vp9_loop_filter_mbv sse2
prototype void vp9_loop_filter_bv "unsigned char *y, unsigned char *u, unsigned char *v, int ystride, int uv_stride, struct loop_filter_info *lfi" prototype void vp9_loop_filter_bv "uint8_t *y, uint8_t *u, uint8_t *v, int ystride, int uv_stride, struct loop_filter_info *lfi"
specialize vp9_loop_filter_bv sse2 specialize vp9_loop_filter_bv sse2
prototype void vp9_loop_filter_bv8x8 "unsigned char *y, unsigned char *u, unsigned char *v, int ystride, int uv_stride, struct loop_filter_info *lfi" prototype void vp9_loop_filter_bv8x8 "uint8_t *y, uint8_t *u, uint8_t *v, int ystride, int uv_stride, struct loop_filter_info *lfi"
specialize vp9_loop_filter_bv8x8 sse2 specialize vp9_loop_filter_bv8x8 sse2
prototype void vp9_loop_filter_mbh "unsigned char *y, unsigned char *u, unsigned char *v, int ystride, int uv_stride, struct loop_filter_info *lfi" prototype void vp9_loop_filter_mbh "uint8_t *y, uint8_t *u, uint8_t *v, int ystride, int uv_stride, struct loop_filter_info *lfi"
specialize vp9_loop_filter_mbh sse2 specialize vp9_loop_filter_mbh sse2
prototype void vp9_loop_filter_bh "unsigned char *y, unsigned char *u, unsigned char *v, int ystride, int uv_stride, struct loop_filter_info *lfi" prototype void vp9_loop_filter_bh "uint8_t *y, uint8_t *u, uint8_t *v, int ystride, int uv_stride, struct loop_filter_info *lfi"
specialize vp9_loop_filter_bh sse2 specialize vp9_loop_filter_bh sse2
prototype void vp9_loop_filter_bh8x8 "unsigned char *y, unsigned char *u, unsigned char *v, int ystride, int uv_stride, struct loop_filter_info *lfi" prototype void vp9_loop_filter_bh8x8 "uint8_t *y, uint8_t *u, uint8_t *v, int ystride, int uv_stride, struct loop_filter_info *lfi"
specialize vp9_loop_filter_bh8x8 sse2 specialize vp9_loop_filter_bh8x8 sse2
prototype void vp9_loop_filter_simple_mbv "unsigned char *y, int ystride, const unsigned char *blimit" prototype void vp9_loop_filter_simple_mbv "uint8_t *y, int ystride, const uint8_t *blimit"
specialize vp9_loop_filter_simple_mbv mmx sse2 specialize vp9_loop_filter_simple_mbv mmx sse2
vp9_loop_filter_simple_mbv_c=vp9_loop_filter_simple_vertical_edge_c vp9_loop_filter_simple_mbv_c=vp9_loop_filter_simple_vertical_edge_c
vp9_loop_filter_simple_mbv_mmx=vp9_loop_filter_simple_vertical_edge_mmx vp9_loop_filter_simple_mbv_mmx=vp9_loop_filter_simple_vertical_edge_mmx
vp9_loop_filter_simple_mbv_sse2=vp9_loop_filter_simple_vertical_edge_sse2 vp9_loop_filter_simple_mbv_sse2=vp9_loop_filter_simple_vertical_edge_sse2
prototype void vp9_loop_filter_simple_mbh "unsigned char *y, int ystride, const unsigned char *blimit" prototype void vp9_loop_filter_simple_mbh "uint8_t *y, int ystride, const uint8_t *blimit"
specialize vp9_loop_filter_simple_mbh mmx sse2 specialize vp9_loop_filter_simple_mbh mmx sse2
vp9_loop_filter_simple_mbh_c=vp9_loop_filter_simple_horizontal_edge_c vp9_loop_filter_simple_mbh_c=vp9_loop_filter_simple_horizontal_edge_c
vp9_loop_filter_simple_mbh_mmx=vp9_loop_filter_simple_horizontal_edge_mmx vp9_loop_filter_simple_mbh_mmx=vp9_loop_filter_simple_horizontal_edge_mmx
vp9_loop_filter_simple_mbh_sse2=vp9_loop_filter_simple_horizontal_edge_sse2 vp9_loop_filter_simple_mbh_sse2=vp9_loop_filter_simple_horizontal_edge_sse2
prototype void vp9_loop_filter_simple_bv "unsigned char *y, int ystride, const unsigned char *blimit" prototype void vp9_loop_filter_simple_bv "uint8_t *y, int ystride, const uint8_t *blimit"
specialize vp9_loop_filter_simple_bv mmx sse2 specialize vp9_loop_filter_simple_bv mmx sse2
vp9_loop_filter_simple_bv_c=vp9_loop_filter_bvs_c vp9_loop_filter_simple_bv_c=vp9_loop_filter_bvs_c
vp9_loop_filter_simple_bv_mmx=vp9_loop_filter_bvs_mmx vp9_loop_filter_simple_bv_mmx=vp9_loop_filter_bvs_mmx
vp9_loop_filter_simple_bv_sse2=vp9_loop_filter_bvs_sse2 vp9_loop_filter_simple_bv_sse2=vp9_loop_filter_bvs_sse2
prototype void vp9_loop_filter_simple_bh "unsigned char *y, int ystride, const unsigned char *blimit" prototype void vp9_loop_filter_simple_bh "uint8_t *y, int ystride, const uint8_t *blimit"
specialize vp9_loop_filter_simple_bh mmx sse2 specialize vp9_loop_filter_simple_bh mmx sse2
vp9_loop_filter_simple_bh_c=vp9_loop_filter_bhs_c vp9_loop_filter_simple_bh_c=vp9_loop_filter_bhs_c
vp9_loop_filter_simple_bh_mmx=vp9_loop_filter_bhs_mmx vp9_loop_filter_simple_bh_mmx=vp9_loop_filter_bhs_mmx
@ -216,190 +218,190 @@ vp9_loop_filter_simple_bh_sse2=vp9_loop_filter_bhs_sse2
# #
# post proc # post proc
# #
prototype void vp9_mbpost_proc_down "unsigned char *dst, int pitch, int rows, int cols, int flimit" prototype void vp9_mbpost_proc_down "uint8_t *dst, int pitch, int rows, int cols, int flimit"
specialize vp9_mbpost_proc_down mmx sse2 specialize vp9_mbpost_proc_down mmx sse2
vp9_mbpost_proc_down_sse2=vp9_mbpost_proc_down_xmm vp9_mbpost_proc_down_sse2=vp9_mbpost_proc_down_xmm
prototype void vp9_mbpost_proc_across_ip "unsigned char *src, int pitch, int rows, int cols, int flimit" prototype void vp9_mbpost_proc_across_ip "uint8_t *src, int pitch, int rows, int cols, int flimit"
specialize vp9_mbpost_proc_across_ip sse2 specialize vp9_mbpost_proc_across_ip sse2
vp9_mbpost_proc_across_ip_sse2=vp9_mbpost_proc_across_ip_xmm vp9_mbpost_proc_across_ip_sse2=vp9_mbpost_proc_across_ip_xmm
prototype void vp9_post_proc_down_and_across "unsigned char *src_ptr, unsigned char *dst_ptr, int src_pixels_per_line, int dst_pixels_per_line, int rows, int cols, int flimit" prototype void vp9_post_proc_down_and_across "uint8_t *src_ptr, uint8_t *dst_ptr, int src_pixels_per_line, int dst_pixels_per_line, int rows, int cols, int flimit"
specialize vp9_post_proc_down_and_across mmx sse2 specialize vp9_post_proc_down_and_across mmx sse2
vp9_post_proc_down_and_across_sse2=vp9_post_proc_down_and_across_xmm vp9_post_proc_down_and_across_sse2=vp9_post_proc_down_and_across_xmm
prototype void vp9_plane_add_noise "unsigned char *Start, char *noise, char blackclamp[16], char whiteclamp[16], char bothclamp[16], unsigned int Width, unsigned int Height, int Pitch" prototype void vp9_plane_add_noise "uint8_t *Start, char *noise, char blackclamp[16], char whiteclamp[16], char bothclamp[16], unsigned int Width, unsigned int Height, int Pitch"
specialize vp9_plane_add_noise mmx sse2 specialize vp9_plane_add_noise mmx sse2
vp9_plane_add_noise_sse2=vp9_plane_add_noise_wmt vp9_plane_add_noise_sse2=vp9_plane_add_noise_wmt
prototype void vp9_blend_mb_inner "unsigned char *y, unsigned char *u, unsigned char *v, int y1, int u1, int v1, int alpha, int stride" prototype void vp9_blend_mb_inner "uint8_t *y, uint8_t *u, uint8_t *v, int y1, int u1, int v1, int alpha, int stride"
specialize vp9_blend_mb_inner specialize vp9_blend_mb_inner
prototype void vp9_blend_mb_outer "unsigned char *y, unsigned char *u, unsigned char *v, int y1, int u1, int v1, int alpha, int stride" prototype void vp9_blend_mb_outer "uint8_t *y, uint8_t *u, uint8_t *v, int y1, int u1, int v1, int alpha, int stride"
specialize vp9_blend_mb_outer specialize vp9_blend_mb_outer
prototype void vp9_blend_b "unsigned char *y, unsigned char *u, unsigned char *v, int y1, int u1, int v1, int alpha, int stride" prototype void vp9_blend_b "uint8_t *y, uint8_t *u, uint8_t *v, int y1, int u1, int v1, int alpha, int stride"
specialize vp9_blend_b specialize vp9_blend_b
# #
# sad 16x3, 3x16 # sad 16x3, 3x16
# #
prototype unsigned int vp9_sad16x3 "const unsigned char *src_ptr, int src_stride, const unsigned char *ref_ptr, int ref_stride" prototype unsigned int vp9_sad16x3 "const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride"
specialize vp9_sad16x3 sse2 specialize vp9_sad16x3 sse2
prototype unsigned int vp9_sad3x16 "const unsigned char *src_ptr, int src_stride, const unsigned char *ref_ptr, int ref_stride" prototype unsigned int vp9_sad3x16 "const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride"
specialize vp9_sad3x16 sse2 specialize vp9_sad3x16 sse2
# #
# Sub Pixel Filters # Sub Pixel Filters
# #
prototype void vp9_eighttap_predict16x16 "unsigned char *src_ptr, int src_pixels_per_line, int xoffset, int yoffset, unsigned char *dst_ptr, int dst_pitch" prototype void vp9_eighttap_predict16x16 "uint8_t *src_ptr, int src_pixels_per_line, int xoffset, int yoffset, uint8_t *dst_ptr, int dst_pitch"
specialize vp9_eighttap_predict16x16 specialize vp9_eighttap_predict16x16
prototype void vp9_eighttap_predict8x8 "unsigned char *src_ptr, int src_pixels_per_line, int xoffset, int yoffset, unsigned char *dst_ptr, int dst_pitch" prototype void vp9_eighttap_predict8x8 "uint8_t *src_ptr, int src_pixels_per_line, int xoffset, int yoffset, uint8_t *dst_ptr, int dst_pitch"
specialize vp9_eighttap_predict8x8 specialize vp9_eighttap_predict8x8
prototype void vp9_eighttap_predict_avg16x16 "unsigned char *src_ptr, int src_pixels_per_line, int xoffset, int yoffset, unsigned char *dst_ptr, int dst_pitch" prototype void vp9_eighttap_predict_avg16x16 "uint8_t *src_ptr, int src_pixels_per_line, int xoffset, int yoffset, uint8_t *dst_ptr, int dst_pitch"
specialize vp9_eighttap_predict_avg16x16 specialize vp9_eighttap_predict_avg16x16
prototype void vp9_eighttap_predict_avg8x8 "unsigned char *src_ptr, int src_pixels_per_line, int xoffset, int yoffset, unsigned char *dst_ptr, int dst_pitch" prototype void vp9_eighttap_predict_avg8x8 "uint8_t *src_ptr, int src_pixels_per_line, int xoffset, int yoffset, uint8_t *dst_ptr, int dst_pitch"
specialize vp9_eighttap_predict_avg8x8 specialize vp9_eighttap_predict_avg8x8
prototype void vp9_eighttap_predict_avg4x4 "unsigned char *src_ptr, int src_pixels_per_line, int xoffset, int yoffset, unsigned char *dst_ptr, int dst_pitch" prototype void vp9_eighttap_predict_avg4x4 "uint8_t *src_ptr, int src_pixels_per_line, int xoffset, int yoffset, uint8_t *dst_ptr, int dst_pitch"
specialize vp9_eighttap_predict_avg4x4 specialize vp9_eighttap_predict_avg4x4
prototype void vp9_eighttap_predict8x4 "unsigned char *src_ptr, int src_pixels_per_line, int xoffset, int yoffset, unsigned char *dst_ptr, int dst_pitch" prototype void vp9_eighttap_predict8x4 "uint8_t *src_ptr, int src_pixels_per_line, int xoffset, int yoffset, uint8_t *dst_ptr, int dst_pitch"
specialize vp9_eighttap_predict8x4 specialize vp9_eighttap_predict8x4
prototype void vp9_eighttap_predict "unsigned char *src_ptr, int src_pixels_per_line, int xoffset, int yoffset, unsigned char *dst_ptr, int dst_pitch" prototype void vp9_eighttap_predict "uint8_t *src_ptr, int src_pixels_per_line, int xoffset, int yoffset, uint8_t *dst_ptr, int dst_pitch"
specialize vp9_eighttap_predict specialize vp9_eighttap_predict
prototype void vp9_eighttap_predict16x16_sharp "unsigned char *src_ptr, int src_pixels_per_line, int xoffset, int yoffset, unsigned char *dst_ptr, int dst_pitch" prototype void vp9_eighttap_predict16x16_sharp "uint8_t *src_ptr, int src_pixels_per_line, int xoffset, int yoffset, uint8_t *dst_ptr, int dst_pitch"
specialize vp9_eighttap_predict16x16_sharp specialize vp9_eighttap_predict16x16_sharp
prototype void vp9_eighttap_predict8x8_sharp "unsigned char *src_ptr, int src_pixels_per_line, int xoffset, int yoffset, unsigned char *dst_ptr, int dst_pitch" prototype void vp9_eighttap_predict8x8_sharp "uint8_t *src_ptr, int src_pixels_per_line, int xoffset, int yoffset, uint8_t *dst_ptr, int dst_pitch"
specialize vp9_eighttap_predict8x8_sharp specialize vp9_eighttap_predict8x8_sharp
prototype void vp9_eighttap_predict_avg16x16_sharp "unsigned char *src_ptr, int src_pixels_per_line, int xoffset, int yoffset, unsigned char *dst_ptr, int dst_pitch" prototype void vp9_eighttap_predict_avg16x16_sharp "uint8_t *src_ptr, int src_pixels_per_line, int xoffset, int yoffset, uint8_t *dst_ptr, int dst_pitch"
specialize vp9_eighttap_predict_avg16x16_sharp specialize vp9_eighttap_predict_avg16x16_sharp
prototype void vp9_eighttap_predict_avg8x8_sharp "unsigned char *src_ptr, int src_pixels_per_line, int xoffset, int yoffset, unsigned char *dst_ptr, int dst_pitch" prototype void vp9_eighttap_predict_avg8x8_sharp "uint8_t *src_ptr, int src_pixels_per_line, int xoffset, int yoffset, uint8_t *dst_ptr, int dst_pitch"
specialize vp9_eighttap_predict_avg8x8_sharp specialize vp9_eighttap_predict_avg8x8_sharp
prototype void vp9_eighttap_predict_avg4x4_sharp "unsigned char *src_ptr, int src_pixels_per_line, int xoffset, int yoffset, unsigned char *dst_ptr, int dst_pitch" prototype void vp9_eighttap_predict_avg4x4_sharp "uint8_t *src_ptr, int src_pixels_per_line, int xoffset, int yoffset, uint8_t *dst_ptr, int dst_pitch"
specialize vp9_eighttap_predict_avg4x4_sharp specialize vp9_eighttap_predict_avg4x4_sharp
prototype void vp9_eighttap_predict8x4_sharp "unsigned char *src_ptr, int src_pixels_per_line, int xoffset, int yoffset, unsigned char *dst_ptr, int dst_pitch" prototype void vp9_eighttap_predict8x4_sharp "uint8_t *src_ptr, int src_pixels_per_line, int xoffset, int yoffset, uint8_t *dst_ptr, int dst_pitch"
specialize vp9_eighttap_predict8x4_sharp specialize vp9_eighttap_predict8x4_sharp
prototype void vp9_eighttap_predict_sharp "unsigned char *src_ptr, int src_pixels_per_line, int xoffset, int yoffset, unsigned char *dst_ptr, int dst_pitch" prototype void vp9_eighttap_predict_sharp "uint8_t *src_ptr, int src_pixels_per_line, int xoffset, int yoffset, uint8_t *dst_ptr, int dst_pitch"
specialize vp9_eighttap_predict_sharp specialize vp9_eighttap_predict_sharp
prototype void vp9_sixtap_predict16x16 "unsigned char *src_ptr, int src_pixels_per_line, int xoffset, int yoffset, unsigned char *dst_ptr, int dst_pitch" prototype void vp9_sixtap_predict16x16 "uint8_t *src_ptr, int src_pixels_per_line, int xoffset, int yoffset, uint8_t *dst_ptr, int dst_pitch"
specialize vp9_sixtap_predict16x16 specialize vp9_sixtap_predict16x16
prototype void vp9_sixtap_predict8x8 "unsigned char *src_ptr, int src_pixels_per_line, int xoffset, int yoffset, unsigned char *dst_ptr, int dst_pitch" prototype void vp9_sixtap_predict8x8 "uint8_t *src_ptr, int src_pixels_per_line, int xoffset, int yoffset, uint8_t *dst_ptr, int dst_pitch"
specialize vp9_sixtap_predict8x8 specialize vp9_sixtap_predict8x8
prototype void vp9_sixtap_predict_avg16x16 "unsigned char *src_ptr, int src_pixels_per_line, int xoffset, int yoffset, unsigned char *dst_ptr, int dst_pitch" prototype void vp9_sixtap_predict_avg16x16 "uint8_t *src_ptr, int src_pixels_per_line, int xoffset, int yoffset, uint8_t *dst_ptr, int dst_pitch"
specialize vp9_sixtap_predict_avg16x16 specialize vp9_sixtap_predict_avg16x16
prototype void vp9_sixtap_predict_avg8x8 "unsigned char *src_ptr, int src_pixels_per_line, int xoffset, int yoffset, unsigned char *dst_ptr, int dst_pitch" prototype void vp9_sixtap_predict_avg8x8 "uint8_t *src_ptr, int src_pixels_per_line, int xoffset, int yoffset, uint8_t *dst_ptr, int dst_pitch"
specialize vp9_sixtap_predict_avg8x8 specialize vp9_sixtap_predict_avg8x8
prototype void vp9_sixtap_predict8x4 "unsigned char *src_ptr, int src_pixels_per_line, int xoffset, int yoffset, unsigned char *dst_ptr, int dst_pitch" prototype void vp9_sixtap_predict8x4 "uint8_t *src_ptr, int src_pixels_per_line, int xoffset, int yoffset, uint8_t *dst_ptr, int dst_pitch"
specialize vp9_sixtap_predict8x4 specialize vp9_sixtap_predict8x4
prototype void vp9_sixtap_predict "unsigned char *src_ptr, int src_pixels_per_line, int xoffset, int yoffset, unsigned char *dst_ptr, int dst_pitch" prototype void vp9_sixtap_predict "uint8_t *src_ptr, int src_pixels_per_line, int xoffset, int yoffset, uint8_t *dst_ptr, int dst_pitch"
specialize vp9_sixtap_predict specialize vp9_sixtap_predict
prototype void vp9_sixtap_predict_avg "unsigned char *src_ptr, int src_pixels_per_line, int xoffset, int yoffset, unsigned char *dst_ptr, int dst_pitch" prototype void vp9_sixtap_predict_avg "uint8_t *src_ptr, int src_pixels_per_line, int xoffset, int yoffset, uint8_t *dst_ptr, int dst_pitch"
specialize vp9_sixtap_predict_avg specialize vp9_sixtap_predict_avg
prototype void vp9_bilinear_predict16x16 "unsigned char *src_ptr, int src_pixels_per_line, int xoffset, int yoffset, unsigned char *dst_ptr, int dst_pitch" prototype void vp9_bilinear_predict16x16 "uint8_t *src_ptr, int src_pixels_per_line, int xoffset, int yoffset, uint8_t *dst_ptr, int dst_pitch"
specialize vp9_bilinear_predict16x16 mmx sse2 specialize vp9_bilinear_predict16x16 mmx sse2
prototype void vp9_bilinear_predict8x8 "unsigned char *src_ptr, int src_pixels_per_line, int xoffset, int yoffset, unsigned char *dst_ptr, int dst_pitch" prototype void vp9_bilinear_predict8x8 "uint8_t *src_ptr, int src_pixels_per_line, int xoffset, int yoffset, uint8_t *dst_ptr, int dst_pitch"
specialize vp9_bilinear_predict8x8 mmx sse2 specialize vp9_bilinear_predict8x8 mmx sse2
prototype void vp9_bilinear_predict_avg16x16 "unsigned char *src_ptr, int src_pixels_per_line, int xoffset, int yoffset, unsigned char *dst_ptr, int dst_pitch" prototype void vp9_bilinear_predict_avg16x16 "uint8_t *src_ptr, int src_pixels_per_line, int xoffset, int yoffset, uint8_t *dst_ptr, int dst_pitch"
specialize vp9_bilinear_predict_avg16x16 specialize vp9_bilinear_predict_avg16x16
prototype void vp9_bilinear_predict_avg8x8 "unsigned char *src_ptr, int src_pixels_per_line, int xoffset, int yoffset, unsigned char *dst_ptr, int dst_pitch" prototype void vp9_bilinear_predict_avg8x8 "uint8_t *src_ptr, int src_pixels_per_line, int xoffset, int yoffset, uint8_t *dst_ptr, int dst_pitch"
specialize vp9_bilinear_predict_avg8x8 specialize vp9_bilinear_predict_avg8x8
prototype void vp9_bilinear_predict8x4 "unsigned char *src_ptr, int src_pixels_per_line, int xoffset, int yoffset, unsigned char *dst_ptr, int dst_pitch" prototype void vp9_bilinear_predict8x4 "uint8_t *src_ptr, int src_pixels_per_line, int xoffset, int yoffset, uint8_t *dst_ptr, int dst_pitch"
specialize vp9_bilinear_predict8x4 mmx specialize vp9_bilinear_predict8x4 mmx
prototype void vp9_bilinear_predict4x4 "unsigned char *src_ptr, int src_pixels_per_line, int xoffset, int yoffset, unsigned char *dst_ptr, int dst_pitch" prototype void vp9_bilinear_predict4x4 "uint8_t *src_ptr, int src_pixels_per_line, int xoffset, int yoffset, uint8_t *dst_ptr, int dst_pitch"
specialize vp9_bilinear_predict4x4 mmx specialize vp9_bilinear_predict4x4 mmx
prototype void vp9_bilinear_predict_avg4x4 "unsigned char *src_ptr, int src_pixels_per_line, int xoffset, int yoffset, unsigned char *dst_ptr, int dst_pitch" prototype void vp9_bilinear_predict_avg4x4 "uint8_t *src_ptr, int src_pixels_per_line, int xoffset, int yoffset, uint8_t *dst_ptr, int dst_pitch"
specialize vp9_bilinear_predict_avg4x4 specialize vp9_bilinear_predict_avg4x4
# #
# dct # dct
# #
prototype void vp9_short_idct4x4llm_1 "short *input, short *output, int pitch" prototype void vp9_short_idct4x4llm_1 "int16_t *input, int16_t *output, int pitch"
specialize vp9_short_idct4x4llm_1 mmx specialize vp9_short_idct4x4llm_1 mmx
prototype void vp9_short_idct4x4llm "short *input, short *output, int pitch" prototype void vp9_short_idct4x4llm "int16_t *input, int16_t *output, int pitch"
specialize vp9_short_idct4x4llm mmx specialize vp9_short_idct4x4llm mmx
prototype void vp9_short_idct8x8 "short *input, short *output, int pitch" prototype void vp9_short_idct8x8 "int16_t *input, int16_t *output, int pitch"
specialize vp9_short_idct8x8 specialize vp9_short_idct8x8
prototype void vp9_short_idct10_8x8 "short *input, short *output, int pitch" prototype void vp9_short_idct10_8x8 "int16_t *input, int16_t *output, int pitch"
specialize vp9_short_idct10_8x8 specialize vp9_short_idct10_8x8
prototype void vp9_short_ihaar2x2 "short *input, short *output, int pitch" prototype void vp9_short_ihaar2x2 "int16_t *input, int16_t *output, int pitch"
specialize vp9_short_ihaar2x2 specialize vp9_short_ihaar2x2
prototype void vp9_short_idct16x16 "short *input, short *output, int pitch" prototype void vp9_short_idct16x16 "int16_t *input, int16_t *output, int pitch"
specialize vp9_short_idct16x16 specialize vp9_short_idct16x16
prototype void vp9_short_idct10_16x16 "short *input, short *output, int pitch" prototype void vp9_short_idct10_16x16 "int16_t *input, int16_t *output, int pitch"
specialize vp9_short_idct10_16x16 specialize vp9_short_idct10_16x16
prototype void vp9_short_idct32x32 "short *input, short *output, int pitch" prototype void vp9_short_idct32x32 "int16_t *input, int16_t *output, int pitch"
specialize vp9_short_idct32x32 specialize vp9_short_idct32x32
prototype void vp9_ihtllm "const short *input, short *output, int pitch, int tx_type, int tx_dim" prototype void vp9_ihtllm "const int16_t *input, int16_t *output, int pitch, int tx_type, int tx_dim"
specialize vp9_ihtllm specialize vp9_ihtllm
# #
# 2nd order # 2nd order
# #
prototype void vp9_short_inv_walsh4x4_1 "short *in, short *out" prototype void vp9_short_inv_walsh4x4_1 "int16_t *in, int16_t *out"
specialize vp9_short_inv_walsh4x4_1 specialize vp9_short_inv_walsh4x4_1
prototype void vp9_short_inv_walsh4x4 "short *in, short *out" prototype void vp9_short_inv_walsh4x4 "int16_t *in, int16_t *out"
specialize vp9_short_inv_walsh4x4_ specialize vp9_short_inv_walsh4x4_
# dct and add # dct and add
prototype void vp9_dc_only_idct_add_8x8 "short input_dc, unsigned char *pred_ptr, unsigned char *dst_ptr, int pitch, int stride" prototype void vp9_dc_only_idct_add_8x8 "int input_dc, uint8_t *pred_ptr, uint8_t *dst_ptr, int pitch, int stride"
specialize vp9_dc_only_idct_add_8x8 specialize vp9_dc_only_idct_add_8x8
prototype void vp9_dc_only_idct_add "short input_dc, unsigned char *pred_ptr, unsigned char *dst_ptr, int pitch, int stride" prototype void vp9_dc_only_idct_add "int input_dc, uint8_t *pred_ptr, uint8_t *dst_ptr, int pitch, int stride"
specialize vp9_dc_only_idct_add specialize vp9_dc_only_idct_add
if [ "$CONFIG_LOSSLESS" = "yes" ]; then if [ "$CONFIG_LOSSLESS" = "yes" ]; then
prototype void vp9_short_inv_walsh4x4_1_x8 "short *input, short *output, int pitch" prototype void vp9_short_inv_walsh4x4_1_x8 "int16_t *input, int16_t *output, int pitch"
prototype void vp9_short_inv_walsh4x4_x8 "short *input, short *output, int pitch" prototype void vp9_short_inv_walsh4x4_x8 "int16_t *input, int16_t *output, int pitch"
prototype void vp9_dc_only_inv_walsh_add "short input_dc, unsigned char *pred_ptr, unsigned char *dst_ptr, int pitch, int stride" prototype void vp9_dc_only_inv_walsh_add "int input_dc, uint8_t *pred_ptr, uint8_t *dst_ptr, int pitch, int stride"
prototype void vp9_short_inv_walsh4x4_1_lossless "short *in, short *out" prototype void vp9_short_inv_walsh4x4_1_lossless "int16_t *in, int16_t *out"
prototype void vp9_short_inv_walsh4x4_lossless "short *in, short *out" prototype void vp9_short_inv_walsh4x4_lossless "int16_t *in, int16_t *out"
fi fi
if [ "$CONFIG_SUPERBLOCKS" = "yes" ]; then if [ "$CONFIG_SUPERBLOCKS" = "yes" ]; then
prototype unsigned int vp9_sad32x3 "const unsigned char *src_ptr, int src_stride, const unsigned char *ref_ptr, int ref_stride, int max_sad" prototype unsigned int vp9_sad32x3 "const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride, int max_sad"
specialize vp9_sad32x3 specialize vp9_sad32x3
prototype unsigned int vp9_sad3x32 "const unsigned char *src_ptr, int src_stride, const unsigned char *ref_ptr, int ref_stride, int max_sad" prototype unsigned int vp9_sad3x32 "const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride, int max_sad"
specialize vp9_sad3x32 specialize vp9_sad3x32
fi fi
@ -413,154 +415,154 @@ if [ "$CONFIG_VP9_ENCODER" = "yes" ]; then
# variance # variance
[ $arch = "x86_64" ] && mmx_x86_64=mmx && sse2_x86_64=sse2 [ $arch = "x86_64" ] && mmx_x86_64=mmx && sse2_x86_64=sse2
prototype unsigned int vp9_variance32x32 "const unsigned char *src_ptr, int source_stride, const unsigned char *ref_ptr, int ref_stride, unsigned int *sse" prototype unsigned int vp9_variance32x32 "const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int ref_stride, unsigned int *sse"
specialize vp9_variance32x32 specialize vp9_variance32x32
prototype unsigned int vp9_variance16x16 "const unsigned char *src_ptr, int source_stride, const unsigned char *ref_ptr, int ref_stride, unsigned int *sse" prototype unsigned int vp9_variance16x16 "const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int ref_stride, unsigned int *sse"
specialize vp9_variance16x16 mmx sse2 specialize vp9_variance16x16 mmx sse2
vp9_variance16x16_sse2=vp9_variance16x16_wmt vp9_variance16x16_sse2=vp9_variance16x16_wmt
vp9_variance16x16_mmx=vp9_variance16x16_mmx vp9_variance16x16_mmx=vp9_variance16x16_mmx
prototype unsigned int vp9_variance16x8 "const unsigned char *src_ptr, int source_stride, const unsigned char *ref_ptr, int ref_stride, unsigned int *sse" prototype unsigned int vp9_variance16x8 "const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int ref_stride, unsigned int *sse"
specialize vp9_variance16x8 mmx sse2 specialize vp9_variance16x8 mmx sse2
vp9_variance16x8_sse2=vp9_variance16x8_wmt vp9_variance16x8_sse2=vp9_variance16x8_wmt
vp9_variance16x8_mmx=vp9_variance16x8_mmx vp9_variance16x8_mmx=vp9_variance16x8_mmx
prototype unsigned int vp9_variance8x16 "const unsigned char *src_ptr, int source_stride, const unsigned char *ref_ptr, int ref_stride, unsigned int *sse" prototype unsigned int vp9_variance8x16 "const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int ref_stride, unsigned int *sse"
specialize vp9_variance8x16 mmx sse2 specialize vp9_variance8x16 mmx sse2
vp9_variance8x16_sse2=vp9_variance8x16_wmt vp9_variance8x16_sse2=vp9_variance8x16_wmt
vp9_variance8x16_mmx=vp9_variance8x16_mmx vp9_variance8x16_mmx=vp9_variance8x16_mmx
prototype unsigned int vp9_variance8x8 "const unsigned char *src_ptr, int source_stride, const unsigned char *ref_ptr, int ref_stride, unsigned int *sse" prototype unsigned int vp9_variance8x8 "const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int ref_stride, unsigned int *sse"
specialize vp9_variance8x8 mmx sse2 specialize vp9_variance8x8 mmx sse2
vp9_variance8x8_sse2=vp9_variance8x8_wmt vp9_variance8x8_sse2=vp9_variance8x8_wmt
vp9_variance8x8_mmx=vp9_variance8x8_mmx vp9_variance8x8_mmx=vp9_variance8x8_mmx
prototype unsigned int vp9_variance4x4 "const unsigned char *src_ptr, int source_stride, const unsigned char *ref_ptr, int ref_stride, unsigned int *sse" prototype unsigned int vp9_variance4x4 "const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int ref_stride, unsigned int *sse"
specialize vp9_variance4x4 mmx sse2 specialize vp9_variance4x4 mmx sse2
vp9_variance4x4_sse2=vp9_variance4x4_wmt vp9_variance4x4_sse2=vp9_variance4x4_wmt
vp9_variance4x4_mmx=vp9_variance4x4_mmx vp9_variance4x4_mmx=vp9_variance4x4_mmx
prototype unsigned int vp9_sub_pixel_variance32x32 "const unsigned char *src_ptr, int source_stride, int xoffset, int yoffset, const unsigned char *ref_ptr, int Refstride, unsigned int *sse" prototype unsigned int vp9_sub_pixel_variance32x32 "const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int Refstride, unsigned int *sse"
specialize vp9_sub_pixel_variance32x32 specialize vp9_sub_pixel_variance32x32
prototype unsigned int vp9_sub_pixel_variance16x16 "const unsigned char *src_ptr, int source_stride, int xoffset, int yoffset, const unsigned char *ref_ptr, int Refstride, unsigned int *sse" prototype unsigned int vp9_sub_pixel_variance16x16 "const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int Refstride, unsigned int *sse"
specialize vp9_sub_pixel_variance16x16 sse2 mmx ssse3 specialize vp9_sub_pixel_variance16x16 sse2 mmx ssse3
vp9_sub_pixel_variance16x16_sse2=vp9_sub_pixel_variance16x16_wmt vp9_sub_pixel_variance16x16_sse2=vp9_sub_pixel_variance16x16_wmt
prototype unsigned int vp9_sub_pixel_variance8x16 "const unsigned char *src_ptr, int source_stride, int xoffset, int yoffset, const unsigned char *ref_ptr, int Refstride, unsigned int *sse" prototype unsigned int vp9_sub_pixel_variance8x16 "const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int Refstride, unsigned int *sse"
specialize vp9_sub_pixel_variance8x16 sse2 mmx specialize vp9_sub_pixel_variance8x16 sse2 mmx
vp9_sub_pixel_variance8x16_sse2=vp9_sub_pixel_variance8x16_wmt vp9_sub_pixel_variance8x16_sse2=vp9_sub_pixel_variance8x16_wmt
prototype unsigned int vp9_sub_pixel_variance16x8 "const unsigned char *src_ptr, int source_stride, int xoffset, int yoffset, const unsigned char *ref_ptr, int Refstride, unsigned int *sse" prototype unsigned int vp9_sub_pixel_variance16x8 "const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int Refstride, unsigned int *sse"
specialize vp9_sub_pixel_variance16x8 sse2 mmx ssse3 specialize vp9_sub_pixel_variance16x8 sse2 mmx ssse3
vp9_sub_pixel_variance16x8_sse2=vp9_sub_pixel_variance16x8_ssse3; vp9_sub_pixel_variance16x8_sse2=vp9_sub_pixel_variance16x8_ssse3;
vp9_sub_pixel_variance16x8_sse2=vp9_sub_pixel_variance16x8_wmt vp9_sub_pixel_variance16x8_sse2=vp9_sub_pixel_variance16x8_wmt
prototype unsigned int vp9_sub_pixel_variance8x8 "const unsigned char *src_ptr, int source_stride, int xoffset, int yoffset, const unsigned char *ref_ptr, int Refstride, unsigned int *sse" prototype unsigned int vp9_sub_pixel_variance8x8 "const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int Refstride, unsigned int *sse"
specialize vp9_sub_pixel_variance8x8 sse2 mmx specialize vp9_sub_pixel_variance8x8 sse2 mmx
vp9_sub_pixel_variance8x8_sse2=vp9_sub_pixel_variance8x8_wmt vp9_sub_pixel_variance8x8_sse2=vp9_sub_pixel_variance8x8_wmt
prototype unsigned int vp9_sub_pixel_variance4x4 "const unsigned char *src_ptr, int source_stride, int xoffset, int yoffset, const unsigned char *ref_ptr, int Refstride, unsigned int *sse" prototype unsigned int vp9_sub_pixel_variance4x4 "const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int Refstride, unsigned int *sse"
specialize vp9_sub_pixel_variance4x4 sse2 mmx specialize vp9_sub_pixel_variance4x4 sse2 mmx
vp9_sub_pixel_variance4x4_sse2=vp9_sub_pixel_variance4x4_wmt vp9_sub_pixel_variance4x4_sse2=vp9_sub_pixel_variance4x4_wmt
prototype unsigned int vp9_sad32x32 "const unsigned char *src_ptr, int source_stride, const unsigned char *ref_ptr, int ref_stride, unsigned int max_sad" prototype unsigned int vp9_sad32x32 "const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int ref_stride, unsigned int max_sad"
specialize vp9_sad32x32 specialize vp9_sad32x32
prototype unsigned int vp9_sad16x16 "const unsigned char *src_ptr, int source_stride, const unsigned char *ref_ptr, int ref_stride, unsigned int max_sad" prototype unsigned int vp9_sad16x16 "const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int ref_stride, unsigned int max_sad"
specialize vp9_sad16x16 mmx sse2 sse3 specialize vp9_sad16x16 mmx sse2 sse3
vp9_sad16x16_sse2=vp9_sad16x16_wmt vp9_sad16x16_sse2=vp9_sad16x16_wmt
prototype unsigned int vp9_sad16x8 "const unsigned char *src_ptr, int source_stride, const unsigned char *ref_ptr, int ref_stride, unsigned int max_sad" prototype unsigned int vp9_sad16x8 "const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int ref_stride, unsigned int max_sad"
specialize vp9_sad16x8 mmx sse2 specialize vp9_sad16x8 mmx sse2
vp9_sad16x8_sse2=vp9_sad16x8_wmt vp9_sad16x8_sse2=vp9_sad16x8_wmt
prototype unsigned int vp9_sad8x16 "const unsigned char *src_ptr, int source_stride, const unsigned char *ref_ptr, int ref_stride, unsigned int max_sad" prototype unsigned int vp9_sad8x16 "const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int ref_stride, unsigned int max_sad"
specialize vp9_sad8x16 mmx sse2 specialize vp9_sad8x16 mmx sse2
vp9_sad8x16_sse2=vp9_sad8x16_wmt vp9_sad8x16_sse2=vp9_sad8x16_wmt
prototype unsigned int vp9_sad8x8 "const unsigned char *src_ptr, int source_stride, const unsigned char *ref_ptr, int ref_stride, unsigned int max_sad" prototype unsigned int vp9_sad8x8 "const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int ref_stride, unsigned int max_sad"
specialize vp9_sad8x8 mmx sse2 specialize vp9_sad8x8 mmx sse2
vp9_sad8x8_sse2=vp9_sad8x8_wmt vp9_sad8x8_sse2=vp9_sad8x8_wmt
prototype unsigned int vp9_sad4x4 "const unsigned char *src_ptr, int source_stride, const unsigned char *ref_ptr, int ref_stride, unsigned int max_sad" prototype unsigned int vp9_sad4x4 "const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int ref_stride, unsigned int max_sad"
specialize vp9_sad4x4 mmx sse2 specialize vp9_sad4x4 mmx sse2
vp9_sad4x4_sse2=vp9_sad4x4_wmt vp9_sad4x4_sse2=vp9_sad4x4_wmt
prototype unsigned int vp9_variance_halfpixvar16x16_h "const unsigned char *src_ptr, int source_stride, const unsigned char *ref_ptr, int ref_stride, unsigned int *sse" prototype unsigned int vp9_variance_halfpixvar16x16_h "const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int ref_stride, unsigned int *sse"
specialize vp9_variance_halfpixvar16x16_h mmx sse2 specialize vp9_variance_halfpixvar16x16_h mmx sse2
vp9_variance_halfpixvar16x16_h_sse2=vp9_variance_halfpixvar16x16_h_wmt vp9_variance_halfpixvar16x16_h_sse2=vp9_variance_halfpixvar16x16_h_wmt
prototype unsigned int vp9_variance_halfpixvar16x16_v "const unsigned char *src_ptr, int source_stride, const unsigned char *ref_ptr, int ref_stride, unsigned int *sse" prototype unsigned int vp9_variance_halfpixvar16x16_v "const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int ref_stride, unsigned int *sse"
specialize vp9_variance_halfpixvar16x16_v mmx sse2 specialize vp9_variance_halfpixvar16x16_v mmx sse2
vp9_variance_halfpixvar16x16_v_sse2=vp9_variance_halfpixvar16x16_v_wmt vp9_variance_halfpixvar16x16_v_sse2=vp9_variance_halfpixvar16x16_v_wmt
prototype unsigned int vp9_variance_halfpixvar16x16_hv "const unsigned char *src_ptr, int source_stride, const unsigned char *ref_ptr, int ref_stride, unsigned int *sse" prototype unsigned int vp9_variance_halfpixvar16x16_hv "const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int ref_stride, unsigned int *sse"
specialize vp9_variance_halfpixvar16x16_hv mmx sse2 specialize vp9_variance_halfpixvar16x16_hv mmx sse2
vp9_variance_halfpixvar16x16_hv_sse2=vp9_variance_halfpixvar16x16_hv_wmt vp9_variance_halfpixvar16x16_hv_sse2=vp9_variance_halfpixvar16x16_hv_wmt
prototype unsigned int vp9_variance_halfpixvar32x32_h "const unsigned char *src_ptr, int source_stride, const unsigned char *ref_ptr, int ref_stride, unsigned int *sse" prototype unsigned int vp9_variance_halfpixvar32x32_h "const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int ref_stride, unsigned int *sse"
specialize vp9_variance_halfpixvar32x32_h specialize vp9_variance_halfpixvar32x32_h
prototype unsigned int vp9_variance_halfpixvar32x32_v "const unsigned char *src_ptr, int source_stride, const unsigned char *ref_ptr, int ref_stride, unsigned int *sse" prototype unsigned int vp9_variance_halfpixvar32x32_v "const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int ref_stride, unsigned int *sse"
specialize vp9_variance_halfpixvar32x32_v specialize vp9_variance_halfpixvar32x32_v
prototype unsigned int vp9_variance_halfpixvar32x32_hv "const unsigned char *src_ptr, int source_stride, const unsigned char *ref_ptr, int ref_stride, unsigned int *sse" prototype unsigned int vp9_variance_halfpixvar32x32_hv "const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int ref_stride, unsigned int *sse"
specialize vp9_variance_halfpixvar32x32_hv specialize vp9_variance_halfpixvar32x32_hv
prototype void vp9_sad32x32x3 "const unsigned char *src_ptr, int source_stride, const unsigned char *ref_ptr, int ref_stride, unsigned int *sad_array" prototype void vp9_sad32x32x3 "const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int ref_stride, unsigned int *sad_array"
specialize vp9_sad32x32x3 specialize vp9_sad32x32x3
prototype void vp9_sad16x16x3 "const unsigned char *src_ptr, int source_stride, const unsigned char *ref_ptr, int ref_stride, unsigned int *sad_array" prototype void vp9_sad16x16x3 "const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int ref_stride, unsigned int *sad_array"
specialize vp9_sad16x16x3 sse3 ssse3 specialize vp9_sad16x16x3 sse3 ssse3
prototype void vp9_sad16x8x3 "const unsigned char *src_ptr, int source_stride, const unsigned char *ref_ptr, int ref_stride, unsigned int *sad_array" prototype void vp9_sad16x8x3 "const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int ref_stride, unsigned int *sad_array"
specialize vp9_sad16x8x3 sse3 ssse3 specialize vp9_sad16x8x3 sse3 ssse3
prototype void vp9_sad8x16x3 "const unsigned char *src_ptr, int source_stride, const unsigned char *ref_ptr, int ref_stride, unsigned int *sad_array" prototype void vp9_sad8x16x3 "const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int ref_stride, unsigned int *sad_array"
specialize vp9_sad8x16x3 sse3 specialize vp9_sad8x16x3 sse3
prototype void vp9_sad8x8x3 "const unsigned char *src_ptr, int source_stride, const unsigned char *ref_ptr, int ref_stride, unsigned int *sad_array" prototype void vp9_sad8x8x3 "const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int ref_stride, unsigned int *sad_array"
specialize vp9_sad8x8x3 sse3 specialize vp9_sad8x8x3 sse3
prototype void vp9_sad4x4x3 "const unsigned char *src_ptr, int source_stride, const unsigned char *ref_ptr, int ref_stride, unsigned int *sad_array" prototype void vp9_sad4x4x3 "const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int ref_stride, unsigned int *sad_array"
specialize vp9_sad4x4x3 sse3 specialize vp9_sad4x4x3 sse3
prototype void vp9_sad32x32x8 "const unsigned char *src_ptr, int src_stride, const unsigned char *ref_ptr, int ref_stride, unsigned short *sad_array" prototype void vp9_sad32x32x8 "const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride, uint16_t *sad_array"
specialize vp9_sad32x32x8 specialize vp9_sad32x32x8
prototype void vp9_sad16x16x8 "const unsigned char *src_ptr, int src_stride, const unsigned char *ref_ptr, int ref_stride, unsigned short *sad_array" prototype void vp9_sad16x16x8 "const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride, uint16_t *sad_array"
specialize vp9_sad16x16x8 sse4 specialize vp9_sad16x16x8 sse4
prototype void vp9_sad16x8x8 "const unsigned char *src_ptr, int src_stride, const unsigned char *ref_ptr, int ref_stride, unsigned short *sad_array" prototype void vp9_sad16x8x8 "const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride, uint16_t *sad_array"
specialize vp9_sad16x8x8 sse4 specialize vp9_sad16x8x8 sse4
prototype void vp9_sad8x16x8 "const unsigned char *src_ptr, int src_stride, const unsigned char *ref_ptr, int ref_stride, unsigned short *sad_array" prototype void vp9_sad8x16x8 "const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride, uint16_t *sad_array"
specialize vp9_sad8x16x8 sse4 specialize vp9_sad8x16x8 sse4
prototype void vp9_sad8x8x8 "const unsigned char *src_ptr, int src_stride, const unsigned char *ref_ptr, int ref_stride, unsigned short *sad_array" prototype void vp9_sad8x8x8 "const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride, uint16_t *sad_array"
specialize vp9_sad8x8x8 sse4 specialize vp9_sad8x8x8 sse4
prototype void vp9_sad4x4x8 "const unsigned char *src_ptr, int src_stride, const unsigned char *ref_ptr, int ref_stride, unsigned short *sad_array" prototype void vp9_sad4x4x8 "const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride, uint16_t *sad_array"
specialize vp9_sad4x4x8 sse4 specialize vp9_sad4x4x8 sse4
prototype void vp9_sad32x32x4d "const unsigned char *src_ptr, int src_stride, const unsigned char **ref_ptr, int ref_stride, unsigned int *sad_array" prototype void vp9_sad32x32x4d "const uint8_t *src_ptr, int src_stride, const uint8_t **ref_ptr, int ref_stride, unsigned int *sad_array"
specialize vp9_sad32x32x4d specialize vp9_sad32x32x4d
prototype void vp9_sad16x16x4d "const unsigned char *src_ptr, int src_stride, const unsigned char **ref_ptr, int ref_stride, unsigned int *sad_array" prototype void vp9_sad16x16x4d "const uint8_t *src_ptr, int src_stride, const uint8_t **ref_ptr, int ref_stride, unsigned int *sad_array"
specialize vp9_sad16x16x4d sse3 specialize vp9_sad16x16x4d sse3
prototype void vp9_sad16x8x4d "const unsigned char *src_ptr, int src_stride, const unsigned char **ref_ptr, int ref_stride, unsigned int *sad_array" prototype void vp9_sad16x8x4d "const uint8_t *src_ptr, int src_stride, const uint8_t **ref_ptr, int ref_stride, unsigned int *sad_array"
specialize vp9_sad16x8x4d sse3 specialize vp9_sad16x8x4d sse3
prototype void vp9_sad8x16x4d "const unsigned char *src_ptr, int src_stride, const unsigned char **ref_ptr, int ref_stride, unsigned int *sad_array" prototype void vp9_sad8x16x4d "const uint8_t *src_ptr, int src_stride, const uint8_t **ref_ptr, int ref_stride, unsigned int *sad_array"
specialize vp9_sad8x16x4d sse3 specialize vp9_sad8x16x4d sse3
prototype void vp9_sad8x8x4d "const unsigned char *src_ptr, int src_stride, const unsigned char **ref_ptr, int ref_stride, unsigned int *sad_array" prototype void vp9_sad8x8x4d "const uint8_t *src_ptr, int src_stride, const uint8_t **ref_ptr, int ref_stride, unsigned int *sad_array"
specialize vp9_sad8x8x4d sse3 specialize vp9_sad8x8x4d sse3
prototype void vp9_sad4x4x4d "const unsigned char *src_ptr, int src_stride, const unsigned char **ref_ptr, int ref_stride, unsigned int *sad_array" prototype void vp9_sad4x4x4d "const uint8_t *src_ptr, int src_stride, const uint8_t **ref_ptr, int ref_stride, unsigned int *sad_array"
specialize vp9_sad4x4x4d sse3 specialize vp9_sad4x4x4d sse3
# #
@ -568,30 +570,30 @@ specialize vp9_sad4x4x4d sse3
# #
case $arch in case $arch in
x86*) x86*)
prototype void vp9_copy32xn "const unsigned char *src_ptr, int source_stride, const unsigned char *ref_ptr, int ref_stride, int n" prototype void vp9_copy32xn "const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int ref_stride, int n"
specialize vp9_copy32xn sse2 sse3 specialize vp9_copy32xn sse2 sse3
;; ;;
esac esac
prototype unsigned int vp9_sub_pixel_mse16x16 "const unsigned char *src_ptr, int src_pixels_per_line, int xoffset, int yoffset, const unsigned char *dst_ptr, int dst_pixels_per_line, unsigned int *sse" prototype unsigned int vp9_sub_pixel_mse16x16 "const uint8_t *src_ptr, int src_pixels_per_line, int xoffset, int yoffset, const uint8_t *dst_ptr, int dst_pixels_per_line, unsigned int *sse"
specialize vp9_sub_pixel_mse16x16 sse2 mmx specialize vp9_sub_pixel_mse16x16 sse2 mmx
vp9_sub_pixel_mse16x16_sse2=vp9_sub_pixel_mse16x16_wmt vp9_sub_pixel_mse16x16_sse2=vp9_sub_pixel_mse16x16_wmt
prototype unsigned int vp9_mse16x16 "const unsigned char *src_ptr, int source_stride, const unsigned char *ref_ptr, int recon_stride, unsigned int *sse" prototype unsigned int vp9_mse16x16 "const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int recon_stride, unsigned int *sse"
specialize vp9_mse16x16 mmx sse2 specialize vp9_mse16x16 mmx sse2
vp9_mse16x16_sse2=vp9_mse16x16_wmt vp9_mse16x16_sse2=vp9_mse16x16_wmt
prototype unsigned int vp9_sub_pixel_mse32x32 "const unsigned char *src_ptr, int source_stride, int xoffset, int yoffset, const unsigned char *ref_ptr, int Refstride, unsigned int *sse" prototype unsigned int vp9_sub_pixel_mse32x32 "const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int Refstride, unsigned int *sse"
specialize vp9_sub_pixel_mse32x32 specialize vp9_sub_pixel_mse32x32
prototype unsigned int vp9_get_mb_ss "const short *" prototype unsigned int vp9_get_mb_ss "const int16_t *"
specialize vp9_get_mb_ss mmx sse2 specialize vp9_get_mb_ss mmx sse2
# ENCODEMB INVOKE # ENCODEMB INVOKE
prototype int vp9_mbblock_error "struct macroblock *mb, int dc" prototype int vp9_mbblock_error "struct macroblock *mb, int dc"
specialize vp9_mbblock_error mmx sse2 specialize vp9_mbblock_error mmx sse2
vp9_mbblock_error_sse2=vp9_mbblock_error_xmm vp9_mbblock_error_sse2=vp9_mbblock_error_xmm
prototype int vp9_block_error "short *coeff, short *dqcoeff, int block_size" prototype int vp9_block_error "int16_t *coeff, int16_t *dqcoeff, int block_size"
specialize vp9_block_error mmx sse2 specialize vp9_block_error mmx sse2
vp9_block_error_sse2=vp9_block_error_xmm vp9_block_error_sse2=vp9_block_error_xmm
@ -605,10 +607,10 @@ vp9_mbuverror_sse2=vp9_mbuverror_xmm
prototype void vp9_subtract_b "struct block *be, struct blockd *bd, int pitch" prototype void vp9_subtract_b "struct block *be, struct blockd *bd, int pitch"
specialize vp9_subtract_b mmx sse2 specialize vp9_subtract_b mmx sse2
prototype void vp9_subtract_mby "short *diff, unsigned char *src, unsigned char *pred, int stride" prototype void vp9_subtract_mby "int16_t *diff, uint8_t *src, uint8_t *pred, int stride"
specialize vp9_subtract_mby mmx sse2 specialize vp9_subtract_mby mmx sse2
prototype void vp9_subtract_mbuv "short *diff, unsigned char *usrc, unsigned char *vsrc, unsigned char *pred, int stride" prototype void vp9_subtract_mbuv "int16_t *diff, uint8_t *usrc, uint8_t *vsrc, uint8_t *pred, int stride"
specialize vp9_subtract_mbuv mmx sse2 specialize vp9_subtract_mbuv mmx sse2
# #
@ -617,45 +619,45 @@ specialize vp9_subtract_mbuv mmx sse2
if [ "$CONFIG_INTERNAL_STATS" = "yes" ]; then if [ "$CONFIG_INTERNAL_STATS" = "yes" ]; then
[ $arch = "x86_64" ] && sse2_on_x86_64=sse2 [ $arch = "x86_64" ] && sse2_on_x86_64=sse2
prototype void vp9_ssim_parms_8x8 "unsigned char *s, int sp, unsigned char *r, int rp, unsigned long *sum_s, unsigned long *sum_r, unsigned long *sum_sq_s, unsigned long *sum_sq_r, unsigned long *sum_sxr" prototype void vp9_ssim_parms_8x8 "uint8_t *s, int sp, uint8_t *r, int rp, unsigned long *sum_s, unsigned long *sum_r, unsigned long *sum_sq_s, unsigned long *sum_sq_r, unsigned long *sum_sxr"
specialize vp9_ssim_parms_8x8 $sse2_on_x86_64 specialize vp9_ssim_parms_8x8 $sse2_on_x86_64
prototype void vp9_ssim_parms_16x16 "unsigned char *s, int sp, unsigned char *r, int rp, unsigned long *sum_s, unsigned long *sum_r, unsigned long *sum_sq_s, unsigned long *sum_sq_r, unsigned long *sum_sxr" prototype void vp9_ssim_parms_16x16 "uint8_t *s, int sp, uint8_t *r, int rp, unsigned long *sum_s, unsigned long *sum_r, unsigned long *sum_sq_s, unsigned long *sum_sq_r, unsigned long *sum_sxr"
specialize vp9_ssim_parms_16x16 $sse2_on_x86_64 specialize vp9_ssim_parms_16x16 $sse2_on_x86_64
fi fi
# fdct functions # fdct functions
prototype void vp9_fht "const short *input, int pitch, short *output, int tx_type, int tx_dim" prototype void vp9_fht "const int16_t *input, int pitch, int16_t *output, int tx_type, int tx_dim"
specialize vp9_fht specialize vp9_fht
prototype void vp9_short_fdct8x8 "short *InputData, short *OutputData, int pitch" prototype void vp9_short_fdct8x8 "int16_t *InputData, int16_t *OutputData, int pitch"
specialize vp9_short_fdct8x8 specialize vp9_short_fdct8x8
prototype void vp9_short_fhaar2x2 "short *InputData, short *OutputData, int pitch" prototype void vp9_short_fhaar2x2 "int16_t *InputData, int16_t *OutputData, int pitch"
specialize vp9_short_fhaar2x2 specialize vp9_short_fhaar2x2
prototype void vp9_short_fdct4x4 "short *InputData, short *OutputData, int pitch" prototype void vp9_short_fdct4x4 "int16_t *InputData, int16_t *OutputData, int pitch"
specialize vp9_short_fdct4x4 specialize vp9_short_fdct4x4
prototype void vp9_short_fdct8x4 "short *InputData, short *OutputData, int pitch" prototype void vp9_short_fdct8x4 "int16_t *InputData, int16_t *OutputData, int pitch"
specialize vp9_short_fdct8x4 specialize vp9_short_fdct8x4
prototype void vp9_short_walsh4x4 "short *InputData, short *OutputData, int pitch" prototype void vp9_short_walsh4x4 "int16_t *InputData, int16_t *OutputData, int pitch"
specialize vp9_short_walsh4x4 specialize vp9_short_walsh4x4
prototype void vp9_short_fdct32x32 "short *InputData, short *OutputData, int pitch" prototype void vp9_short_fdct32x32 "int16_t *InputData, int16_t *OutputData, int pitch"
specialize vp9_short_fdct32x32 specialize vp9_short_fdct32x32
prototype void vp9_short_fdct16x16 "short *InputData, short *OutputData, int pitch" prototype void vp9_short_fdct16x16 "int16_t *InputData, int16_t *OutputData, int pitch"
specialize vp9_short_fdct16x16 specialize vp9_short_fdct16x16
prototype void vp9_short_walsh4x4_lossless "short *InputData, short *OutputData, int pitch" prototype void vp9_short_walsh4x4_lossless "int16_t *InputData, int16_t *OutputData, int pitch"
specialize vp9_short_walsh4x4_lossless specialize vp9_short_walsh4x4_lossless
prototype void vp9_short_walsh4x4_x8 "short *InputData, short *OutputData, int pitch" prototype void vp9_short_walsh4x4_x8 "int16_t *InputData, int16_t *OutputData, int pitch"
specialize vp9_short_walsh4x4_x8 specialize vp9_short_walsh4x4_x8
prototype void vp9_short_walsh8x4_x8 "short *InputData, short *OutputData, int pitch" prototype void vp9_short_walsh8x4_x8 "int16_t *InputData, int16_t *OutputData, int pitch"
specialize vp9_short_walsh8x4_x8 specialize vp9_short_walsh8x4_x8
# #
@ -674,7 +676,7 @@ prototype int vp9_diamond_search_sad "struct macroblock *x, struct block *b, str
specialize vp9_diamond_search_sad sse3 specialize vp9_diamond_search_sad sse3
vp9_diamond_search_sad_sse3=vp9_diamond_search_sadx4 vp9_diamond_search_sad_sse3=vp9_diamond_search_sadx4
prototype void vp9_temporal_filter_apply "unsigned char *frame1, unsigned int stride, unsigned char *frame2, unsigned int block_size, int strength, int filter_weight, unsigned int *accumulator, unsigned short *count" prototype void vp9_temporal_filter_apply "uint8_t *frame1, unsigned int stride, uint8_t *frame2, unsigned int block_size, int strength, int filter_weight, unsigned int *accumulator, uint16_t *count"
specialize vp9_temporal_filter_apply sse2 specialize vp9_temporal_filter_apply sse2
prototype void vp9_yv12_copy_partial_frame "struct yv12_buffer_config *src_ybc, struct yv12_buffer_config *dst_ybc, int fraction" prototype void vp9_yv12_copy_partial_frame "struct yv12_buffer_config *src_ybc, struct yv12_buffer_config *dst_ybc, int fraction"

View File

@ -11,14 +11,14 @@
#ifndef VP9_COMMON_VP9_SADMXN_H_ #ifndef VP9_COMMON_VP9_SADMXN_H_
#define VP9_COMMON_VP9_SADMXN_H_ #define VP9_COMMON_VP9_SADMXN_H_
static __inline #include "vpx/vpx_integer.h"
unsigned int sad_mx_n_c(
const unsigned char *src_ptr, static __inline unsigned int sad_mx_n_c(const uint8_t *src_ptr,
int src_stride, int src_stride,
const unsigned char *ref_ptr, const uint8_t *ref_ptr,
int ref_stride, int ref_stride,
int m, int m,
int n) { int n) {
int r, c; int r, c;
unsigned int sad = 0; unsigned int sad = 0;
@ -34,4 +34,4 @@ unsigned int sad_mx_n_c(
return sad; return sad;
} }
#endif #endif // VP9_COMMON_VP9_SADMXN_H_

View File

@ -59,5 +59,5 @@ int vp9_check_segref_inter(MACROBLOCKD *xd, int segment_id);
int vp9_get_seg_tx_type(MACROBLOCKD *xd, int segment_id); int vp9_get_seg_tx_type(MACROBLOCKD *xd, int segment_id);
#endif /* __INC_SEG_COMMON_H__ */ #endif // VP9_COMMON_VP9_SEG_COMMON_H_

View File

@ -18,14 +18,14 @@ void vp9_setup_intra_recon(YV12_BUFFER_CONFIG *ybf) {
/* set up frame new frame for intra coded blocks */ /* set up frame new frame for intra coded blocks */
vpx_memset(ybf->y_buffer - 1 - ybf->y_stride, 127, ybf->y_width + 5); vpx_memset(ybf->y_buffer - 1 - ybf->y_stride, 127, ybf->y_width + 5);
for (i = 0; i < ybf->y_height; i++) for (i = 0; i < ybf->y_height; i++)
ybf->y_buffer[ybf->y_stride * i - 1] = (unsigned char) 129; ybf->y_buffer[ybf->y_stride * i - 1] = (uint8_t) 129;
vpx_memset(ybf->u_buffer - 1 - ybf->uv_stride, 127, ybf->uv_width + 5); vpx_memset(ybf->u_buffer - 1 - ybf->uv_stride, 127, ybf->uv_width + 5);
for (i = 0; i < ybf->uv_height; i++) for (i = 0; i < ybf->uv_height; i++)
ybf->u_buffer[ybf->uv_stride * i - 1] = (unsigned char) 129; ybf->u_buffer[ybf->uv_stride * i - 1] = (uint8_t) 129;
vpx_memset(ybf->v_buffer - 1 - ybf->uv_stride, 127, ybf->uv_width + 5); vpx_memset(ybf->v_buffer - 1 - ybf->uv_stride, 127, ybf->uv_width + 5);
for (i = 0; i < ybf->uv_height; i++) for (i = 0; i < ybf->uv_height; i++)
ybf->v_buffer[ybf->uv_stride * i - 1] = (unsigned char) 129; ybf->v_buffer[ybf->uv_stride * i - 1] = (uint8_t) 129;
} }

View File

@ -8,6 +8,11 @@
* be found in the AUTHORS file in the root of the source tree. * be found in the AUTHORS file in the root of the source tree.
*/ */
#ifndef VP9_COMMON_VP9_SETUPINTRARECON_H_
#define VP9_COMMON_VP9_SETUPINTRARECON_H_
#include "vpx_scale/yv12config.h" #include "vpx_scale/yv12config.h"
extern void vp9_setup_intra_recon(YV12_BUFFER_CONFIG *ybf); extern void vp9_setup_intra_recon(YV12_BUFFER_CONFIG *ybf);
#endif // VP9_COMMON_VP9_SETUPINTRARECON_H_

View File

@ -8,14 +8,14 @@
* be found in the AUTHORS file in the root of the source tree. * be found in the AUTHORS file in the root of the source tree.
*/ */
#ifndef VP9_COMMON_VP9_SUBPELVAR_H_
#define VP9_COMMON_VP9_SUBPELVAR_H_
#include "vp9/common/vp9_filter.h" #include "vp9/common/vp9_filter.h"
static void variance(const uint8_t *src_ptr,
static void variance(const unsigned char *src_ptr,
int source_stride, int source_stride,
const unsigned char *ref_ptr, const uint8_t *ref_ptr,
int recon_stride, int recon_stride,
int w, int w,
int h, int h,
@ -67,13 +67,13 @@ static void variance(const unsigned char *src_ptr,
* to the next. * to the next.
* *
****************************************************************************/ ****************************************************************************/
static void var_filter_block2d_bil_first_pass(const unsigned char *src_ptr, static void var_filter_block2d_bil_first_pass(const uint8_t *src_ptr,
unsigned short *output_ptr, uint16_t *output_ptr,
unsigned int src_pixels_per_line, unsigned int src_pixels_per_line,
int pixel_step, int pixel_step,
unsigned int output_height, unsigned int output_height,
unsigned int output_width, unsigned int output_width,
const short *vp9_filter) { const int16_t *vp9_filter) {
unsigned int i, j; unsigned int i, j;
for (i = 0; i < output_height; i++) { for (i = 0; i < output_height; i++) {
@ -119,13 +119,13 @@ static void var_filter_block2d_bil_first_pass(const unsigned char *src_ptr,
* to the next. * to the next.
* *
****************************************************************************/ ****************************************************************************/
static void var_filter_block2d_bil_second_pass(const unsigned short *src_ptr, static void var_filter_block2d_bil_second_pass(const uint16_t *src_ptr,
unsigned char *output_ptr, uint8_t *output_ptr,
unsigned int src_pixels_per_line, unsigned int src_pixels_per_line,
unsigned int pixel_step, unsigned int pixel_step,
unsigned int output_height, unsigned int output_height,
unsigned int output_width, unsigned int output_width,
const short *vp9_filter) { const int16_t *vp9_filter) {
unsigned int i, j; unsigned int i, j;
int Temp; int Temp;
@ -145,3 +145,4 @@ static void var_filter_block2d_bil_second_pass(const unsigned short *src_ptr,
} }
} }
#endif // VP9_COMMON_VP9_SUBPELVAR_H_

View File

@ -8,14 +8,13 @@
* be found in the AUTHORS file in the root of the source tree. * be found in the AUTHORS file in the root of the source tree.
*/ */
#ifndef VP9_COMMON_VP9_SUBPIXEL_H_ #ifndef VP9_COMMON_VP9_SUBPIXEL_H_
#define VP9_COMMON_VP9_SUBPIXEL_H_ #define VP9_COMMON_VP9_SUBPIXEL_H_
#define prototype_subpixel_predict(sym) \ #define prototype_subpixel_predict(sym) \
void sym(unsigned char *src, int src_pitch, int xofst, int yofst, \ void sym(uint8_t *src, int src_pitch, int xofst, int yofst, \
unsigned char *dst, int dst_pitch) uint8_t *dst, int dst_pitch)
typedef prototype_subpixel_predict((*vp9_subpix_fn_t)); typedef prototype_subpixel_predict((*vp9_subpix_fn_t));
#endif #endif // VP9_COMMON_VP9_SUBPIXEL_H_

View File

@ -12,7 +12,7 @@
void vp9_swap_yv12_buffer(YV12_BUFFER_CONFIG *new_frame, void vp9_swap_yv12_buffer(YV12_BUFFER_CONFIG *new_frame,
YV12_BUFFER_CONFIG *last_frame) { YV12_BUFFER_CONFIG *last_frame) {
unsigned char *temp; uint8_t *temp;
temp = last_frame->buffer_alloc; temp = last_frame->buffer_alloc;
last_frame->buffer_alloc = new_frame->buffer_alloc; last_frame->buffer_alloc = new_frame->buffer_alloc;

View File

@ -16,4 +16,4 @@
void vp9_swap_yv12_buffer(YV12_BUFFER_CONFIG *new_frame, void vp9_swap_yv12_buffer(YV12_BUFFER_CONFIG *new_frame,
YV12_BUFFER_CONFIG *last_frame); YV12_BUFFER_CONFIG *last_frame);
#endif // __SWAPYV12_BUFFER_H #endif // VP9_COMMON_VP9_SWAPYV12BUFFER_H_

View File

@ -7,6 +7,7 @@
* in the file PATENTS. All contributing project authors may * in the file PATENTS. All contributing project authors may
* be found in the AUTHORS file in the root of the source tree. * be found in the AUTHORS file in the root of the source tree.
*/ */
#ifndef VP9_COMMON_VP9_SYSTEMDEPENDENT_H_ #ifndef VP9_COMMON_VP9_SYSTEMDEPENDENT_H_
#define VP9_COMMON_VP9_SYSTEMDEPENDENT_H_ #define VP9_COMMON_VP9_SYSTEMDEPENDENT_H_
@ -34,4 +35,5 @@ static int round(double x) {
struct VP9Common; struct VP9Common;
void vp9_machine_specific_config(struct VP9Common *); void vp9_machine_specific_config(struct VP9Common *);
#endif
#endif // VP9_COMMON_VP9_SYSTEMDEPENDENT_H_

View File

@ -16,4 +16,4 @@ extern void vp9_blit_text(const char *msg, unsigned char *address,
extern void vp9_blit_line(int x0, int x1, int y0, int y1, extern void vp9_blit_line(int x0, int x1, int y0, int y1,
unsigned char *image, const int pitch); unsigned char *image, const int pitch);
#endif // __INC_TEXTBLIT_H #endif // VP9_COMMON_VP9_TEXTBLIT_H_

View File

@ -8,31 +8,18 @@
* be found in the AUTHORS file in the root of the source tree. * be found in the AUTHORS file in the root of the source tree.
*/ */
#ifndef VP9_COMMON_VP9_TREECODER_H_ #ifndef VP9_COMMON_VP9_TREECODER_H_
#define VP9_COMMON_VP9_TREECODER_H_ #define VP9_COMMON_VP9_TREECODER_H_
#include "vpx/vpx_integer.h" #include "vpx/vpx_integer.h"
typedef unsigned char vp9_prob; typedef uint8_t vp9_prob;
#define vp9_prob_half ( (vp9_prob) 128) #define vp9_prob_half ((vp9_prob) 128)
typedef signed char vp9_tree_index; typedef int8_t vp9_tree_index;
struct bool_coder_spec;
typedef struct bool_coder_spec bool_coder_spec;
typedef struct bool_writer bool_writer;
typedef struct bool_reader bool_reader;
typedef const bool_coder_spec c_bool_coder_spec;
typedef const bool_writer c_bool_writer;
typedef const bool_reader c_bool_reader;
# define vp9_complement( x) (255 - x)
#define vp9_complement(x) (255 - x)
/* We build coding trees compactly in arrays. /* We build coding trees compactly in arrays.
Each node of the tree is a pair of vp9_tree_indices. Each node of the tree is a pair of vp9_tree_indices.
@ -43,7 +30,6 @@ typedef const bool_reader c_bool_reader;
typedef const vp9_tree_index vp9_tree[], *vp9_tree_p; typedef const vp9_tree_index vp9_tree[], *vp9_tree_p;
typedef const struct vp9_token_struct { typedef const struct vp9_token_struct {
int value; int value;
int Len; int Len;
@ -55,20 +41,17 @@ void vp9_tokens_from_tree(struct vp9_token_struct *, vp9_tree);
void vp9_tokens_from_tree_offset(struct vp9_token_struct *, vp9_tree, void vp9_tokens_from_tree_offset(struct vp9_token_struct *, vp9_tree,
int offset); int offset);
/* Convert array of token occurrence counts into a table of probabilities /* Convert array of token occurrence counts into a table of probabilities
for the associated binary encoding tree. Also writes count of branches for the associated binary encoding tree. Also writes count of branches
taken for each node on the tree; this facilitiates decisions as to taken for each node on the tree; this facilitiates decisions as to
probability updates. */ probability updates. */
void vp9_tree_probs_from_distribution( void vp9_tree_probs_from_distribution(int n, /* n = size of alphabet */
int n, /* n = size of alphabet */ vp9_token tok[ /* n */ ],
vp9_token tok [ /* n */ ], vp9_tree tree,
vp9_tree tree, vp9_prob probs[ /* n - 1 */ ],
vp9_prob probs [ /* n-1 */ ], unsigned int branch_ct[ /* n - 1 */ ][2],
unsigned int branch_ct [ /* n-1 */ ] [2], const unsigned int num_events[ /* n */ ]);
const unsigned int num_events[ /* n */ ]
);
static __inline vp9_prob clip_prob(int p) { static __inline vp9_prob clip_prob(int p) {
return (p > 255) ? 255u : (p < 1) ? 1u : p; return (p > 255) ? 255u : (p < 1) ? 1u : p;
@ -87,4 +70,4 @@ static __inline vp9_prob weighted_prob(int prob1, int prob2, int factor) {
return (prob1 * (256 - factor) + prob2 * factor + 128) >> 8; return (prob1 * (256 - factor) + prob2 * factor + 128) >> 8;
} }
#endif #endif // VP9_COMMON_VP9_TREECODER_H_

View File

@ -8,9 +8,9 @@
* be found in the AUTHORS file in the root of the source tree. * be found in the AUTHORS file in the root of the source tree.
*/ */
#ifndef VP9_DECODER_VP9_DBOOLHUFF_H_ #ifndef VP9_DECODER_VP9_DBOOLHUFF_H_
#define VP9_DECODER_VP9_DBOOLHUFF_H_ #define VP9_DECODER_VP9_DBOOLHUFF_H_
#include <stddef.h> #include <stddef.h>
#include <limits.h> #include <limits.h>
#include "vpx_ports/config.h" #include "vpx_ports/config.h"
@ -33,7 +33,7 @@ typedef struct {
unsigned int range; unsigned int range;
} BOOL_DECODER; } BOOL_DECODER;
DECLARE_ALIGNED(16, extern const unsigned char, vp9_norm[256]); DECLARE_ALIGNED(16, extern const uint8_t, vp9_norm[256]);
int vp9_start_decode(BOOL_DECODER *br, int vp9_start_decode(BOOL_DECODER *br,
const unsigned char *source, const unsigned char *source,
@ -152,4 +152,4 @@ static int bool_error(BOOL_DECODER *br) {
extern int vp9_decode_unsigned_max(BOOL_DECODER *br, int max); extern int vp9_decode_unsigned_max(BOOL_DECODER *br, int max);
#endif #endif // VP9_DECODER_VP9_DBOOLHUFF_H_

View File

@ -8,6 +8,8 @@
* be found in the AUTHORS file in the root of the source tree. * be found in the AUTHORS file in the root of the source tree.
*/ */
#ifndef VP9_DECODER_VP9_DECODEMV_H_
#define VP9_DECODER_VP9_DECODEMV_H_
#include "vp9/decoder/vp9_onyxd_int.h" #include "vp9/decoder/vp9_onyxd_int.h"
@ -17,3 +19,5 @@ void vp9_decode_mb_mode_mv(VP9D_COMP* const pbi,
int mb_col, int mb_col,
BOOL_DECODER* const bc); BOOL_DECODER* const bc);
void vp9_decode_mode_mvs_init(VP9D_COMP* const pbi, BOOL_DECODER* const bc); void vp9_decode_mode_mvs_init(VP9D_COMP* const pbi, BOOL_DECODER* const bc);
#endif // VP9_DECODER_VP9_DECODEMV_H_

View File

@ -82,17 +82,17 @@ void vp9_init_de_quantizer(VP9D_COMP *pbi) {
VP9_COMMON *const pc = &pbi->common; VP9_COMMON *const pc = &pbi->common;
for (Q = 0; Q < QINDEX_RANGE; Q++) { for (Q = 0; Q < QINDEX_RANGE; Q++) {
pc->Y1dequant[Q][0] = (short)vp9_dc_quant(Q, pc->y1dc_delta_q); pc->Y1dequant[Q][0] = (int16_t)vp9_dc_quant(Q, pc->y1dc_delta_q);
pc->Y2dequant[Q][0] = (short)vp9_dc2quant(Q, pc->y2dc_delta_q); pc->Y2dequant[Q][0] = (int16_t)vp9_dc2quant(Q, pc->y2dc_delta_q);
pc->UVdequant[Q][0] = (short)vp9_dc_uv_quant(Q, pc->uvdc_delta_q); pc->UVdequant[Q][0] = (int16_t)vp9_dc_uv_quant(Q, pc->uvdc_delta_q);
/* all the ac values =; */ /* all the ac values =; */
for (i = 1; i < 16; i++) { for (i = 1; i < 16; i++) {
int rc = vp9_default_zig_zag1d_4x4[i]; int rc = vp9_default_zig_zag1d_4x4[i];
pc->Y1dequant[Q][rc] = (short)vp9_ac_yquant(Q); pc->Y1dequant[Q][rc] = (int16_t)vp9_ac_yquant(Q);
pc->Y2dequant[Q][rc] = (short)vp9_ac2quant(Q, pc->y2ac_delta_q); pc->Y2dequant[Q][rc] = (int16_t)vp9_ac2quant(Q, pc->y2ac_delta_q);
pc->UVdequant[Q][rc] = (short)vp9_ac_uv_quant(Q, pc->uvac_delta_q); pc->UVdequant[Q][rc] = (int16_t)vp9_ac_uv_quant(Q, pc->uvac_delta_q);
} }
} }
} }
@ -283,10 +283,10 @@ static void decode_8x8(VP9D_COMP *pbi, MACROBLOCKD *xd,
for (i = 0; i < 4; i++) { for (i = 0; i < 4; i++) {
int ib = vp9_i8x8_block[i]; int ib = vp9_i8x8_block[i];
int idx = (ib & 0x02) ? (ib + 2) : ib; int idx = (ib & 0x02) ? (ib + 2) : ib;
short *q = xd->block[idx].qcoeff; int16_t *q = xd->block[idx].qcoeff;
short *dq = xd->block[0].dequant; int16_t *dq = xd->block[0].dequant;
unsigned char *pre = xd->block[ib].predictor; uint8_t *pre = xd->block[ib].predictor;
unsigned char *dst = *(xd->block[ib].base_dst) + xd->block[ib].dst; uint8_t *dst = *(xd->block[ib].base_dst) + xd->block[ib].dst;
int stride = xd->dst.y_stride; int stride = xd->dst.y_stride;
BLOCKD *b = &xd->block[ib]; BLOCKD *b = &xd->block[ib];
if (xd->mode_info_context->mbmi.mode == I8X8_PRED) { if (xd->mode_info_context->mbmi.mode == I8X8_PRED) {
@ -580,8 +580,8 @@ static void decode_8x8_sb(VP9D_COMP *pbi, MACROBLOCKD *xd,
for (i = 0; i < 4; i++) { for (i = 0; i < 4; i++) {
int ib = vp9_i8x8_block[i]; int ib = vp9_i8x8_block[i];
int idx = (ib & 0x02) ? (ib + 2) : ib; int idx = (ib & 0x02) ? (ib + 2) : ib;
short *q = xd->block[idx].qcoeff; int16_t *q = xd->block[idx].qcoeff;
short *dq = xd->block[0].dequant; int16_t *dq = xd->block[0].dequant;
int stride = xd->dst.y_stride; int stride = xd->dst.y_stride;
BLOCKD *b = &xd->block[ib]; BLOCKD *b = &xd->block[ib];
tx_type = get_tx_type_8x8(xd, &xd->block[ib]); tx_type = get_tx_type_8x8(xd, &xd->block[ib]);

View File

@ -16,4 +16,4 @@ struct VP9Decompressor;
extern void vp9_init_de_quantizer(struct VP9Decompressor *pbi); extern void vp9_init_de_quantizer(struct VP9Decompressor *pbi);
#endif // __INC_DECODFRAME_H #endif // VP9_DECODER_VP9_DECODFRAME_H_

View File

@ -188,7 +188,7 @@ void vp9_dequantize_b_2x2_c(BLOCKD *d) {
void vp9_dequant_idct_add_8x8_c(int16_t *input, const int16_t *dq, void vp9_dequant_idct_add_8x8_c(int16_t *input, const int16_t *dq,
uint8_t *pred, uint8_t *dest, int pitch, uint8_t *pred, uint8_t *dest, int pitch,
int stride, int dc, uint16_t eobs) { int stride, int dc, int eob) {
int16_t output[64]; int16_t output[64];
int16_t *diff_ptr = output; int16_t *diff_ptr = output;
int i; int i;
@ -204,10 +204,10 @@ void vp9_dequant_idct_add_8x8_c(int16_t *input, const int16_t *dq,
* TODO(yunqingwang): "eobs = 1" case is also handled in vp9_short_idct8x8_c. * TODO(yunqingwang): "eobs = 1" case is also handled in vp9_short_idct8x8_c.
* Combine that with code here. * Combine that with code here.
*/ */
if (eobs == 0) { if (eob == 0) {
/* All 0 DCT coefficient */ /* All 0 DCT coefficient */
vp9_copy_mem8x8(pred, pitch, dest, stride); vp9_copy_mem8x8(pred, pitch, dest, stride);
} else if (eobs == 1) { } else if (eob == 1) {
/* DC only DCT coefficient. */ /* DC only DCT coefficient. */
int16_t out; int16_t out;
@ -220,7 +220,7 @@ void vp9_dequant_idct_add_8x8_c(int16_t *input, const int16_t *dq,
input[0] = 0; input[0] = 0;
add_constant_residual(out, pred, pitch, dest, stride, 8, 8); add_constant_residual(out, pred, pitch, dest, stride, 8, 8);
} else if (eobs <= 10) { } else if (eob <= 10) {
input[1] = input[1] * dq[1]; input[1] = input[1] * dq[1];
input[2] = input[2] * dq[1]; input[2] = input[2] * dq[1];
input[3] = input[3] * dq[1]; input[3] = input[3] * dq[1];
@ -280,17 +280,17 @@ void vp9_ht_dequant_idct_add_16x16_c(TX_TYPE tx_type, int16_t *input,
void vp9_dequant_idct_add_16x16_c(int16_t *input, const int16_t *dq, void vp9_dequant_idct_add_16x16_c(int16_t *input, const int16_t *dq,
uint8_t *pred, uint8_t *dest, int pitch, uint8_t *pred, uint8_t *dest, int pitch,
int stride, uint16_t eobs) { int stride, int eob) {
int16_t output[256]; int16_t output[256];
int16_t *diff_ptr = output; int16_t *diff_ptr = output;
int i; int i;
/* The calculation can be simplified if there are not many non-zero dct /* The calculation can be simplified if there are not many non-zero dct
* coefficients. Use eobs to separate different cases. */ * coefficients. Use eobs to separate different cases. */
if (eobs == 0) { if (eob == 0) {
/* All 0 DCT coefficient */ /* All 0 DCT coefficient */
vp9_copy_mem16x16(pred, pitch, dest, stride); vp9_copy_mem16x16(pred, pitch, dest, stride);
} else if (eobs == 1) { } else if (eob == 1) {
/* DC only DCT coefficient. */ /* DC only DCT coefficient. */
int16_t out; int16_t out;
@ -303,7 +303,7 @@ void vp9_dequant_idct_add_16x16_c(int16_t *input, const int16_t *dq,
input[0] = 0; input[0] = 0;
add_constant_residual(out, pred, pitch, dest, stride, 16, 16); add_constant_residual(out, pred, pitch, dest, stride, 16, 16);
} else if (eobs <= 10) { } else if (eob <= 10) {
input[0]= input[0] * dq[0]; input[0]= input[0] * dq[0];
input[1] = input[1] * dq[1]; input[1] = input[1] * dq[1];
input[2] = input[2] * dq[1]; input[2] = input[2] * dq[1];
@ -343,8 +343,8 @@ void vp9_dequant_idct_add_16x16_c(int16_t *input, const int16_t *dq,
#if CONFIG_TX32X32 && CONFIG_SUPERBLOCKS #if CONFIG_TX32X32 && CONFIG_SUPERBLOCKS
void vp9_dequant_idct_add_32x32(int16_t *input, const int16_t *dq, void vp9_dequant_idct_add_32x32(int16_t *input, const int16_t *dq,
uint8_t *pred, uint8_t *dest, int pitch, uint8_t *pred, uint8_t *dest, int pitch,
int stride, uint16_t eobs) { int stride, int eob) {
short output[1024]; int16_t output[1024];
int i; int i;
input[0]= input[0] * dq[0] / 2; input[0]= input[0] * dq[0] / 2;
@ -356,11 +356,11 @@ void vp9_dequant_idct_add_32x32(int16_t *input, const int16_t *dq,
add_residual(output, pred, pitch, dest, stride, 32, 32); add_residual(output, pred, pitch, dest, stride, 32, 32);
} }
void vp9_dequant_idct_add_uv_block_16x16_c(short *q, const short *dq, void vp9_dequant_idct_add_uv_block_16x16_c(int16_t *q, const int16_t *dq,
unsigned char *dstu, uint8_t *dstu,
unsigned char *dstv, uint8_t *dstv,
int stride, int stride,
unsigned short *eobs) { uint16_t *eobs) {
vp9_dequant_idct_add_16x16_c(q, dq, dstu, dstu, stride, stride, eobs[0]); vp9_dequant_idct_add_16x16_c(q, dq, dstu, dstu, stride, stride, eobs[0]);
vp9_dequant_idct_add_16x16_c(q + 256, dq, vp9_dequant_idct_add_16x16_c(q + 256, dq,
dstv, dstv, stride, stride, eobs[4]); dstv, dstv, stride, stride, eobs[4]);

View File

@ -11,92 +11,108 @@
#ifndef VP9_DECODER_VP9_DEQUANTIZE_H_ #ifndef VP9_DECODER_VP9_DEQUANTIZE_H_
#define VP9_DECODER_VP9_DEQUANTIZE_H_ #define VP9_DECODER_VP9_DEQUANTIZE_H_
#include "vp9/common/vp9_blockd.h" #include "vp9/common/vp9_blockd.h"
#if CONFIG_LOSSLESS #if CONFIG_LOSSLESS
extern void vp9_dequant_idct_add_lossless_c(short *input, const short *dq, extern void vp9_dequant_idct_add_lossless_c(int16_t *input,
unsigned char *pred, const int16_t *dq,
unsigned char *output, uint8_t *pred,
uint8_t *output,
int pitch, int stride); int pitch, int stride);
extern void vp9_dequant_dc_idct_add_lossless_c(short *input, const short *dq, extern void vp9_dequant_dc_idct_add_lossless_c(int16_t *input,
unsigned char *pred, const int16_t *dq,
unsigned char *output, uint8_t *pred,
uint8_t *output,
int pitch, int stride, int dc); int pitch, int stride, int dc);
extern void vp9_dequant_dc_idct_add_y_block_lossless_c(short *q, extern void vp9_dequant_dc_idct_add_y_block_lossless_c(int16_t *q,
const short *dq, const int16_t *dq,
unsigned char *pre, uint8_t *pre,
unsigned char *dst, uint8_t *dst,
int stride, int stride,
unsigned short *eobs, uint16_t *eobs,
const short *dc); const int16_t *dc);
extern void vp9_dequant_idct_add_y_block_lossless_c(short *q, const short *dq, extern void vp9_dequant_idct_add_y_block_lossless_c(int16_t *q,
unsigned char *pre, const int16_t *dq,
unsigned char *dst, uint8_t *pre,
uint8_t *dst,
int stride, int stride,
unsigned short *eobs); uint16_t *eobs);
extern void vp9_dequant_idct_add_uv_block_lossless_c(short *q, const short *dq, extern void vp9_dequant_idct_add_uv_block_lossless_c(int16_t *q,
unsigned char *pre, const int16_t *dq,
unsigned char *dst_u, uint8_t *pre,
unsigned char *dst_v, uint8_t *dst_u,
uint8_t *dst_v,
int stride, int stride,
unsigned short *eobs); uint16_t *eobs);
#endif #endif // CONFIG_LOSSLESS
typedef void (*vp9_dequant_idct_add_fn_t)(short *input, const short *dq, typedef void (*vp9_dequant_idct_add_fn_t)(int16_t *input, const int16_t *dq,
unsigned char *pred, unsigned char *output, int pitch, int stride); uint8_t *pred, uint8_t *output,
typedef void(*vp9_dequant_dc_idct_add_fn_t)(short *input, const short *dq, int pitch, int stride);
unsigned char *pred, unsigned char *output, int pitch, int stride, int dc); typedef void(*vp9_dequant_dc_idct_add_fn_t)(int16_t *input, const int16_t *dq,
uint8_t *pred, uint8_t *output,
int pitch, int stride, int dc);
typedef void(*vp9_dequant_dc_idct_add_y_block_fn_t)(short *q, const short *dq, typedef void(*vp9_dequant_dc_idct_add_y_block_fn_t)(int16_t *q,
unsigned char *pre, unsigned char *dst, int stride, unsigned short *eobs, const int16_t *dq,
const short *dc); uint8_t *pre, uint8_t *dst,
typedef void(*vp9_dequant_idct_add_y_block_fn_t)(short *q, const short *dq, int stride, uint16_t *eobs,
unsigned char *pre, unsigned char *dst, int stride, unsigned short *eobs); const int16_t *dc);
typedef void(*vp9_dequant_idct_add_uv_block_fn_t)(short *q, const short *dq, typedef void(*vp9_dequant_idct_add_y_block_fn_t)(int16_t *q, const int16_t *dq,
unsigned char *pre, unsigned char *dst_u, unsigned char *dst_v, int stride, uint8_t *pre, uint8_t *dst,
unsigned short *eobs); int stride, uint16_t *eobs);
typedef void(*vp9_dequant_idct_add_uv_block_fn_t)(int16_t *q, const int16_t *dq,
uint8_t *pre, uint8_t *dst_u,
uint8_t *dst_v, int stride,
uint16_t *eobs);
void vp9_ht_dequant_idct_add_c(TX_TYPE tx_type, short *input, const short *dq, void vp9_ht_dequant_idct_add_c(TX_TYPE tx_type, int16_t *input,
unsigned char *pred, unsigned char *dest, const int16_t *dq,
int pitch, int stride); uint8_t *pred, uint8_t *dest,
int pitch, int stride);
void vp9_ht_dequant_idct_add_8x8_c(TX_TYPE tx_type, short *input, void vp9_ht_dequant_idct_add_8x8_c(TX_TYPE tx_type, int16_t *input,
const short *dq, unsigned char *pred, const int16_t *dq, uint8_t *pred,
unsigned char *dest, int pitch, int stride); uint8_t *dest, int pitch, int stride);
void vp9_ht_dequant_idct_add_16x16_c(TX_TYPE tx_type, short *input, void vp9_ht_dequant_idct_add_16x16_c(TX_TYPE tx_type, int16_t *input,
const short *dq, unsigned char *pred, const int16_t *dq, uint8_t *pred,
unsigned char *dest, uint8_t *dest,
int pitch, int stride); int pitch, int stride);
#if CONFIG_SUPERBLOCKS #if CONFIG_SUPERBLOCKS
void vp9_dequant_dc_idct_add_y_block_8x8_inplace_c(short *q, const short *dq, void vp9_dequant_dc_idct_add_y_block_8x8_inplace_c(int16_t *q,
unsigned char *dst, const int16_t *dq,
uint8_t *dst,
int stride, int stride,
unsigned short *eobs, uint16_t *eobs,
const short *dc, const int16_t *dc,
MACROBLOCKD *xd); MACROBLOCKD *xd);
void vp9_dequant_dc_idct_add_y_block_4x4_inplace_c(short *q, const short *dq, void vp9_dequant_dc_idct_add_y_block_4x4_inplace_c(int16_t *q,
unsigned char *dst, const int16_t *dq,
uint8_t *dst,
int stride, int stride,
unsigned short *eobs, uint16_t *eobs,
const short *dc, const int16_t *dc,
MACROBLOCKD *xd); MACROBLOCKD *xd);
void vp9_dequant_idct_add_uv_block_8x8_inplace_c(short *q, const short *dq, void vp9_dequant_idct_add_uv_block_8x8_inplace_c(int16_t *q,
unsigned char *dstu, const int16_t *dq,
unsigned char *dstv, uint8_t *dstu,
uint8_t *dstv,
int stride, int stride,
unsigned short *eobs, uint16_t *eobs,
MACROBLOCKD *xd); MACROBLOCKD *xd);
void vp9_dequant_idct_add_uv_block_4x4_inplace_c(short *q, const short *dq, void vp9_dequant_idct_add_uv_block_4x4_inplace_c(int16_t *q,
unsigned char *dstu, const int16_t *dq,
unsigned char *dstv, uint8_t *dstu,
uint8_t *dstv,
int stride, int stride,
unsigned short *eobs, uint16_t *eobs,
MACROBLOCKD *xd); MACROBLOCKD *xd);
#endif #endif // CONFIG_SUPERBLOCKS
#endif #endif // VP9_DECODER_VP9_DEQUANTIZE_H_

View File

@ -53,11 +53,11 @@
#define CAT5_PROB3 157 #define CAT5_PROB3 157
#define CAT5_PROB4 180 #define CAT5_PROB4 180
static const unsigned char cat6_prob[15] = { static const vp9_prob cat6_prob[15] = {
254, 254, 254, 252, 249, 243, 230, 196, 177, 153, 140, 133, 130, 129, 0 254, 254, 254, 252, 249, 243, 230, 196, 177, 153, 140, 133, 130, 129, 0
}; };
DECLARE_ALIGNED(16, extern const unsigned char, vp9_norm[256]); DECLARE_ALIGNED(16, extern const uint8_t, vp9_norm[256]);
static int get_signed(BOOL_DECODER *br, int value_to_sign) { static int get_signed(BOOL_DECODER *br, int value_to_sign) {
const int split = (br->range + 1) >> 1; const int split = (br->range + 1) >> 1;
@ -254,7 +254,7 @@ int vp9_decode_sb_tokens(VP9D_COMP* const pbi,
ENTROPY_CONTEXT* const L = (ENTROPY_CONTEXT *)xd->left_context; ENTROPY_CONTEXT* const L = (ENTROPY_CONTEXT *)xd->left_context;
ENTROPY_CONTEXT* const A1 = (ENTROPY_CONTEXT *)(&xd->above_context[1]); ENTROPY_CONTEXT* const A1 = (ENTROPY_CONTEXT *)(&xd->above_context[1]);
ENTROPY_CONTEXT* const L1 = (ENTROPY_CONTEXT *)(&xd->left_context[1]); ENTROPY_CONTEXT* const L1 = (ENTROPY_CONTEXT *)(&xd->left_context[1]);
unsigned short* const eobs = xd->eobs; uint16_t *const eobs = xd->eobs;
const int segment_id = xd->mode_info_context->mbmi.segment_id; const int segment_id = xd->mode_info_context->mbmi.segment_id;
int c, i, eobtotal = 0, seg_eob; int c, i, eobtotal = 0, seg_eob;
@ -320,7 +320,7 @@ static int vp9_decode_mb_tokens_16x16(VP9D_COMP* const pbi,
BOOL_DECODER* const bc) { BOOL_DECODER* const bc) {
ENTROPY_CONTEXT* const A = (ENTROPY_CONTEXT *)xd->above_context; ENTROPY_CONTEXT* const A = (ENTROPY_CONTEXT *)xd->above_context;
ENTROPY_CONTEXT* const L = (ENTROPY_CONTEXT *)xd->left_context; ENTROPY_CONTEXT* const L = (ENTROPY_CONTEXT *)xd->left_context;
unsigned short* const eobs = xd->eobs; uint16_t *const eobs = xd->eobs;
const int segment_id = xd->mode_info_context->mbmi.segment_id; const int segment_id = xd->mode_info_context->mbmi.segment_id;
int c, i, eobtotal = 0, seg_eob; int c, i, eobtotal = 0, seg_eob;
// Luma block // Luma block
@ -374,7 +374,7 @@ static int vp9_decode_mb_tokens_8x8(VP9D_COMP* const pbi,
BOOL_DECODER* const bc) { BOOL_DECODER* const bc) {
ENTROPY_CONTEXT *const A = (ENTROPY_CONTEXT *)xd->above_context; ENTROPY_CONTEXT *const A = (ENTROPY_CONTEXT *)xd->above_context;
ENTROPY_CONTEXT *const L = (ENTROPY_CONTEXT *)xd->left_context; ENTROPY_CONTEXT *const L = (ENTROPY_CONTEXT *)xd->left_context;
unsigned short *const eobs = xd->eobs; uint16_t *const eobs = xd->eobs;
PLANE_TYPE type; PLANE_TYPE type;
int c, i, eobtotal = 0, seg_eob; int c, i, eobtotal = 0, seg_eob;
const int segment_id = xd->mode_info_context->mbmi.segment_id; const int segment_id = xd->mode_info_context->mbmi.segment_id;
@ -471,7 +471,7 @@ static int decode_coefs_4x4(VP9D_COMP *dx, MACROBLOCKD *xd,
ENTROPY_CONTEXT *const L = (ENTROPY_CONTEXT *)xd->left_context; ENTROPY_CONTEXT *const L = (ENTROPY_CONTEXT *)xd->left_context;
ENTROPY_CONTEXT *const a = A + vp9_block2above[TX_4X4][i]; ENTROPY_CONTEXT *const a = A + vp9_block2above[TX_4X4][i];
ENTROPY_CONTEXT *const l = L + vp9_block2left[TX_4X4][i]; ENTROPY_CONTEXT *const l = L + vp9_block2left[TX_4X4][i];
unsigned short *const eobs = xd->eobs; uint16_t *const eobs = xd->eobs;
int c; int c;
c = decode_coefs(dx, xd, bc, a, l, type, tx_type, seg_eob, c = decode_coefs(dx, xd, bc, a, l, type, tx_type, seg_eob,

View File

@ -32,4 +32,4 @@ int vp9_decode_sb_tokens(VP9D_COMP* const pbi,
int vp9_decode_mb_tokens_4x4_uv(VP9D_COMP* const dx, MACROBLOCKD* const xd, int vp9_decode_mb_tokens_4x4_uv(VP9D_COMP* const dx, MACROBLOCKD* const xd,
BOOL_DECODER* const bc); BOOL_DECODER* const bc);
#endif /* DETOKENIZE_H */ #endif // VP9_DECODER_VP9_DETOKENIZE_H_

View File

@ -14,11 +14,11 @@
#include "vp9/decoder/vp9_dequantize.h" #include "vp9/decoder/vp9_dequantize.h"
#endif #endif
void vp9_dequant_dc_idct_add_y_block_c(short *q, const short *dq, void vp9_dequant_dc_idct_add_y_block_c(int16_t *q, const int16_t *dq,
unsigned char *pre, uint8_t *pre,
unsigned char *dst, uint8_t *dst,
int stride, unsigned short *eobs, int stride, uint16_t *eobs,
const short *dc) { const int16_t *dc) {
int i, j; int i, j;
for (i = 0; i < 4; i++) { for (i = 0; i < 4; i++) {
@ -40,11 +40,12 @@ void vp9_dequant_dc_idct_add_y_block_c(short *q, const short *dq,
} }
#if CONFIG_SUPERBLOCKS #if CONFIG_SUPERBLOCKS
void vp9_dequant_dc_idct_add_y_block_4x4_inplace_c(short *q, const short *dq, void vp9_dequant_dc_idct_add_y_block_4x4_inplace_c(int16_t *q,
unsigned char *dst, const int16_t *dq,
uint8_t *dst,
int stride, int stride,
unsigned short *eobs, uint16_t *eobs,
const short *dc, const int16_t *dc,
MACROBLOCKD *xd) { MACROBLOCKD *xd) {
int i, j; int i, j;
@ -65,10 +66,10 @@ void vp9_dequant_dc_idct_add_y_block_4x4_inplace_c(short *q, const short *dq,
} }
#endif #endif
void vp9_dequant_idct_add_y_block_c(short *q, const short *dq, void vp9_dequant_idct_add_y_block_c(int16_t *q, const int16_t *dq,
unsigned char *pre, uint8_t *pre,
unsigned char *dst, uint8_t *dst,
int stride, unsigned short *eobs) { int stride, uint16_t *eobs) {
int i, j; int i, j;
for (i = 0; i < 4; i++) { for (i = 0; i < 4; i++) {
@ -90,10 +91,10 @@ void vp9_dequant_idct_add_y_block_c(short *q, const short *dq,
} }
} }
void vp9_dequant_idct_add_uv_block_c(short *q, const short *dq, void vp9_dequant_idct_add_uv_block_c(int16_t *q, const int16_t *dq,
unsigned char *pre, unsigned char *dstu, uint8_t *pre, uint8_t *dstu,
unsigned char *dstv, int stride, uint8_t *dstv, int stride,
unsigned short *eobs) { uint16_t *eobs) {
int i, j; int i, j;
for (i = 0; i < 2; i++) { for (i = 0; i < 2; i++) {
@ -134,11 +135,11 @@ void vp9_dequant_idct_add_uv_block_c(short *q, const short *dq,
} }
#if CONFIG_SUPERBLOCKS #if CONFIG_SUPERBLOCKS
void vp9_dequant_idct_add_uv_block_4x4_inplace_c(short *q, const short *dq, void vp9_dequant_idct_add_uv_block_4x4_inplace_c(int16_t *q, const int16_t *dq,
unsigned char *dstu, uint8_t *dstu,
unsigned char *dstv, uint8_t *dstv,
int stride, int stride,
unsigned short *eobs, uint16_t *eobs,
MACROBLOCKD *xd) { MACROBLOCKD *xd) {
int i, j; int i, j;
@ -176,11 +177,11 @@ void vp9_dequant_idct_add_uv_block_4x4_inplace_c(short *q, const short *dq,
} }
#endif #endif
void vp9_dequant_dc_idct_add_y_block_8x8_c(short *q, const short *dq, void vp9_dequant_dc_idct_add_y_block_8x8_c(int16_t *q, const int16_t *dq,
unsigned char *pre, uint8_t *pre,
unsigned char *dst, uint8_t *dst,
int stride, unsigned short *eobs, int stride, uint16_t *eobs,
const short *dc, const int16_t *dc,
MACROBLOCKD *xd) { MACROBLOCKD *xd) {
q[0] = dc[0]; q[0] = dc[0];
vp9_dequant_idct_add_8x8_c(q, dq, pre, dst, 16, stride, 1, xd->eobs[0]); vp9_dequant_idct_add_8x8_c(q, dq, pre, dst, 16, stride, 1, xd->eobs[0]);
@ -200,11 +201,12 @@ void vp9_dequant_dc_idct_add_y_block_8x8_c(short *q, const short *dq,
} }
#if CONFIG_SUPERBLOCKS #if CONFIG_SUPERBLOCKS
void vp9_dequant_dc_idct_add_y_block_8x8_inplace_c(short *q, const short *dq, void vp9_dequant_dc_idct_add_y_block_8x8_inplace_c(int16_t *q,
unsigned char *dst, const int16_t *dq,
uint8_t *dst,
int stride, int stride,
unsigned short *eobs, uint16_t *eobs,
const short *dc, const int16_t *dc,
MACROBLOCKD *xd) { MACROBLOCKD *xd) {
q[0] = dc[0]; q[0] = dc[0];
vp9_dequant_idct_add_8x8_c(q, dq, dst, dst, stride, stride, 1, xd->eobs[0]); vp9_dequant_idct_add_8x8_c(q, dq, dst, dst, stride, stride, 1, xd->eobs[0]);
@ -225,13 +227,13 @@ void vp9_dequant_dc_idct_add_y_block_8x8_inplace_c(short *q, const short *dq,
} }
#endif #endif
void vp9_dequant_idct_add_y_block_8x8_c(short *q, const short *dq, void vp9_dequant_idct_add_y_block_8x8_c(int16_t *q, const int16_t *dq,
unsigned char *pre, uint8_t *pre,
unsigned char *dst, uint8_t *dst,
int stride, unsigned short *eobs, int stride, uint16_t *eobs,
MACROBLOCKD *xd) { MACROBLOCKD *xd) {
unsigned char *origdest = dst; uint8_t *origdest = dst;
unsigned char *origpred = pre; uint8_t *origpred = pre;
vp9_dequant_idct_add_8x8_c(q, dq, pre, dst, 16, stride, 0, xd->eobs[0]); vp9_dequant_idct_add_8x8_c(q, dq, pre, dst, 16, stride, 0, xd->eobs[0]);
vp9_dequant_idct_add_8x8_c(&q[64], dq, origpred + 8, vp9_dequant_idct_add_8x8_c(&q[64], dq, origpred + 8,
@ -243,11 +245,11 @@ void vp9_dequant_idct_add_y_block_8x8_c(short *q, const short *dq,
xd->eobs[12]); xd->eobs[12]);
} }
void vp9_dequant_idct_add_uv_block_8x8_c(short *q, const short *dq, void vp9_dequant_idct_add_uv_block_8x8_c(int16_t *q, const int16_t *dq,
unsigned char *pre, uint8_t *pre,
unsigned char *dstu, uint8_t *dstu,
unsigned char *dstv, uint8_t *dstv,
int stride, unsigned short *eobs, int stride, uint16_t *eobs,
MACROBLOCKD *xd) { MACROBLOCKD *xd) {
vp9_dequant_idct_add_8x8_c(q, dq, pre, dstu, 8, stride, 0, xd->eobs[16]); vp9_dequant_idct_add_8x8_c(q, dq, pre, dstu, 8, stride, 0, xd->eobs[16]);
@ -258,11 +260,11 @@ void vp9_dequant_idct_add_uv_block_8x8_c(short *q, const short *dq,
} }
#if CONFIG_SUPERBLOCKS #if CONFIG_SUPERBLOCKS
void vp9_dequant_idct_add_uv_block_8x8_inplace_c(short *q, const short *dq, void vp9_dequant_idct_add_uv_block_8x8_inplace_c(int16_t *q, const int16_t *dq,
unsigned char *dstu, uint8_t *dstu,
unsigned char *dstv, uint8_t *dstv,
int stride, int stride,
unsigned short *eobs, uint16_t *eobs,
MACROBLOCKD *xd) { MACROBLOCKD *xd) {
vp9_dequant_idct_add_8x8_c(q, dq, dstu, dstu, stride, stride, 0, vp9_dequant_idct_add_8x8_c(q, dq, dstu, dstu, stride, stride, 0,
xd->eobs[16]); xd->eobs[16]);
@ -274,12 +276,12 @@ void vp9_dequant_idct_add_uv_block_8x8_inplace_c(short *q, const short *dq,
#endif #endif
#if CONFIG_LOSSLESS #if CONFIG_LOSSLESS
void vp9_dequant_dc_idct_add_y_block_lossless_c(short *q, const short *dq, void vp9_dequant_dc_idct_add_y_block_lossless_c(int16_t *q, const int16_t *dq,
unsigned char *pre, uint8_t *pre,
unsigned char *dst, uint8_t *dst,
int stride, int stride,
unsigned short *eobs, uint16_t *eobs,
const short *dc) { const int16_t *dc) {
int i, j; int i, j;
for (i = 0; i < 4; i++) { for (i = 0; i < 4; i++) {
@ -300,10 +302,10 @@ void vp9_dequant_dc_idct_add_y_block_lossless_c(short *q, const short *dq,
} }
} }
void vp9_dequant_idct_add_y_block_lossless_c(short *q, const short *dq, void vp9_dequant_idct_add_y_block_lossless_c(int16_t *q, const int16_t *dq,
unsigned char *pre, uint8_t *pre,
unsigned char *dst, uint8_t *dst,
int stride, unsigned short *eobs) { int stride, uint16_t *eobs) {
int i, j; int i, j;
for (i = 0; i < 4; i++) { for (i = 0; i < 4; i++) {
@ -325,12 +327,12 @@ void vp9_dequant_idct_add_y_block_lossless_c(short *q, const short *dq,
} }
} }
void vp9_dequant_idct_add_uv_block_lossless_c(short *q, const short *dq, void vp9_dequant_idct_add_uv_block_lossless_c(int16_t *q, const int16_t *dq,
unsigned char *pre, uint8_t *pre,
unsigned char *dstu, uint8_t *dstu,
unsigned char *dstv, uint8_t *dstv,
int stride, int stride,
unsigned short *eobs) { uint16_t *eobs) {
int i, j; int i, j;
for (i = 0; i < 2; i++) { for (i = 0; i < 2; i++) {

View File

@ -8,15 +8,12 @@
* be found in the AUTHORS file in the root of the source tree. * be found in the AUTHORS file in the root of the source tree.
*/ */
#ifndef VP9_COMMON_VP9_ONYXD_H_ #ifndef VP9_COMMON_VP9_ONYXD_H_
#define VP9_COMMON_VP9_ONYXD_H_ #define VP9_COMMON_VP9_ONYXD_H_
/* Create/destroy static data structures. */ /* Create/destroy static data structures. */
#ifdef __cplusplus #ifdef __cplusplus
extern "C" extern "C" {
{
#endif #endif
#include "vpx_scale/yv12config.h" #include "vpx_scale/yv12config.h"
#include "vp9/common/vp9_ppflags.h" #include "vp9/common/vp9_ppflags.h"
@ -64,4 +61,4 @@ extern "C"
} }
#endif #endif
#endif // __INC_ONYXD_H #endif // VP9_COMMON_VP9_ONYXD_H_

View File

@ -13,7 +13,7 @@
#if CONFIG_POSTPROC #if CONFIG_POSTPROC
#include "vp9/common/vp9_postproc.h" #include "vp9/common/vp9_postproc.h"
#endif #endif
#include "vp9/common/vp9_onyxd.h" #include "vp9/decoder/vp9_onyxd.h"
#include "vp9/decoder/vp9_onyxd_int.h" #include "vp9/decoder/vp9_onyxd_int.h"
#include "vpx_mem/vpx_mem.h" #include "vpx_mem/vpx_mem.h"
#include "vp9/common/vp9_alloccommon.h" #include "vp9/common/vp9_alloccommon.h"
@ -37,7 +37,7 @@ static void ref_cnt_fb(int *buf, int *idx, int new_idx);
#if WRITE_RECON_BUFFER == 1 #if WRITE_RECON_BUFFER == 1
static void recon_write_yuv_frame(char *name, YV12_BUFFER_CONFIG *s) { static void recon_write_yuv_frame(char *name, YV12_BUFFER_CONFIG *s) {
FILE *yuv_file = fopen((char *)name, "ab"); FILE *yuv_file = fopen((char *)name, "ab");
unsigned char *src = s->y_buffer; uint8_t *src = s->y_buffer;
int h = s->y_height; int h = s->y_height;
do { do {

View File

@ -8,11 +8,11 @@
* be found in the AUTHORS file in the root of the source tree. * be found in the AUTHORS file in the root of the source tree.
*/ */
#ifndef VP9_DECODER_VP9_ONYXD_INT_H_ #ifndef VP9_DECODER_VP9_ONYXD_INT_H_
#define VP9_DECODER_VP9_ONYXD_INT_H_ #define VP9_DECODER_VP9_ONYXD_INT_H_
#include "vpx_ports/config.h" #include "vpx_ports/config.h"
#include "vp9/common/vp9_onyxd.h" #include "vp9/decoder/vp9_onyxd.h"
#include "vp9/decoder/vp9_treereader.h" #include "vp9/decoder/vp9_treereader.h"
#include "vp9/common/vp9_onyxc_int.h" #include "vp9/common/vp9_onyxc_int.h"
#include "vp9/decoder/vp9_dequantize.h" #include "vp9/decoder/vp9_dequantize.h"
@ -103,4 +103,4 @@ int vp9_decode_frame(VP9D_COMP *cpi, const unsigned char **p_data_end);
} while(0) } while(0)
#endif #endif
#endif // __INC_ONYXD_INT_H #endif // VP9_DECODER_VP9_TREEREADER_H_

View File

@ -1,15 +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.
*/
#ifndef VP9_DECODER_VP9_RECONINTRA_MT_H_
#define VP9_DECODER_VP9_RECONINTRA_MT_H_
#endif

View File

@ -34,4 +34,4 @@ static int treed_read(vp9_reader *const r, /* !!! must return a 0 or 1 !!! */
return -i; return -i;
} }
#endif /* tree_reader_h */ #endif // VP9_DECODER_VP9_TREEREADER_H_

View File

@ -14,4 +14,4 @@
void vp9_update_skip_probs(VP9_COMP *cpi); void vp9_update_skip_probs(VP9_COMP *cpi);
#endif #endif // VP9_ENCODER_VP9_BITSTREAM_H_

View File

@ -8,7 +8,6 @@
* be found in the AUTHORS file in the root of the source tree. * be found in the AUTHORS file in the root of the source tree.
*/ */
#ifndef VP9_ENCODER_VP9_BLOCK_H_ #ifndef VP9_ENCODER_VP9_BLOCK_H_
#define VP9_ENCODER_VP9_BLOCK_H_ #define VP9_ENCODER_VP9_BLOCK_H_
@ -26,32 +25,32 @@ typedef struct {
typedef struct block { typedef struct block {
// 16 Y blocks, 4 U blocks, 4 V blocks each with 16 entries // 16 Y blocks, 4 U blocks, 4 V blocks each with 16 entries
short *src_diff; int16_t *src_diff;
short *coeff; int16_t *coeff;
// 16 Y blocks, 4 U blocks, 4 V blocks each with 16 entries // 16 Y blocks, 4 U blocks, 4 V blocks each with 16 entries
short *quant; int16_t *quant;
short *quant_fast; // fast quant deprecated for now int16_t *quant_fast; // fast quant deprecated for now
unsigned char *quant_shift; uint8_t *quant_shift;
short *zbin; int16_t *zbin;
short *zbin_8x8; int16_t *zbin_8x8;
short *zbin_16x16; int16_t *zbin_16x16;
#if CONFIG_TX32X32 && CONFIG_SUPERBLOCKS #if CONFIG_TX32X32 && CONFIG_SUPERBLOCKS
short *zbin_32x32; int16_t *zbin_32x32;
#endif #endif
short *zrun_zbin_boost; int16_t *zrun_zbin_boost;
short *zrun_zbin_boost_8x8; int16_t *zrun_zbin_boost_8x8;
short *zrun_zbin_boost_16x16; int16_t *zrun_zbin_boost_16x16;
#if CONFIG_TX32X32 && CONFIG_SUPERBLOCKS #if CONFIG_TX32X32 && CONFIG_SUPERBLOCKS
short *zrun_zbin_boost_32x32; int16_t *zrun_zbin_boost_32x32;
#endif #endif
short *round; int16_t *round;
// Zbin Over Quant value // Zbin Over Quant value
short zbin_extra; short zbin_extra;
unsigned char **base_src; uint8_t **base_src;
unsigned char **base_second_src; uint8_t **base_second_src;
int src; int src;
int src_stride; int src_stride;
@ -94,16 +93,16 @@ typedef struct {
#if CONFIG_SUPERBLOCKS && CONFIG_TX32X32 #if CONFIG_SUPERBLOCKS && CONFIG_TX32X32
typedef struct superblock { typedef struct superblock {
DECLARE_ALIGNED(16, short, src_diff[32*32+16*16*2]); DECLARE_ALIGNED(16, int16_t, src_diff[32*32+16*16*2]);
DECLARE_ALIGNED(16, short, coeff[32*32+16*16*2]); DECLARE_ALIGNED(16, int16_t, coeff[32*32+16*16*2]);
} SUPERBLOCK; } SUPERBLOCK;
#endif #endif
typedef struct macroblock { typedef struct macroblock {
DECLARE_ALIGNED(16, short, src_diff[400]); // 16x16 Y 8x8 U 8x8 V 4x4 2nd Y DECLARE_ALIGNED(16, int16_t, src_diff[400]); // 16x16 Y 8x8 U 8x8 V 4x4 2nd Y
DECLARE_ALIGNED(16, short, coeff[400]); // 16x16 Y 8x8 U 8x8 V 4x4 2nd Y DECLARE_ALIGNED(16, int16_t, coeff[400]); // 16x16 Y 8x8 U 8x8 V 4x4 2nd Y
#if !CONFIG_SUPERBLOCKS #if !CONFIG_SUPERBLOCKS
DECLARE_ALIGNED(16, unsigned char, thismb[256]); // 16x16 Y DECLARE_ALIGNED(16, uint8_t, thismb[256]); // 16x16 Y
unsigned char *thismb_ptr; unsigned char *thismb_ptr;
#endif #endif
@ -188,19 +187,17 @@ typedef struct macroblock {
PICK_MODE_CONTEXT sb_context[4]; PICK_MODE_CONTEXT sb_context[4];
#endif #endif
void (*vp9_short_fdct4x4)(short *input, short *output, int pitch); void (*vp9_short_fdct4x4)(int16_t *input, int16_t *output, int pitch);
void (*vp9_short_fdct8x4)(short *input, short *output, int pitch); void (*vp9_short_fdct8x4)(int16_t *input, int16_t *output, int pitch);
void (*short_walsh4x4)(short *input, short *output, int pitch); void (*short_walsh4x4)(int16_t *input, int16_t *output, int pitch);
void (*quantize_b_4x4)(BLOCK *b, BLOCKD *d); void (*quantize_b_4x4)(BLOCK *b, BLOCKD *d);
void (*quantize_b_4x4_pair)(BLOCK *b1, BLOCK *b2, BLOCKD *d0, BLOCKD *d1); void (*quantize_b_4x4_pair)(BLOCK *b1, BLOCK *b2, BLOCKD *d0, BLOCKD *d1);
void (*vp9_short_fdct8x8)(short *input, short *output, int pitch); void (*vp9_short_fdct8x8)(int16_t *input, int16_t *output, int pitch);
void (*vp9_short_fdct16x16)(short *input, short *output, int pitch); void (*vp9_short_fdct16x16)(int16_t *input, int16_t *output, int pitch);
void (*short_fhaar2x2)(short *input, short *output, int pitch); void (*short_fhaar2x2)(int16_t *input, int16_t *output, int pitch);
void (*quantize_b_16x16)(BLOCK *b, BLOCKD *d); void (*quantize_b_16x16)(BLOCK *b, BLOCKD *d);
void (*quantize_b_8x8)(BLOCK *b, BLOCKD *d); void (*quantize_b_8x8)(BLOCK *b, BLOCKD *d);
void (*quantize_b_2x2)(BLOCK *b, BLOCKD *d); void (*quantize_b_2x2)(BLOCK *b, BLOCKD *d);
} MACROBLOCK; } MACROBLOCK;
#endif // VP9_ENCODER_VP9_BLOCK_H_
#endif

View File

@ -109,4 +109,4 @@ static void encode_bool(BOOL_CODER *br, int bit, int probability) {
br->range = range; br->range = range;
} }
#endif #endif // VP9_ENCODER_VP9_BOOLHUFF_H_

View File

@ -80,7 +80,7 @@ unsigned int b_modes[B_MODE_COUNT];
* Eventually this should be replaced by custom no-reference routines, * Eventually this should be replaced by custom no-reference routines,
* which will be faster. * which will be faster.
*/ */
static const unsigned char VP9_VAR_OFFS[16] = { static const uint8_t VP9_VAR_OFFS[16] = {
128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128
}; };
@ -1263,9 +1263,9 @@ void encode_sb_row(VP9_COMP *cpi,
MODE_INFO *mic = xd->mode_info_context; MODE_INFO *mic = xd->mode_info_context;
PARTITION_INFO *pi = x->partition_info; PARTITION_INFO *pi = x->partition_info;
signed char *gfa = x->gf_active_ptr; signed char *gfa = x->gf_active_ptr;
unsigned char *yb = x->src.y_buffer; uint8_t *yb = x->src.y_buffer;
unsigned char *ub = x->src.u_buffer; uint8_t *ub = x->src.u_buffer;
unsigned char *vb = x->src.v_buffer; uint8_t *vb = x->src.v_buffer;
#endif #endif
#if CONFIG_SUPERBLOCKS #if CONFIG_SUPERBLOCKS

View File

@ -18,4 +18,4 @@ extern void vp9_build_block_offsets(struct macroblock *x);
extern void vp9_setup_block_ptrs(struct macroblock *x); extern void vp9_setup_block_ptrs(struct macroblock *x);
#endif // __INC_ENCODEFRAME_H #endif // VP9_ENCODER_VP9_ENCODEFRAME_H_

View File

@ -22,4 +22,4 @@ void vp9_encode_intra8x8mby(MACROBLOCK *x);
void vp9_encode_intra8x8mbuv(MACROBLOCK *x); void vp9_encode_intra8x8mbuv(MACROBLOCK *x);
void vp9_encode_intra8x8(MACROBLOCK *x, int ib); void vp9_encode_intra8x8(MACROBLOCK *x, int ib);
#endif // __ENCODEINTRA_H_ #endif // VP9_ENCODER_VP9_ENCODEINTRA_H_

View File

@ -21,9 +21,9 @@
#include "vp9_rtcd.h" #include "vp9_rtcd.h"
void vp9_subtract_b_c(BLOCK *be, BLOCKD *bd, int pitch) { void vp9_subtract_b_c(BLOCK *be, BLOCKD *bd, int pitch) {
unsigned char *src_ptr = (*(be->base_src) + be->src); uint8_t *src_ptr = (*(be->base_src) + be->src);
short *diff_ptr = be->src_diff; int16_t *diff_ptr = be->src_diff;
unsigned char *pred_ptr = bd->predictor; uint8_t *pred_ptr = bd->predictor;
int src_stride = be->src_stride; int src_stride = be->src_stride;
int r, c; int r, c;
@ -40,9 +40,9 @@ void vp9_subtract_b_c(BLOCK *be, BLOCKD *bd, int pitch) {
} }
void vp9_subtract_4b_c(BLOCK *be, BLOCKD *bd, int pitch) { void vp9_subtract_4b_c(BLOCK *be, BLOCKD *bd, int pitch) {
unsigned char *src_ptr = (*(be->base_src) + be->src); uint8_t *src_ptr = (*(be->base_src) + be->src);
short *diff_ptr = be->src_diff; int16_t *diff_ptr = be->src_diff;
unsigned char *pred_ptr = bd->predictor; uint8_t *pred_ptr = bd->predictor;
int src_stride = be->src_stride; int src_stride = be->src_stride;
int r, c; int r, c;
@ -56,12 +56,12 @@ void vp9_subtract_4b_c(BLOCK *be, BLOCKD *bd, int pitch) {
} }
} }
void vp9_subtract_mbuv_s_c(short *diff, const unsigned char *usrc, void vp9_subtract_mbuv_s_c(int16_t *diff, const uint8_t *usrc,
const unsigned char *vsrc, int src_stride, const uint8_t *vsrc, int src_stride,
const unsigned char *upred, const uint8_t *upred,
const unsigned char *vpred, int dst_stride) { const uint8_t *vpred, int dst_stride) {
short *udiff = diff + 256; int16_t *udiff = diff + 256;
short *vdiff = diff + 320; int16_t *vdiff = diff + 320;
int r, c; int r, c;
for (r = 0; r < 8; r++) { for (r = 0; r < 8; r++) {
@ -85,16 +85,16 @@ void vp9_subtract_mbuv_s_c(short *diff, const unsigned char *usrc,
} }
} }
void vp9_subtract_mbuv_c(short *diff, unsigned char *usrc, void vp9_subtract_mbuv_c(int16_t *diff, uint8_t *usrc,
unsigned char *vsrc, unsigned char *pred, int stride) { uint8_t *vsrc, uint8_t *pred, int stride) {
unsigned char *upred = pred + 256; uint8_t *upred = pred + 256;
unsigned char *vpred = pred + 320; uint8_t *vpred = pred + 320;
vp9_subtract_mbuv_s_c(diff, usrc, vsrc, stride, upred, vpred, 8); vp9_subtract_mbuv_s_c(diff, usrc, vsrc, stride, upred, vpred, 8);
} }
void vp9_subtract_mby_s_c(short *diff, const unsigned char *src, int src_stride, void vp9_subtract_mby_s_c(int16_t *diff, const uint8_t *src, int src_stride,
const unsigned char *pred, int dst_stride) { const uint8_t *pred, int dst_stride) {
int r, c; int r, c;
for (r = 0; r < 16; r++) { for (r = 0; r < 16; r++) {
@ -109,8 +109,8 @@ void vp9_subtract_mby_s_c(short *diff, const unsigned char *src, int src_stride,
} }
#if CONFIG_TX32X32 && CONFIG_SUPERBLOCKS #if CONFIG_TX32X32 && CONFIG_SUPERBLOCKS
void vp9_subtract_sby_s_c(short *diff, const unsigned char *src, int src_stride, void vp9_subtract_sby_s_c(int16_t *diff, const uint8_t *src, int src_stride,
const unsigned char *pred, int dst_stride) { const uint8_t *pred, int dst_stride) {
int r, c; int r, c;
for (r = 0; r < 32; r++) { for (r = 0; r < 32; r++) {
@ -124,12 +124,12 @@ void vp9_subtract_sby_s_c(short *diff, const unsigned char *src, int src_stride,
} }
} }
void vp9_subtract_sbuv_s_c(short *diff, const unsigned char *usrc, void vp9_subtract_sbuv_s_c(int16_t *diff, const uint8_t *usrc,
const unsigned char *vsrc, int src_stride, const uint8_t *vsrc, int src_stride,
const unsigned char *upred, const uint8_t *upred,
const unsigned char *vpred, int dst_stride) { const uint8_t *vpred, int dst_stride) {
short *udiff = diff + 1024; int16_t *udiff = diff + 1024;
short *vdiff = diff + 1024 + 256; int16_t *vdiff = diff + 1024 + 256;
int r, c; int r, c;
for (r = 0; r < 16; r++) { for (r = 0; r < 16; r++) {
@ -154,8 +154,8 @@ void vp9_subtract_sbuv_s_c(short *diff, const unsigned char *usrc,
} }
#endif #endif
void vp9_subtract_mby_c(short *diff, unsigned char *src, void vp9_subtract_mby_c(int16_t *diff, uint8_t *src,
unsigned char *pred, int stride) { uint8_t *pred, int stride) {
vp9_subtract_mby_s_c(diff, src, stride, pred, 16); vp9_subtract_mby_s_c(diff, src, stride, pred, 16);
} }
@ -169,7 +169,7 @@ static void subtract_mb(MACROBLOCK *x) {
} }
static void build_dcblock_4x4(MACROBLOCK *x) { static void build_dcblock_4x4(MACROBLOCK *x) {
short *src_diff_ptr = &x->src_diff[384]; int16_t *src_diff_ptr = &x->src_diff[384];
int i; int i;
for (i = 0; i < 16; i++) { for (i = 0; i < 16; i++) {
@ -368,9 +368,9 @@ static void optimize_b(MACROBLOCK *mb, int i, PLANE_TYPE type,
BLOCKD *d = &mb->e_mbd.block[i]; BLOCKD *d = &mb->e_mbd.block[i];
vp9_token_state tokens[257][2]; vp9_token_state tokens[257][2];
unsigned best_index[257][2]; unsigned best_index[257][2];
const short *dequant_ptr = d->dequant, *coeff_ptr = b->coeff; const int16_t *dequant_ptr = d->dequant, *coeff_ptr = b->coeff;
short *qcoeff_ptr = d->qcoeff; int16_t *qcoeff_ptr = d->qcoeff;
short *dqcoeff_ptr = d->dqcoeff; int16_t *dqcoeff_ptr = d->dqcoeff;
int eob = d->eob, final_eob, sz = 0; int eob = d->eob, final_eob, sz = 0;
int i0 = (type == PLANE_TYPE_Y_NO_DC); int i0 = (type == PLANE_TYPE_Y_NO_DC);
int rc, x, next; int rc, x, next;

View File

@ -8,7 +8,6 @@
* be found in the AUTHORS file in the root of the source tree. * be found in the AUTHORS file in the root of the source tree.
*/ */
#ifndef VP9_ENCODER_VP9_ENCODEMB_H_ #ifndef VP9_ENCODER_VP9_ENCODEMB_H_
#define VP9_ENCODER_VP9_ENCODEMB_H_ #define VP9_ENCODER_VP9_ENCODEMB_H_
@ -57,21 +56,21 @@ void vp9_fidct_mb(MACROBLOCK *x);
void vp9_subtract_4b_c(BLOCK *be, BLOCKD *bd, int pitch); void vp9_subtract_4b_c(BLOCK *be, BLOCKD *bd, int pitch);
#if CONFIG_SUPERBLOCKS #if CONFIG_SUPERBLOCKS
void vp9_subtract_mbuv_s_c(short *diff, const unsigned char *usrc, void vp9_subtract_mbuv_s_c(int16_t *diff, const uint8_t *usrc,
const unsigned char *vsrc, int src_stride, const uint8_t *vsrc, int src_stride,
const unsigned char *upred, const uint8_t *upred,
const unsigned char *vpred, int dst_stride); const uint8_t *vpred, int dst_stride);
void vp9_subtract_mby_s_c(short *diff, const unsigned char *src, void vp9_subtract_mby_s_c(int16_t *diff, const uint8_t *src,
int src_stride, const unsigned char *pred, int src_stride, const uint8_t *pred,
int dst_stride); int dst_stride);
#if CONFIG_TX32X32 #if CONFIG_TX32X32
void vp9_subtract_sby_s_c(short *diff, const unsigned char *src, int src_stride, void vp9_subtract_sby_s_c(int16_t *diff, const uint8_t *src, int src_stride,
const unsigned char *pred, int dst_stride); const uint8_t *pred, int dst_stride);
void vp9_subtract_sbuv_s_c(short *diff, const unsigned char *usrc, void vp9_subtract_sbuv_s_c(int16_t *diff, const uint8_t *usrc,
const unsigned char *vsrc, int src_stride, const uint8_t *vsrc, int src_stride,
const unsigned char *upred, const uint8_t *upred,
const unsigned char *vpred, int dst_stride); const uint8_t *vpred, int dst_stride);
#endif #endif // CONFIG_TX32X32
#endif #endif // CONFIG_SUPERBLOCKS
#endif #endif // VP9_ENCODER_VP9_ENCODEMB_H_

View File

@ -30,4 +30,5 @@ void vp9_update_nmv_count(VP9_COMP *cpi, MACROBLOCK *x,
int_mv *best_ref_mv, int_mv *second_best_ref_mv); int_mv *best_ref_mv, int_mv *second_best_ref_mv);
void print_nmvcounts(nmv_context_counts tnmvcounts); void print_nmvcounts(nmv_context_counts tnmvcounts);
#endif
#endif // VP9_ENCODER_VP9_ENCODEMV_H_

View File

@ -295,7 +295,7 @@ static const double weight_table[256] = {
static double simple_weight(YV12_BUFFER_CONFIG *source) { static double simple_weight(YV12_BUFFER_CONFIG *source) {
int i, j; int i, j;
unsigned char *src = source->y_buffer; uint8_t *src = source->y_buffer;
double sum_weights = 0.0; double sum_weights = 0.0;
// Loop throught the Y plane raw examining levels and creating a weight for the image // Loop throught the Y plane raw examining levels and creating a weight for the image
@ -344,15 +344,15 @@ static void zz_motion_search(VP9_COMP *cpi, MACROBLOCK *x, YV12_BUFFER_CONFIG *r
BLOCK *b = &x->block[0]; BLOCK *b = &x->block[0];
BLOCKD *d = &x->e_mbd.block[0]; BLOCKD *d = &x->e_mbd.block[0];
unsigned char *src_ptr = (*(b->base_src) + b->src); uint8_t *src_ptr = (*(b->base_src) + b->src);
int src_stride = b->src_stride; int src_stride = b->src_stride;
unsigned char *ref_ptr; uint8_t *ref_ptr;
int ref_stride = d->pre_stride; int ref_stride = d->pre_stride;
// Set up pointers for this macro block recon buffer // Set up pointers for this macro block recon buffer
xd->pre.y_buffer = recon_buffer->y_buffer + recon_yoffset; xd->pre.y_buffer = recon_buffer->y_buffer + recon_yoffset;
ref_ptr = (unsigned char *)(*(d->base_pre) + d->pre); ref_ptr = (uint8_t *)(*(d->base_pre) + d->pre);
vp9_mse16x16(src_ptr, src_stride, ref_ptr, ref_stride, vp9_mse16x16(src_ptr, src_stride, ref_ptr, ref_stride,
(unsigned int *)(best_motion_err)); (unsigned int *)(best_motion_err));

View File

@ -8,8 +8,7 @@
* be found in the AUTHORS file in the root of the source tree. * be found in the AUTHORS file in the root of the source tree.
*/ */
#ifndef VP9_ENCODER_VP9_FIRSTPASS_H_
#if !defined __INC_FIRSTPASS_H
#define VP9_ENCODER_VP9_FIRSTPASS_H_ #define VP9_ENCODER_VP9_FIRSTPASS_H_
extern void vp9_init_first_pass(VP9_COMP *cpi); extern void vp9_init_first_pass(VP9_COMP *cpi);
@ -20,4 +19,4 @@ extern void vp9_init_second_pass(VP9_COMP *cpi);
extern void vp9_second_pass(VP9_COMP *cpi); extern void vp9_second_pass(VP9_COMP *cpi);
extern void vp9_end_second_pass(VP9_COMP *cpi); extern void vp9_end_second_pass(VP9_COMP *cpi);
#endif #endif // VP9_ENCODER_VP9_FIRSTPASS_H_

View File

@ -7,8 +7,10 @@
* in the file PATENTS. All contributing project authors may * in the file PATENTS. All contributing project authors may
* be found in the AUTHORS file in the root of the source tree. * be found in the AUTHORS file in the root of the source tree.
*/ */
#ifndef VP9_ENCODER_VP9_LOOKAHEAD_H_ #ifndef VP9_ENCODER_VP9_LOOKAHEAD_H_
#define VP9_ENCODER_VP9_LOOKAHEAD_H_ #define VP9_ENCODER_VP9_LOOKAHEAD_H_
#include "vpx_scale/yv12config.h" #include "vpx_scale/yv12config.h"
#include "vpx/vpx_integer.h" #include "vpx/vpx_integer.h"
@ -101,5 +103,4 @@ vp9_lookahead_peek(struct lookahead_ctx *ctx,
unsigned int unsigned int
vp9_lookahead_depth(struct lookahead_ctx *ctx); vp9_lookahead_depth(struct lookahead_ctx *ctx);
#endif // VP9_ENCODER_VP9_LOOKAHEAD_H_
#endif

View File

@ -13,4 +13,4 @@
extern void vp9_update_mbgraph_stats(VP9_COMP *cpi); extern void vp9_update_mbgraph_stats(VP9_COMP *cpi);
#endif /* __INC_MBGRAPH_H__ */ #endif // VP9_ENCODER_VP9_MBGRAPH_H_

View File

@ -251,7 +251,7 @@ int vp9_find_best_sub_pixel_step_iteratively(MACROBLOCK *x, BLOCK *b, BLOCKD *d,
int *mvjcost, int *mvcost[2], int *mvjcost, int *mvcost[2],
int *distortion, int *distortion,
unsigned int *sse1) { unsigned int *sse1) {
unsigned char *z = (*(b->base_src) + b->src); uint8_t *z = (*(b->base_src) + b->src);
MACROBLOCKD *xd = &x->e_mbd; MACROBLOCKD *xd = &x->e_mbd;
int rr, rc, br, bc, hstep; int rr, rc, br, bc, hstep;
@ -270,8 +270,9 @@ int vp9_find_best_sub_pixel_step_iteratively(MACROBLOCK *x, BLOCK *b, BLOCKD *d,
int usehp = xd->allow_high_precision_mv; int usehp = xd->allow_high_precision_mv;
#if !CONFIG_SUPERBLOCKS && (ARCH_X86 || ARCH_X86_64) #if !CONFIG_SUPERBLOCKS && (ARCH_X86 || ARCH_X86_64)
unsigned char *y0 = *(d->base_pre) + d->pre + (bestmv->as_mv.row) * d->pre_stride + bestmv->as_mv.col; uint8_t *y0 = *(d->base_pre) + d->pre +
unsigned char *y; (bestmv->as_mv.row) * d->pre_stride + bestmv->as_mv.col;
uint8_t *y;
int buf_r1, buf_r2, buf_c1, buf_c2; int buf_r1, buf_r2, buf_c1, buf_c2;
// Clamping to avoid out-of-range data access // Clamping to avoid out-of-range data access
@ -289,7 +290,8 @@ int vp9_find_best_sub_pixel_step_iteratively(MACROBLOCK *x, BLOCK *b, BLOCKD *d,
vfp->copymem(y0 - buf_c1 - d->pre_stride * buf_r1, d->pre_stride, xd->y_buf, y_stride, 16 + buf_r1 + buf_r2); vfp->copymem(y0 - buf_c1 - d->pre_stride * buf_r1, d->pre_stride, xd->y_buf, y_stride, 16 + buf_r1 + buf_r2);
y = xd->y_buf + y_stride * buf_r1 + buf_c1; y = xd->y_buf + y_stride * buf_r1 + buf_c1;
#else #else
unsigned char *y = *(d->base_pre) + d->pre + (bestmv->as_mv.row) * d->pre_stride + bestmv->as_mv.col; uint8_t *y = *(d->base_pre) + d->pre +
(bestmv->as_mv.row) * d->pre_stride + bestmv->as_mv.col;
y_stride = d->pre_stride; y_stride = d->pre_stride;
#endif #endif
@ -454,7 +456,7 @@ int vp9_find_best_sub_pixel_step(MACROBLOCK *x, BLOCK *b, BLOCKD *d,
int_mv this_mv; int_mv this_mv;
int_mv orig_mv; int_mv orig_mv;
int yrow_movedback = 0, ycol_movedback = 0; int yrow_movedback = 0, ycol_movedback = 0;
unsigned char *z = (*(b->base_src) + b->src); uint8_t *z = (*(b->base_src) + b->src);
int left, right, up, down, diag; int left, right, up, down, diag;
unsigned int sse; unsigned int sse;
int whichdir; int whichdir;
@ -464,15 +466,17 @@ int vp9_find_best_sub_pixel_step(MACROBLOCK *x, BLOCK *b, BLOCKD *d,
int usehp = xd->allow_high_precision_mv; int usehp = xd->allow_high_precision_mv;
#if !CONFIG_SUPERBLOCKS && (ARCH_X86 || ARCH_X86_64) #if !CONFIG_SUPERBLOCKS && (ARCH_X86 || ARCH_X86_64)
unsigned char *y0 = *(d->base_pre) + d->pre + (bestmv->as_mv.row) * d->pre_stride + bestmv->as_mv.col; uint8_t *y0 = *(d->base_pre) + d->pre +
unsigned char *y; (bestmv->as_mv.row) * d->pre_stride + bestmv->as_mv.col;
uint8_t *y;
y_stride = 32; y_stride = 32;
/* Copy 18 rows x 32 cols area to intermediate buffer before searching. */ /* Copy 18 rows x 32 cols area to intermediate buffer before searching. */
vfp->copymem(y0 - 1 - d->pre_stride, d->pre_stride, xd->y_buf, y_stride, 18); vfp->copymem(y0 - 1 - d->pre_stride, d->pre_stride, xd->y_buf, y_stride, 18);
y = xd->y_buf + y_stride + 1; y = xd->y_buf + y_stride + 1;
#else #else
unsigned char *y = *(d->base_pre) + d->pre + (bestmv->as_mv.row) * d->pre_stride + bestmv->as_mv.col; uint8_t *y = *(d->base_pre) + d->pre +
(bestmv->as_mv.row) * d->pre_stride + bestmv->as_mv.col;
y_stride = d->pre_stride; y_stride = d->pre_stride;
#endif #endif
@ -933,7 +937,7 @@ int vp9_find_best_half_pixel_step(MACROBLOCK *x, BLOCK *b, BLOCKD *d,
int bestmse = INT_MAX; int bestmse = INT_MAX;
int_mv startmv; int_mv startmv;
int_mv this_mv; int_mv this_mv;
unsigned char *z = (*(b->base_src) + b->src); uint8_t *z = (*(b->base_src) + b->src);
int left, right, up, down, diag; int left, right, up, down, diag;
unsigned int sse; unsigned int sse;
int whichdir; int whichdir;
@ -942,16 +946,16 @@ int vp9_find_best_half_pixel_step(MACROBLOCK *x, BLOCK *b, BLOCKD *d,
MACROBLOCKD *xd = &x->e_mbd; MACROBLOCKD *xd = &x->e_mbd;
#if !CONFIG_SUPERBLOCKS && (ARCH_X86 || ARCH_X86_64) #if !CONFIG_SUPERBLOCKS && (ARCH_X86 || ARCH_X86_64)
unsigned char *y0 = *(d->base_pre) + d->pre + uint8_t *y0 = *(d->base_pre) + d->pre +
(bestmv->as_mv.row) * d->pre_stride + bestmv->as_mv.col; (bestmv->as_mv.row) * d->pre_stride + bestmv->as_mv.col;
unsigned char *y; uint8_t *y;
y_stride = 32; y_stride = 32;
/* Copy 18 rows x 32 cols area to intermediate buffer before searching. */ /* Copy 18 rows x 32 cols area to intermediate buffer before searching. */
vfp->copymem(y0 - 1 - d->pre_stride, d->pre_stride, xd->y_buf, y_stride, 18); vfp->copymem(y0 - 1 - d->pre_stride, d->pre_stride, xd->y_buf, y_stride, 18);
y = xd->y_buf + y_stride + 1; y = xd->y_buf + y_stride + 1;
#else #else
unsigned char *y = *(d->base_pre) + d->pre + uint8_t *y = *(d->base_pre) + d->pre +
(bestmv->as_mv.row) * d->pre_stride + bestmv->as_mv.col; (bestmv->as_mv.row) * d->pre_stride + bestmv->as_mv.col;
y_stride = d->pre_stride; y_stride = d->pre_stride;
#endif #endif
@ -1118,15 +1122,15 @@ int vp9_hex_search
MV neighbors[4] = {{0, -1}, { -1, 0}, {1, 0}, {0, 1}}; MV neighbors[4] = {{0, -1}, { -1, 0}, {1, 0}, {0, 1}};
int i, j; int i, j;
unsigned char *what = (*(b->base_src) + b->src); uint8_t *what = (*(b->base_src) + b->src);
int what_stride = b->src_stride; int what_stride = b->src_stride;
int in_what_stride = d->pre_stride; int in_what_stride = d->pre_stride;
int br, bc; int br, bc;
int_mv this_mv; int_mv this_mv;
unsigned int bestsad = 0x7fffffff; unsigned int bestsad = 0x7fffffff;
unsigned int thissad; unsigned int thissad;
unsigned char *base_offset; uint8_t *base_offset;
unsigned char *this_offset; uint8_t *this_offset;
int k = -1; int k = -1;
int all_in; int all_in;
int best_site = -1; int best_site = -1;
@ -1141,7 +1145,7 @@ int vp9_hex_search
bc = ref_mv->as_mv.col; bc = ref_mv->as_mv.col;
// Work out the start point for the search // Work out the start point for the search
base_offset = (unsigned char *)(*(d->base_pre) + d->pre); base_offset = (uint8_t *)(*(d->base_pre) + d->pre);
this_offset = base_offset + (br * (d->pre_stride)) + bc; this_offset = base_offset + (br * (d->pre_stride)) + bc;
this_mv.as_mv.row = br; this_mv.as_mv.row = br;
this_mv.as_mv.col = bc; this_mv.as_mv.col = bc;
@ -1264,11 +1268,11 @@ int vp9_diamond_search_sad_c(MACROBLOCK *x, BLOCK *b, BLOCKD *d,
int *mvcost[2], int_mv *center_mv) { int *mvcost[2], int_mv *center_mv) {
int i, j, step; int i, j, step;
unsigned char *what = (*(b->base_src) + b->src); uint8_t *what = (*(b->base_src) + b->src);
int what_stride = b->src_stride; int what_stride = b->src_stride;
unsigned char *in_what; uint8_t *in_what;
int in_what_stride = d->pre_stride; int in_what_stride = d->pre_stride;
unsigned char *best_address; uint8_t *best_address;
int tot_steps; int tot_steps;
int_mv this_mv; int_mv this_mv;
@ -1281,7 +1285,7 @@ int vp9_diamond_search_sad_c(MACROBLOCK *x, BLOCK *b, BLOCKD *d,
int this_row_offset, this_col_offset; int this_row_offset, this_col_offset;
search_site *ss; search_site *ss;
unsigned char *check_here; uint8_t *check_here;
int thissad; int thissad;
MACROBLOCKD *xd = &x->e_mbd; MACROBLOCKD *xd = &x->e_mbd;
int_mv fcenter_mv; int_mv fcenter_mv;
@ -1300,7 +1304,8 @@ int vp9_diamond_search_sad_c(MACROBLOCK *x, BLOCK *b, BLOCKD *d,
best_mv->as_mv.col = ref_col; best_mv->as_mv.col = ref_col;
// Work out the start point for the search // Work out the start point for the search
in_what = (unsigned char *)(*(d->base_pre) + d->pre + (ref_row * (d->pre_stride)) + ref_col); in_what = (uint8_t *)(*(d->base_pre) + d->pre +
(ref_row * (d->pre_stride)) + ref_col);
best_address = in_what; best_address = in_what;
// Check the starting position // Check the starting position
@ -1374,11 +1379,11 @@ int vp9_diamond_search_sadx4(MACROBLOCK *x, BLOCK *b, BLOCKD *d,
int *mvjcost, int *mvcost[2], int_mv *center_mv) { int *mvjcost, int *mvcost[2], int_mv *center_mv) {
int i, j, step; int i, j, step;
unsigned char *what = (*(b->base_src) + b->src); uint8_t *what = (*(b->base_src) + b->src);
int what_stride = b->src_stride; int what_stride = b->src_stride;
unsigned char *in_what; uint8_t *in_what;
int in_what_stride = d->pre_stride; int in_what_stride = d->pre_stride;
unsigned char *best_address; uint8_t *best_address;
int tot_steps; int tot_steps;
int_mv this_mv; int_mv this_mv;
@ -1393,7 +1398,7 @@ int vp9_diamond_search_sadx4(MACROBLOCK *x, BLOCK *b, BLOCKD *d,
int this_col_offset; int this_col_offset;
search_site *ss; search_site *ss;
unsigned char *check_here; uint8_t *check_here;
unsigned int thissad; unsigned int thissad;
MACROBLOCKD *xd = &x->e_mbd; MACROBLOCKD *xd = &x->e_mbd;
int_mv fcenter_mv; int_mv fcenter_mv;
@ -1412,7 +1417,8 @@ int vp9_diamond_search_sadx4(MACROBLOCK *x, BLOCK *b, BLOCKD *d,
best_mv->as_mv.col = ref_col; best_mv->as_mv.col = ref_col;
// Work out the start point for the search // Work out the start point for the search
in_what = (unsigned char *)(*(d->base_pre) + d->pre + (ref_row * (d->pre_stride)) + ref_col); in_what = (uint8_t *)(*(d->base_pre) + d->pre +
(ref_row * (d->pre_stride)) + ref_col);
best_address = in_what; best_address = in_what;
// Check the starting position // Check the starting position
@ -1580,18 +1586,18 @@ int vp9_full_search_sad_c(MACROBLOCK *x, BLOCK *b, BLOCKD *d, int_mv *ref_mv,
vp9_variance_fn_ptr_t *fn_ptr, int *mvjcost, vp9_variance_fn_ptr_t *fn_ptr, int *mvjcost,
int *mvcost[2], int *mvcost[2],
int_mv *center_mv) { int_mv *center_mv) {
unsigned char *what = (*(b->base_src) + b->src); uint8_t *what = (*(b->base_src) + b->src);
int what_stride = b->src_stride; int what_stride = b->src_stride;
unsigned char *in_what; uint8_t *in_what;
int in_what_stride = d->pre_stride; int in_what_stride = d->pre_stride;
int mv_stride = d->pre_stride; int mv_stride = d->pre_stride;
unsigned char *bestaddress; uint8_t *bestaddress;
int_mv *best_mv = &d->bmi.as_mv.first; int_mv *best_mv = &d->bmi.as_mv.first;
int_mv this_mv; int_mv this_mv;
int bestsad = INT_MAX; int bestsad = INT_MAX;
int r, c; int r, c;
unsigned char *check_here; uint8_t *check_here;
int thissad; int thissad;
MACROBLOCKD *xd = &x->e_mbd; MACROBLOCKD *xd = &x->e_mbd;
@ -1675,18 +1681,18 @@ int vp9_full_search_sadx3(MACROBLOCK *x, BLOCK *b, BLOCKD *d, int_mv *ref_mv,
int sad_per_bit, int distance, int sad_per_bit, int distance,
vp9_variance_fn_ptr_t *fn_ptr, int *mvjcost, vp9_variance_fn_ptr_t *fn_ptr, int *mvjcost,
int *mvcost[2], int_mv *center_mv) { int *mvcost[2], int_mv *center_mv) {
unsigned char *what = (*(b->base_src) + b->src); uint8_t *what = (*(b->base_src) + b->src);
int what_stride = b->src_stride; int what_stride = b->src_stride;
unsigned char *in_what; uint8_t *in_what;
int in_what_stride = d->pre_stride; int in_what_stride = d->pre_stride;
int mv_stride = d->pre_stride; int mv_stride = d->pre_stride;
unsigned char *bestaddress; uint8_t *bestaddress;
int_mv *best_mv = &d->bmi.as_mv.first; int_mv *best_mv = &d->bmi.as_mv.first;
int_mv this_mv; int_mv this_mv;
unsigned int bestsad = INT_MAX; unsigned int bestsad = INT_MAX;
int r, c; int r, c;
unsigned char *check_here; uint8_t *check_here;
unsigned int thissad; unsigned int thissad;
MACROBLOCKD *xd = &x->e_mbd; MACROBLOCKD *xd = &x->e_mbd;
@ -1804,18 +1810,18 @@ int vp9_full_search_sadx8(MACROBLOCK *x, BLOCK *b, BLOCKD *d, int_mv *ref_mv,
vp9_variance_fn_ptr_t *fn_ptr, vp9_variance_fn_ptr_t *fn_ptr,
int *mvjcost, int *mvcost[2], int *mvjcost, int *mvcost[2],
int_mv *center_mv) { int_mv *center_mv) {
unsigned char *what = (*(b->base_src) + b->src); uint8_t *what = (*(b->base_src) + b->src);
int what_stride = b->src_stride; int what_stride = b->src_stride;
unsigned char *in_what; uint8_t *in_what;
int in_what_stride = d->pre_stride; int in_what_stride = d->pre_stride;
int mv_stride = d->pre_stride; int mv_stride = d->pre_stride;
unsigned char *bestaddress; uint8_t *bestaddress;
int_mv *best_mv = &d->bmi.as_mv.first; int_mv *best_mv = &d->bmi.as_mv.first;
int_mv this_mv; int_mv this_mv;
unsigned int bestsad = INT_MAX; unsigned int bestsad = INT_MAX;
int r, c; int r, c;
unsigned char *check_here; uint8_t *check_here;
unsigned int thissad; unsigned int thissad;
MACROBLOCKD *xd = &x->e_mbd; MACROBLOCKD *xd = &x->e_mbd;
@ -1827,7 +1833,7 @@ int vp9_full_search_sadx8(MACROBLOCK *x, BLOCK *b, BLOCKD *d, int_mv *ref_mv,
int col_min = ref_col - distance; int col_min = ref_col - distance;
int col_max = ref_col + distance; int col_max = ref_col + distance;
DECLARE_ALIGNED_ARRAY(16, unsigned short, sad_array8, 8); DECLARE_ALIGNED_ARRAY(16, uint16_t, sad_array8, 8);
unsigned int sad_array[3]; unsigned int sad_array[3];
int_mv fcenter_mv; int_mv fcenter_mv;
@ -1959,14 +1965,15 @@ int vp9_refining_search_sad_c(MACROBLOCK *x, BLOCK *b, BLOCKD *d,
int *mvjcost, int *mvcost[2], int_mv *center_mv) { int *mvjcost, int *mvcost[2], int_mv *center_mv) {
MV neighbors[4] = {{ -1, 0}, {0, -1}, {0, 1}, {1, 0}}; MV neighbors[4] = {{ -1, 0}, {0, -1}, {0, 1}, {1, 0}};
int i, j; int i, j;
short this_row_offset, this_col_offset; int this_row_offset, this_col_offset;
int what_stride = b->src_stride; int what_stride = b->src_stride;
int in_what_stride = d->pre_stride; int in_what_stride = d->pre_stride;
unsigned char *what = (*(b->base_src) + b->src); uint8_t *what = (*(b->base_src) + b->src);
unsigned char *best_address = (unsigned char *)(*(d->base_pre) + d->pre + uint8_t *best_address = (uint8_t *)(*(d->base_pre) + d->pre +
(ref_mv->as_mv.row * (d->pre_stride)) + ref_mv->as_mv.col); (ref_mv->as_mv.row * (d->pre_stride)) +
unsigned char *check_here; ref_mv->as_mv.col);
uint8_t *check_here;
unsigned int thissad; unsigned int thissad;
int_mv this_mv; int_mv this_mv;
unsigned int bestsad = INT_MAX; unsigned int bestsad = INT_MAX;
@ -2036,14 +2043,15 @@ int vp9_refining_search_sadx4(MACROBLOCK *x, BLOCK *b, BLOCKD *d,
int *mvjcost, int *mvcost[2], int_mv *center_mv) { int *mvjcost, int *mvcost[2], int_mv *center_mv) {
MV neighbors[4] = {{ -1, 0}, {0, -1}, {0, 1}, {1, 0}}; MV neighbors[4] = {{ -1, 0}, {0, -1}, {0, 1}, {1, 0}};
int i, j; int i, j;
short this_row_offset, this_col_offset; int this_row_offset, this_col_offset;
int what_stride = b->src_stride; int what_stride = b->src_stride;
int in_what_stride = d->pre_stride; int in_what_stride = d->pre_stride;
unsigned char *what = (*(b->base_src) + b->src); uint8_t *what = (*(b->base_src) + b->src);
unsigned char *best_address = (unsigned char *)(*(d->base_pre) + d->pre + uint8_t *best_address = (uint8_t *)(*(d->base_pre) + d->pre +
(ref_mv->as_mv.row * (d->pre_stride)) + ref_mv->as_mv.col); (ref_mv->as_mv.row * (d->pre_stride)) +
unsigned char *check_here; ref_mv->as_mv.col);
uint8_t *check_here;
unsigned int thissad; unsigned int thissad;
int_mv this_mv; int_mv this_mv;
unsigned int bestsad = INT_MAX; unsigned int bestsad = INT_MAX;

View File

@ -83,4 +83,4 @@ typedef int (*vp9_diamond_search_fn_t)(MACROBLOCK *x, BLOCK *b, BLOCKD *d,
int_mv *center_mv); int_mv *center_mv);
#endif #endif // VP9_ENCODER_VP9_MCOMP_H_

View File

@ -14,4 +14,4 @@
void vp9_init_mode_costs(VP9_COMP *x); void vp9_init_mode_costs(VP9_COMP *x);
#endif #endif // VP9_ENCODER_VP9_MODECOSTS_H_

View File

@ -2294,8 +2294,8 @@ void vp9_remove_compressor(VP9_PTR *ptr) {
} }
static uint64_t calc_plane_error(unsigned char *orig, int orig_stride, static uint64_t calc_plane_error(uint8_t *orig, int orig_stride,
unsigned char *recon, int recon_stride, uint8_t *recon, int recon_stride,
unsigned int cols, unsigned int rows) { unsigned int cols, unsigned int rows) {
unsigned int row, col; unsigned int row, col;
uint64_t total_sse = 0; uint64_t total_sse = 0;
@ -2311,9 +2311,9 @@ static uint64_t calc_plane_error(unsigned char *orig, int orig_stride,
/* Handle odd-sized width */ /* Handle odd-sized width */
if (col < cols) { if (col < cols) {
unsigned int border_row, border_col; unsigned int border_row, border_col;
unsigned char *border_orig = orig; uint8_t *border_orig = orig;
unsigned char *border_recon = recon; uint8_t *border_recon = recon;
for (border_row = 0; border_row < 16; border_row++) { for (border_row = 0; border_row < 16; border_row++) {
for (border_col = col; border_col < cols; border_col++) { for (border_col = col; border_col < cols; border_col++) {
@ -2472,7 +2472,7 @@ int vp9_update_entropy(VP9_PTR comp, int update) {
#ifdef OUTPUT_YUV_SRC #ifdef OUTPUT_YUV_SRC
void vp9_write_yuv_frame(YV12_BUFFER_CONFIG *s) { void vp9_write_yuv_frame(YV12_BUFFER_CONFIG *s) {
unsigned char *src = s->y_buffer; uint8_t *src = s->y_buffer;
int h = s->y_height; int h = s->y_height;
do { do {
@ -2501,7 +2501,7 @@ void vp9_write_yuv_frame(YV12_BUFFER_CONFIG *s) {
#ifdef OUTPUT_YUV_REC #ifdef OUTPUT_YUV_REC
void vp9_write_yuv_rec_frame(VP9_COMMON *cm) { void vp9_write_yuv_rec_frame(VP9_COMMON *cm) {
YV12_BUFFER_CONFIG *s = cm->frame_to_show; YV12_BUFFER_CONFIG *s = cm->frame_to_show;
unsigned char *src = s->y_buffer; uint8_t *src = s->y_buffer;
int h = cm->Height; int h = cm->Height;
do { do {
@ -2674,9 +2674,9 @@ static double compute_edge_pixel_proportion(YV12_BUFFER_CONFIG *frame) {
int i, j; int i, j;
int num_edge_pels = 0; int num_edge_pels = 0;
int num_pels = (frame->y_height - 2) * (frame->y_width - 2); int num_pels = (frame->y_height - 2) * (frame->y_width - 2);
unsigned char *prev = frame->y_buffer + 1; uint8_t *prev = frame->y_buffer + 1;
unsigned char *curr = frame->y_buffer + 1 + frame->y_stride; uint8_t *curr = frame->y_buffer + 1 + frame->y_stride;
unsigned char *next = frame->y_buffer + 1 + 2 * frame->y_stride; uint8_t *next = frame->y_buffer + 1 + 2 * frame->y_stride;
for (i = 1; i < frame->y_height - 1; i++) { for (i = 1; i < frame->y_height - 1; i++) {
for (j = 1; j < frame->y_width - 1; j++) { for (j = 1; j < frame->y_width - 1; j++) {
/* Sobel hor and ver gradients */ /* Sobel hor and ver gradients */
@ -2887,13 +2887,10 @@ static void select_interintra_mode(VP9_COMP *cpi) {
} }
#endif #endif
static void encode_frame_to_data_rate static void encode_frame_to_data_rate(VP9_COMP *cpi,
( unsigned long *size,
VP9_COMP *cpi, unsigned char *dest,
unsigned long *size, unsigned int *frame_flags) {
unsigned char *dest,
unsigned int *frame_flags
) {
VP9_COMMON *cm = &cpi->common; VP9_COMMON *cm = &cpi->common;
MACROBLOCKD *xd = &cpi->mb.e_mbd; MACROBLOCKD *xd = &cpi->mb.e_mbd;
@ -3189,7 +3186,7 @@ static void encode_frame_to_data_rate
#if CONFIG_POSTPROC #if CONFIG_POSTPROC
if (cpi->oxcf.noise_sensitivity > 0) { if (cpi->oxcf.noise_sensitivity > 0) {
unsigned char *src; uint8_t *src;
int l = 0; int l = 0;
switch (cpi->oxcf.noise_sensitivity) { switch (cpi->oxcf.noise_sensitivity) {
@ -4473,8 +4470,8 @@ int vp9_calc_ss_err(YV12_BUFFER_CONFIG *source, YV12_BUFFER_CONFIG *dest) {
int i, j; int i, j;
int Total = 0; int Total = 0;
unsigned char *src = source->y_buffer; uint8_t *src = source->y_buffer;
unsigned char *dst = dest->y_buffer; uint8_t *dst = dest->y_buffer;
// Loop through the Y plane raw and reconstruction data summing (square differences) // Loop through the Y plane raw and reconstruction data summing (square differences)
for (i = 0; i < source->y_height; i += 16) { for (i = 0; i < source->y_height; i += 16) {

View File

@ -835,4 +835,5 @@ extern void vp9_alloc_compressor_data(VP9_COMP *cpi);
"Failed to allocate "#lval);\ "Failed to allocate "#lval);\
} while(0) } while(0)
#endif #endif
#endif // __INC_ONYX_INT_H
#endif // VP9_ENCODER_VP9_ONYX_INT_H_

View File

@ -21,7 +21,7 @@
void vp9_yv12_copy_partial_frame_c(YV12_BUFFER_CONFIG *src_ybc, void vp9_yv12_copy_partial_frame_c(YV12_BUFFER_CONFIG *src_ybc,
YV12_BUFFER_CONFIG *dst_ybc, int Fraction) { YV12_BUFFER_CONFIG *dst_ybc, int Fraction) {
unsigned char *src_y, *dst_y; uint8_t *src_y, *dst_y;
int yheight; int yheight;
int ystride; int ystride;
int border; int border;
@ -51,8 +51,8 @@ static int calc_partial_ssl_err(YV12_BUFFER_CONFIG *source,
int i, j; int i, j;
int Total = 0; int Total = 0;
int srcoffset, dstoffset; int srcoffset, dstoffset;
unsigned char *src = source->y_buffer; uint8_t *src = source->y_buffer;
unsigned char *dst = dest->y_buffer; uint8_t *dst = dest->y_buffer;
int linestocopy = (source->y_height >> (Fraction + 4)); int linestocopy = (source->y_height >> (Fraction + 4));

View File

@ -23,4 +23,4 @@ extern void vp9_set_alt_lf_level(struct VP9_COMP *cpi, int filt_val);
extern void vp9_pick_filter_level(struct yv12_buffer_config *sd, extern void vp9_pick_filter_level(struct yv12_buffer_config *sd,
struct VP9_COMP *cpi); struct VP9_COMP *cpi);
#endif // __INC_PICKLPF_H #endif // VP9_ENCODER_VP9_PICKLPF_H_

View File

@ -14,4 +14,4 @@
extern double vp9_mse2psnr(double Samples, double Peak, double Mse); extern double vp9_mse2psnr(double Samples, double Peak, double Mse);
#endif #endif // VP9_ENCODER_VP9_PSNR_H_

View File

@ -25,29 +25,29 @@ void vp9_ht_quantize_b_4x4(BLOCK *b, BLOCKD *d, TX_TYPE tx_type) {
int i, rc, eob; int i, rc, eob;
int zbin; int zbin;
int x, y, z, sz; int x, y, z, sz;
short *zbin_boost_ptr = b->zrun_zbin_boost; int16_t *zbin_boost_ptr = b->zrun_zbin_boost;
short *coeff_ptr = b->coeff; int16_t *coeff_ptr = b->coeff;
short *zbin_ptr = b->zbin; int16_t *zbin_ptr = b->zbin;
short *round_ptr = b->round; int16_t *round_ptr = b->round;
short *quant_ptr = b->quant; int16_t *quant_ptr = b->quant;
unsigned char *quant_shift_ptr = b->quant_shift; uint8_t *quant_shift_ptr = b->quant_shift;
short *qcoeff_ptr = d->qcoeff; int16_t *qcoeff_ptr = d->qcoeff;
short *dqcoeff_ptr = d->dqcoeff; int16_t *dqcoeff_ptr = d->dqcoeff;
short *dequant_ptr = d->dequant; int16_t *dequant_ptr = d->dequant;
short zbin_oq_value = b->zbin_extra; int zbin_oq_value = b->zbin_extra;
int const *pt_scan ; int const *pt_scan ;
switch (tx_type) { switch (tx_type) {
case ADST_DCT : case ADST_DCT:
pt_scan = vp9_row_scan_4x4; pt_scan = vp9_row_scan_4x4;
break; break;
case DCT_ADST : case DCT_ADST:
pt_scan = vp9_col_scan_4x4; pt_scan = vp9_col_scan_4x4;
break; break;
default : default:
pt_scan = vp9_default_zig_zag1d_4x4; pt_scan = vp9_default_zig_zag1d_4x4;
break; break;
} }
@ -89,16 +89,16 @@ void vp9_regular_quantize_b_4x4(BLOCK *b, BLOCKD *d) {
int i, rc, eob; int i, rc, eob;
int zbin; int zbin;
int x, y, z, sz; int x, y, z, sz;
short *zbin_boost_ptr = b->zrun_zbin_boost; int16_t *zbin_boost_ptr = b->zrun_zbin_boost;
short *coeff_ptr = b->coeff; int16_t *coeff_ptr = b->coeff;
short *zbin_ptr = b->zbin; int16_t *zbin_ptr = b->zbin;
short *round_ptr = b->round; int16_t *round_ptr = b->round;
short *quant_ptr = b->quant; int16_t *quant_ptr = b->quant;
unsigned char *quant_shift_ptr = b->quant_shift; uint8_t *quant_shift_ptr = b->quant_shift;
short *qcoeff_ptr = d->qcoeff; int16_t *qcoeff_ptr = d->qcoeff;
short *dqcoeff_ptr = d->dqcoeff; int16_t *dqcoeff_ptr = d->dqcoeff;
short *dequant_ptr = d->dequant; int16_t *dequant_ptr = d->dequant;
short zbin_oq_value = b->zbin_extra; int zbin_oq_value = b->zbin_extra;
vpx_memset(qcoeff_ptr, 0, 32); vpx_memset(qcoeff_ptr, 0, 32);
vpx_memset(dqcoeff_ptr, 0, 32); vpx_memset(dqcoeff_ptr, 0, 32);
@ -174,17 +174,17 @@ void vp9_regular_quantize_b_2x2(BLOCK *b, BLOCKD *d) {
int i, rc, eob; int i, rc, eob;
int zbin; int zbin;
int x, y, z, sz; int x, y, z, sz;
short *zbin_boost_ptr = b->zrun_zbin_boost; int16_t *zbin_boost_ptr = b->zrun_zbin_boost;
int zbin_zrun_index = 0; int zbin_zrun_index = 0;
short *coeff_ptr = b->coeff; int16_t *coeff_ptr = b->coeff;
short *zbin_ptr = b->zbin; int16_t *zbin_ptr = b->zbin;
short *round_ptr = b->round; int16_t *round_ptr = b->round;
short *quant_ptr = b->quant; int16_t *quant_ptr = b->quant;
unsigned char *quant_shift_ptr = b->quant_shift; uint8_t *quant_shift_ptr = b->quant_shift;
short *qcoeff_ptr = d->qcoeff; int16_t *qcoeff_ptr = d->qcoeff;
short *dqcoeff_ptr = d->dqcoeff; int16_t *dqcoeff_ptr = d->dqcoeff;
short *dequant_ptr = d->dequant; int16_t *dequant_ptr = d->dequant;
short zbin_oq_value = b->zbin_extra; int zbin_oq_value = b->zbin_extra;
// double q2nd = 4; // double q2nd = 4;
vpx_memset(qcoeff_ptr, 0, 32); vpx_memset(qcoeff_ptr, 0, 32);
vpx_memset(dqcoeff_ptr, 0, 32); vpx_memset(dqcoeff_ptr, 0, 32);
@ -224,19 +224,19 @@ void vp9_regular_quantize_b_8x8(BLOCK *b, BLOCKD *d) {
int i, rc, eob; int i, rc, eob;
int zbin; int zbin;
int x, y, z, sz; int x, y, z, sz;
short *zbin_boost_ptr = b->zrun_zbin_boost_8x8; int16_t *zbin_boost_ptr = b->zrun_zbin_boost_8x8;
short *coeff_ptr = b->coeff; int16_t *coeff_ptr = b->coeff;
short *zbin_ptr = b->zbin_8x8; int16_t *zbin_ptr = b->zbin_8x8;
short *round_ptr = b->round; int16_t *round_ptr = b->round;
short *quant_ptr = b->quant; int16_t *quant_ptr = b->quant;
unsigned char *quant_shift_ptr = b->quant_shift; uint8_t *quant_shift_ptr = b->quant_shift;
short *qcoeff_ptr = d->qcoeff; int16_t *qcoeff_ptr = d->qcoeff;
short *dqcoeff_ptr = d->dqcoeff; int16_t *dqcoeff_ptr = d->dqcoeff;
short *dequant_ptr = d->dequant; int16_t *dequant_ptr = d->dequant;
short zbin_oq_value = b->zbin_extra; int zbin_oq_value = b->zbin_extra;
vpx_memset(qcoeff_ptr, 0, 64 * sizeof(short)); vpx_memset(qcoeff_ptr, 0, 64 * sizeof(int16_t));
vpx_memset(dqcoeff_ptr, 0, 64 * sizeof(short)); vpx_memset(dqcoeff_ptr, 0, 64 * sizeof(int16_t));
eob = -1; eob = -1;
@ -323,20 +323,20 @@ void vp9_quantize_mb_16x16(MACROBLOCK *x) {
vp9_quantize_mbuv_8x8(x); vp9_quantize_mbuv_8x8(x);
} }
static void quantize(short *zbin_boost_orig_ptr, static void quantize(int16_t *zbin_boost_orig_ptr,
short *coeff_ptr, int n_coeffs, int max_coeffs, int16_t *coeff_ptr, int n_coeffs, int max_coeffs,
short *zbin_ptr, short *round_ptr, short *quant_ptr, int16_t *zbin_ptr, int16_t *round_ptr, int16_t *quant_ptr,
unsigned char *quant_shift_ptr, uint8_t *quant_shift_ptr,
short *qcoeff_ptr, short *dqcoeff_ptr, int16_t *qcoeff_ptr, int16_t *dqcoeff_ptr,
short *dequant_ptr, short zbin_oq_value, int16_t *dequant_ptr, int zbin_oq_value,
int *eob_ptr, const int *scan, int mul) { int *eob_ptr, const int *scan, int mul) {
int i, rc, eob; int i, rc, eob;
int zbin; int zbin;
int x, y, z, sz; int x, y, z, sz;
short *zbin_boost_ptr = zbin_boost_orig_ptr; int16_t *zbin_boost_ptr = zbin_boost_orig_ptr;
vpx_memset(qcoeff_ptr, 0, n_coeffs*sizeof(short)); vpx_memset(qcoeff_ptr, 0, n_coeffs*sizeof(int16_t));
vpx_memset(dqcoeff_ptr, 0, n_coeffs*sizeof(short)); vpx_memset(dqcoeff_ptr, 0, n_coeffs*sizeof(int16_t));
eob = -1; eob = -1;
for (i = 0; i < max_coeffs; i++) { for (i = 0; i < max_coeffs; i++) {
@ -425,15 +425,15 @@ void vp9_regular_quantize_b_4x4_pair(BLOCK *b1, BLOCK *b2,
vp9_regular_quantize_b_4x4(b2, d2); vp9_regular_quantize_b_4x4(b2, d2);
} }
static void invert_quant(short *quant, static void invert_quant(int16_t *quant,
unsigned char *shift, short d) { uint8_t *shift, int d) {
unsigned t; unsigned t;
int l; int l;
t = d; t = d;
for (l = 0; t > 1; l++) for (l = 0; t > 1; l++)
t >>= 1; t >>= 1;
t = 1 + (1 << (16 + l)) / d; t = 1 + (1 << (16 + l)) / d;
*quant = (short)(t - (1 << 16)); *quant = (int16_t)(t - (1 << 16));
*shift = l; *shift = l;
} }
@ -738,7 +738,7 @@ void vp9_mb_init_quantizer(VP9_COMP *cpi, MACROBLOCK *x) {
#if CONFIG_TX32X32 && CONFIG_SUPERBLOCKS #if CONFIG_TX32X32 && CONFIG_SUPERBLOCKS
x->block[i].zrun_zbin_boost_32x32 = cpi->zrun_zbin_boost_y1_32x32[QIndex]; x->block[i].zrun_zbin_boost_32x32 = cpi->zrun_zbin_boost_y1_32x32[QIndex];
#endif #endif
x->block[i].zbin_extra = (short)zbin_extra; x->block[i].zbin_extra = (int16_t)zbin_extra;
// Segment max eob offset feature. // Segment max eob offset feature.
if (vp9_segfeature_active(xd, segment_id, SEG_LVL_EOB)) { if (vp9_segfeature_active(xd, segment_id, SEG_LVL_EOB)) {
@ -780,7 +780,7 @@ void vp9_mb_init_quantizer(VP9_COMP *cpi, MACROBLOCK *x) {
x->block[i].zrun_zbin_boost_8x8 = cpi->zrun_zbin_boost_uv_8x8[QIndex]; x->block[i].zrun_zbin_boost_8x8 = cpi->zrun_zbin_boost_uv_8x8[QIndex];
x->block[i].zrun_zbin_boost_16x16 = cpi->zrun_zbin_boost_uv_16x16[QIndex]; x->block[i].zrun_zbin_boost_16x16 = cpi->zrun_zbin_boost_uv_16x16[QIndex];
x->block[i].zbin_extra = (short)zbin_extra; x->block[i].zbin_extra = (int16_t)zbin_extra;
// Segment max eob offset feature. // Segment max eob offset feature.
if (vp9_segfeature_active(xd, segment_id, SEG_LVL_EOB)) { if (vp9_segfeature_active(xd, segment_id, SEG_LVL_EOB)) {
@ -813,7 +813,7 @@ void vp9_mb_init_quantizer(VP9_COMP *cpi, MACROBLOCK *x) {
x->block[24].zrun_zbin_boost = cpi->zrun_zbin_boost_y2[QIndex]; x->block[24].zrun_zbin_boost = cpi->zrun_zbin_boost_y2[QIndex];
x->block[24].zrun_zbin_boost_8x8 = cpi->zrun_zbin_boost_y2_8x8[QIndex]; x->block[24].zrun_zbin_boost_8x8 = cpi->zrun_zbin_boost_y2_8x8[QIndex];
x->block[24].zrun_zbin_boost_16x16 = cpi->zrun_zbin_boost_y2_16x16[QIndex]; x->block[24].zrun_zbin_boost_16x16 = cpi->zrun_zbin_boost_y2_16x16[QIndex];
x->block[24].zbin_extra = (short)zbin_extra; x->block[24].zbin_extra = (int16_t)zbin_extra;
// TBD perhaps not use for Y2 // TBD perhaps not use for Y2
// Segment max eob offset feature. // Segment max eob offset feature.
@ -842,7 +842,7 @@ void vp9_update_zbin_extra(VP9_COMP *cpi, MACROBLOCK *x) {
cpi->zbin_mode_boost + cpi->zbin_mode_boost +
x->act_zbin_adj)) >> 7; x->act_zbin_adj)) >> 7;
for (i = 0; i < 16; i++) { for (i = 0; i < 16; i++) {
x->block[i].zbin_extra = (short)zbin_extra; x->block[i].zbin_extra = (int16_t)zbin_extra;
} }
// UV // UV
@ -852,7 +852,7 @@ void vp9_update_zbin_extra(VP9_COMP *cpi, MACROBLOCK *x) {
x->act_zbin_adj)) >> 7; x->act_zbin_adj)) >> 7;
for (i = 16; i < 24; i++) { for (i = 16; i < 24; i++) {
x->block[i].zbin_extra = (short)zbin_extra; x->block[i].zbin_extra = (int16_t)zbin_extra;
} }
// Y2 // Y2
@ -861,7 +861,7 @@ void vp9_update_zbin_extra(VP9_COMP *cpi, MACROBLOCK *x) {
cpi->zbin_mode_boost + cpi->zbin_mode_boost +
x->act_zbin_adj)) >> 7; x->act_zbin_adj)) >> 7;
x->block[24].zbin_extra = (short)zbin_extra; x->block[24].zbin_extra = (int16_t)zbin_extra;
} }
void vp9_frame_init_quantizer(VP9_COMP *cpi) { void vp9_frame_init_quantizer(VP9_COMP *cpi) {

View File

@ -95,4 +95,4 @@ extern void vp9_mb_init_quantizer(struct VP9_COMP *cpi, MACROBLOCK *x);
extern void vp9_init_quantizer(struct VP9_COMP *cpi); extern void vp9_init_quantizer(struct VP9_COMP *cpi);
#endif #endif // VP9_ENCODER_VP9_QUANTIZE_H_

View File

@ -35,4 +35,4 @@ extern int vp9_gfboost_qadjust(int qindex);
extern int vp9_bits_per_mb(FRAME_TYPE frame_type, int qindex); extern int vp9_bits_per_mb(FRAME_TYPE frame_type, int qindex);
void vp9_setup_inter_frame(VP9_COMP *cpi); void vp9_setup_inter_frame(VP9_COMP *cpi);
#endif #endif // VP9_ENCODER_VP9_RATECTRL_H_

View File

@ -403,7 +403,7 @@ void vp9_initialize_rd_consts(VP9_COMP *cpi, int QIndex) {
} }
} }
int vp9_block_error_c(short *coeff, short *dqcoeff, int block_size) { int vp9_block_error_c(int16_t *coeff, int16_t *dqcoeff, int block_size) {
int i, error = 0; int i, error = 0;
for (i = 0; i < block_size; i++) { for (i = 0; i < block_size; i++) {
@ -469,9 +469,9 @@ int vp9_mbuverror_c(MACROBLOCK *mb) {
} }
int vp9_uvsse(MACROBLOCK *x) { int vp9_uvsse(MACROBLOCK *x) {
unsigned char *uptr, *vptr; uint8_t *uptr, *vptr;
unsigned char *upred_ptr = (*(x->block[16].base_src) + x->block[16].src); uint8_t *upred_ptr = (*(x->block[16].base_src) + x->block[16].src);
unsigned char *vpred_ptr = (*(x->block[20].base_src) + x->block[20].src); uint8_t *vpred_ptr = (*(x->block[20].base_src) + x->block[20].src);
int uv_stride = x->block[16].src_stride; int uv_stride = x->block[16].src_stride;
unsigned int sse1 = 0; unsigned int sse1 = 0;
@ -520,7 +520,7 @@ static int cost_coeffs_2x2(MACROBLOCK *mb,
int eob = b->eob; int eob = b->eob;
int pt; /* surrounding block/prev coef predictor */ int pt; /* surrounding block/prev coef predictor */
int cost = 0; int cost = 0;
short *qcoeff_ptr = b->qcoeff; int16_t *qcoeff_ptr = b->qcoeff;
VP9_COMBINEENTROPYCONTEXTS(pt, *a, *l); VP9_COMBINEENTROPYCONTEXTS(pt, *a, *l);
assert(eob <= 4); assert(eob <= 4);
@ -550,7 +550,7 @@ static int cost_coeffs(MACROBLOCK *mb, BLOCKD *b, PLANE_TYPE type,
int cost = 0, default_eob, seg_eob; int cost = 0, default_eob, seg_eob;
int pt; /* surrounding block/prev coef predictor */ int pt; /* surrounding block/prev coef predictor */
int const *scan, *band; int const *scan, *band;
short *qcoeff_ptr = b->qcoeff; int16_t *qcoeff_ptr = b->qcoeff;
MACROBLOCKD *xd = &mb->e_mbd; MACROBLOCKD *xd = &mb->e_mbd;
MB_MODE_INFO *mbmi = &mb->e_mbd.mode_info_context->mbmi; MB_MODE_INFO *mbmi = &mb->e_mbd.mode_info_context->mbmi;
TX_TYPE tx_type = DCT_DCT; TX_TYPE tx_type = DCT_DCT;
@ -928,7 +928,7 @@ static void macro_block_yrd(VP9_COMP *cpi, MACROBLOCK *x, int *rate,
txfm_cache, TX_16X16); txfm_cache, TX_16X16);
} }
static void copy_predictor(unsigned char *dst, const unsigned char *predictor) { static void copy_predictor(uint8_t *dst, const uint8_t *predictor) {
const unsigned int *p = (const unsigned int *)predictor; const unsigned int *p = (const unsigned int *)predictor;
unsigned int *d = (unsigned int *)dst; unsigned int *d = (unsigned int *)dst;
d[0] = p[0]; d[0] = p[0];
@ -951,7 +951,8 @@ static int rdcost_sby_32x32(MACROBLOCK *x) {
return cost_coeffs(x, xd->block, PLANE_TYPE_Y_WITH_DC, ta, tl, TX_32X32); return cost_coeffs(x, xd->block, PLANE_TYPE_Y_WITH_DC, ta, tl, TX_32X32);
} }
static int vp9_sb_block_error_c(short *coeff, short *dqcoeff, int block_size) { static int vp9_sb_block_error_c(int16_t *coeff, int16_t *dqcoeff,
int block_size) {
int i; int i;
int64_t error = 0; int64_t error = 0;
@ -970,7 +971,7 @@ static void super_block_yrd_32x32(MACROBLOCK *x,
MACROBLOCKD * const xd = &x->e_mbd; MACROBLOCKD * const xd = &x->e_mbd;
SUPERBLOCKD * const xd_sb = &xd->sb_coeff_data; SUPERBLOCKD * const xd_sb = &xd->sb_coeff_data;
#if DEBUG_ERROR || CONFIG_DWT32X32HYBRID #if DEBUG_ERROR || CONFIG_DWT32X32HYBRID
short out[1024]; int16_t out[1024];
#endif #endif
vp9_transform_sby_32x32(x); vp9_transform_sby_32x32(x);
@ -1079,7 +1080,7 @@ static void super_block_yrd(VP9_COMP *cpi,
} }
#endif #endif
static void copy_predictor_8x8(unsigned char *dst, const unsigned char *predictor) { static void copy_predictor_8x8(uint8_t *dst, const uint8_t *predictor) {
const unsigned int *p = (const unsigned int *)predictor; const unsigned int *p = (const unsigned int *)predictor;
unsigned int *d = (unsigned int *)dst; unsigned int *d = (unsigned int *)dst;
d[0] = p[0]; d[0] = p[0];
@ -1129,8 +1130,8 @@ static int64_t rd_pick_intra4x4block(VP9_COMP *cpi, MACROBLOCK *x, BLOCK *be,
* a temp buffer that meets the stride requirements, but we are only * a temp buffer that meets the stride requirements, but we are only
* interested in the left 4x4 block * interested in the left 4x4 block
* */ * */
DECLARE_ALIGNED_ARRAY(16, unsigned char, best_predictor, 16 * 4); DECLARE_ALIGNED_ARRAY(16, uint8_t, best_predictor, 16 * 4);
DECLARE_ALIGNED_ARRAY(16, short, best_dqcoeff, 16); DECLARE_ALIGNED_ARRAY(16, int16_t, best_dqcoeff, 16);
#if CONFIG_NEWBINTRAMODES #if CONFIG_NEWBINTRAMODES
b->bmi.as_mode.context = vp9_find_bpred_context(b); b->bmi.as_mode.context = vp9_find_bpred_context(b);
@ -1488,8 +1489,8 @@ static int64_t rd_pick_intra8x8block(VP9_COMP *cpi, MACROBLOCK *x, int ib,
* a temp buffer that meets the stride requirements, but we are only * a temp buffer that meets the stride requirements, but we are only
* interested in the left 8x8 block * interested in the left 8x8 block
* */ * */
DECLARE_ALIGNED_ARRAY(16, unsigned char, best_predictor, 16 * 8); DECLARE_ALIGNED_ARRAY(16, uint8_t, best_predictor, 16 * 8);
DECLARE_ALIGNED_ARRAY(16, short, best_dqcoeff, 16 * 4); DECLARE_ALIGNED_ARRAY(16, int16_t, best_dqcoeff, 16 * 4);
// perform transformation of dimension 8x8 // perform transformation of dimension 8x8
// note the input and output index mapping // note the input and output index mapping
@ -2921,7 +2922,7 @@ static int rd_pick_best_mbsegmentation(VP9_COMP *cpi, MACROBLOCK *x,
} }
static void mv_pred(VP9_COMP *cpi, MACROBLOCK *x, static void mv_pred(VP9_COMP *cpi, MACROBLOCK *x,
unsigned char *ref_y_buffer, int ref_y_stride, uint8_t *ref_y_buffer, int ref_y_stride,
int ref_frame, enum BlockSize block_size ) { int ref_frame, enum BlockSize block_size ) {
MACROBLOCKD *xd = &x->e_mbd; MACROBLOCKD *xd = &x->e_mbd;
MB_MODE_INFO *mbmi = &xd->mode_info_context->mbmi; MB_MODE_INFO *mbmi = &xd->mode_info_context->mbmi;
@ -2933,8 +2934,8 @@ static void mv_pred(VP9_COMP *cpi, MACROBLOCK *x,
int this_sad = INT_MAX; int this_sad = INT_MAX;
BLOCK *b = &x->block[0]; BLOCK *b = &x->block[0];
unsigned char *src_y_ptr = *(b->base_src); uint8_t *src_y_ptr = *(b->base_src);
unsigned char *ref_y_ptr; uint8_t *ref_y_ptr;
int row_offset, col_offset; int row_offset, col_offset;
// Get the sad for each candidate reference mv // Get the sad for each candidate reference mv
@ -3182,9 +3183,9 @@ static void setup_buffer_inter(VP9_COMP *cpi, MACROBLOCK *x,
int_mv frame_nearest_mv[MAX_REF_FRAMES], int_mv frame_nearest_mv[MAX_REF_FRAMES],
int_mv frame_near_mv[MAX_REF_FRAMES], int_mv frame_near_mv[MAX_REF_FRAMES],
int frame_mdcounts[4][4], int frame_mdcounts[4][4],
unsigned char *y_buffer[4], uint8_t *y_buffer[4],
unsigned char *u_buffer[4], uint8_t *u_buffer[4],
unsigned char *v_buffer[4]) { uint8_t *v_buffer[4]) {
YV12_BUFFER_CONFIG *yv12 = &cpi->common.yv12_fb[idx]; YV12_BUFFER_CONFIG *yv12 = &cpi->common.yv12_fb[idx];
MACROBLOCKD *const xd = &x->e_mbd; MACROBLOCKD *const xd = &x->e_mbd;
MB_MODE_INFO *const mbmi = &xd->mode_info_context->mbmi; MB_MODE_INFO *const mbmi = &xd->mode_info_context->mbmi;
@ -3557,7 +3558,7 @@ static void rd_pick_inter_mode(VP9_COMP *cpi, MACROBLOCK *x,
int_mv frame_mv[MB_MODE_COUNT][MAX_REF_FRAMES]; int_mv frame_mv[MB_MODE_COUNT][MAX_REF_FRAMES];
int frame_mdcounts[4][4]; int frame_mdcounts[4][4];
unsigned char *y_buffer[4], *u_buffer[4], *v_buffer[4]; uint8_t *y_buffer[4], *u_buffer[4], *v_buffer[4];
unsigned int ref_costs[MAX_REF_FRAMES]; unsigned int ref_costs[MAX_REF_FRAMES];
int_mv seg_mvs[NB_PARTITIONINGS][16 /* n_blocks */][MAX_REF_FRAMES - 1]; int_mv seg_mvs[NB_PARTITIONINGS][16 /* n_blocks */][MAX_REF_FRAMES - 1];
@ -4501,9 +4502,9 @@ int64_t vp9_rd_pick_inter_mode_sb(VP9_COMP *cpi, MACROBLOCK *x,
int comp_pred, i; int comp_pred, i;
int_mv frame_mv[MB_MODE_COUNT][MAX_REF_FRAMES]; int_mv frame_mv[MB_MODE_COUNT][MAX_REF_FRAMES];
int frame_mdcounts[4][4]; int frame_mdcounts[4][4];
unsigned char *y_buffer[4]; uint8_t *y_buffer[4];
unsigned char *u_buffer[4]; uint8_t *u_buffer[4];
unsigned char *v_buffer[4]; uint8_t *v_buffer[4];
static const int flag_list[4] = { 0, VP9_LAST_FLAG, VP9_GOLD_FLAG, static const int flag_list[4] = { 0, VP9_LAST_FLAG, VP9_GOLD_FLAG,
VP9_ALT_FLAG }; VP9_ALT_FLAG };
int idx_list[4] = { 0, cpi->common.lst_fb_idx, cpi->common.gld_fb_idx, int idx_list[4] = { 0, cpi->common.lst_fb_idx, cpi->common.gld_fb_idx,

View File

@ -38,4 +38,4 @@ extern void vp9_init_me_luts();
extern void vp9_set_mbmode_and_mvs(MACROBLOCK *x, extern void vp9_set_mbmode_and_mvs(MACROBLOCK *x,
MB_PREDICTION_MODE mb, int_mv *mv); MB_PREDICTION_MODE mb, int_mv *mv);
#endif #endif // VP9_ENCODER_VP9_RDOPT_H_

View File

@ -14,62 +14,61 @@
#include "vpx_ports/config.h" #include "vpx_ports/config.h"
#include "vpx/vpx_integer.h" #include "vpx/vpx_integer.h"
unsigned int vp9_sad32x32_c(const unsigned char *src_ptr, unsigned int vp9_sad32x32_c(const uint8_t *src_ptr,
int src_stride, int src_stride,
const unsigned char *ref_ptr, const uint8_t *ref_ptr,
int ref_stride, int ref_stride,
int max_sad) { int max_sad) {
return sad_mx_n_c(src_ptr, src_stride, ref_ptr, ref_stride, 32, 32); return sad_mx_n_c(src_ptr, src_stride, ref_ptr, ref_stride, 32, 32);
} }
unsigned int vp9_sad16x16_c(const unsigned char *src_ptr, unsigned int vp9_sad16x16_c(const uint8_t *src_ptr,
int src_stride, int src_stride,
const unsigned char *ref_ptr, const uint8_t *ref_ptr,
int ref_stride, int ref_stride,
int max_sad) { int max_sad) {
return sad_mx_n_c(src_ptr, src_stride, ref_ptr, ref_stride, 16, 16); return sad_mx_n_c(src_ptr, src_stride, ref_ptr, ref_stride, 16, 16);
} }
unsigned int vp9_sad8x8_c(const unsigned char *src_ptr, unsigned int vp9_sad8x8_c(const uint8_t *src_ptr,
int src_stride, int src_stride,
const unsigned char *ref_ptr, const uint8_t *ref_ptr,
int ref_stride, int ref_stride,
int max_sad) { int max_sad) {
return sad_mx_n_c(src_ptr, src_stride, ref_ptr, ref_stride, 8, 8); return sad_mx_n_c(src_ptr, src_stride, ref_ptr, ref_stride, 8, 8);
} }
unsigned int vp9_sad16x8_c(const unsigned char *src_ptr, unsigned int vp9_sad16x8_c(const uint8_t *src_ptr,
int src_stride, int src_stride,
const unsigned char *ref_ptr, const uint8_t *ref_ptr,
int ref_stride, int ref_stride,
int max_sad) { int max_sad) {
return sad_mx_n_c(src_ptr, src_stride, ref_ptr, ref_stride, 16, 8); return sad_mx_n_c(src_ptr, src_stride, ref_ptr, ref_stride, 16, 8);
} }
unsigned int vp9_sad8x16_c(const unsigned char *src_ptr, unsigned int vp9_sad8x16_c(const uint8_t *src_ptr,
int src_stride, int src_stride,
const unsigned char *ref_ptr, const uint8_t *ref_ptr,
int ref_stride, int ref_stride,
int max_sad) { int max_sad) {
return sad_mx_n_c(src_ptr, src_stride, ref_ptr, ref_stride, 8, 16); return sad_mx_n_c(src_ptr, src_stride, ref_ptr, ref_stride, 8, 16);
} }
unsigned int vp9_sad4x4_c(const unsigned char *src_ptr, unsigned int vp9_sad4x4_c(const uint8_t *src_ptr,
int src_stride, int src_stride,
const unsigned char *ref_ptr, const uint8_t *ref_ptr,
int ref_stride, int ref_stride,
int max_sad) { int max_sad) {
return sad_mx_n_c(src_ptr, src_stride, ref_ptr, ref_stride, 4, 4); return sad_mx_n_c(src_ptr, src_stride, ref_ptr, ref_stride, 4, 4);
} }
void vp9_sad32x32x3_c(const unsigned char *src_ptr, void vp9_sad32x32x3_c(const uint8_t *src_ptr,
int src_stride, int src_stride,
const unsigned char *ref_ptr, const uint8_t *ref_ptr,
int ref_stride, int ref_stride,
unsigned int *sad_array unsigned int *sad_array) {
) {
sad_array[0] = vp9_sad32x32_c(src_ptr, src_stride, sad_array[0] = vp9_sad32x32_c(src_ptr, src_stride,
ref_ptr, ref_stride, 0x7fffffff); ref_ptr, ref_stride, 0x7fffffff);
sad_array[1] = vp9_sad32x32_c(src_ptr, src_stride, sad_array[1] = vp9_sad32x32_c(src_ptr, src_stride,
@ -78,41 +77,40 @@ void vp9_sad32x32x3_c(const unsigned char *src_ptr,
ref_ptr + 2, ref_stride, 0x7fffffff); ref_ptr + 2, ref_stride, 0x7fffffff);
} }
void vp9_sad32x32x8_c(const unsigned char *src_ptr, void vp9_sad32x32x8_c(const uint8_t *src_ptr,
int src_stride, int src_stride,
const unsigned char *ref_ptr, const uint8_t *ref_ptr,
int ref_stride, int ref_stride,
unsigned short *sad_array uint16_t *sad_array) {
) { sad_array[0] = (uint16_t)vp9_sad32x32_c(src_ptr, src_stride,
sad_array[0] = (unsigned short)vp9_sad32x32_c(src_ptr, src_stride, ref_ptr, ref_stride,
ref_ptr, ref_stride, 0x7fffffff);
0x7fffffff); sad_array[1] = (uint16_t)vp9_sad32x32_c(src_ptr, src_stride,
sad_array[1] = (unsigned short)vp9_sad32x32_c(src_ptr, src_stride, ref_ptr + 1, ref_stride,
ref_ptr + 1, ref_stride, 0x7fffffff);
0x7fffffff); sad_array[2] = (uint16_t)vp9_sad32x32_c(src_ptr, src_stride,
sad_array[2] = (unsigned short)vp9_sad32x32_c(src_ptr, src_stride, ref_ptr + 2, ref_stride,
ref_ptr + 2, ref_stride, 0x7fffffff);
0x7fffffff); sad_array[3] = (uint16_t)vp9_sad32x32_c(src_ptr, src_stride,
sad_array[3] = (unsigned short)vp9_sad32x32_c(src_ptr, src_stride, ref_ptr + 3, ref_stride,
ref_ptr + 3, ref_stride, 0x7fffffff);
0x7fffffff); sad_array[4] = (uint16_t)vp9_sad32x32_c(src_ptr, src_stride,
sad_array[4] = (unsigned short)vp9_sad32x32_c(src_ptr, src_stride, ref_ptr + 4, ref_stride,
ref_ptr + 4, ref_stride, 0x7fffffff);
0x7fffffff); sad_array[5] = (uint16_t)vp9_sad32x32_c(src_ptr, src_stride,
sad_array[5] = (unsigned short)vp9_sad32x32_c(src_ptr, src_stride, ref_ptr + 5, ref_stride,
ref_ptr + 5, ref_stride, 0x7fffffff);
0x7fffffff); sad_array[6] = (uint16_t)vp9_sad32x32_c(src_ptr, src_stride,
sad_array[6] = (unsigned short)vp9_sad32x32_c(src_ptr, src_stride, ref_ptr + 6, ref_stride,
ref_ptr + 6, ref_stride, 0x7fffffff);
0x7fffffff); sad_array[7] = (uint16_t)vp9_sad32x32_c(src_ptr, src_stride,
sad_array[7] = (unsigned short)vp9_sad32x32_c(src_ptr, src_stride, ref_ptr + 7, ref_stride,
ref_ptr + 7, ref_stride, 0x7fffffff);
0x7fffffff);
} }
void vp9_sad16x16x3_c(const unsigned char *src_ptr, void vp9_sad16x16x3_c(const uint8_t *src_ptr,
int src_stride, int src_stride,
const unsigned char *ref_ptr, const uint8_t *ref_ptr,
int ref_stride, int ref_stride,
unsigned int *sad_array) { unsigned int *sad_array) {
sad_array[0] = vp9_sad16x16_c(src_ptr, src_stride, sad_array[0] = vp9_sad16x16_c(src_ptr, src_stride,
@ -123,40 +121,40 @@ void vp9_sad16x16x3_c(const unsigned char *src_ptr,
ref_ptr + 2, ref_stride, 0x7fffffff); ref_ptr + 2, ref_stride, 0x7fffffff);
} }
void vp9_sad16x16x8_c(const unsigned char *src_ptr, void vp9_sad16x16x8_c(const uint8_t *src_ptr,
int src_stride, int src_stride,
const unsigned char *ref_ptr, const uint8_t *ref_ptr,
int ref_stride, int ref_stride,
unsigned short *sad_array) { uint16_t *sad_array) {
sad_array[0] = (unsigned short)vp9_sad16x16_c(src_ptr, src_stride, sad_array[0] = (uint16_t)vp9_sad16x16_c(src_ptr, src_stride,
ref_ptr, ref_stride, ref_ptr, ref_stride,
0x7fffffff); 0x7fffffff);
sad_array[1] = (unsigned short)vp9_sad16x16_c(src_ptr, src_stride, sad_array[1] = (uint16_t)vp9_sad16x16_c(src_ptr, src_stride,
ref_ptr + 1, ref_stride, ref_ptr + 1, ref_stride,
0x7fffffff); 0x7fffffff);
sad_array[2] = (unsigned short)vp9_sad16x16_c(src_ptr, src_stride, sad_array[2] = (uint16_t)vp9_sad16x16_c(src_ptr, src_stride,
ref_ptr + 2, ref_stride, ref_ptr + 2, ref_stride,
0x7fffffff); 0x7fffffff);
sad_array[3] = (unsigned short)vp9_sad16x16_c(src_ptr, src_stride, sad_array[3] = (uint16_t)vp9_sad16x16_c(src_ptr, src_stride,
ref_ptr + 3, ref_stride, ref_ptr + 3, ref_stride,
0x7fffffff); 0x7fffffff);
sad_array[4] = (unsigned short)vp9_sad16x16_c(src_ptr, src_stride, sad_array[4] = (uint16_t)vp9_sad16x16_c(src_ptr, src_stride,
ref_ptr + 4, ref_stride, ref_ptr + 4, ref_stride,
0x7fffffff); 0x7fffffff);
sad_array[5] = (unsigned short)vp9_sad16x16_c(src_ptr, src_stride, sad_array[5] = (uint16_t)vp9_sad16x16_c(src_ptr, src_stride,
ref_ptr + 5, ref_stride, ref_ptr + 5, ref_stride,
0x7fffffff); 0x7fffffff);
sad_array[6] = (unsigned short)vp9_sad16x16_c(src_ptr, src_stride, sad_array[6] = (uint16_t)vp9_sad16x16_c(src_ptr, src_stride,
ref_ptr + 6, ref_stride, ref_ptr + 6, ref_stride,
0x7fffffff); 0x7fffffff);
sad_array[7] = (unsigned short)vp9_sad16x16_c(src_ptr, src_stride, sad_array[7] = (uint16_t)vp9_sad16x16_c(src_ptr, src_stride,
ref_ptr + 7, ref_stride, ref_ptr + 7, ref_stride,
0x7fffffff); 0x7fffffff);
} }
void vp9_sad16x8x3_c(const unsigned char *src_ptr, void vp9_sad16x8x3_c(const uint8_t *src_ptr,
int src_stride, int src_stride,
const unsigned char *ref_ptr, const uint8_t *ref_ptr,
int ref_stride, int ref_stride,
unsigned int *sad_array) { unsigned int *sad_array) {
sad_array[0] = vp9_sad16x8_c(src_ptr, src_stride, sad_array[0] = vp9_sad16x8_c(src_ptr, src_stride,
@ -167,40 +165,40 @@ void vp9_sad16x8x3_c(const unsigned char *src_ptr,
ref_ptr + 2, ref_stride, 0x7fffffff); ref_ptr + 2, ref_stride, 0x7fffffff);
} }
void vp9_sad16x8x8_c(const unsigned char *src_ptr, void vp9_sad16x8x8_c(const uint8_t *src_ptr,
int src_stride, int src_stride,
const unsigned char *ref_ptr, const uint8_t *ref_ptr,
int ref_stride, int ref_stride,
unsigned short *sad_array) { uint16_t *sad_array) {
sad_array[0] = (unsigned short)vp9_sad16x8_c(src_ptr, src_stride, sad_array[0] = (uint16_t)vp9_sad16x8_c(src_ptr, src_stride,
ref_ptr, ref_stride, ref_ptr, ref_stride,
0x7fffffff); 0x7fffffff);
sad_array[1] = (unsigned short)vp9_sad16x8_c(src_ptr, src_stride, sad_array[1] = (uint16_t)vp9_sad16x8_c(src_ptr, src_stride,
ref_ptr + 1, ref_stride, ref_ptr + 1, ref_stride,
0x7fffffff); 0x7fffffff);
sad_array[2] = (unsigned short)vp9_sad16x8_c(src_ptr, src_stride, sad_array[2] = (uint16_t)vp9_sad16x8_c(src_ptr, src_stride,
ref_ptr + 2, ref_stride, ref_ptr + 2, ref_stride,
0x7fffffff); 0x7fffffff);
sad_array[3] = (unsigned short)vp9_sad16x8_c(src_ptr, src_stride, sad_array[3] = (uint16_t)vp9_sad16x8_c(src_ptr, src_stride,
ref_ptr + 3, ref_stride, ref_ptr + 3, ref_stride,
0x7fffffff); 0x7fffffff);
sad_array[4] = (unsigned short)vp9_sad16x8_c(src_ptr, src_stride, sad_array[4] = (uint16_t)vp9_sad16x8_c(src_ptr, src_stride,
ref_ptr + 4, ref_stride, ref_ptr + 4, ref_stride,
0x7fffffff); 0x7fffffff);
sad_array[5] = (unsigned short)vp9_sad16x8_c(src_ptr, src_stride, sad_array[5] = (uint16_t)vp9_sad16x8_c(src_ptr, src_stride,
ref_ptr + 5, ref_stride, ref_ptr + 5, ref_stride,
0x7fffffff); 0x7fffffff);
sad_array[6] = (unsigned short)vp9_sad16x8_c(src_ptr, src_stride, sad_array[6] = (uint16_t)vp9_sad16x8_c(src_ptr, src_stride,
ref_ptr + 6, ref_stride, ref_ptr + 6, ref_stride,
0x7fffffff); 0x7fffffff);
sad_array[7] = (unsigned short)vp9_sad16x8_c(src_ptr, src_stride, sad_array[7] = (uint16_t)vp9_sad16x8_c(src_ptr, src_stride,
ref_ptr + 7, ref_stride, ref_ptr + 7, ref_stride,
0x7fffffff); 0x7fffffff);
} }
void vp9_sad8x8x3_c(const unsigned char *src_ptr, void vp9_sad8x8x3_c(const uint8_t *src_ptr,
int src_stride, int src_stride,
const unsigned char *ref_ptr, const uint8_t *ref_ptr,
int ref_stride, int ref_stride,
unsigned int *sad_array) { unsigned int *sad_array) {
sad_array[0] = vp9_sad8x8_c(src_ptr, src_stride, sad_array[0] = vp9_sad8x8_c(src_ptr, src_stride,
@ -211,40 +209,40 @@ void vp9_sad8x8x3_c(const unsigned char *src_ptr,
ref_ptr + 2, ref_stride, 0x7fffffff); ref_ptr + 2, ref_stride, 0x7fffffff);
} }
void vp9_sad8x8x8_c(const unsigned char *src_ptr, void vp9_sad8x8x8_c(const uint8_t *src_ptr,
int src_stride, int src_stride,
const unsigned char *ref_ptr, const uint8_t *ref_ptr,
int ref_stride, int ref_stride,
unsigned short *sad_array) { uint16_t *sad_array) {
sad_array[0] = (unsigned short)vp9_sad8x8_c(src_ptr, src_stride, sad_array[0] = (uint16_t)vp9_sad8x8_c(src_ptr, src_stride,
ref_ptr, ref_stride, ref_ptr, ref_stride,
0x7fffffff); 0x7fffffff);
sad_array[1] = (unsigned short)vp9_sad8x8_c(src_ptr, src_stride, sad_array[1] = (uint16_t)vp9_sad8x8_c(src_ptr, src_stride,
ref_ptr + 1, ref_stride, ref_ptr + 1, ref_stride,
0x7fffffff); 0x7fffffff);
sad_array[2] = (unsigned short)vp9_sad8x8_c(src_ptr, src_stride, sad_array[2] = (uint16_t)vp9_sad8x8_c(src_ptr, src_stride,
ref_ptr + 2, ref_stride, ref_ptr + 2, ref_stride,
0x7fffffff); 0x7fffffff);
sad_array[3] = (unsigned short)vp9_sad8x8_c(src_ptr, src_stride, sad_array[3] = (uint16_t)vp9_sad8x8_c(src_ptr, src_stride,
ref_ptr + 3, ref_stride, ref_ptr + 3, ref_stride,
0x7fffffff); 0x7fffffff);
sad_array[4] = (unsigned short)vp9_sad8x8_c(src_ptr, src_stride, sad_array[4] = (uint16_t)vp9_sad8x8_c(src_ptr, src_stride,
ref_ptr + 4, ref_stride, ref_ptr + 4, ref_stride,
0x7fffffff); 0x7fffffff);
sad_array[5] = (unsigned short)vp9_sad8x8_c(src_ptr, src_stride, sad_array[5] = (uint16_t)vp9_sad8x8_c(src_ptr, src_stride,
ref_ptr + 5, ref_stride, ref_ptr + 5, ref_stride,
0x7fffffff); 0x7fffffff);
sad_array[6] = (unsigned short)vp9_sad8x8_c(src_ptr, src_stride, sad_array[6] = (uint16_t)vp9_sad8x8_c(src_ptr, src_stride,
ref_ptr + 6, ref_stride, ref_ptr + 6, ref_stride,
0x7fffffff); 0x7fffffff);
sad_array[7] = (unsigned short)vp9_sad8x8_c(src_ptr, src_stride, sad_array[7] = (uint16_t)vp9_sad8x8_c(src_ptr, src_stride,
ref_ptr + 7, ref_stride, ref_ptr + 7, ref_stride,
0x7fffffff); 0x7fffffff);
} }
void vp9_sad8x16x3_c(const unsigned char *src_ptr, void vp9_sad8x16x3_c(const uint8_t *src_ptr,
int src_stride, int src_stride,
const unsigned char *ref_ptr, const uint8_t *ref_ptr,
int ref_stride, int ref_stride,
unsigned int *sad_array) { unsigned int *sad_array) {
sad_array[0] = vp9_sad8x16_c(src_ptr, src_stride, sad_array[0] = vp9_sad8x16_c(src_ptr, src_stride,
@ -255,40 +253,40 @@ void vp9_sad8x16x3_c(const unsigned char *src_ptr,
ref_ptr + 2, ref_stride, 0x7fffffff); ref_ptr + 2, ref_stride, 0x7fffffff);
} }
void vp9_sad8x16x8_c(const unsigned char *src_ptr, void vp9_sad8x16x8_c(const uint8_t *src_ptr,
int src_stride, int src_stride,
const unsigned char *ref_ptr, const uint8_t *ref_ptr,
int ref_stride, int ref_stride,
unsigned short *sad_array) { uint16_t *sad_array) {
sad_array[0] = (unsigned short)vp9_sad8x16_c(src_ptr, src_stride, sad_array[0] = (uint16_t)vp9_sad8x16_c(src_ptr, src_stride,
ref_ptr, ref_stride, ref_ptr, ref_stride,
0x7fffffff); 0x7fffffff);
sad_array[1] = (unsigned short)vp9_sad8x16_c(src_ptr, src_stride, sad_array[1] = (uint16_t)vp9_sad8x16_c(src_ptr, src_stride,
ref_ptr + 1, ref_stride, ref_ptr + 1, ref_stride,
0x7fffffff); 0x7fffffff);
sad_array[2] = (unsigned short)vp9_sad8x16_c(src_ptr, src_stride, sad_array[2] = (uint16_t)vp9_sad8x16_c(src_ptr, src_stride,
ref_ptr + 2, ref_stride, ref_ptr + 2, ref_stride,
0x7fffffff); 0x7fffffff);
sad_array[3] = (unsigned short)vp9_sad8x16_c(src_ptr, src_stride, sad_array[3] = (uint16_t)vp9_sad8x16_c(src_ptr, src_stride,
ref_ptr + 3, ref_stride, ref_ptr + 3, ref_stride,
0x7fffffff); 0x7fffffff);
sad_array[4] = (unsigned short)vp9_sad8x16_c(src_ptr, src_stride, sad_array[4] = (uint16_t)vp9_sad8x16_c(src_ptr, src_stride,
ref_ptr + 4, ref_stride, ref_ptr + 4, ref_stride,
0x7fffffff); 0x7fffffff);
sad_array[5] = (unsigned short)vp9_sad8x16_c(src_ptr, src_stride, sad_array[5] = (uint16_t)vp9_sad8x16_c(src_ptr, src_stride,
ref_ptr + 5, ref_stride, ref_ptr + 5, ref_stride,
0x7fffffff); 0x7fffffff);
sad_array[6] = (unsigned short)vp9_sad8x16_c(src_ptr, src_stride, sad_array[6] = (uint16_t)vp9_sad8x16_c(src_ptr, src_stride,
ref_ptr + 6, ref_stride, ref_ptr + 6, ref_stride,
0x7fffffff); 0x7fffffff);
sad_array[7] = (unsigned short)vp9_sad8x16_c(src_ptr, src_stride, sad_array[7] = (uint16_t)vp9_sad8x16_c(src_ptr, src_stride,
ref_ptr + 7, ref_stride, ref_ptr + 7, ref_stride,
0x7fffffff); 0x7fffffff);
} }
void vp9_sad4x4x3_c(const unsigned char *src_ptr, void vp9_sad4x4x3_c(const uint8_t *src_ptr,
int src_stride, int src_stride,
const unsigned char *ref_ptr, const uint8_t *ref_ptr,
int ref_stride, int ref_stride,
unsigned int *sad_array) { unsigned int *sad_array) {
sad_array[0] = vp9_sad4x4_c(src_ptr, src_stride, sad_array[0] = vp9_sad4x4_c(src_ptr, src_stride,
@ -299,43 +297,42 @@ void vp9_sad4x4x3_c(const unsigned char *src_ptr,
ref_ptr + 2, ref_stride, 0x7fffffff); ref_ptr + 2, ref_stride, 0x7fffffff);
} }
void vp9_sad4x4x8_c(const unsigned char *src_ptr, void vp9_sad4x4x8_c(const uint8_t *src_ptr,
int src_stride, int src_stride,
const unsigned char *ref_ptr, const uint8_t *ref_ptr,
int ref_stride, int ref_stride,
unsigned short *sad_array) { uint16_t *sad_array) {
sad_array[0] = (unsigned short)vp9_sad4x4_c(src_ptr, src_stride, sad_array[0] = (uint16_t)vp9_sad4x4_c(src_ptr, src_stride,
ref_ptr, ref_stride, ref_ptr, ref_stride,
0x7fffffff); 0x7fffffff);
sad_array[1] = (unsigned short)vp9_sad4x4_c(src_ptr, src_stride, sad_array[1] = (uint16_t)vp9_sad4x4_c(src_ptr, src_stride,
ref_ptr + 1, ref_stride, ref_ptr + 1, ref_stride,
0x7fffffff); 0x7fffffff);
sad_array[2] = (unsigned short)vp9_sad4x4_c(src_ptr, src_stride, sad_array[2] = (uint16_t)vp9_sad4x4_c(src_ptr, src_stride,
ref_ptr + 2, ref_stride, ref_ptr + 2, ref_stride,
0x7fffffff); 0x7fffffff);
sad_array[3] = (unsigned short)vp9_sad4x4_c(src_ptr, src_stride, sad_array[3] = (uint16_t)vp9_sad4x4_c(src_ptr, src_stride,
ref_ptr + 3, ref_stride, ref_ptr + 3, ref_stride,
0x7fffffff); 0x7fffffff);
sad_array[4] = (unsigned short)vp9_sad4x4_c(src_ptr, src_stride, sad_array[4] = (uint16_t)vp9_sad4x4_c(src_ptr, src_stride,
ref_ptr + 4, ref_stride, ref_ptr + 4, ref_stride,
0x7fffffff); 0x7fffffff);
sad_array[5] = (unsigned short)vp9_sad4x4_c(src_ptr, src_stride, sad_array[5] = (uint16_t)vp9_sad4x4_c(src_ptr, src_stride,
ref_ptr + 5, ref_stride, ref_ptr + 5, ref_stride,
0x7fffffff); 0x7fffffff);
sad_array[6] = (unsigned short)vp9_sad4x4_c(src_ptr, src_stride, sad_array[6] = (uint16_t)vp9_sad4x4_c(src_ptr, src_stride,
ref_ptr + 6, ref_stride, ref_ptr + 6, ref_stride,
0x7fffffff); 0x7fffffff);
sad_array[7] = (unsigned short)vp9_sad4x4_c(src_ptr, src_stride, sad_array[7] = (uint16_t)vp9_sad4x4_c(src_ptr, src_stride,
ref_ptr + 7, ref_stride, ref_ptr + 7, ref_stride,
0x7fffffff); 0x7fffffff);
} }
void vp9_sad32x32x4d_c(const unsigned char *src_ptr, void vp9_sad32x32x4d_c(const uint8_t *src_ptr,
int src_stride, int src_stride,
unsigned char *ref_ptr[], uint8_t *ref_ptr[],
int ref_stride, int ref_stride,
unsigned int *sad_array unsigned int *sad_array) {
) {
sad_array[0] = vp9_sad32x32_c(src_ptr, src_stride, sad_array[0] = vp9_sad32x32_c(src_ptr, src_stride,
ref_ptr[0], ref_stride, 0x7fffffff); ref_ptr[0], ref_stride, 0x7fffffff);
sad_array[1] = vp9_sad32x32_c(src_ptr, src_stride, sad_array[1] = vp9_sad32x32_c(src_ptr, src_stride,
@ -346,9 +343,9 @@ void vp9_sad32x32x4d_c(const unsigned char *src_ptr,
ref_ptr[3], ref_stride, 0x7fffffff); ref_ptr[3], ref_stride, 0x7fffffff);
} }
void vp9_sad16x16x4d_c(const unsigned char *src_ptr, void vp9_sad16x16x4d_c(const uint8_t *src_ptr,
int src_stride, int src_stride,
unsigned char *ref_ptr[], uint8_t *ref_ptr[],
int ref_stride, int ref_stride,
unsigned int *sad_array) { unsigned int *sad_array) {
sad_array[0] = vp9_sad16x16_c(src_ptr, src_stride, sad_array[0] = vp9_sad16x16_c(src_ptr, src_stride,
@ -361,9 +358,9 @@ void vp9_sad16x16x4d_c(const unsigned char *src_ptr,
ref_ptr[3], ref_stride, 0x7fffffff); ref_ptr[3], ref_stride, 0x7fffffff);
} }
void vp9_sad16x8x4d_c(const unsigned char *src_ptr, void vp9_sad16x8x4d_c(const uint8_t *src_ptr,
int src_stride, int src_stride,
unsigned char *ref_ptr[], uint8_t *ref_ptr[],
int ref_stride, int ref_stride,
unsigned int *sad_array) { unsigned int *sad_array) {
sad_array[0] = vp9_sad16x8_c(src_ptr, src_stride, sad_array[0] = vp9_sad16x8_c(src_ptr, src_stride,
@ -376,9 +373,9 @@ void vp9_sad16x8x4d_c(const unsigned char *src_ptr,
ref_ptr[3], ref_stride, 0x7fffffff); ref_ptr[3], ref_stride, 0x7fffffff);
} }
void vp9_sad8x8x4d_c(const unsigned char *src_ptr, void vp9_sad8x8x4d_c(const uint8_t *src_ptr,
int src_stride, int src_stride,
unsigned char *ref_ptr[], uint8_t *ref_ptr[],
int ref_stride, int ref_stride,
unsigned int *sad_array) { unsigned int *sad_array) {
sad_array[0] = vp9_sad8x8_c(src_ptr, src_stride, sad_array[0] = vp9_sad8x8_c(src_ptr, src_stride,
@ -391,9 +388,9 @@ void vp9_sad8x8x4d_c(const unsigned char *src_ptr,
ref_ptr[3], ref_stride, 0x7fffffff); ref_ptr[3], ref_stride, 0x7fffffff);
} }
void vp9_sad8x16x4d_c(const unsigned char *src_ptr, void vp9_sad8x16x4d_c(const uint8_t *src_ptr,
int src_stride, int src_stride,
unsigned char *ref_ptr[], uint8_t *ref_ptr[],
int ref_stride, int ref_stride,
unsigned int *sad_array) { unsigned int *sad_array) {
sad_array[0] = vp9_sad8x16_c(src_ptr, src_stride, sad_array[0] = vp9_sad8x16_c(src_ptr, src_stride,
@ -406,9 +403,9 @@ void vp9_sad8x16x4d_c(const unsigned char *src_ptr,
ref_ptr[3], ref_stride, 0x7fffffff); ref_ptr[3], ref_stride, 0x7fffffff);
} }
void vp9_sad4x4x4d_c(const unsigned char *src_ptr, void vp9_sad4x4x4d_c(const uint8_t *src_ptr,
int src_stride, int src_stride,
unsigned char *ref_ptr[], uint8_t *ref_ptr[],
int ref_stride, int ref_stride,
unsigned int *sad_array) { unsigned int *sad_array) {
sad_array[0] = vp9_sad4x4_c(src_ptr, src_stride, sad_array[0] = vp9_sad4x4_c(src_ptr, src_stride,
@ -422,9 +419,9 @@ void vp9_sad4x4x4d_c(const unsigned char *src_ptr,
} }
/* Copy 2 macroblocks to a buffer */ /* Copy 2 macroblocks to a buffer */
void vp9_copy32xn_c(unsigned char *src_ptr, void vp9_copy32xn_c(uint8_t *src_ptr,
int src_stride, int src_stride,
unsigned char *dst_ptr, uint8_t *dst_ptr,
int dst_stride, int dst_stride,
int height) { int height) {
int r; int r;

View File

@ -11,16 +11,17 @@
#include <stdlib.h> #include <stdlib.h>
#include "vpx_ports/mem.h" #include "vpx_ports/mem.h"
#include "./vp9_rtcd.h" #include "./vp9_rtcd.h"
unsigned int vp9_satd16x16_c(const unsigned char *src_ptr,
unsigned int vp9_satd16x16_c(const uint8_t *src_ptr,
int src_stride, int src_stride,
const unsigned char *ref_ptr, const uint8_t *ref_ptr,
int ref_stride, int ref_stride,
unsigned int *psatd) { unsigned int *psatd) {
int r, c, i; int r, c, i;
unsigned int satd = 0; unsigned int satd = 0;
DECLARE_ALIGNED(16, short, diff_in[256]); DECLARE_ALIGNED(16, int16_t, diff_in[256]);
DECLARE_ALIGNED(16, short, diff_out[16]); DECLARE_ALIGNED(16, int16_t, diff_out[16]);
short *in; int16_t *in;
for (r = 0; r < 16; r++) { for (r = 0; r < 16; r++) {
for (c = 0; c < 16; c++) { for (c = 0; c < 16; c++) {

View File

@ -43,4 +43,4 @@ extern void vp9_set_segment_data(VP9_PTR ptr, signed char *feature_data,
extern void vp9_choose_segmap_coding_method(VP9_COMP *cpi); extern void vp9_choose_segmap_coding_method(VP9_COMP *cpi);
#endif /* __INC_SEGMENTATION_H__ */ #endif // VP9_ENCODER_VP9_SEGMENTATION_H_

View File

@ -11,7 +11,7 @@
#include "vp9/encoder/vp9_onyx_int.h" #include "vp9/encoder/vp9_onyx_int.h"
void vp9_ssim_parms_16x16_c(unsigned char *s, int sp, unsigned char *r, void vp9_ssim_parms_16x16_c(uint8_t *s, int sp, uint8_t *r,
int rp, unsigned long *sum_s, unsigned long *sum_r, int rp, unsigned long *sum_s, unsigned long *sum_r,
unsigned long *sum_sq_s, unsigned long *sum_sq_r, unsigned long *sum_sq_s, unsigned long *sum_sq_r,
unsigned long *sum_sxr) { unsigned long *sum_sxr) {
@ -26,7 +26,7 @@ void vp9_ssim_parms_16x16_c(unsigned char *s, int sp, unsigned char *r,
} }
} }
} }
void vp9_ssim_parms_8x8_c(unsigned char *s, int sp, unsigned char *r, int rp, void vp9_ssim_parms_8x8_c(uint8_t *s, int sp, uint8_t *r, int rp,
unsigned long *sum_s, unsigned long *sum_r, unsigned long *sum_s, unsigned long *sum_r,
unsigned long *sum_sq_s, unsigned long *sum_sq_r, unsigned long *sum_sq_s, unsigned long *sum_sq_r,
unsigned long *sum_sxr) { unsigned long *sum_sxr) {
@ -65,13 +65,13 @@ static double similarity(unsigned long sum_s, unsigned long sum_r,
return ssim_n * 1.0 / ssim_d; return ssim_n * 1.0 / ssim_d;
} }
static double ssim_16x16(unsigned char *s, int sp, unsigned char *r, int rp) { static double ssim_16x16(uint8_t *s, int sp, uint8_t *r, int rp) {
unsigned long sum_s = 0, sum_r = 0, sum_sq_s = 0, sum_sq_r = 0, sum_sxr = 0; unsigned long sum_s = 0, sum_r = 0, sum_sq_s = 0, sum_sq_r = 0, sum_sxr = 0;
vp9_ssim_parms_16x16(s, sp, r, rp, &sum_s, &sum_r, &sum_sq_s, &sum_sq_r, vp9_ssim_parms_16x16(s, sp, r, rp, &sum_s, &sum_r, &sum_sq_s, &sum_sq_r,
&sum_sxr); &sum_sxr);
return similarity(sum_s, sum_r, sum_sq_s, sum_sq_r, sum_sxr, 256); return similarity(sum_s, sum_r, sum_sq_s, sum_sq_r, sum_sxr, 256);
} }
static double ssim_8x8(unsigned char *s, int sp, unsigned char *r, int rp) { static double ssim_8x8(uint8_t *s, int sp, uint8_t *r, int rp) {
unsigned long sum_s = 0, sum_r = 0, sum_sq_s = 0, sum_sq_r = 0, sum_sxr = 0; unsigned long sum_s = 0, sum_r = 0, sum_sq_s = 0, sum_sq_r = 0, sum_sxr = 0;
vp9_ssim_parms_8x8(s, sp, r, rp, &sum_s, &sum_r, &sum_sq_s, &sum_sq_r, vp9_ssim_parms_8x8(s, sp, r, rp, &sum_s, &sum_r, &sum_sq_s, &sum_sq_r,
&sum_sxr); &sum_sxr);
@ -81,7 +81,7 @@ static double ssim_8x8(unsigned char *s, int sp, unsigned char *r, int rp) {
// We are using a 8x8 moving window with starting location of each 8x8 window // We are using a 8x8 moving window with starting location of each 8x8 window
// on the 4x4 pixel grid. Such arrangement allows the windows to overlap // on the 4x4 pixel grid. Such arrangement allows the windows to overlap
// block boundaries to penalize blocking artifacts. // block boundaries to penalize blocking artifacts.
double vp9_ssim2(unsigned char *img1, unsigned char *img2, int stride_img1, double vp9_ssim2(uint8_t *img1, uint8_t *img2, int stride_img1,
int stride_img2, int width, int height) { int stride_img2, int width, int height) {
int i, j; int i, j;
int samples = 0; int samples = 0;

View File

@ -35,19 +35,16 @@
#if VP9_TEMPORAL_ALT_REF #if VP9_TEMPORAL_ALT_REF
static void temporal_filter_predictors_mb_c static void temporal_filter_predictors_mb_c(MACROBLOCKD *xd,
( uint8_t *y_mb_ptr,
MACROBLOCKD *xd, uint8_t *u_mb_ptr,
unsigned char *y_mb_ptr, uint8_t *v_mb_ptr,
unsigned char *u_mb_ptr, int stride,
unsigned char *v_mb_ptr, int mv_row,
int stride, int mv_col,
int mv_row, uint8_t *pred) {
int mv_col,
unsigned char *pred
) {
int offset; int offset;
unsigned char *yptr, *uptr, *vptr; uint8_t *yptr, *uptr, *vptr;
int omv_row, omv_col; int omv_row, omv_col;
// Y // Y
@ -75,23 +72,20 @@ static void temporal_filter_predictors_mb_c
(omv_col & 15), (omv_row & 15), &pred[256], 8); (omv_col & 15), (omv_row & 15), &pred[256], 8);
xd->subpixel_predict8x8(vptr, stride, xd->subpixel_predict8x8(vptr, stride,
(omv_col & 15), (omv_row & 15), &pred[320], 8); (omv_col & 15), (omv_row & 15), &pred[320], 8);
} } else {
else {
vp9_copy_mem8x8(uptr, stride, &pred[256], 8); vp9_copy_mem8x8(uptr, stride, &pred[256], 8);
vp9_copy_mem8x8(vptr, stride, &pred[320], 8); vp9_copy_mem8x8(vptr, stride, &pred[320], 8);
} }
} }
void vp9_temporal_filter_apply_c
( void vp9_temporal_filter_apply_c(uint8_t *frame1,
unsigned char *frame1, unsigned int stride,
unsigned int stride, uint8_t *frame2,
unsigned char *frame2, unsigned int block_size,
unsigned int block_size, int strength,
int strength, int filter_weight,
int filter_weight, unsigned int *accumulator,
unsigned int *accumulator, uint16_t *count) {
unsigned short *count
) {
unsigned int i, j, k; unsigned int i, j, k;
int modifier; int modifier;
int byte = 0; int byte = 0;
@ -129,14 +123,11 @@ void vp9_temporal_filter_apply_c
#if ALT_REF_MC_ENABLED #if ALT_REF_MC_ENABLED
static int temporal_filter_find_matching_mb_c static int temporal_filter_find_matching_mb_c(VP9_COMP *cpi,
( YV12_BUFFER_CONFIG *arf_frame,
VP9_COMP *cpi, YV12_BUFFER_CONFIG *frame_ptr,
YV12_BUFFER_CONFIG *arf_frame, int mb_offset,
YV12_BUFFER_CONFIG *frame_ptr, int error_thresh) {
int mb_offset,
int error_thresh
) {
MACROBLOCK *x = &cpi->mb; MACROBLOCK *x = &cpi->mb;
int step_param; int step_param;
int further_steps; int further_steps;
@ -149,10 +140,10 @@ static int temporal_filter_find_matching_mb_c
int_mv best_ref_mv1_full; /* full-pixel value of best_ref_mv1 */ int_mv best_ref_mv1_full; /* full-pixel value of best_ref_mv1 */
// Save input state // Save input state
unsigned char **base_src = b->base_src; uint8_t **base_src = b->base_src;
int src = b->src; int src = b->src;
int src_stride = b->src_stride; int src_stride = b->src_stride;
unsigned char **base_pre = d->base_pre; uint8_t **base_pre = d->base_pre;
int pre = d->pre; int pre = d->pre;
int pre_stride = d->pre_stride; int pre_stride = d->pre_stride;
@ -216,13 +207,10 @@ static int temporal_filter_find_matching_mb_c
} }
#endif #endif
static void temporal_filter_iterate_c static void temporal_filter_iterate_c(VP9_COMP *cpi,
( int frame_count,
VP9_COMP *cpi, int alt_ref_index,
int frame_count, int strength) {
int alt_ref_index,
int strength
) {
int byte; int byte;
int frame; int frame;
int mb_col, mb_row; int mb_col, mb_row;
@ -232,16 +220,16 @@ static void temporal_filter_iterate_c
int mb_y_offset = 0; int mb_y_offset = 0;
int mb_uv_offset = 0; int mb_uv_offset = 0;
DECLARE_ALIGNED_ARRAY(16, unsigned int, accumulator, 16 * 16 + 8 * 8 + 8 * 8); DECLARE_ALIGNED_ARRAY(16, unsigned int, accumulator, 16 * 16 + 8 * 8 + 8 * 8);
DECLARE_ALIGNED_ARRAY(16, unsigned short, count, 16 * 16 + 8 * 8 + 8 * 8); DECLARE_ALIGNED_ARRAY(16, uint16_t, count, 16 * 16 + 8 * 8 + 8 * 8);
MACROBLOCKD *mbd = &cpi->mb.e_mbd; MACROBLOCKD *mbd = &cpi->mb.e_mbd;
YV12_BUFFER_CONFIG *f = cpi->frames[alt_ref_index]; YV12_BUFFER_CONFIG *f = cpi->frames[alt_ref_index];
unsigned char *dst1, *dst2; uint8_t *dst1, *dst2;
DECLARE_ALIGNED_ARRAY(16, unsigned char, predictor, 16 * 16 + 8 * 8 + 8 * 8); DECLARE_ALIGNED_ARRAY(16, uint8_t, predictor, 16 * 16 + 8 * 8 + 8 * 8);
// Save input state // Save input state
unsigned char *y_buffer = mbd->pre.y_buffer; uint8_t *y_buffer = mbd->pre.y_buffer;
unsigned char *u_buffer = mbd->pre.u_buffer; uint8_t *u_buffer = mbd->pre.u_buffer;
unsigned char *v_buffer = mbd->pre.v_buffer; uint8_t *v_buffer = mbd->pre.v_buffer;
for (mb_row = 0; mb_row < mb_rows; mb_row++) { for (mb_row = 0; mb_row < mb_rows; mb_row++) {
#if ALT_REF_MC_ENABLED #if ALT_REF_MC_ENABLED
@ -266,7 +254,7 @@ static void temporal_filter_iterate_c
int stride; int stride;
vpx_memset(accumulator, 0, 384 * sizeof(unsigned int)); vpx_memset(accumulator, 0, 384 * sizeof(unsigned int));
vpx_memset(count, 0, 384 * sizeof(unsigned short)); vpx_memset(count, 0, 384 * sizeof(uint16_t));
#if ALT_REF_MC_ENABLED #if ALT_REF_MC_ENABLED
cpi->mb.mv_col_min = -((mb_col * 16) + (17 - 2 * VP9_INTERP_EXTEND)); cpi->mb.mv_col_min = -((mb_col * 16) + (17 - 2 * VP9_INTERP_EXTEND));
@ -341,7 +329,7 @@ static void temporal_filter_iterate_c
pval *= cpi->fixed_divide[count[k]]; pval *= cpi->fixed_divide[count[k]];
pval >>= 19; pval >>= 19;
dst1[byte] = (unsigned char)pval; dst1[byte] = (uint8_t)pval;
// move to next pixel // move to next pixel
byte++; byte++;
@ -362,13 +350,13 @@ static void temporal_filter_iterate_c
unsigned int pval = accumulator[k] + (count[k] >> 1); unsigned int pval = accumulator[k] + (count[k] >> 1);
pval *= cpi->fixed_divide[count[k]]; pval *= cpi->fixed_divide[count[k]];
pval >>= 19; pval >>= 19;
dst1[byte] = (unsigned char)pval; dst1[byte] = (uint8_t)pval;
// V // V
pval = accumulator[m] + (count[m] >> 1); pval = accumulator[m] + (count[m] >> 1);
pval *= cpi->fixed_divide[count[m]]; pval *= cpi->fixed_divide[count[m]];
pval >>= 19; pval >>= 19;
dst2[byte] = (unsigned char)pval; dst2[byte] = (uint8_t)pval;
// move to next pixel // move to next pixel
byte++; byte++;

Some files were not shown because too many files have changed in this diff Show More