Commit f274c219 authored by James Zern's avatar James Zern

vpx_mem: remove vpx_memcpy

vestigial. replace instances with memcpy() which they already were being
defined to.

Change-Id: Icfd1b0bc5d95b70efab91b9ae777ace1e81d2d7c
parent fbd3b894
...@@ -398,9 +398,9 @@ class ConvolveTest : public ::testing::TestWithParam<ConvolveParam> { ...@@ -398,9 +398,9 @@ class ConvolveTest : public ::testing::TestWithParam<ConvolveParam> {
} }
void CopyOutputToRef() { void CopyOutputToRef() {
vpx_memcpy(output_ref_, output_, kOutputBufferSize); memcpy(output_ref_, output_, kOutputBufferSize);
#if CONFIG_VP9_HIGHBITDEPTH #if CONFIG_VP9_HIGHBITDEPTH
vpx_memcpy(output16_ref_, output16_, kOutputBufferSize); memcpy(output16_ref_, output16_, kOutputBufferSize);
#endif #endif
} }
......
...@@ -69,8 +69,7 @@ class QuantizeTestBase { ...@@ -69,8 +69,7 @@ class QuantizeTestBase {
// Copy macroblockd from the reference to get pre-set-up dequant values. // Copy macroblockd from the reference to get pre-set-up dequant values.
macroblockd_dst_ = reinterpret_cast<MACROBLOCKD *>( macroblockd_dst_ = reinterpret_cast<MACROBLOCKD *>(
vpx_memalign(32, sizeof(*macroblockd_dst_))); vpx_memalign(32, sizeof(*macroblockd_dst_)));
vpx_memcpy(macroblockd_dst_, &vp8_comp_->mb.e_mbd, memcpy(macroblockd_dst_, &vp8_comp_->mb.e_mbd, sizeof(*macroblockd_dst_));
sizeof(*macroblockd_dst_));
// Fix block pointers - currently they point to the blocks in the reference // Fix block pointers - currently they point to the blocks in the reference
// structure. // structure.
vp8_setup_block_dptrs(macroblockd_dst_); vp8_setup_block_dptrs(macroblockd_dst_);
...@@ -79,8 +78,7 @@ class QuantizeTestBase { ...@@ -79,8 +78,7 @@ class QuantizeTestBase {
void UpdateQuantizer(int q) { void UpdateQuantizer(int q) {
vp8_set_quantizer(vp8_comp_, q); vp8_set_quantizer(vp8_comp_, q);
vpx_memcpy(macroblockd_dst_, &vp8_comp_->mb.e_mbd, memcpy(macroblockd_dst_, &vp8_comp_->mb.e_mbd, sizeof(*macroblockd_dst_));
sizeof(*macroblockd_dst_));
vp8_setup_block_dptrs(macroblockd_dst_); vp8_setup_block_dptrs(macroblockd_dst_);
} }
......
...@@ -101,13 +101,13 @@ class VpxScaleBase { ...@@ -101,13 +101,13 @@ class VpxScaleBase {
// The first row was already extended to the left and right. Copy it up. // The first row was already extended to the left and right. Copy it up.
for (int y = 0; y < padding; ++y) { for (int y = 0; y < padding; ++y) {
vpx_memcpy(top, left, extend_width); memcpy(top, left, extend_width);
top += stride; top += stride;
} }
uint8_t *bottom = left + (crop_height * stride); uint8_t *bottom = left + (crop_height * stride);
for (int y = 0; y < bottom_extend; ++y) { for (int y = 0; y < bottom_extend; ++y) {
vpx_memcpy(bottom, left + (crop_height - 1) * stride, extend_width); memcpy(bottom, left + (crop_height - 1) * stride, extend_width);
bottom += stride; bottom += stride;
} }
} }
......
...@@ -29,14 +29,14 @@ extern "C" { ...@@ -29,14 +29,14 @@ extern "C" {
#define vp8_copy( Dest, Src) { \ #define vp8_copy( Dest, Src) { \
assert( sizeof( Dest) == sizeof( Src)); \ assert( sizeof( Dest) == sizeof( Src)); \
vpx_memcpy( Dest, Src, sizeof( Src)); \ memcpy( Dest, Src, sizeof( Src)); \
} }
/* Use this for variably-sized arrays. */ /* Use this for variably-sized arrays. */
#define vp8_copy_array( Dest, Src, N) { \ #define vp8_copy_array( Dest, Src, N) { \
assert( sizeof( *Dest) == sizeof( *Src)); \ assert( sizeof( *Dest) == sizeof( *Src)); \
vpx_memcpy( Dest, Src, N * sizeof( *Src)); \ memcpy( Dest, Src, N * sizeof( *Src)); \
} }
#define vp8_zero( Dest) vpx_memset( &Dest, 0, sizeof( Dest)); #define vp8_zero( Dest) vpx_memset( &Dest, 0, sizeof( Dest));
......
...@@ -183,7 +183,6 @@ const vp8_extra_bit_struct vp8_extra_bits[12] = ...@@ -183,7 +183,6 @@ const vp8_extra_bit_struct vp8_extra_bits[12] =
void vp8_default_coef_probs(VP8_COMMON *pc) void vp8_default_coef_probs(VP8_COMMON *pc)
{ {
vpx_memcpy(pc->fc.coef_probs, default_coef_probs, memcpy(pc->fc.coef_probs, default_coef_probs, sizeof(default_coef_probs));
sizeof(default_coef_probs));
} }
...@@ -159,13 +159,13 @@ const vp8_tree_index vp8_small_mvtree [14] = ...@@ -159,13 +159,13 @@ const vp8_tree_index vp8_small_mvtree [14] =
void vp8_init_mbmode_probs(VP8_COMMON *x) void vp8_init_mbmode_probs(VP8_COMMON *x)
{ {
vpx_memcpy(x->fc.ymode_prob, vp8_ymode_prob, sizeof(vp8_ymode_prob)); memcpy(x->fc.ymode_prob, vp8_ymode_prob, sizeof(vp8_ymode_prob));
vpx_memcpy(x->fc.uv_mode_prob, vp8_uv_mode_prob, sizeof(vp8_uv_mode_prob)); memcpy(x->fc.uv_mode_prob, vp8_uv_mode_prob, sizeof(vp8_uv_mode_prob));
vpx_memcpy(x->fc.sub_mv_ref_prob, sub_mv_ref_prob, sizeof(sub_mv_ref_prob)); memcpy(x->fc.sub_mv_ref_prob, sub_mv_ref_prob, sizeof(sub_mv_ref_prob));
} }
void vp8_default_bmode_probs(vp8_prob p [VP8_BINTRAMODES-1]) void vp8_default_bmode_probs(vp8_prob p [VP8_BINTRAMODES-1])
{ {
vpx_memcpy(p, vp8_bmode_prob, sizeof(vp8_bmode_prob)); memcpy(p, vp8_bmode_prob, sizeof(vp8_bmode_prob));
} }
...@@ -41,7 +41,7 @@ static void copy_and_extend_plane ...@@ -41,7 +41,7 @@ static void copy_and_extend_plane
for (i = 0; i < h; i++) for (i = 0; i < h; i++)
{ {
vpx_memset(dest_ptr1, src_ptr1[0], el); vpx_memset(dest_ptr1, src_ptr1[0], el);
vpx_memcpy(dest_ptr1 + el, src_ptr1, w); memcpy(dest_ptr1 + el, src_ptr1, w);
vpx_memset(dest_ptr2, src_ptr2[0], er); vpx_memset(dest_ptr2, src_ptr2[0], er);
src_ptr1 += sp; src_ptr1 += sp;
src_ptr2 += sp; src_ptr2 += sp;
...@@ -60,13 +60,13 @@ static void copy_and_extend_plane ...@@ -60,13 +60,13 @@ static void copy_and_extend_plane
for (i = 0; i < et; i++) for (i = 0; i < et; i++)
{ {
vpx_memcpy(dest_ptr1, src_ptr1, linesize); memcpy(dest_ptr1, src_ptr1, linesize);
dest_ptr1 += dp; dest_ptr1 += dp;
} }
for (i = 0; i < eb; i++) for (i = 0; i < eb; i++)
{ {
vpx_memcpy(dest_ptr2, src_ptr2, linesize); memcpy(dest_ptr2, src_ptr2, linesize);
dest_ptr2 += dp; dest_ptr2 += dp;
} }
} }
......
...@@ -231,9 +231,9 @@ static void multiframe_quality_enhance_block ...@@ -231,9 +231,9 @@ static void multiframe_quality_enhance_block
{ {
vp8_copy_mem8x8(y, y_stride, yd, yd_stride); vp8_copy_mem8x8(y, y_stride, yd, yd_stride);
for (up = u, udp = ud, i = 0; i < uvblksize; ++i, up += uv_stride, udp += uvd_stride) for (up = u, udp = ud, i = 0; i < uvblksize; ++i, up += uv_stride, udp += uvd_stride)
vpx_memcpy(udp, up, uvblksize); memcpy(udp, up, uvblksize);
for (vp = v, vdp = vd, i = 0; i < uvblksize; ++i, vp += uv_stride, vdp += uvd_stride) for (vp = v, vdp = vd, i = 0; i < uvblksize; ++i, vp += uv_stride, vdp += uvd_stride)
vpx_memcpy(vdp, vp, uvblksize); memcpy(vdp, vp, uvblksize);
} }
} }
} }
...@@ -341,8 +341,8 @@ void vp8_multiframe_quality_enhance ...@@ -341,8 +341,8 @@ void vp8_multiframe_quality_enhance
for (k = 0; k < 4; ++k, up += show->uv_stride, udp += dest->uv_stride, for (k = 0; k < 4; ++k, up += show->uv_stride, udp += dest->uv_stride,
vp += show->uv_stride, vdp += dest->uv_stride) vp += show->uv_stride, vdp += dest->uv_stride)
{ {
vpx_memcpy(udp, up, 4); memcpy(udp, up, 4);
vpx_memcpy(vdp, vp, 4); memcpy(vdp, vp, 4);
} }
} }
} }
......
...@@ -217,8 +217,8 @@ void vp8_build_intra_predictors_mbuv_s_c(MACROBLOCKD *x, ...@@ -217,8 +217,8 @@ void vp8_build_intra_predictors_mbuv_s_c(MACROBLOCKD *x,
{ {
for (i = 0; i < 8; i++) for (i = 0; i < 8; i++)
{ {
vpx_memcpy(upred_ptr, uabove_row, 8); memcpy(upred_ptr, uabove_row, 8);
vpx_memcpy(vpred_ptr, vabove_row, 8); memcpy(vpred_ptr, vabove_row, 8);
upred_ptr += pred_stride; upred_ptr += pred_stride;
vpred_ptr += pred_stride; vpred_ptr += pred_stride;
} }
......
...@@ -323,7 +323,7 @@ static void yv12_extend_frame_top_c(YV12_BUFFER_CONFIG *ybf) ...@@ -323,7 +323,7 @@ static void yv12_extend_frame_top_c(YV12_BUFFER_CONFIG *ybf)
for (i = 0; i < (int)Border; i++) for (i = 0; i < (int)Border; i++)
{ {
vpx_memcpy(dest_ptr1, src_ptr1, plane_stride); memcpy(dest_ptr1, src_ptr1, plane_stride);
dest_ptr1 += plane_stride; dest_ptr1 += plane_stride;
} }
...@@ -338,7 +338,7 @@ static void yv12_extend_frame_top_c(YV12_BUFFER_CONFIG *ybf) ...@@ -338,7 +338,7 @@ static void yv12_extend_frame_top_c(YV12_BUFFER_CONFIG *ybf)
for (i = 0; i < (int)(Border); i++) for (i = 0; i < (int)(Border); i++)
{ {
vpx_memcpy(dest_ptr1, src_ptr1, plane_stride); memcpy(dest_ptr1, src_ptr1, plane_stride);
dest_ptr1 += plane_stride; dest_ptr1 += plane_stride;
} }
...@@ -351,7 +351,7 @@ static void yv12_extend_frame_top_c(YV12_BUFFER_CONFIG *ybf) ...@@ -351,7 +351,7 @@ static void yv12_extend_frame_top_c(YV12_BUFFER_CONFIG *ybf)
for (i = 0; i < (int)(Border); i++) for (i = 0; i < (int)(Border); i++)
{ {
vpx_memcpy(dest_ptr1, src_ptr1, plane_stride); memcpy(dest_ptr1, src_ptr1, plane_stride);
dest_ptr1 += plane_stride; dest_ptr1 += plane_stride;
} }
} }
...@@ -379,7 +379,7 @@ static void yv12_extend_frame_bottom_c(YV12_BUFFER_CONFIG *ybf) ...@@ -379,7 +379,7 @@ static void yv12_extend_frame_bottom_c(YV12_BUFFER_CONFIG *ybf)
for (i = 0; i < (int)Border; i++) for (i = 0; i < (int)Border; i++)
{ {
vpx_memcpy(dest_ptr2, src_ptr2, plane_stride); memcpy(dest_ptr2, src_ptr2, plane_stride);
dest_ptr2 += plane_stride; dest_ptr2 += plane_stride;
} }
...@@ -397,7 +397,7 @@ static void yv12_extend_frame_bottom_c(YV12_BUFFER_CONFIG *ybf) ...@@ -397,7 +397,7 @@ static void yv12_extend_frame_bottom_c(YV12_BUFFER_CONFIG *ybf)
for (i = 0; i < (int)(Border); i++) for (i = 0; i < (int)(Border); i++)
{ {
vpx_memcpy(dest_ptr2, src_ptr2, plane_stride); memcpy(dest_ptr2, src_ptr2, plane_stride);
dest_ptr2 += plane_stride; dest_ptr2 += plane_stride;
} }
...@@ -411,7 +411,7 @@ static void yv12_extend_frame_bottom_c(YV12_BUFFER_CONFIG *ybf) ...@@ -411,7 +411,7 @@ static void yv12_extend_frame_bottom_c(YV12_BUFFER_CONFIG *ybf)
for (i = 0; i < (int)(Border); i++) for (i = 0; i < (int)(Border); i++)
{ {
vpx_memcpy(dest_ptr2, src_ptr2, plane_stride); memcpy(dest_ptr2, src_ptr2, plane_stride);
dest_ptr2 += plane_stride; dest_ptr2 += plane_stride;
} }
} }
...@@ -918,7 +918,7 @@ static void init_frame(VP8D_COMP *pbi) ...@@ -918,7 +918,7 @@ static void init_frame(VP8D_COMP *pbi)
if (pc->frame_type == KEY_FRAME) if (pc->frame_type == KEY_FRAME)
{ {
/* Various keyframe initializations */ /* Various keyframe initializations */
vpx_memcpy(pc->fc.mvc, vp8_default_mv_context, sizeof(vp8_default_mv_context)); memcpy(pc->fc.mvc, vp8_default_mv_context, sizeof(vp8_default_mv_context));
vp8_init_mbmode_probs(pc); vp8_init_mbmode_probs(pc);
...@@ -1072,8 +1072,8 @@ int vp8_decode_frame(VP8D_COMP *pbi) ...@@ -1072,8 +1072,8 @@ int vp8_decode_frame(VP8D_COMP *pbi)
} }
else else
{ {
vpx_memcpy(&xd->pre, yv12_fb_new, sizeof(YV12_BUFFER_CONFIG)); memcpy(&xd->pre, yv12_fb_new, sizeof(YV12_BUFFER_CONFIG));
vpx_memcpy(&xd->dst, yv12_fb_new, sizeof(YV12_BUFFER_CONFIG)); memcpy(&xd->dst, yv12_fb_new, sizeof(YV12_BUFFER_CONFIG));
} }
} }
if ((!pbi->decoded_key_frame && pc->frame_type != KEY_FRAME)) if ((!pbi->decoded_key_frame && pc->frame_type != KEY_FRAME))
...@@ -1278,7 +1278,7 @@ int vp8_decode_frame(VP8D_COMP *pbi) ...@@ -1278,7 +1278,7 @@ int vp8_decode_frame(VP8D_COMP *pbi)
#endif #endif
if (pc->refresh_entropy_probs == 0) if (pc->refresh_entropy_probs == 0)
{ {
vpx_memcpy(&pc->lfc, &pc->fc, sizeof(pc->fc)); memcpy(&pc->lfc, &pc->fc, sizeof(pc->fc));
} }
pc->refresh_last_frame = pc->frame_type == KEY_FRAME || vp8_read_bit(bc); pc->refresh_last_frame = pc->frame_type == KEY_FRAME || vp8_read_bit(bc);
...@@ -1380,7 +1380,7 @@ int vp8_decode_frame(VP8D_COMP *pbi) ...@@ -1380,7 +1380,7 @@ int vp8_decode_frame(VP8D_COMP *pbi)
if (pc->refresh_entropy_probs == 0) if (pc->refresh_entropy_probs == 0)
{ {
vpx_memcpy(&pc->fc, &pc->lfc, sizeof(pc->fc)); memcpy(&pc->fc, &pc->lfc, sizeof(pc->fc));
pbi->independent_partitions = prev_independent_partitions; pbi->independent_partitions = prev_independent_partitions;
} }
......
...@@ -60,12 +60,12 @@ static void setup_decoding_thread_data(VP8D_COMP *pbi, MACROBLOCKD *xd, MB_ROW_D ...@@ -60,12 +60,12 @@ static void setup_decoding_thread_data(VP8D_COMP *pbi, MACROBLOCKD *xd, MB_ROW_D
mbd->segmentation_enabled = xd->segmentation_enabled; mbd->segmentation_enabled = xd->segmentation_enabled;
mbd->mb_segement_abs_delta = xd->mb_segement_abs_delta; mbd->mb_segement_abs_delta = xd->mb_segement_abs_delta;
vpx_memcpy(mbd->segment_feature_data, xd->segment_feature_data, sizeof(xd->segment_feature_data)); memcpy(mbd->segment_feature_data, xd->segment_feature_data, sizeof(xd->segment_feature_data));
/*signed char ref_lf_deltas[MAX_REF_LF_DELTAS];*/ /*signed char ref_lf_deltas[MAX_REF_LF_DELTAS];*/
vpx_memcpy(mbd->ref_lf_deltas, xd->ref_lf_deltas, sizeof(xd->ref_lf_deltas)); memcpy(mbd->ref_lf_deltas, xd->ref_lf_deltas, sizeof(xd->ref_lf_deltas));
/*signed char mode_lf_deltas[MAX_MODE_LF_DELTAS];*/ /*signed char mode_lf_deltas[MAX_MODE_LF_DELTAS];*/
vpx_memcpy(mbd->mode_lf_deltas, xd->mode_lf_deltas, sizeof(xd->mode_lf_deltas)); memcpy(mbd->mode_lf_deltas, xd->mode_lf_deltas, sizeof(xd->mode_lf_deltas));
/*unsigned char mode_ref_lf_delta_enabled; /*unsigned char mode_ref_lf_delta_enabled;
unsigned char mode_ref_lf_delta_update;*/ unsigned char mode_ref_lf_delta_update;*/
mbd->mode_ref_lf_delta_enabled = xd->mode_ref_lf_delta_enabled; mbd->mode_ref_lf_delta_enabled = xd->mode_ref_lf_delta_enabled;
...@@ -73,10 +73,10 @@ static void setup_decoding_thread_data(VP8D_COMP *pbi, MACROBLOCKD *xd, MB_ROW_D ...@@ -73,10 +73,10 @@ static void setup_decoding_thread_data(VP8D_COMP *pbi, MACROBLOCKD *xd, MB_ROW_D
mbd->current_bc = &pbi->mbc[0]; mbd->current_bc = &pbi->mbc[0];
vpx_memcpy(mbd->dequant_y1_dc, xd->dequant_y1_dc, sizeof(xd->dequant_y1_dc)); memcpy(mbd->dequant_y1_dc, xd->dequant_y1_dc, sizeof(xd->dequant_y1_dc));
vpx_memcpy(mbd->dequant_y1, xd->dequant_y1, sizeof(xd->dequant_y1)); memcpy(mbd->dequant_y1, xd->dequant_y1, sizeof(xd->dequant_y1));
vpx_memcpy(mbd->dequant_y2, xd->dequant_y2, sizeof(xd->dequant_y2)); memcpy(mbd->dequant_y2, xd->dequant_y2, sizeof(xd->dequant_y2));
vpx_memcpy(mbd->dequant_uv, xd->dequant_uv, sizeof(xd->dequant_uv)); memcpy(mbd->dequant_uv, xd->dequant_uv, sizeof(xd->dequant_uv));
mbd->fullpixel_mask = 0xffffffff; mbd->fullpixel_mask = 0xffffffff;
...@@ -499,9 +499,9 @@ static void mt_decode_mb_rows(VP8D_COMP *pbi, MACROBLOCKD *xd, int start_mb_row) ...@@ -499,9 +499,9 @@ static void mt_decode_mb_rows(VP8D_COMP *pbi, MACROBLOCKD *xd, int start_mb_row)
if( mb_row != pc->mb_rows-1 ) if( mb_row != pc->mb_rows-1 )
{ {
/* Save decoded MB last row data for next-row decoding */ /* Save decoded MB last row data for next-row decoding */
vpx_memcpy((pbi->mt_yabove_row[mb_row + 1] + 32 + mb_col*16), (xd->dst.y_buffer + 15 * recon_y_stride), 16); memcpy((pbi->mt_yabove_row[mb_row + 1] + 32 + mb_col*16), (xd->dst.y_buffer + 15 * recon_y_stride), 16);
vpx_memcpy((pbi->mt_uabove_row[mb_row + 1] + 16 + mb_col*8), (xd->dst.u_buffer + 7 * recon_uv_stride), 8); memcpy((pbi->mt_uabove_row[mb_row + 1] + 16 + mb_col*8), (xd->dst.u_buffer + 7 * recon_uv_stride), 8);
vpx_memcpy((pbi->mt_vabove_row[mb_row + 1] + 16 + mb_col*8), (xd->dst.v_buffer + 7 * recon_uv_stride), 8); memcpy((pbi->mt_vabove_row[mb_row + 1] + 16 + mb_col*8), (xd->dst.v_buffer + 7 * recon_uv_stride), 8);
} }
/* save left_col for next MB decoding */ /* save left_col for next MB decoding */
......
...@@ -1543,7 +1543,7 @@ void vp8_pack_bitstream(VP8_COMP *cpi, unsigned char *dest, unsigned char * dest ...@@ -1543,7 +1543,7 @@ void vp8_pack_bitstream(VP8_COMP *cpi, unsigned char *dest, unsigned char * dest
if (pc->refresh_entropy_probs == 0) if (pc->refresh_entropy_probs == 0)
{ {
/* save a copy for later refresh */ /* save a copy for later refresh */
vpx_memcpy(&cpi->common.lfc, &cpi->common.fc, sizeof(cpi->common.fc)); memcpy(&cpi->common.lfc, &cpi->common.fc, sizeof(cpi->common.fc));
} }
vp8_update_coef_probs(cpi); vp8_update_coef_probs(cpi);
......
...@@ -155,8 +155,8 @@ static void calc_av_activity( VP8_COMP *cpi, int64_t activity_sum ) ...@@ -155,8 +155,8 @@ static void calc_av_activity( VP8_COMP *cpi, int64_t activity_sum )
cpi->common.MBs)); cpi->common.MBs));
/* Copy map to sort list */ /* Copy map to sort list */
vpx_memcpy( sortlist, cpi->mb_activity_map, memcpy( sortlist, cpi->mb_activity_map,
sizeof(unsigned int) * cpi->common.MBs ); sizeof(unsigned int) * cpi->common.MBs );
/* Ripple each value down to its correct position */ /* Ripple each value down to its correct position */
......
...@@ -506,8 +506,8 @@ static void optimize_mb(MACROBLOCK *x) ...@@ -506,8 +506,8 @@ static void optimize_mb(MACROBLOCK *x)
ENTROPY_CONTEXT *ta; ENTROPY_CONTEXT *ta;
ENTROPY_CONTEXT *tl; ENTROPY_CONTEXT *tl;
vpx_memcpy(&t_above, x->e_mbd.above_context, sizeof(ENTROPY_CONTEXT_PLANES)); memcpy(&t_above, x->e_mbd.above_context, sizeof(ENTROPY_CONTEXT_PLANES));
vpx_memcpy(&t_left, x->e_mbd.left_context, sizeof(ENTROPY_CONTEXT_PLANES)); memcpy(&t_left, x->e_mbd.left_context, sizeof(ENTROPY_CONTEXT_PLANES));
ta = (ENTROPY_CONTEXT *)&t_above; ta = (ENTROPY_CONTEXT *)&t_above;
tl = (ENTROPY_CONTEXT *)&t_left; tl = (ENTROPY_CONTEXT *)&t_left;
...@@ -555,8 +555,8 @@ void vp8_optimize_mby(MACROBLOCK *x) ...@@ -555,8 +555,8 @@ void vp8_optimize_mby(MACROBLOCK *x)
if (!x->e_mbd.left_context) if (!x->e_mbd.left_context)
return; return;
vpx_memcpy(&t_above, x->e_mbd.above_context, sizeof(ENTROPY_CONTEXT_PLANES)); memcpy(&t_above, x->e_mbd.above_context, sizeof(ENTROPY_CONTEXT_PLANES));
vpx_memcpy(&t_left, x->e_mbd.left_context, sizeof(ENTROPY_CONTEXT_PLANES)); memcpy(&t_left, x->e_mbd.left_context, sizeof(ENTROPY_CONTEXT_PLANES));
ta = (ENTROPY_CONTEXT *)&t_above; ta = (ENTROPY_CONTEXT *)&t_above;
tl = (ENTROPY_CONTEXT *)&t_left; tl = (ENTROPY_CONTEXT *)&t_left;
...@@ -595,8 +595,8 @@ void vp8_optimize_mbuv(MACROBLOCK *x) ...@@ -595,8 +595,8 @@ void vp8_optimize_mbuv(MACROBLOCK *x)
if (!x->e_mbd.left_context) if (!x->e_mbd.left_context)
return; return;
vpx_memcpy(&t_above, x->e_mbd.above_context, sizeof(ENTROPY_CONTEXT_PLANES)); memcpy(&t_above, x->e_mbd.above_context, sizeof(ENTROPY_CONTEXT_PLANES));
vpx_memcpy(&t_left, x->e_mbd.left_context, sizeof(ENTROPY_CONTEXT_PLANES)); memcpy(&t_left, x->e_mbd.left_context, sizeof(ENTROPY_CONTEXT_PLANES));
ta = (ENTROPY_CONTEXT *)&t_above; ta = (ENTROPY_CONTEXT *)&t_above;
tl = (ENTROPY_CONTEXT *)&t_left; tl = (ENTROPY_CONTEXT *)&t_left;
......
...@@ -416,14 +416,13 @@ static void setup_mbby_copy(MACROBLOCK *mbdst, MACROBLOCK *mbsrc) ...@@ -416,14 +416,13 @@ static void setup_mbby_copy(MACROBLOCK *mbdst, MACROBLOCK *mbsrc)
zd->subpixel_predict16x16 = xd->subpixel_predict16x16; zd->subpixel_predict16x16 = xd->subpixel_predict16x16;
zd->segmentation_enabled = xd->segmentation_enabled; zd->segmentation_enabled = xd->segmentation_enabled;
zd->mb_segement_abs_delta = xd->mb_segement_abs_delta; zd->mb_segement_abs_delta = xd->mb_segement_abs_delta;
vpx_memcpy(zd->segment_feature_data, xd->segment_feature_data, memcpy(zd->segment_feature_data, xd->segment_feature_data,
sizeof(xd->segment_feature_data)); sizeof(xd->segment_feature_data));
vpx_memcpy(zd->dequant_y1_dc, xd->dequant_y1_dc, memcpy(zd->dequant_y1_dc, xd->dequant_y1_dc, sizeof(xd->dequant_y1_dc));
sizeof(xd->dequant_y1_dc)); memcpy(zd->dequant_y1, xd->dequant_y1, sizeof(xd->dequant_y1));
vpx_memcpy(zd->dequant_y1, xd->dequant_y1, sizeof(xd->dequant_y1)); memcpy(zd->dequant_y2, xd->dequant_y2, sizeof(xd->dequant_y2));
vpx_memcpy(zd->dequant_y2, xd->dequant_y2, sizeof(xd->dequant_y2)); memcpy(zd->dequant_uv, xd->dequant_uv, sizeof(xd->dequant_uv));
vpx_memcpy(zd->dequant_uv, xd->dequant_uv, sizeof(xd->dequant_uv));
#if 1 #if 1
/*TODO: Remove dequant from BLOCKD. This is a temporary solution until /*TODO: Remove dequant from BLOCKD. This is a temporary solution until
...@@ -438,9 +437,8 @@ static void setup_mbby_copy(MACROBLOCK *mbdst, MACROBLOCK *mbsrc) ...@@ -438,9 +437,8 @@ static void setup_mbby_copy(MACROBLOCK *mbdst, MACROBLOCK *mbsrc)
#endif #endif
vpx_memcpy(z->rd_threshes, x->rd_threshes, sizeof(x->rd_threshes)); memcpy(z->rd_threshes, x->rd_threshes, sizeof(x->rd_threshes));
vpx_memcpy(z->rd_thresh_mult, x->rd_thresh_mult, memcpy(z->rd_thresh_mult, x->rd_thresh_mult, sizeof(x->rd_thresh_mult));
sizeof(x->rd_thresh_mult));
z->zbin_over_quant = x->zbin_over_quant; z->zbin_over_quant = x->zbin_over_quant;
z->zbin_mode_boost_enabled = x->zbin_mode_boost_enabled; z->zbin_mode_boost_enabled = x->zbin_mode_boost_enabled;
......
...@@ -573,7 +573,7 @@ void vp8_first_pass(VP8_COMP *cpi) ...@@ -573,7 +573,7 @@ void vp8_first_pass(VP8_COMP *cpi)
{ {
int flag[2] = {1, 1}; int flag[2] = {1, 1};
vp8_initialize_rd_consts(cpi, x, vp8_dc_quant(cm->base_qindex, cm->y1dc_delta_q)); vp8_initialize_rd_consts(cpi, x, vp8_dc_quant(cm->base_qindex, cm->y1dc_delta_q));
vpx_memcpy(cm->fc.mvc, vp8_default_mv_context, sizeof(vp8_default_mv_context)); memcpy(cm->fc.mvc, vp8_default_mv_context, sizeof(vp8_default_mv_context));
vp8_build_component_cost_table(cpi->mb.mvcost, (const MV_CONTEXT *) cm->fc.mvc, flag); vp8_build_component_cost_table(cpi->mb.mvcost, (const MV_CONTEXT *) cm->fc.mvc, flag);
} }
...@@ -1875,7 +1875,7 @@ static void define_gf_group(VP8_COMP *cpi, FIRSTPASS_STATS *this_frame) ...@@ -1875,7 +1875,7 @@ static void define_gf_group(VP8_COMP *cpi, FIRSTPASS_STATS *this_frame)
break; break;
} }
vpx_memcpy(this_frame, &next_frame, sizeof(*this_frame)); memcpy(this_frame, &next_frame, sizeof(*this_frame));
old_boost_score = boost_score; old_boost_score = boost_score;
} }
...@@ -2445,7 +2445,7 @@ void vp8_second_pass(VP8_COMP *cpi) ...@@ -2445,7 +2445,7 @@ void vp8_second_pass(VP8_COMP *cpi)
if (cpi->twopass.frames_to_key == 0) if (cpi->twopass.frames_to_key == 0)
{ {
/* Define next KF group and assign bits to it */ /* Define next KF group and assign bits to it */
vpx_memcpy(&this_frame_copy, &this_frame, sizeof(this_frame)); memcpy(&this_frame_copy, &this_frame, sizeof(this_frame));
find_next_key_frame(cpi, &this_frame_copy); find_next_key_frame(cpi, &this_frame_copy);
/* Special case: Error error_resilient_mode mode does not make much /* Special case: Error error_resilient_mode mode does not make much
...@@ -2471,7 +2471,7 @@ void vp8_second_pass(VP8_COMP *cpi) ...@@ -2471,7 +2471,7 @@ void vp8_second_pass(VP8_COMP *cpi)
if (cpi->frames_till_gf_update_due == 0) if (cpi->frames_till_gf_update_due == 0)
{ {
/* Define next gf group and assign bits to it */ /* Define next gf group and assign bits to it */
vpx_memcpy(&this_frame_copy, &this_frame, sizeof(this_frame)); memcpy(&this_frame_copy, &this_frame, sizeof(this_frame));
define_gf_group(cpi, &this_frame_copy); define_gf_group(cpi, &this_frame_copy);
/* If we are going to code an altref frame at the end of the group /* If we are going to code an altref frame at the end of the group
...@@ -2487,7 +2487,7 @@ void vp8_second_pass(VP8_COMP *cpi) ...@@ -2487,7 +2487,7 @@ void vp8_second_pass(VP8_COMP *cpi)
* to the GF group * to the GF group
*/ */
int bak = cpi->per_frame_bandwidth; int bak = cpi->per_frame_bandwidth;
vpx_memcpy(&this_frame_copy, &this_frame, sizeof(this_frame)); memcpy(&this_frame_copy, &this_frame, sizeof(this_frame));
assign_std_frame_bits(cpi, &this_frame_copy); assign_std_frame_bits(cpi, &this_frame_copy);
cpi->per_frame_bandwidth = bak; cpi->per_frame_bandwidth = bak;
} }
...@@ -2510,14 +2510,14 @@ void vp8_second_pass(VP8_COMP *cpi) ...@@ -2510,14 +2510,14 @@ void vp8_second_pass(VP8_COMP *cpi)
if (cpi->common.frame_type != KEY_FRAME) if (cpi->common.frame_type != KEY_FRAME)
{ {
/* Assign bits from those allocated to the GF group */ /* Assign bits from those allocated to the GF group */
vpx_memcpy(&this_frame_copy, &this_frame, sizeof(this_frame)); memcpy(&this_frame_copy, &this_frame, sizeof(this_frame));
assign_std_frame_bits(cpi, &this_frame_copy); assign_std_frame_bits(cpi, &this_frame_copy);
} }
} }
else else
{ {
/* Assign bits from those allocated to the GF group */ /* Assign bits from those allocated to the GF group */
vpx_memcpy(&this_frame_copy, &this_frame, sizeof(this_frame)); memcpy(&this_frame_copy, &this_frame, sizeof(this_frame));
assign_std_frame_bits(cpi, &this_frame_copy); assign_std_frame_bits(cpi, &this_frame_copy);
} }
} }
...@@ -2658,7 +2658,7 @@ static int test_candidate_kf(VP8_COMP *cpi, FIRSTPASS_STATS *last_frame, FIRSTP ...@@ -2658,7 +2658,7 @@ static int test_candidate_kf(VP8_COMP *cpi, FIRSTPASS_STATS *last_frame, FIRSTP
double decay_accumulator = 1.0; double decay_accumulator = 1.0;
double next_iiratio; double next_iiratio;
vpx_memcpy(&local_next_frame, next_frame, sizeof(*next_frame)); memcpy(&local_next_frame, next_frame, sizeof(*next_frame));
/* Note the starting file position so we can reset to it */ /* Note the starting file position so we can reset to it */
start_pos = cpi->twopass.stats_in; start_pos = cpi->twopass.stats_in;
...@@ -2756,7 +2756,7 @@ static void find_next_key_frame(VP8_COMP *cpi, FIRSTPASS_STATS *this_frame) ...@@ -2756,7 +2756,7 @@ static void find_next_key_frame(VP8_COMP *cpi, FIRSTPASS_STATS *this_frame)
cpi->twopass.frames_to_key = 1; cpi->twopass.frames_to_key = 1;
/* Take a copy of the initial frame details */ /* Take a copy of the initial frame details */
vpx_memcpy(&first_frame, this_frame, sizeof(*this_frame)); memcpy(&first_frame, this_frame, sizeof(*this_frame));
cpi->twopass.kf_group_bits = 0; cpi->twopass.kf_group_bits = 0;
cpi->twopass.kf_group_error_left = 0; cpi->twopass.kf_group_error_left = 0;
...@@ -2779,7 +2779,7 @@ static void find_next_key_frame(VP8_COMP *cpi, FIRSTPASS_STATS *this_frame) ...@@ -2779,7 +2779,7 @@ static void find_next_key_frame(VP8_COMP *cpi, FIRSTPASS_STATS *this_frame)
kf_group_coded_err += this_frame->coded_error; kf_group_coded_err += this_frame->coded_error;
/* Load the next frame's stats. */ /* Load the next frame's stats. */
vpx_memcpy(&last_frame, this_frame, sizeof(*this_frame)); memcpy(&last_frame, this_frame, sizeof(*this_frame));
input_stats(cpi, this_frame); input_stats(cpi, this_frame);
/* Provided that we are not at the end of the file... */ /* Provided that we are not at the end of the file... */
...@@ -2847,7 +2847,7 @@ static void find_next_key_frame(VP8_COMP *cpi, FIRSTPASS_STATS *this_frame) ...@@ -2847,7 +2847,7 @@ static void find_next_key_frame(VP8_COMP *cpi, FIRSTPASS_STATS *this_frame)
cpi->twopass.frames_to_key /= 2; cpi->twopass.frames_to_key /= 2;
/* Copy first frame details */ /* Copy first frame details */
vpx_memcpy(&tmp_frame, &first_frame, sizeof(first_frame)); memcpy(&tmp_frame, &first_frame, sizeof(first_frame));
/* Reset to the start of the group */ /* Reset to the start of the group */
reset_fpf_position(cpi, start_position); reset_fpf_position(cpi, start_position);
......
...@@ -508,7 +508,7 @@ static void disable_segmentation(VP8_COMP *cpi) ...@@ -508,7 +508,7 @@ static void disable_segmentation(VP8_COMP *cpi)
static void set_segmentation_map(VP8_COMP *cpi, unsigned char *segmentation_map) static void set_segmentation_map(VP8_COMP *cpi, unsigned char *segmentation_map)
{ {
/* Copy in the new segmentation map */ /* Copy in the new segmentation map */
vpx_memcpy(cpi->segmentation_map, segmentation_map, (cpi->common.mb_rows * cpi->common.mb_cols)); memcpy(cpi->segmentation_map, segmentation_map, (cpi->common.mb_rows * cpi->common.mb_cols));
/* Signal that the map should be updated. */ /* Signal that the map should be updated. */
cpi->mb.e_mbd.update_mb_segmentation_map = 1; cpi->mb.e_mbd.update_mb_segmentation_map = 1;
...@@ -530,7 +530,7 @@ static void set_segmentation_map(VP8_COMP *cpi, unsigned char *segmentation_map) ...@@ -530,7 +530,7 @@ static void set_segmentation_map(VP8_COMP *cpi, unsigned char *segmentation_map)
static void set_segment_data(VP8_COMP *cpi, signed char *feature_data, unsigned char abs_delta) static void set_segment_data(VP8_COMP *cpi, signed char *feature_data, unsigned char abs_delta)
{ {
cpi->mb.e_mbd.mb_segement_abs_delta = abs_delta; cpi->mb.e_mbd.mb_segement_abs_delta = abs_delta;
vpx_memcpy(cpi->segment_feature_data, feature_data, sizeof(cpi->segment_feature_data)); memcpy(cpi->segment_feature_data, feature_data, sizeof(cpi->segment_feature_data));