Commit 978e4d04 authored by Ronald S. Bultje's avatar Ronald S. Bultje

Fix some compiler warnings.

Change-Id: Iccb56e3b966d1519ba49dfe4e1396479c6b54a6f
parent cbc66fa8
......@@ -262,4 +262,12 @@ typedef struct vp8_recon_rtcd_vtable {
void vp8_recon_intra_mbuv(const vp8_recon_rtcd_vtable_t *rtcd,
MACROBLOCKD *xd);
#if CONFIG_SUPERBLOCKS
extern void vp8_recon_mby_s_c(const vp8_recon_rtcd_vtable_t *rtcd,
MACROBLOCKD *xd, uint8_t *dst);
extern void vp8_recon_mbuv_s_c(const vp8_recon_rtcd_vtable_t *rtcd,
MACROBLOCKD *xd, uint8_t *udst, uint8_t *vdst);
#endif
#endif
......@@ -45,6 +45,15 @@ extern void vp8_build_2nd_inter16x16_predictors_mb(MACROBLOCKD *xd,
int dst_ystride,
int dst_uvstride);
#if CONFIG_SUPERBLOCKS
extern void vp8_build_inter32x32_predictors_sb(MACROBLOCKD *x,
unsigned char *dst_y,
unsigned char *dst_u,
unsigned char *dst_v,
int dst_ystride,
int dst_uvstride);
#endif
extern void vp8_build_inter_predictors_mb(MACROBLOCKD *xd);
extern void vp8_build_inter_predictors_b(BLOCKD *d, int pitch,
......
......@@ -201,5 +201,16 @@ void vp8_ht_dequant_idct_add_8x8_c(TX_TYPE tx_type, short *input, short *dq,
int pitch, int stride);
#endif
#if CONFIG_SUPERBLOCKS
void vp8_dequant_dc_idct_add_y_block_8x8_inplace_c(short *q, short *dq,
unsigned char *dst,
int stride, char *eobs,
short *dc, MACROBLOCKD *xd);
void vp8_dequant_idct_add_uv_block_8x8_inplace_c(short *q, short *dq,
unsigned char *dstu,
unsigned char *dstv,
int stride, char *eobs,
MACROBLOCKD *xd);
#endif
#endif
......@@ -21,6 +21,7 @@
#include "vp8/common/setupintrarecon.h"
#include "encodeintra.h"
#include "vp8/common/reconinter.h"
#include "vp8/common/invtrans.h"
#include "rdopt.h"
#include "vp8/common/findnearmv.h"
#include "vp8/common/reconintra.h"
......@@ -76,7 +77,8 @@ void vp8cx_encode_intra_super_block(VP8_COMP *cpi,
MACROBLOCK *x,
TOKENEXTRA **t, int mb_col);
static void adjust_act_zbin(VP8_COMP *cpi, MACROBLOCK *x);
extern void vp8_stuff_mb_8x8(VP8_COMP *cpi,
MACROBLOCKD *xd, TOKENEXTRA **t, int dry_run);
#ifdef MODE_STATS
unsigned int inter_y_modes[MB_MODE_COUNT];
......@@ -852,7 +854,6 @@ static void encode_sb(VP8_COMP *cpi,
MACROBLOCK *x,
MACROBLOCKD *xd,
TOKENEXTRA **tp) {
VP8_COMMON *pc = cm;
int i;
int map_index;
int mb_row, mb_col;
......@@ -1693,7 +1694,6 @@ static void update_sb_skip_coeff_state(VP8_COMP *cpi,
// reset pointer, stuff EOBs where necessary
*tp = t[0];
for (n = 0; n < 4; n++) {
TOKENEXTRA *tbak = *tp;
if (skip[n]) {
x->e_mbd.above_context = &ta[n];
x->e_mbd.left_context = &tl[n];
......@@ -1715,9 +1715,12 @@ void vp8cx_encode_intra_super_block(VP8_COMP *cpi,
int n;
MACROBLOCKD *xd = &x->e_mbd;
VP8_COMMON *cm = &cpi->common;
const uint8_t *src = x->src.y_buffer, *dst = xd->dst.y_buffer;
const uint8_t *usrc = x->src.u_buffer, *udst = xd->dst.u_buffer;
const uint8_t *vsrc = x->src.v_buffer, *vdst = xd->dst.v_buffer;
const uint8_t *src = x->src.y_buffer;
uint8_t *dst = xd->dst.y_buffer;
const uint8_t *usrc = x->src.u_buffer;
uint8_t *udst = xd->dst.u_buffer;
const uint8_t *vsrc = x->src.v_buffer;
uint8_t *vdst = xd->dst.v_buffer;
int src_y_stride = x->src.y_stride, dst_y_stride = xd->dst.y_stride;
int src_uv_stride = x->src.uv_stride, dst_uv_stride = xd->dst.uv_stride;
const VP8_ENCODER_RTCD *rtcd = IF_RTCD(&cpi->rtcd);
......@@ -2041,13 +2044,15 @@ void vp8cx_encode_inter_superblock(VP8_COMP *cpi, MACROBLOCK *x, TOKENEXTRA **t,
const int output_enabled = 1;
VP8_COMMON *cm = &cpi->common;
MACROBLOCKD *xd = &x->e_mbd;
const uint8_t *src = x->src.y_buffer, *dst = xd->dst.y_buffer;
const uint8_t *usrc = x->src.u_buffer, *udst = xd->dst.u_buffer;
const uint8_t *vsrc = x->src.v_buffer, *vdst = xd->dst.v_buffer;
const uint8_t *src = x->src.y_buffer;
uint8_t *dst = xd->dst.y_buffer;
const uint8_t *usrc = x->src.u_buffer;
uint8_t *udst = xd->dst.u_buffer;
const uint8_t *vsrc = x->src.v_buffer;
uint8_t *vdst = xd->dst.v_buffer;
int src_y_stride = x->src.y_stride, dst_y_stride = xd->dst.y_stride;
int src_uv_stride = x->src.uv_stride, dst_uv_stride = xd->dst.uv_stride;
const VP8_ENCODER_RTCD *rtcd = IF_RTCD(&cpi->rtcd);
int mis = xd->mode_info_stride;
unsigned int segment_id = xd->mode_info_context->mbmi.segment_id;
int seg_ref_active;
unsigned char ref_pred_flag;
......
......@@ -67,8 +67,10 @@ void vp8_subtract_4b_c(BLOCK *be, BLOCKD *bd, int pitch) {
}
}
void vp8_subtract_mbuv_s_c(short *diff, unsigned char *usrc, unsigned char *vsrc, int src_stride,
unsigned char *upred, unsigned char *vpred, int dst_stride) {
void vp8_subtract_mbuv_s_c(short *diff, const unsigned char *usrc,
const unsigned char *vsrc, int src_stride,
const unsigned char *upred,
const unsigned char *vpred, int dst_stride) {
short *udiff = diff + 256;
short *vdiff = diff + 320;
......@@ -95,14 +97,16 @@ void vp8_subtract_mbuv_s_c(short *diff, unsigned char *usrc, unsigned char *vsrc
}
}
void vp8_subtract_mbuv_c(short *diff, unsigned char *usrc, unsigned char *vsrc, unsigned char *pred, int stride) {
void vp8_subtract_mbuv_c(short *diff, unsigned char *usrc,
unsigned char *vsrc, unsigned char *pred, int stride) {
unsigned char *upred = pred + 256;
unsigned char *vpred = pred + 320;
vp8_subtract_mbuv_s_c(diff, usrc, vsrc, stride, upred, vpred, 8);
}
void vp8_subtract_mby_s_c(short *diff, unsigned char *src, int src_stride, unsigned char *pred, int dst_stride) {
void vp8_subtract_mby_s_c(short *diff, const unsigned char *src, int src_stride,
const unsigned char *pred, int dst_stride) {
int r, c;
for (r = 0; r < 16; r++) {
......@@ -116,8 +120,8 @@ void vp8_subtract_mby_s_c(short *diff, unsigned char *src, int src_stride, unsig
}
}
void vp8_subtract_mby_c(short *diff, unsigned char *src, unsigned char *pred, int stride)
{
void vp8_subtract_mby_c(short *diff, unsigned char *src,
unsigned char *pred, int stride) {
vp8_subtract_mby_s_c(diff, src, stride, pred, 16);
}
......
......@@ -132,4 +132,14 @@ void vp8_optimize_mby_16x16(MACROBLOCK *x, const struct VP8_ENCODER_RTCD *rtcd);
void vp8_subtract_4b_c(BLOCK *be, BLOCKD *bd, int pitch);
#if CONFIG_SUPERBLOCKS
void vp8_subtract_mbuv_s_c(short *diff, const unsigned char *usrc,
const unsigned char *vsrc, int src_stride,
const unsigned char *upred,
const unsigned char *vpred, int dst_stride);
void vp8_subtract_mby_s_c(short *diff, const unsigned char *src,
int src_stride, const unsigned char *pred,
int dst_stride);
#endif
#endif
......@@ -3856,7 +3856,6 @@ void vp8_rd_pick_intra_mode(VP8_COMP *cpi, MACROBLOCK *x,
int mode16x16;
int mode8x8[2][4];
int dist;
int rateuv8, rateuv_tokenonly8, distuv8;
mbmi->ref_frame = INTRA_FRAME;
rd_pick_intra_mbuv_mode(cpi, x, &rateuv, &rateuv_tokenonly, &distuv);
......@@ -3961,7 +3960,6 @@ int64_t vp8_rd_pick_inter_mode_sb(VP8_COMP *cpi, MACROBLOCK *x,
BLOCKD *d = &xd->block[0];
MB_PREDICTION_MODE this_mode;
MV_REFERENCE_FRAME ref_frame;
int mis = xd->mode_info_stride;
unsigned char segment_id = xd->mode_info_context->mbmi.segment_id;
int comp_pred;
int_mv best_ref_mv, second_best_ref_mv;
......@@ -4313,11 +4311,11 @@ int64_t vp8_rd_pick_inter_mode_sb(VP8_COMP *cpi, MACROBLOCK *x,
if ((sse - var < q2dc *q2dc >> 4) ||
(sse / 2 > var && sse - var < 64)) {
// Check u and v to make sure skip is ok
int sse2, sse3;
int var2 = VARIANCE_INVOKE(&cpi->rtcd.variance, var16x16)
unsigned int sse2, sse3;
var += VARIANCE_INVOKE(&cpi->rtcd.variance, var16x16)
(x->src.u_buffer, x->src.uv_stride,
xd->dst.u_buffer, xd->dst.uv_stride, &sse2);
int var3 = VARIANCE_INVOKE(&cpi->rtcd.variance, var16x16)
var += VARIANCE_INVOKE(&cpi->rtcd.variance, var16x16)
(x->src.v_buffer, x->src.uv_stride,
xd->dst.v_buffer, xd->dst.uv_stride, &sse3);
sse2 += sse3;
......@@ -4658,7 +4656,6 @@ void vp8cx_pick_mode_inter_macroblock(VP8_COMP *cpi, MACROBLOCK *x,
int recon_yoffset,
int recon_uvoffset,
int *totalrate, int *totaldist) {
VP8_COMMON *cm = &cpi->common;
MACROBLOCKD *const xd = &x->e_mbd;
MB_MODE_INFO * mbmi = &x->e_mbd.mode_info_context->mbmi;
int rate, distortion;
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment