vpx_mem: remove vpx_memset
vestigial. replace instances with memset() which they already were being defined to. Change-Id: Ie030cfaaa3e890dd92cf1a995fcb1927ba175201
This commit is contained in:
parent
f274c2199b
commit
f58011ada5
@ -502,11 +502,11 @@ class Trans16x16TestBase {
|
||||
fwd_txfm_ref(input_extreme_block, output_ref_block, pitch_, tx_type_);
|
||||
|
||||
// clear reconstructed pixel buffers
|
||||
vpx_memset(dst, 0, kNumCoeffs * sizeof(uint8_t));
|
||||
vpx_memset(ref, 0, kNumCoeffs * sizeof(uint8_t));
|
||||
memset(dst, 0, kNumCoeffs * sizeof(uint8_t));
|
||||
memset(ref, 0, kNumCoeffs * sizeof(uint8_t));
|
||||
#if CONFIG_VP9_HIGHBITDEPTH
|
||||
vpx_memset(dst16, 0, kNumCoeffs * sizeof(uint16_t));
|
||||
vpx_memset(ref16, 0, kNumCoeffs * sizeof(uint16_t));
|
||||
memset(dst16, 0, kNumCoeffs * sizeof(uint16_t));
|
||||
memset(ref16, 0, kNumCoeffs * sizeof(uint16_t));
|
||||
#endif
|
||||
|
||||
// quantization with maximum allowed step sizes
|
||||
|
@ -280,8 +280,8 @@ TEST_P(Loop8Test6Param, ValueCheck) {
|
||||
// function of sharpness_lvl and the loopfilter lvl as:
|
||||
// block_inside_limit = lvl >> ((sharpness_lvl > 0) + (sharpness_lvl > 4));
|
||||
// ...
|
||||
// vpx_memset(lfi->lfthr[lvl].mblim, (2 * (lvl + 2) + block_inside_limit),
|
||||
// SIMD_WIDTH);
|
||||
// memset(lfi->lfthr[lvl].mblim, (2 * (lvl + 2) + block_inside_limit),
|
||||
// SIMD_WIDTH);
|
||||
// This means that the largest value for mblim will occur when sharpness_lvl
|
||||
// is equal to 0, and lvl is equal to its greatest value (MAX_LOOP_FILTER).
|
||||
// In this case block_inside_limit will be equal to MAX_LOOP_FILTER and
|
||||
|
@ -63,12 +63,12 @@ TEST_P(VP8PostProcessingFilterTest, FilterOutputCheck) {
|
||||
uint8_t *const dst_image_ptr = dst_image + 8;
|
||||
uint8_t *const flimits =
|
||||
reinterpret_cast<uint8_t *>(vpx_memalign(16, block_width));
|
||||
(void)vpx_memset(flimits, 255, block_width);
|
||||
(void)memset(flimits, 255, block_width);
|
||||
|
||||
// Initialize pixels in the input:
|
||||
// block pixels to value 1,
|
||||
// border pixels to value 10.
|
||||
(void)vpx_memset(src_image, 10, input_size);
|
||||
(void)memset(src_image, 10, input_size);
|
||||
uint8_t *pixel_ptr = src_image_ptr;
|
||||
for (int i = 0; i < block_height; ++i) {
|
||||
for (int j = 0; j < block_width; ++j) {
|
||||
@ -78,7 +78,7 @@ TEST_P(VP8PostProcessingFilterTest, FilterOutputCheck) {
|
||||
}
|
||||
|
||||
// Initialize pixels in the output to 99.
|
||||
(void)vpx_memset(dst_image, 99, output_size);
|
||||
(void)memset(dst_image, 99, output_size);
|
||||
|
||||
ASM_REGISTER_STATE_CHECK(
|
||||
GetParam()(src_image_ptr, dst_image_ptr, input_stride,
|
||||
|
@ -56,7 +56,7 @@ class QuantizeTestBase {
|
||||
|
||||
// The full configuration is necessary to generate the quantization tables.
|
||||
VP8_CONFIG vp8_config;
|
||||
vpx_memset(&vp8_config, 0, sizeof(vp8_config));
|
||||
memset(&vp8_config, 0, sizeof(vp8_config));
|
||||
|
||||
vp8_comp_ = vp8_create_compressor(&vp8_config);
|
||||
|
||||
|
@ -53,7 +53,7 @@ TEST(VP8RoiMapTest, ParameterCheck) {
|
||||
cpi.common.mb_rows = 240 >> 4;
|
||||
cpi.common.mb_cols = 320 >> 4;
|
||||
const int mbs = (cpi.common.mb_rows * cpi.common.mb_cols);
|
||||
vpx_memset(cpi.segment_feature_data, 0, sizeof(cpi.segment_feature_data));
|
||||
memset(cpi.segment_feature_data, 0, sizeof(cpi.segment_feature_data));
|
||||
|
||||
// Segment map
|
||||
cpi.segmentation_map = reinterpret_cast<unsigned char *>(vpx_calloc(mbs, 1));
|
||||
@ -61,9 +61,9 @@ TEST(VP8RoiMapTest, ParameterCheck) {
|
||||
// Allocate memory for the source memory map.
|
||||
unsigned char *roi_map =
|
||||
reinterpret_cast<unsigned char *>(vpx_calloc(mbs, 1));
|
||||
vpx_memset(&roi_map[mbs >> 2], 1, (mbs >> 2));
|
||||
vpx_memset(&roi_map[mbs >> 1], 2, (mbs >> 2));
|
||||
vpx_memset(&roi_map[mbs -(mbs >> 2)], 3, (mbs >> 2));
|
||||
memset(&roi_map[mbs >> 2], 1, (mbs >> 2));
|
||||
memset(&roi_map[mbs >> 1], 2, (mbs >> 2));
|
||||
memset(&roi_map[mbs -(mbs >> 2)], 3, (mbs >> 2));
|
||||
|
||||
// Do a test call with valid parameters.
|
||||
int roi_retval = vp8_set_roimap(&cpi, roi_map, cpi.common.mb_rows,
|
||||
|
@ -33,10 +33,10 @@ class VpxScaleBase {
|
||||
void ResetImage(int width, int height) {
|
||||
width_ = width;
|
||||
height_ = height;
|
||||
vpx_memset(&img_, 0, sizeof(img_));
|
||||
memset(&img_, 0, sizeof(img_));
|
||||
ASSERT_EQ(0, vp8_yv12_alloc_frame_buffer(&img_, width_, height_,
|
||||
VP8BORDERINPIXELS));
|
||||
vpx_memset(img_.buffer_alloc, kBufFiller, img_.frame_size);
|
||||
memset(img_.buffer_alloc, kBufFiller, img_.frame_size);
|
||||
FillPlane(img_.y_buffer, img_.y_crop_width, img_.y_crop_height,
|
||||
img_.y_stride);
|
||||
FillPlane(img_.u_buffer, img_.uv_crop_width, img_.uv_crop_height,
|
||||
@ -44,15 +44,15 @@ class VpxScaleBase {
|
||||
FillPlane(img_.v_buffer, img_.uv_crop_width, img_.uv_crop_height,
|
||||
img_.uv_stride);
|
||||
|
||||
vpx_memset(&ref_img_, 0, sizeof(ref_img_));
|
||||
memset(&ref_img_, 0, sizeof(ref_img_));
|
||||
ASSERT_EQ(0, vp8_yv12_alloc_frame_buffer(&ref_img_, width_, height_,
|
||||
VP8BORDERINPIXELS));
|
||||
vpx_memset(ref_img_.buffer_alloc, kBufFiller, ref_img_.frame_size);
|
||||
memset(ref_img_.buffer_alloc, kBufFiller, ref_img_.frame_size);
|
||||
|
||||
vpx_memset(&cpy_img_, 0, sizeof(cpy_img_));
|
||||
memset(&cpy_img_, 0, sizeof(cpy_img_));
|
||||
ASSERT_EQ(0, vp8_yv12_alloc_frame_buffer(&cpy_img_, width_, height_,
|
||||
VP8BORDERINPIXELS));
|
||||
vpx_memset(cpy_img_.buffer_alloc, kBufFiller, cpy_img_.frame_size);
|
||||
memset(cpy_img_.buffer_alloc, kBufFiller, cpy_img_.frame_size);
|
||||
ReferenceCopyFrame();
|
||||
}
|
||||
|
||||
@ -87,8 +87,8 @@ class VpxScaleBase {
|
||||
|
||||
// Fill the border pixels from the nearest image pixel.
|
||||
for (int y = 0; y < crop_height; ++y) {
|
||||
vpx_memset(left, left[padding], padding);
|
||||
vpx_memset(right, right[-1], right_extend);
|
||||
memset(left, left[padding], padding);
|
||||
memset(right, right[-1], right_extend);
|
||||
left += stride;
|
||||
right += stride;
|
||||
}
|
||||
|
@ -103,9 +103,9 @@ int vp8_alloc_frame_buffers(VP8_COMMON *oci, int width, int height)
|
||||
goto allocation_fail;
|
||||
|
||||
oci->post_proc_buffer_int_used = 0;
|
||||
vpx_memset(&oci->postproc_state, 0, sizeof(oci->postproc_state));
|
||||
vpx_memset(oci->post_proc_buffer.buffer_alloc, 128,
|
||||
oci->post_proc_buffer.frame_size);
|
||||
memset(&oci->postproc_state, 0, sizeof(oci->postproc_state));
|
||||
memset(oci->post_proc_buffer.buffer_alloc, 128,
|
||||
oci->post_proc_buffer.frame_size);
|
||||
|
||||
/* Allocate buffer to store post-processing filter coefficients.
|
||||
*
|
||||
@ -176,7 +176,7 @@ void vp8_create_common(VP8_COMMON *oci)
|
||||
oci->clamp_type = RECON_CLAMP_REQUIRED;
|
||||
|
||||
/* Initialize reference frame sign bias structure to defaults */
|
||||
vpx_memset(oci->ref_frame_sign_bias, 0, sizeof(oci->ref_frame_sign_bias));
|
||||
memset(oci->ref_frame_sign_bias, 0, sizeof(oci->ref_frame_sign_bias));
|
||||
|
||||
/* Default disable buffer to buffer copying */
|
||||
oci->copy_buffer_to_gf = 0;
|
||||
|
@ -165,7 +165,7 @@ vp8_dequant_idct_loop2_v6
|
||||
str r1, [r2], r12 ; store output to dst
|
||||
bne vp8_dequant_idct_loop2_v6
|
||||
|
||||
; vpx_memset
|
||||
; memset
|
||||
sub r0, r0, #32
|
||||
add sp, sp, #4
|
||||
|
||||
|
@ -39,9 +39,9 @@ extern "C" {
|
||||
memcpy( Dest, Src, N * sizeof( *Src)); \
|
||||
}
|
||||
|
||||
#define vp8_zero( Dest) vpx_memset( &Dest, 0, sizeof( Dest));
|
||||
#define vp8_zero( Dest) memset( &Dest, 0, sizeof( Dest));
|
||||
|
||||
#define vp8_zero_array( Dest, N) vpx_memset( Dest, 0, N * sizeof( *Dest));
|
||||
#define vp8_zero_array( Dest, N) memset( Dest, 0, N * sizeof( *Dest));
|
||||
|
||||
|
||||
#ifdef __cplusplus
|
||||
|
@ -38,6 +38,6 @@ void vp8_dequant_idct_add_c(short *input, short *dq,
|
||||
|
||||
vp8_short_idct4x4llm_c(input, dest, stride, dest, stride);
|
||||
|
||||
vpx_memset(input, 0, 32);
|
||||
memset(input, 0, 32);
|
||||
|
||||
}
|
||||
|
@ -40,9 +40,9 @@ static void copy_and_extend_plane
|
||||
|
||||
for (i = 0; i < h; i++)
|
||||
{
|
||||
vpx_memset(dest_ptr1, src_ptr1[0], el);
|
||||
memset(dest_ptr1, src_ptr1[0], el);
|
||||
memcpy(dest_ptr1 + el, src_ptr1, w);
|
||||
vpx_memset(dest_ptr2, src_ptr2[0], er);
|
||||
memset(dest_ptr2, src_ptr2[0], er);
|
||||
src_ptr1 += sp;
|
||||
src_ptr2 += sp;
|
||||
dest_ptr1 += dp;
|
||||
|
@ -33,7 +33,7 @@ void vp8_dequant_idct_add_y_block_c
|
||||
else
|
||||
{
|
||||
vp8_dc_only_idct_add_c (q[0]*dq[0], dst, stride, dst, stride);
|
||||
vpx_memset(q, 0, 2 * sizeof(q[0]));
|
||||
memset(q, 0, 2 * sizeof(q[0]));
|
||||
}
|
||||
|
||||
q += 16;
|
||||
@ -59,7 +59,7 @@ void vp8_dequant_idct_add_uv_block_c
|
||||
else
|
||||
{
|
||||
vp8_dc_only_idct_add_c (q[0]*dq[0], dstu, stride, dstu, stride);
|
||||
vpx_memset(q, 0, 2 * sizeof(q[0]));
|
||||
memset(q, 0, 2 * sizeof(q[0]));
|
||||
}
|
||||
|
||||
q += 16;
|
||||
@ -78,7 +78,7 @@ void vp8_dequant_idct_add_uv_block_c
|
||||
else
|
||||
{
|
||||
vp8_dc_only_idct_add_c (q[0]*dq[0], dstv, stride, dstv, stride);
|
||||
vpx_memset(q, 0, 2 * sizeof(q[0]));
|
||||
memset(q, 0, 2 * sizeof(q[0]));
|
||||
}
|
||||
|
||||
q += 16;
|
||||
|
@ -82,11 +82,10 @@ void vp8_loop_filter_update_sharpness(loop_filter_info_n *lfi,
|
||||
if (block_inside_limit < 1)
|
||||
block_inside_limit = 1;
|
||||
|
||||
vpx_memset(lfi->lim[i], block_inside_limit, SIMD_WIDTH);
|
||||
vpx_memset(lfi->blim[i], (2 * filt_lvl + block_inside_limit),
|
||||
SIMD_WIDTH);
|
||||
vpx_memset(lfi->mblim[i], (2 * (filt_lvl + 2) + block_inside_limit),
|
||||
SIMD_WIDTH);
|
||||
memset(lfi->lim[i], block_inside_limit, SIMD_WIDTH);
|
||||
memset(lfi->blim[i], (2 * filt_lvl + block_inside_limit), SIMD_WIDTH);
|
||||
memset(lfi->mblim[i], (2 * (filt_lvl + 2) + block_inside_limit),
|
||||
SIMD_WIDTH);
|
||||
}
|
||||
}
|
||||
|
||||
@ -105,7 +104,7 @@ void vp8_loop_filter_init(VP8_COMMON *cm)
|
||||
/* init hev threshold const vectors */
|
||||
for(i = 0; i < 4 ; i++)
|
||||
{
|
||||
vpx_memset(lfi->hev_thr[i], i, SIMD_WIDTH);
|
||||
memset(lfi->hev_thr[i], i, SIMD_WIDTH);
|
||||
}
|
||||
}
|
||||
|
||||
@ -151,7 +150,7 @@ void vp8_loop_filter_frame_init(VP8_COMMON *cm,
|
||||
/* we could get rid of this if we assume that deltas are set to
|
||||
* zero when not in use; encoder always uses deltas
|
||||
*/
|
||||
vpx_memset(lfi->lvl[seg][0], lvl_seg, 4 * 4 );
|
||||
memset(lfi->lvl[seg][0], lvl_seg, 4 * 4 );
|
||||
continue;
|
||||
}
|
||||
|
||||
|
@ -26,7 +26,7 @@ void vp8_dequant_idct_add_dspr2(short *input, short *dq,
|
||||
|
||||
vp8_short_idct4x4llm_dspr2(input, dest, stride, dest, stride);
|
||||
|
||||
vpx_memset(input, 0, 32);
|
||||
memset(input, 0, 32);
|
||||
|
||||
}
|
||||
|
||||
|
@ -355,8 +355,8 @@ void vp8_deblock(VP8_COMMON *cm,
|
||||
else
|
||||
mb_ppl = (unsigned char)ppl;
|
||||
|
||||
vpx_memset(ylptr, mb_ppl, 16);
|
||||
vpx_memset(uvlptr, mb_ppl, 8);
|
||||
memset(ylptr, mb_ppl, 16);
|
||||
memset(uvlptr, mb_ppl, 8);
|
||||
|
||||
ylptr += 16;
|
||||
uvlptr += 8;
|
||||
@ -403,7 +403,7 @@ void vp8_de_noise(VP8_COMMON *cm,
|
||||
(void) low_var_thresh;
|
||||
(void) flag;
|
||||
|
||||
vpx_memset(limits, (unsigned char)ppl, 16 * mb_cols);
|
||||
memset(limits, (unsigned char)ppl, 16 * mb_cols);
|
||||
|
||||
/* TODO: The original code don't filter the 2 outer rows and columns. */
|
||||
for (mbr = 0; mbr < mb_rows; mbr++)
|
||||
@ -763,7 +763,7 @@ int vp8_post_proc_frame(VP8_COMMON *oci, YV12_BUFFER_CONFIG *dest, vp8_ppflags_t
|
||||
/* insure that postproc is set to all 0's so that post proc
|
||||
* doesn't pull random data in from edge
|
||||
*/
|
||||
vpx_memset((&oci->post_proc_buffer_int)->buffer_alloc,128,(&oci->post_proc_buffer)->frame_size);
|
||||
memset((&oci->post_proc_buffer_int)->buffer_alloc,128,(&oci->post_proc_buffer)->frame_size);
|
||||
|
||||
}
|
||||
}
|
||||
|
@ -70,10 +70,10 @@ void vp8_build_intra_predictors_mby_s_c(MACROBLOCKD *x,
|
||||
expected_dc = 128;
|
||||
}
|
||||
|
||||
/*vpx_memset(ypred_ptr, expected_dc, 256);*/
|
||||
/*memset(ypred_ptr, expected_dc, 256);*/
|
||||
for (r = 0; r < 16; r++)
|
||||
{
|
||||
vpx_memset(ypred_ptr, expected_dc, 16);
|
||||
memset(ypred_ptr, expected_dc, 16);
|
||||
ypred_ptr += y_stride;
|
||||
}
|
||||
}
|
||||
@ -98,7 +98,7 @@ void vp8_build_intra_predictors_mby_s_c(MACROBLOCKD *x,
|
||||
for (r = 0; r < 16; r++)
|
||||
{
|
||||
|
||||
vpx_memset(ypred_ptr, yleft_col[r], 16);
|
||||
memset(ypred_ptr, yleft_col[r], 16);
|
||||
ypred_ptr += y_stride;
|
||||
}
|
||||
|
||||
@ -202,12 +202,12 @@ void vp8_build_intra_predictors_mbuv_s_c(MACROBLOCKD *x,
|
||||
}
|
||||
|
||||
|
||||
/*vpx_memset(upred_ptr,expected_udc,64);*/
|
||||
/*vpx_memset(vpred_ptr,expected_vdc,64);*/
|
||||
/*memset(upred_ptr,expected_udc,64);*/
|
||||
/*memset(vpred_ptr,expected_vdc,64);*/
|
||||
for (i = 0; i < 8; i++)
|
||||
{
|
||||
vpx_memset(upred_ptr, expected_udc, 8);
|
||||
vpx_memset(vpred_ptr, expected_vdc, 8);
|
||||
memset(upred_ptr, expected_udc, 8);
|
||||
memset(vpred_ptr, expected_vdc, 8);
|
||||
upred_ptr += pred_stride;
|
||||
vpred_ptr += pred_stride;
|
||||
}
|
||||
@ -229,8 +229,8 @@ void vp8_build_intra_predictors_mbuv_s_c(MACROBLOCKD *x,
|
||||
{
|
||||
for (i = 0; i < 8; i++)
|
||||
{
|
||||
vpx_memset(upred_ptr, uleft_col[i], 8);
|
||||
vpx_memset(vpred_ptr, vleft_col[i], 8);
|
||||
memset(upred_ptr, uleft_col[i], 8);
|
||||
memset(vpred_ptr, vleft_col[i], 8);
|
||||
upred_ptr += pred_stride;
|
||||
vpred_ptr += pred_stride;
|
||||
}
|
||||
|
@ -17,15 +17,15 @@ void vp8_setup_intra_recon(YV12_BUFFER_CONFIG *ybf)
|
||||
int i;
|
||||
|
||||
/* set up frame new frame for intra coded blocks */
|
||||
vpx_memset(ybf->y_buffer - 1 - ybf->y_stride, 127, ybf->y_width + 5);
|
||||
memset(ybf->y_buffer - 1 - ybf->y_stride, 127, ybf->y_width + 5);
|
||||
for (i = 0; i < ybf->y_height; i++)
|
||||
ybf->y_buffer[ybf->y_stride *i - 1] = (unsigned char) 129;
|
||||
|
||||
vpx_memset(ybf->u_buffer - 1 - ybf->uv_stride, 127, ybf->uv_width + 5);
|
||||
memset(ybf->u_buffer - 1 - ybf->uv_stride, 127, ybf->uv_width + 5);
|
||||
for (i = 0; i < ybf->uv_height; i++)
|
||||
ybf->u_buffer[ybf->uv_stride *i - 1] = (unsigned char) 129;
|
||||
|
||||
vpx_memset(ybf->v_buffer - 1 - ybf->uv_stride, 127, ybf->uv_width + 5);
|
||||
memset(ybf->v_buffer - 1 - ybf->uv_stride, 127, ybf->uv_width + 5);
|
||||
for (i = 0; i < ybf->uv_height; i++)
|
||||
ybf->v_buffer[ybf->uv_stride *i - 1] = (unsigned char) 129;
|
||||
|
||||
@ -33,7 +33,7 @@ void vp8_setup_intra_recon(YV12_BUFFER_CONFIG *ybf)
|
||||
|
||||
void vp8_setup_intra_recon_top_line(YV12_BUFFER_CONFIG *ybf)
|
||||
{
|
||||
vpx_memset(ybf->y_buffer - 1 - ybf->y_stride, 127, ybf->y_width + 5);
|
||||
vpx_memset(ybf->u_buffer - 1 - ybf->uv_stride, 127, ybf->uv_width + 5);
|
||||
vpx_memset(ybf->v_buffer - 1 - ybf->uv_stride, 127, ybf->uv_width + 5);
|
||||
memset(ybf->y_buffer - 1 - ybf->y_stride, 127, ybf->y_width + 5);
|
||||
memset(ybf->u_buffer - 1 - ybf->uv_stride, 127, ybf->uv_width + 5);
|
||||
memset(ybf->v_buffer - 1 - ybf->uv_stride, 127, ybf->uv_width + 5);
|
||||
}
|
||||
|
@ -36,7 +36,7 @@ void vp8_dequant_idct_add_y_block_mmx
|
||||
else if (eobs[0] == 1)
|
||||
{
|
||||
vp8_dc_only_idct_add_mmx (q[0]*dq[0], dst, stride, dst, stride);
|
||||
vpx_memset(q, 0, 2 * sizeof(q[0]));
|
||||
memset(q, 0, 2 * sizeof(q[0]));
|
||||
}
|
||||
|
||||
if (eobs[1] > 1)
|
||||
@ -45,7 +45,7 @@ void vp8_dequant_idct_add_y_block_mmx
|
||||
{
|
||||
vp8_dc_only_idct_add_mmx (q[16]*dq[0], dst+4, stride,
|
||||
dst+4, stride);
|
||||
vpx_memset(q + 16, 0, 2 * sizeof(q[0]));
|
||||
memset(q + 16, 0, 2 * sizeof(q[0]));
|
||||
}
|
||||
|
||||
if (eobs[2] > 1)
|
||||
@ -54,7 +54,7 @@ void vp8_dequant_idct_add_y_block_mmx
|
||||
{
|
||||
vp8_dc_only_idct_add_mmx (q[32]*dq[0], dst+8, stride,
|
||||
dst+8, stride);
|
||||
vpx_memset(q + 32, 0, 2 * sizeof(q[0]));
|
||||
memset(q + 32, 0, 2 * sizeof(q[0]));
|
||||
}
|
||||
|
||||
if (eobs[3] > 1)
|
||||
@ -63,7 +63,7 @@ void vp8_dequant_idct_add_y_block_mmx
|
||||
{
|
||||
vp8_dc_only_idct_add_mmx (q[48]*dq[0], dst+12, stride,
|
||||
dst+12, stride);
|
||||
vpx_memset(q + 48, 0, 2 * sizeof(q[0]));
|
||||
memset(q + 48, 0, 2 * sizeof(q[0]));
|
||||
}
|
||||
|
||||
q += 64;
|
||||
@ -85,7 +85,7 @@ void vp8_dequant_idct_add_uv_block_mmx
|
||||
else if (eobs[0] == 1)
|
||||
{
|
||||
vp8_dc_only_idct_add_mmx (q[0]*dq[0], dstu, stride, dstu, stride);
|
||||
vpx_memset(q, 0, 2 * sizeof(q[0]));
|
||||
memset(q, 0, 2 * sizeof(q[0]));
|
||||
}
|
||||
|
||||
if (eobs[1] > 1)
|
||||
@ -94,7 +94,7 @@ void vp8_dequant_idct_add_uv_block_mmx
|
||||
{
|
||||
vp8_dc_only_idct_add_mmx (q[16]*dq[0], dstu+4, stride,
|
||||
dstu+4, stride);
|
||||
vpx_memset(q + 16, 0, 2 * sizeof(q[0]));
|
||||
memset(q + 16, 0, 2 * sizeof(q[0]));
|
||||
}
|
||||
|
||||
q += 32;
|
||||
@ -109,7 +109,7 @@ void vp8_dequant_idct_add_uv_block_mmx
|
||||
else if (eobs[0] == 1)
|
||||
{
|
||||
vp8_dc_only_idct_add_mmx (q[0]*dq[0], dstv, stride, dstv, stride);
|
||||
vpx_memset(q, 0, 2 * sizeof(q[0]));
|
||||
memset(q, 0, 2 * sizeof(q[0]));
|
||||
}
|
||||
|
||||
if (eobs[1] > 1)
|
||||
@ -118,7 +118,7 @@ void vp8_dequant_idct_add_uv_block_mmx
|
||||
{
|
||||
vp8_dc_only_idct_add_mmx (q[16]*dq[0], dstv+4, stride,
|
||||
dstv+4, stride);
|
||||
vpx_memset(q + 16, 0, 2 * sizeof(q[0]));
|
||||
memset(q + 16, 0, 2 * sizeof(q[0]));
|
||||
}
|
||||
|
||||
q += 32;
|
||||
|
@ -142,7 +142,7 @@ static void decode_macroblock(VP8D_COMP *pbi, MACROBLOCKD *xd,
|
||||
* Better to use the predictor as reconstruction.
|
||||
*/
|
||||
pbi->frame_corrupt_residual = 1;
|
||||
vpx_memset(xd->qcoeff, 0, sizeof(xd->qcoeff));
|
||||
memset(xd->qcoeff, 0, sizeof(xd->qcoeff));
|
||||
vp8_conceal_corrupt_mb(xd);
|
||||
|
||||
|
||||
@ -151,7 +151,7 @@ static void decode_macroblock(VP8D_COMP *pbi, MACROBLOCKD *xd,
|
||||
/* force idct to be skipped for B_PRED and use the
|
||||
* prediction only for reconstruction
|
||||
* */
|
||||
vpx_memset(xd->eobs, 0, 25);
|
||||
memset(xd->eobs, 0, 25);
|
||||
}
|
||||
}
|
||||
#endif
|
||||
@ -184,7 +184,7 @@ static void decode_macroblock(VP8D_COMP *pbi, MACROBLOCKD *xd,
|
||||
|
||||
/* clear out residual eob info */
|
||||
if(xd->mode_info_context->mbmi.mb_skip_coeff)
|
||||
vpx_memset(xd->eobs, 0, 25);
|
||||
memset(xd->eobs, 0, 25);
|
||||
|
||||
intra_prediction_down_copy(xd, xd->recon_above[0] + 16);
|
||||
|
||||
@ -214,7 +214,7 @@ static void decode_macroblock(VP8D_COMP *pbi, MACROBLOCKD *xd,
|
||||
(b->qcoeff[0] * DQC[0],
|
||||
dst, dst_stride,
|
||||
dst, dst_stride);
|
||||
vpx_memset(b->qcoeff, 0, 2 * sizeof(b->qcoeff[0]));
|
||||
memset(b->qcoeff, 0, 2 * sizeof(b->qcoeff[0]));
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -251,14 +251,14 @@ static void decode_macroblock(VP8D_COMP *pbi, MACROBLOCKD *xd,
|
||||
|
||||
vp8_short_inv_walsh4x4(&b->dqcoeff[0],
|
||||
xd->qcoeff);
|
||||
vpx_memset(b->qcoeff, 0, 16 * sizeof(b->qcoeff[0]));
|
||||
memset(b->qcoeff, 0, 16 * sizeof(b->qcoeff[0]));
|
||||
}
|
||||
else
|
||||
{
|
||||
b->dqcoeff[0] = b->qcoeff[0] * xd->dequant_y2[0];
|
||||
vp8_short_inv_walsh4x4_1(&b->dqcoeff[0],
|
||||
xd->qcoeff);
|
||||
vpx_memset(b->qcoeff, 0, 2 * sizeof(b->qcoeff[0]));
|
||||
memset(b->qcoeff, 0, 2 * sizeof(b->qcoeff[0]));
|
||||
}
|
||||
|
||||
/* override the dc dequant constant in order to preserve the
|
||||
@ -446,8 +446,8 @@ static void yv12_extend_frame_left_right_c(YV12_BUFFER_CONFIG *ybf,
|
||||
|
||||
for (i = 0; i < plane_height; i++)
|
||||
{
|
||||
vpx_memset(dest_ptr1, src_ptr1[0], Border);
|
||||
vpx_memset(dest_ptr2, src_ptr2[0], Border);
|
||||
memset(dest_ptr1, src_ptr1[0], Border);
|
||||
memset(dest_ptr2, src_ptr2[0], Border);
|
||||
src_ptr1 += plane_stride;
|
||||
src_ptr2 += plane_stride;
|
||||
dest_ptr1 += plane_stride;
|
||||
@ -470,8 +470,8 @@ static void yv12_extend_frame_left_right_c(YV12_BUFFER_CONFIG *ybf,
|
||||
|
||||
for (i = 0; i < plane_height; i++)
|
||||
{
|
||||
vpx_memset(dest_ptr1, src_ptr1[0], Border);
|
||||
vpx_memset(dest_ptr2, src_ptr2[0], Border);
|
||||
memset(dest_ptr1, src_ptr1[0], Border);
|
||||
memset(dest_ptr2, src_ptr2[0], Border);
|
||||
src_ptr1 += plane_stride;
|
||||
src_ptr2 += plane_stride;
|
||||
dest_ptr1 += plane_stride;
|
||||
@ -490,8 +490,8 @@ static void yv12_extend_frame_left_right_c(YV12_BUFFER_CONFIG *ybf,
|
||||
|
||||
for (i = 0; i < plane_height; i++)
|
||||
{
|
||||
vpx_memset(dest_ptr1, src_ptr1[0], Border);
|
||||
vpx_memset(dest_ptr2, src_ptr2[0], Border);
|
||||
memset(dest_ptr1, src_ptr1[0], Border);
|
||||
memset(dest_ptr2, src_ptr2[0], Border);
|
||||
src_ptr1 += plane_stride;
|
||||
src_ptr2 += plane_stride;
|
||||
dest_ptr1 += plane_stride;
|
||||
@ -568,7 +568,7 @@ static void decode_mb_rows(VP8D_COMP *pbi)
|
||||
|
||||
/* reset contexts */
|
||||
xd->above_context = pc->above_context;
|
||||
vpx_memset(xd->left_context, 0, sizeof(ENTROPY_CONTEXT_PLANES));
|
||||
memset(xd->left_context, 0, sizeof(ENTROPY_CONTEXT_PLANES));
|
||||
|
||||
xd->left_available = 0;
|
||||
|
||||
@ -925,12 +925,12 @@ static void init_frame(VP8D_COMP *pbi)
|
||||
vp8_default_coef_probs(pc);
|
||||
|
||||
/* reset the segment feature data to 0 with delta coding (Default state). */
|
||||
vpx_memset(xd->segment_feature_data, 0, sizeof(xd->segment_feature_data));
|
||||
memset(xd->segment_feature_data, 0, sizeof(xd->segment_feature_data));
|
||||
xd->mb_segement_abs_delta = SEGMENT_DELTADATA;
|
||||
|
||||
/* reset the mode ref deltasa for loop filter */
|
||||
vpx_memset(xd->ref_lf_deltas, 0, sizeof(xd->ref_lf_deltas));
|
||||
vpx_memset(xd->mode_lf_deltas, 0, sizeof(xd->mode_lf_deltas));
|
||||
memset(xd->ref_lf_deltas, 0, sizeof(xd->ref_lf_deltas));
|
||||
memset(xd->mode_lf_deltas, 0, sizeof(xd->mode_lf_deltas));
|
||||
|
||||
/* All buffers are implicitly updated on key frames. */
|
||||
pc->refresh_golden_frame = 1;
|
||||
@ -1105,7 +1105,7 @@ int vp8_decode_frame(VP8D_COMP *pbi)
|
||||
{
|
||||
xd->mb_segement_abs_delta = (unsigned char)vp8_read_bit(bc);
|
||||
|
||||
vpx_memset(xd->segment_feature_data, 0, sizeof(xd->segment_feature_data));
|
||||
memset(xd->segment_feature_data, 0, sizeof(xd->segment_feature_data));
|
||||
|
||||
/* For each segmentation feature (Quant and loop filter level) */
|
||||
for (i = 0; i < MB_LVL_MAX; i++)
|
||||
@ -1129,7 +1129,7 @@ int vp8_decode_frame(VP8D_COMP *pbi)
|
||||
if (xd->update_mb_segmentation_map)
|
||||
{
|
||||
/* Which macro block level features are enabled */
|
||||
vpx_memset(xd->mb_segment_tree_probs, 255, sizeof(xd->mb_segment_tree_probs));
|
||||
memset(xd->mb_segment_tree_probs, 255, sizeof(xd->mb_segment_tree_probs));
|
||||
|
||||
/* Read the probs used to decode the segment id for each macro block. */
|
||||
for (i = 0; i < MB_FEATURE_TREE_PROBS; i++)
|
||||
@ -1327,7 +1327,7 @@ int vp8_decode_frame(VP8D_COMP *pbi)
|
||||
}
|
||||
|
||||
/* clear out the coeff buffer */
|
||||
vpx_memset(xd->qcoeff, 0, sizeof(xd->qcoeff));
|
||||
memset(xd->qcoeff, 0, sizeof(xd->qcoeff));
|
||||
|
||||
vp8_decode_mode_mvs(pbi);
|
||||
|
||||
@ -1341,7 +1341,7 @@ int vp8_decode_frame(VP8D_COMP *pbi)
|
||||
}
|
||||
#endif
|
||||
|
||||
vpx_memset(pc->above_context, 0, sizeof(ENTROPY_CONTEXT_PLANES) * pc->mb_cols);
|
||||
memset(pc->above_context, 0, sizeof(ENTROPY_CONTEXT_PLANES) * pc->mb_cols);
|
||||
pbi->frame_corrupt_residual = 0;
|
||||
|
||||
#if CONFIG_MULTITHREAD
|
||||
|
@ -20,8 +20,8 @@ void vp8_reset_mb_tokens_context(MACROBLOCKD *x)
|
||||
ENTROPY_CONTEXT *a_ctx = ((ENTROPY_CONTEXT *)x->above_context);
|
||||
ENTROPY_CONTEXT *l_ctx = ((ENTROPY_CONTEXT *)x->left_context);
|
||||
|
||||
vpx_memset(a_ctx, 0, sizeof(ENTROPY_CONTEXT_PLANES)-1);
|
||||
vpx_memset(l_ctx, 0, sizeof(ENTROPY_CONTEXT_PLANES)-1);
|
||||
memset(a_ctx, 0, sizeof(ENTROPY_CONTEXT_PLANES)-1);
|
||||
memset(l_ctx, 0, sizeof(ENTROPY_CONTEXT_PLANES)-1);
|
||||
|
||||
/* Clear entropy contexts for Y2 blocks */
|
||||
if (!x->mode_info_context->mbmi.is_4x4)
|
||||
|
@ -350,7 +350,7 @@ static void estimate_missing_mvs(MB_OVERLAP *overlaps,
|
||||
unsigned int first_corrupt)
|
||||
{
|
||||
int mb_row, mb_col;
|
||||
vpx_memset(overlaps, 0, sizeof(MB_OVERLAP) * mb_rows * mb_cols);
|
||||
memset(overlaps, 0, sizeof(MB_OVERLAP) * mb_rows * mb_cols);
|
||||
/* First calculate the overlaps for all blocks */
|
||||
for (mb_row = 0; mb_row < mb_rows; ++mb_row)
|
||||
{
|
||||
|
@ -58,7 +58,7 @@ static struct VP8D_COMP * create_decompressor(VP8D_CONFIG *oxcf)
|
||||
if (!pbi)
|
||||
return NULL;
|
||||
|
||||
vpx_memset(pbi, 0, sizeof(VP8D_COMP));
|
||||
memset(pbi, 0, sizeof(VP8D_COMP));
|
||||
|
||||
if (setjmp(pbi->common.error.jmp))
|
||||
{
|
||||
|
@ -137,7 +137,7 @@ static void mt_decode_macroblock(VP8D_COMP *pbi, MACROBLOCKD *xd,
|
||||
* Better to use the predictor as reconstruction.
|
||||
*/
|
||||
pbi->frame_corrupt_residual = 1;
|
||||
vpx_memset(xd->qcoeff, 0, sizeof(xd->qcoeff));
|
||||
memset(xd->qcoeff, 0, sizeof(xd->qcoeff));
|
||||
vp8_conceal_corrupt_mb(xd);
|
||||
|
||||
|
||||
@ -146,7 +146,7 @@ static void mt_decode_macroblock(VP8D_COMP *pbi, MACROBLOCKD *xd,
|
||||
/* force idct to be skipped for B_PRED and use the
|
||||
* prediction only for reconstruction
|
||||
* */
|
||||
vpx_memset(xd->eobs, 0, 25);
|
||||
memset(xd->eobs, 0, 25);
|
||||
}
|
||||
}
|
||||
#endif
|
||||
@ -179,7 +179,7 @@ static void mt_decode_macroblock(VP8D_COMP *pbi, MACROBLOCKD *xd,
|
||||
|
||||
/* clear out residual eob info */
|
||||
if(xd->mode_info_context->mbmi.mb_skip_coeff)
|
||||
vpx_memset(xd->eobs, 0, 25);
|
||||
memset(xd->eobs, 0, 25);
|
||||
|
||||
intra_prediction_down_copy(xd, xd->recon_above[0] + 16);
|
||||
|
||||
@ -229,7 +229,7 @@ static void mt_decode_macroblock(VP8D_COMP *pbi, MACROBLOCKD *xd,
|
||||
{
|
||||
vp8_dc_only_idct_add(b->qcoeff[0] * DQC[0],
|
||||
dst, dst_stride, dst, dst_stride);
|
||||
vpx_memset(b->qcoeff, 0, 2 * sizeof(b->qcoeff[0]));
|
||||
memset(b->qcoeff, 0, 2 * sizeof(b->qcoeff[0]));
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -266,14 +266,14 @@ static void mt_decode_macroblock(VP8D_COMP *pbi, MACROBLOCKD *xd,
|
||||
|
||||
vp8_short_inv_walsh4x4(&b->dqcoeff[0],
|
||||
xd->qcoeff);
|
||||
vpx_memset(b->qcoeff, 0, 16 * sizeof(b->qcoeff[0]));
|
||||
memset(b->qcoeff, 0, 16 * sizeof(b->qcoeff[0]));
|
||||
}
|
||||
else
|
||||
{
|
||||
b->dqcoeff[0] = b->qcoeff[0] * xd->dequant_y2[0];
|
||||
vp8_short_inv_walsh4x4_1(&b->dqcoeff[0],
|
||||
xd->qcoeff);
|
||||
vpx_memset(b->qcoeff, 0, 2 * sizeof(b->qcoeff[0]));
|
||||
memset(b->qcoeff, 0, 2 * sizeof(b->qcoeff[0]));
|
||||
}
|
||||
|
||||
/* override the dc dequant constant in order to preserve the
|
||||
@ -360,7 +360,7 @@ static void mt_decode_mb_rows(VP8D_COMP *pbi, MACROBLOCKD *xd, int start_mb_row)
|
||||
|
||||
/* reset contexts */
|
||||
xd->above_context = pc->above_context;
|
||||
vpx_memset(xd->left_context, 0, sizeof(ENTROPY_CONTEXT_PLANES));
|
||||
memset(xd->left_context, 0, sizeof(ENTROPY_CONTEXT_PLANES));
|
||||
|
||||
xd->left_available = 0;
|
||||
|
||||
@ -876,23 +876,23 @@ void vp8mt_decode_mb_rows( VP8D_COMP *pbi, MACROBLOCKD *xd)
|
||||
if (filter_level)
|
||||
{
|
||||
/* Set above_row buffer to 127 for decoding first MB row */
|
||||
vpx_memset(pbi->mt_yabove_row[0] + VP8BORDERINPIXELS-1, 127, yv12_fb_new->y_width + 5);
|
||||
vpx_memset(pbi->mt_uabove_row[0] + (VP8BORDERINPIXELS>>1)-1, 127, (yv12_fb_new->y_width>>1) +5);
|
||||
vpx_memset(pbi->mt_vabove_row[0] + (VP8BORDERINPIXELS>>1)-1, 127, (yv12_fb_new->y_width>>1) +5);
|
||||
memset(pbi->mt_yabove_row[0] + VP8BORDERINPIXELS-1, 127, yv12_fb_new->y_width + 5);
|
||||
memset(pbi->mt_uabove_row[0] + (VP8BORDERINPIXELS>>1)-1, 127, (yv12_fb_new->y_width>>1) +5);
|
||||
memset(pbi->mt_vabove_row[0] + (VP8BORDERINPIXELS>>1)-1, 127, (yv12_fb_new->y_width>>1) +5);
|
||||
|
||||
for (j=1; j<pc->mb_rows; j++)
|
||||
{
|
||||
vpx_memset(pbi->mt_yabove_row[j] + VP8BORDERINPIXELS-1, (unsigned char)129, 1);
|
||||
vpx_memset(pbi->mt_uabove_row[j] + (VP8BORDERINPIXELS>>1)-1, (unsigned char)129, 1);
|
||||
vpx_memset(pbi->mt_vabove_row[j] + (VP8BORDERINPIXELS>>1)-1, (unsigned char)129, 1);
|
||||
memset(pbi->mt_yabove_row[j] + VP8BORDERINPIXELS-1, (unsigned char)129, 1);
|
||||
memset(pbi->mt_uabove_row[j] + (VP8BORDERINPIXELS>>1)-1, (unsigned char)129, 1);
|
||||
memset(pbi->mt_vabove_row[j] + (VP8BORDERINPIXELS>>1)-1, (unsigned char)129, 1);
|
||||
}
|
||||
|
||||
/* Set left_col to 129 initially */
|
||||
for (j=0; j<pc->mb_rows; j++)
|
||||
{
|
||||
vpx_memset(pbi->mt_yleft_col[j], (unsigned char)129, 16);
|
||||
vpx_memset(pbi->mt_uleft_col[j], (unsigned char)129, 8);
|
||||
vpx_memset(pbi->mt_vleft_col[j], (unsigned char)129, 8);
|
||||
memset(pbi->mt_yleft_col[j], (unsigned char)129, 16);
|
||||
memset(pbi->mt_uleft_col[j], (unsigned char)129, 8);
|
||||
memset(pbi->mt_vleft_col[j], (unsigned char)129, 8);
|
||||
}
|
||||
|
||||
/* Initialize the loop filter for this frame. */
|
||||
|
@ -415,8 +415,8 @@ int vp8_denoiser_allocate(VP8_DENOISER *denoiser, int width, int height,
|
||||
vp8_denoiser_free(denoiser);
|
||||
return 1;
|
||||
}
|
||||
vpx_memset(denoiser->yv12_running_avg[i].buffer_alloc, 0,
|
||||
denoiser->yv12_running_avg[i].frame_size);
|
||||
memset(denoiser->yv12_running_avg[i].buffer_alloc, 0,
|
||||
denoiser->yv12_running_avg[i].frame_size);
|
||||
|
||||
}
|
||||
denoiser->yv12_mc_running_avg.flags = 0;
|
||||
@ -428,19 +428,19 @@ int vp8_denoiser_allocate(VP8_DENOISER *denoiser, int width, int height,
|
||||
return 1;
|
||||
}
|
||||
|
||||
vpx_memset(denoiser->yv12_mc_running_avg.buffer_alloc, 0,
|
||||
denoiser->yv12_mc_running_avg.frame_size);
|
||||
memset(denoiser->yv12_mc_running_avg.buffer_alloc, 0,
|
||||
denoiser->yv12_mc_running_avg.frame_size);
|
||||
|
||||
if (vp8_yv12_alloc_frame_buffer(&denoiser->yv12_last_source, width,
|
||||
height, VP8BORDERINPIXELS) < 0) {
|
||||
vp8_denoiser_free(denoiser);
|
||||
return 1;
|
||||
}
|
||||
vpx_memset(denoiser->yv12_last_source.buffer_alloc, 0,
|
||||
denoiser->yv12_last_source.frame_size);
|
||||
memset(denoiser->yv12_last_source.buffer_alloc, 0,
|
||||
denoiser->yv12_last_source.frame_size);
|
||||
|
||||
denoiser->denoise_state = vpx_calloc((num_mb_rows * num_mb_cols), 1);
|
||||
vpx_memset(denoiser->denoise_state, 0, (num_mb_rows * num_mb_cols));
|
||||
memset(denoiser->denoise_state, 0, (num_mb_rows * num_mb_cols));
|
||||
vp8_denoiser_set_parameters(denoiser, mode);
|
||||
denoiser->nmse_source_diff = 0;
|
||||
denoiser->nmse_source_diff_count = 0;
|
||||
|
@ -665,8 +665,7 @@ static void init_encode_frame_mb_context(VP8_COMP *cpi)
|
||||
|
||||
x->mvc = cm->fc.mvc;
|
||||
|
||||
vpx_memset(cm->above_context, 0,
|
||||
sizeof(ENTROPY_CONTEXT_PLANES) * cm->mb_cols);
|
||||
memset(cm->above_context, 0, sizeof(ENTROPY_CONTEXT_PLANES) * cm->mb_cols);
|
||||
|
||||
/* Special case treatment when GF and ARF are not sensible options
|
||||
* for reference
|
||||
@ -744,7 +743,7 @@ void vp8_encode_frame(VP8_COMP *cpi)
|
||||
const int num_part = (1 << cm->multi_token_partition);
|
||||
#endif
|
||||
|
||||
vpx_memset(segment_counts, 0, sizeof(segment_counts));
|
||||
memset(segment_counts, 0, sizeof(segment_counts));
|
||||
totalrate = 0;
|
||||
|
||||
if (cpi->compressor_speed == 2)
|
||||
@ -974,7 +973,7 @@ void vp8_encode_frame(VP8_COMP *cpi)
|
||||
int i;
|
||||
|
||||
/* Set to defaults */
|
||||
vpx_memset(xd->mb_segment_tree_probs, 255 , sizeof(xd->mb_segment_tree_probs));
|
||||
memset(xd->mb_segment_tree_probs, 255 , sizeof(xd->mb_segment_tree_probs));
|
||||
|
||||
tot_count = segment_counts[0] + segment_counts[1] + segment_counts[2] + segment_counts[3];
|
||||
|
||||
|
@ -444,7 +444,7 @@ static void setup_mbby_copy(MACROBLOCK *mbdst, MACROBLOCK *mbsrc)
|
||||
z->zbin_mode_boost_enabled = x->zbin_mode_boost_enabled;
|
||||
z->zbin_mode_boost = x->zbin_mode_boost;
|
||||
|
||||
vpx_memset(z->error_bins, 0, sizeof(z->error_bins));
|
||||
memset(z->error_bins, 0, sizeof(z->error_bins));
|
||||
}
|
||||
}
|
||||
|
||||
@ -470,7 +470,7 @@ void vp8cx_init_mbrthread_data(VP8_COMP *cpi,
|
||||
mbd->subpixel_predict16x16 = xd->subpixel_predict16x16;
|
||||
mb->gf_active_ptr = x->gf_active_ptr;
|
||||
|
||||
vpx_memset(mbr_ei[i].segment_counts, 0, sizeof(mbr_ei[i].segment_counts));
|
||||
memset(mbr_ei[i].segment_counts, 0, sizeof(mbr_ei[i].segment_counts));
|
||||
mbr_ei[i].totalrate = 0;
|
||||
|
||||
mb->partition_info = x->pi + x->e_mbd.mode_info_stride * (i + 1);
|
||||
@ -545,7 +545,7 @@ int vp8cx_create_encoder_threads(VP8_COMP *cpi)
|
||||
vpx_malloc(sizeof(sem_t) * th_count));
|
||||
CHECK_MEM_ERROR(cpi->mb_row_ei,
|
||||
vpx_memalign(32, sizeof(MB_ROW_COMP) * th_count));
|
||||
vpx_memset(cpi->mb_row_ei, 0, sizeof(MB_ROW_COMP) * th_count);
|
||||
memset(cpi->mb_row_ei, 0, sizeof(MB_ROW_COMP) * th_count);
|
||||
CHECK_MEM_ERROR(cpi->en_thread_data,
|
||||
vpx_malloc(sizeof(ENCODETHREAD_DATA) * th_count));
|
||||
|
||||
|
@ -1779,7 +1779,7 @@ static void define_gf_group(VP8_COMP *cpi, FIRSTPASS_STATS *this_frame)
|
||||
|
||||
start_pos = cpi->twopass.stats_in;
|
||||
|
||||
vpx_memset(&next_frame, 0, sizeof(next_frame)); /* assure clean */
|
||||
memset(&next_frame, 0, sizeof(next_frame)); /* assure clean */
|
||||
|
||||
/* Load stats for the current frame. */
|
||||
mod_frame_err = calculate_modified_err(cpi, this_frame);
|
||||
@ -2735,7 +2735,7 @@ static void find_next_key_frame(VP8_COMP *cpi, FIRSTPASS_STATS *this_frame)
|
||||
double kf_group_coded_err = 0.0;
|
||||
double recent_loop_decay[8] = {1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0};
|
||||
|
||||
vpx_memset(&next_frame, 0, sizeof(next_frame));
|
||||
memset(&next_frame, 0, sizeof(next_frame));
|
||||
|
||||
vp8_clear_system_state();
|
||||
start_position = cpi->twopass.stats_in;
|
||||
|
@ -1978,8 +1978,8 @@ void print_mode_context(void)
|
||||
#ifdef VP8_ENTROPY_STATS
|
||||
void init_mv_ref_counts()
|
||||
{
|
||||
vpx_memset(mv_ref_ct, 0, sizeof(mv_ref_ct));
|
||||
vpx_memset(mv_mode_cts, 0, sizeof(mv_mode_cts));
|
||||
memset(mv_ref_ct, 0, sizeof(mv_ref_ct));
|
||||
memset(mv_mode_cts, 0, sizeof(mv_mode_cts));
|
||||
}
|
||||
|
||||
void accum_mv_refs(MB_PREDICTION_MODE m, const int ct[4])
|
||||
|
@ -428,10 +428,10 @@ static void setup_features(VP8_COMP *cpi)
|
||||
|
||||
cpi->mb.e_mbd.mode_ref_lf_delta_enabled = 0;
|
||||
cpi->mb.e_mbd.mode_ref_lf_delta_update = 0;
|
||||
vpx_memset(cpi->mb.e_mbd.ref_lf_deltas, 0, sizeof(cpi->mb.e_mbd.ref_lf_deltas));
|
||||
vpx_memset(cpi->mb.e_mbd.mode_lf_deltas, 0, sizeof(cpi->mb.e_mbd.mode_lf_deltas));
|
||||
vpx_memset(cpi->mb.e_mbd.last_ref_lf_deltas, 0, sizeof(cpi->mb.e_mbd.ref_lf_deltas));
|
||||
vpx_memset(cpi->mb.e_mbd.last_mode_lf_deltas, 0, sizeof(cpi->mb.e_mbd.mode_lf_deltas));
|
||||
memset(cpi->mb.e_mbd.ref_lf_deltas, 0, sizeof(cpi->mb.e_mbd.ref_lf_deltas));
|
||||
memset(cpi->mb.e_mbd.mode_lf_deltas, 0, sizeof(cpi->mb.e_mbd.mode_lf_deltas));
|
||||
memset(cpi->mb.e_mbd.last_ref_lf_deltas, 0, sizeof(cpi->mb.e_mbd.ref_lf_deltas));
|
||||
memset(cpi->mb.e_mbd.last_mode_lf_deltas, 0, sizeof(cpi->mb.e_mbd.mode_lf_deltas));
|
||||
|
||||
set_default_lf_deltas(cpi);
|
||||
|
||||
@ -602,7 +602,7 @@ static void cyclic_background_refresh(VP8_COMP *cpi, int Q, int lf_adjustment)
|
||||
|
||||
// Set every macroblock to be eligible for update.
|
||||
// For key frame this will reset seg map to 0.
|
||||
vpx_memset(cpi->segmentation_map, 0, mbs_in_frame);
|
||||
memset(cpi->segmentation_map, 0, mbs_in_frame);
|
||||
|
||||
if (cpi->common.frame_type != KEY_FRAME && block_count > 0)
|
||||
{
|
||||
@ -686,8 +686,8 @@ static void set_default_lf_deltas(VP8_COMP *cpi)
|
||||
cpi->mb.e_mbd.mode_ref_lf_delta_enabled = 1;
|
||||
cpi->mb.e_mbd.mode_ref_lf_delta_update = 1;
|
||||
|
||||
vpx_memset(cpi->mb.e_mbd.ref_lf_deltas, 0, sizeof(cpi->mb.e_mbd.ref_lf_deltas));
|
||||
vpx_memset(cpi->mb.e_mbd.mode_lf_deltas, 0, sizeof(cpi->mb.e_mbd.mode_lf_deltas));
|
||||
memset(cpi->mb.e_mbd.ref_lf_deltas, 0, sizeof(cpi->mb.e_mbd.ref_lf_deltas));
|
||||
memset(cpi->mb.e_mbd.mode_lf_deltas, 0, sizeof(cpi->mb.e_mbd.mode_lf_deltas));
|
||||
|
||||
/* Test of ref frame deltas */
|
||||
cpi->mb.e_mbd.ref_lf_deltas[INTRA_FRAME] = 2;
|
||||
@ -1087,7 +1087,7 @@ void vp8_set_speed_features(VP8_COMP *cpi)
|
||||
if (Speed >= 15)
|
||||
sf->half_pixel_search = 0;
|
||||
|
||||
vpx_memset(cpi->mb.error_bins, 0, sizeof(cpi->mb.error_bins));
|
||||
memset(cpi->mb.error_bins, 0, sizeof(cpi->mb.error_bins));
|
||||
|
||||
}; /* switch */
|
||||
|
||||
@ -1298,7 +1298,7 @@ void vp8_alloc_compressor_data(VP8_COMP *cpi)
|
||||
CHECK_MEM_ERROR(cpi->active_map,
|
||||
vpx_calloc(cm->mb_rows * cm->mb_cols,
|
||||
sizeof(*cpi->active_map)));
|
||||
vpx_memset(cpi->active_map , 1, (cm->mb_rows * cm->mb_cols));
|
||||
memset(cpi->active_map , 1, (cm->mb_rows * cm->mb_cols));
|
||||
|
||||
#if CONFIG_MULTITHREAD
|
||||
if (width < 640)
|
||||
@ -1891,7 +1891,7 @@ struct VP8_COMP* vp8_create_compressor(VP8_CONFIG *oxcf)
|
||||
|
||||
cm = &cpi->common;
|
||||
|
||||
vpx_memset(cpi, 0, sizeof(VP8_COMP));
|
||||
memset(cpi, 0, sizeof(VP8_COMP));
|
||||
|
||||
if (setjmp(cm->error.jmp))
|
||||
{
|
||||
@ -2867,7 +2867,7 @@ static void update_alt_ref_frame_stats(VP8_COMP *cpi)
|
||||
}
|
||||
|
||||
/* Update data structure that monitors level of reference to last GF */
|
||||
vpx_memset(cpi->gf_active_flags, 1, (cm->mb_rows * cm->mb_cols));
|
||||
memset(cpi->gf_active_flags, 1, (cm->mb_rows * cm->mb_cols));
|
||||
cpi->gf_active_count = cm->mb_rows * cm->mb_cols;
|
||||
|
||||
/* this frame refreshes means next frames don't unless specified by user */
|
||||
@ -2916,7 +2916,7 @@ static void update_golden_frame_stats(VP8_COMP *cpi)
|
||||
}
|
||||
|
||||
/* Update data structure that monitors level of reference to last GF */
|
||||
vpx_memset(cpi->gf_active_flags, 1, (cm->mb_rows * cm->mb_cols));
|
||||
memset(cpi->gf_active_flags, 1, (cm->mb_rows * cm->mb_cols));
|
||||
cpi->gf_active_count = cm->mb_rows * cm->mb_cols;
|
||||
|
||||
/* this frame refreshes means next frames don't unless specified by
|
||||
@ -3830,9 +3830,9 @@ static void encode_frame_to_data_rate
|
||||
}
|
||||
|
||||
// Reset the zero_last counter to 0 on key frame.
|
||||
vpx_memset(cpi->consec_zero_last, 0, cm->mb_rows * cm->mb_cols);
|
||||
vpx_memset(cpi->consec_zero_last_mvbias, 0,
|
||||
(cpi->common.mb_rows * cpi->common.mb_cols));
|
||||
memset(cpi->consec_zero_last, 0, cm->mb_rows * cm->mb_cols);
|
||||
memset(cpi->consec_zero_last_mvbias, 0,
|
||||
(cpi->common.mb_rows * cpi->common.mb_cols));
|
||||
}
|
||||
|
||||
#if 0
|
||||
@ -4362,9 +4362,9 @@ static void encode_frame_to_data_rate
|
||||
disable_segmentation(cpi);
|
||||
}
|
||||
// Reset the zero_last counter to 0 on key frame.
|
||||
vpx_memset(cpi->consec_zero_last, 0, cm->mb_rows * cm->mb_cols);
|
||||
vpx_memset(cpi->consec_zero_last_mvbias, 0,
|
||||
(cpi->common.mb_rows * cpi->common.mb_cols));
|
||||
memset(cpi->consec_zero_last, 0, cm->mb_rows * cm->mb_cols);
|
||||
memset(cpi->consec_zero_last_mvbias, 0,
|
||||
(cpi->common.mb_rows * cpi->common.mb_cols));
|
||||
vp8_set_quantizer(cpi, Q);
|
||||
}
|
||||
|
||||
|
@ -862,8 +862,8 @@ void vp8_pick_inter_mode(VP8_COMP *cpi, MACROBLOCK *x, int recon_yoffset,
|
||||
|
||||
mode_mv = mode_mv_sb[sign_bias];
|
||||
best_ref_mv.as_int = 0;
|
||||
vpx_memset(mode_mv_sb, 0, sizeof(mode_mv_sb));
|
||||
vpx_memset(&best_mbmode, 0, sizeof(best_mbmode));
|
||||
memset(mode_mv_sb, 0, sizeof(mode_mv_sb));
|
||||
memset(&best_mbmode, 0, sizeof(best_mbmode));
|
||||
|
||||
/* Setup search priorities */
|
||||
#if CONFIG_MULTI_RES_ENCODING
|
||||
|
@ -286,7 +286,7 @@ void vp8cx_pick_filter_level(YV12_BUFFER_CONFIG *sd, VP8_COMP *cpi)
|
||||
|
||||
YV12_BUFFER_CONFIG * saved_frame = cm->frame_to_show;
|
||||
|
||||
vpx_memset(ss_err, 0, sizeof(ss_err));
|
||||
memset(ss_err, 0, sizeof(ss_err));
|
||||
|
||||
/* Replace unfiltered frame buffer with a new one */
|
||||
cm->frame_to_show = &cpi->pick_lf_lvl_frame;
|
||||
|
@ -65,8 +65,8 @@ void vp8_regular_quantize_b_c(BLOCK *b, BLOCKD *d)
|
||||
short *dequant_ptr = d->dequant;
|
||||
short zbin_oq_value = b->zbin_extra;
|
||||
|
||||
vpx_memset(qcoeff_ptr, 0, 32);
|
||||
vpx_memset(dqcoeff_ptr, 0, 32);
|
||||
memset(qcoeff_ptr, 0, 32);
|
||||
memset(dqcoeff_ptr, 0, 32);
|
||||
|
||||
eob = -1;
|
||||
|
||||
|
@ -1392,7 +1392,7 @@ static int vp8_rd_pick_best_mbsegmentation(VP8_COMP *cpi, MACROBLOCK *x,
|
||||
int i;
|
||||
BEST_SEG_INFO bsi;
|
||||
|
||||
vpx_memset(&bsi, 0, sizeof(bsi));
|
||||
memset(&bsi, 0, sizeof(bsi));
|
||||
|
||||
bsi.segment_rd = best_rd;
|
||||
bsi.ref_mv = best_ref_mv;
|
||||
@ -1988,9 +1988,9 @@ void vp8_rd_pick_inter_mode(VP8_COMP *cpi, MACROBLOCK *x, int recon_yoffset,
|
||||
best_mode.rd = INT_MAX;
|
||||
best_mode.yrd = INT_MAX;
|
||||
best_mode.intra_rd = INT_MAX;
|
||||
vpx_memset(mode_mv_sb, 0, sizeof(mode_mv_sb));
|
||||
vpx_memset(&best_mode.mbmode, 0, sizeof(best_mode.mbmode));
|
||||
vpx_memset(&best_mode.bmodes, 0, sizeof(best_mode.bmodes));
|
||||
memset(mode_mv_sb, 0, sizeof(mode_mv_sb));
|
||||
memset(&best_mode.mbmode, 0, sizeof(best_mode.mbmode));
|
||||
memset(&best_mode.bmodes, 0, sizeof(best_mode.bmodes));
|
||||
|
||||
/* Setup search priorities */
|
||||
get_reference_search_order(cpi, ref_frame_map);
|
||||
|
@ -23,7 +23,7 @@ void vp8_update_gf_useage_maps(VP8_COMP *cpi, VP8_COMMON *cm, MACROBLOCK *x)
|
||||
if ((cm->frame_type == KEY_FRAME) || (cm->refresh_golden_frame))
|
||||
{
|
||||
/* Reset Gf useage monitors */
|
||||
vpx_memset(cpi->gf_active_flags, 1, (cm->mb_rows * cm->mb_cols));
|
||||
memset(cpi->gf_active_flags, 1, (cm->mb_rows * cm->mb_cols));
|
||||
cpi->gf_active_count = cm->mb_rows * cm->mb_cols;
|
||||
}
|
||||
else
|
||||
|
@ -274,8 +274,8 @@ static void vp8_temporal_filter_iterate_c
|
||||
int i, j, k;
|
||||
int stride;
|
||||
|
||||
vpx_memset(accumulator, 0, 384*sizeof(unsigned int));
|
||||
vpx_memset(count, 0, 384*sizeof(unsigned short));
|
||||
memset(accumulator, 0, 384*sizeof(unsigned int));
|
||||
memset(count, 0, 384*sizeof(unsigned short));
|
||||
|
||||
#if ALT_REF_MC_ENABLED
|
||||
cpi->mb.mv_col_min = -((mb_col * 16) + (16 - 5));
|
||||
@ -502,7 +502,7 @@ void vp8_temporal_filter_prepare_c
|
||||
start_frame = distance + frames_to_blur_forward;
|
||||
|
||||
/* Setup frame pointers, NULL indicates frame not included in filter */
|
||||
vpx_memset(cpi->frames, 0, max_frames*sizeof(YV12_BUFFER_CONFIG *));
|
||||
memset(cpi->frames, 0, max_frames*sizeof(YV12_BUFFER_CONFIG *));
|
||||
for (frame = 0; frame < frames_to_blur; frame++)
|
||||
{
|
||||
int which_buffer = start_frame - frame;
|
||||
|
@ -421,7 +421,7 @@ void vp8_tokenize_mb(VP8_COMP *cpi, MACROBLOCK *x, TOKENEXTRA **t)
|
||||
|
||||
void init_context_counters(void)
|
||||
{
|
||||
vpx_memset(context_counters, 0, sizeof(context_counters));
|
||||
memset(context_counters, 0, sizeof(context_counters));
|
||||
}
|
||||
|
||||
void print_context_counters()
|
||||
@ -596,13 +596,13 @@ void vp8_fix_contexts(MACROBLOCKD *x)
|
||||
/* Clear entropy contexts for Y2 blocks */
|
||||
if (x->mode_info_context->mbmi.mode != B_PRED && x->mode_info_context->mbmi.mode != SPLITMV)
|
||||
{
|
||||
vpx_memset(x->above_context, 0, sizeof(ENTROPY_CONTEXT_PLANES));
|
||||
vpx_memset(x->left_context, 0, sizeof(ENTROPY_CONTEXT_PLANES));
|
||||
memset(x->above_context, 0, sizeof(ENTROPY_CONTEXT_PLANES));
|
||||
memset(x->left_context, 0, sizeof(ENTROPY_CONTEXT_PLANES));
|
||||
}
|
||||
else
|
||||
{
|
||||
vpx_memset(x->above_context, 0, sizeof(ENTROPY_CONTEXT_PLANES)-1);
|
||||
vpx_memset(x->left_context, 0, sizeof(ENTROPY_CONTEXT_PLANES)-1);
|
||||
memset(x->above_context, 0, sizeof(ENTROPY_CONTEXT_PLANES)-1);
|
||||
memset(x->left_context, 0, sizeof(ENTROPY_CONTEXT_PLANES)-1);
|
||||
}
|
||||
|
||||
}
|
||||
|
@ -55,7 +55,7 @@ void vp8_regular_quantize_b_sse2(BLOCK *b, BLOCKD *d)
|
||||
__m128i dequant0 = _mm_load_si128((__m128i *)(d->dequant));
|
||||
__m128i dequant1 = _mm_load_si128((__m128i *)(d->dequant + 8));
|
||||
|
||||
vpx_memset(qcoeff_ptr, 0, 32);
|
||||
memset(qcoeff_ptr, 0, 32);
|
||||
|
||||
/* Duplicate to all lanes. */
|
||||
zbin_extra = _mm_shufflelo_epi16(zbin_extra, 0);
|
||||
|
@ -288,8 +288,8 @@ update_fragments(vpx_codec_alg_priv_t *ctx,
|
||||
if (ctx->fragments.count == 0)
|
||||
{
|
||||
/* New frame, reset fragment pointers and sizes */
|
||||
vpx_memset((void*)ctx->fragments.ptrs, 0, sizeof(ctx->fragments.ptrs));
|
||||
vpx_memset(ctx->fragments.sizes, 0, sizeof(ctx->fragments.sizes));
|
||||
memset((void*)ctx->fragments.ptrs, 0, sizeof(ctx->fragments.ptrs));
|
||||
memset(ctx->fragments.sizes, 0, sizeof(ctx->fragments.sizes));
|
||||
}
|
||||
if (ctx->fragments.enabled && !(data == NULL && data_sz == 0))
|
||||
{
|
||||
|
@ -156,7 +156,7 @@ void vp9_remove_common(VP9_COMMON *cm) {
|
||||
void vp9_init_context_buffers(VP9_COMMON *cm) {
|
||||
cm->setup_mi(cm);
|
||||
if (cm->last_frame_seg_map && !cm->frame_parallel_decode)
|
||||
vpx_memset(cm->last_frame_seg_map, 0, cm->mi_rows * cm->mi_cols);
|
||||
memset(cm->last_frame_seg_map, 0, cm->mi_rows * cm->mi_cols);
|
||||
}
|
||||
|
||||
void vp9_swap_current_and_last_seg_map(VP9_COMMON *cm) {
|
||||
|
@ -103,7 +103,7 @@ void vp9_set_contexts(const MACROBLOCKD *xd, struct macroblockd_plane *pd,
|
||||
for (i = above_contexts; i < tx_size_in_blocks; ++i)
|
||||
a[i] = 0;
|
||||
} else {
|
||||
vpx_memset(a, has_eob, sizeof(ENTROPY_CONTEXT) * tx_size_in_blocks);
|
||||
memset(a, has_eob, sizeof(ENTROPY_CONTEXT) * tx_size_in_blocks);
|
||||
}
|
||||
|
||||
// left
|
||||
@ -120,7 +120,7 @@ void vp9_set_contexts(const MACROBLOCKD *xd, struct macroblockd_plane *pd,
|
||||
for (i = left_contexts; i < tx_size_in_blocks; ++i)
|
||||
l[i] = 0;
|
||||
} else {
|
||||
vpx_memset(l, has_eob, sizeof(ENTROPY_CONTEXT) * tx_size_in_blocks);
|
||||
memset(l, has_eob, sizeof(ENTROPY_CONTEXT) * tx_size_in_blocks);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -45,8 +45,8 @@ extern "C" {
|
||||
memcpy(dest, src, n * sizeof(*src)); \
|
||||
}
|
||||
|
||||
#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(dest) memset(&(dest), 0, sizeof(dest))
|
||||
#define vp9_zero_array(dest, n) memset(dest, 0, n * sizeof(*dest))
|
||||
|
||||
static INLINE uint8_t clip_pixel(int val) {
|
||||
return (val > 255) ? 255 : (val < 0) ? 0 : val;
|
||||
|
@ -142,10 +142,10 @@ static INLINE void reset_skip_context(MACROBLOCKD *xd, BLOCK_SIZE bsize) {
|
||||
for (i = 0; i < MAX_MB_PLANE; i++) {
|
||||
struct macroblockd_plane *const pd = &xd->plane[i];
|
||||
const BLOCK_SIZE plane_bsize = get_plane_block_size(bsize, pd);
|
||||
vpx_memset(pd->above_context, 0, sizeof(ENTROPY_CONTEXT) *
|
||||
num_4x4_blocks_wide_lookup[plane_bsize]);
|
||||
vpx_memset(pd->left_context, 0, sizeof(ENTROPY_CONTEXT) *
|
||||
num_4x4_blocks_high_lookup[plane_bsize]);
|
||||
memset(pd->above_context, 0,
|
||||
sizeof(ENTROPY_CONTEXT) * num_4x4_blocks_wide_lookup[plane_bsize]);
|
||||
memset(pd->left_context, 0,
|
||||
sizeof(ENTROPY_CONTEXT) * num_4x4_blocks_high_lookup[plane_bsize]);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -430,10 +430,10 @@ void vp9_setup_past_independence(VP9_COMMON *cm) {
|
||||
cm->seg.abs_delta = SEGMENT_DELTADATA;
|
||||
|
||||
if (cm->last_frame_seg_map && !cm->frame_parallel_decode)
|
||||
vpx_memset(cm->last_frame_seg_map, 0, (cm->mi_rows * cm->mi_cols));
|
||||
memset(cm->last_frame_seg_map, 0, (cm->mi_rows * cm->mi_cols));
|
||||
|
||||
if (cm->current_frame_seg_map)
|
||||
vpx_memset(cm->current_frame_seg_map, 0, (cm->mi_rows * cm->mi_cols));
|
||||
memset(cm->current_frame_seg_map, 0, (cm->mi_rows * cm->mi_cols));
|
||||
|
||||
// Reset the mode ref deltas for loop filter
|
||||
vp9_zero(lf->last_ref_deltas);
|
||||
@ -460,8 +460,8 @@ void vp9_setup_past_independence(VP9_COMMON *cm) {
|
||||
|
||||
// prev_mip will only be allocated in encoder.
|
||||
if (frame_is_intra_only(cm) && cm->prev_mip && !cm->frame_parallel_decode)
|
||||
vpx_memset(cm->prev_mip, 0, cm->mi_stride * (cm->mi_rows + 1) *
|
||||
sizeof(*cm->prev_mip));
|
||||
memset(cm->prev_mip, 0,
|
||||
cm->mi_stride * (cm->mi_rows + 1) * sizeof(*cm->prev_mip));
|
||||
|
||||
vp9_zero(cm->ref_frame_sign_bias);
|
||||
|
||||
|
@ -64,7 +64,7 @@ int vp9_get_frame_buffer(void *cb_priv, size_t min_size,
|
||||
// This memset is needed for fixing valgrind error from C loop filter
|
||||
// due to access uninitialized memory in frame border. It could be
|
||||
// removed if border is totally removed.
|
||||
vpx_memset(int_fb_list->int_fb[i].data, 0, min_size);
|
||||
memset(int_fb_list->int_fb[i].data, 0, min_size);
|
||||
int_fb_list->int_fb[i].size = min_size;
|
||||
}
|
||||
|
||||
|
@ -1276,7 +1276,7 @@ void vp9_idct32x32_1024_add_c(const tran_low_t *input, uint8_t *dest,
|
||||
if (zero_coeff[0] | zero_coeff[1])
|
||||
idct32(input, outptr);
|
||||
else
|
||||
vpx_memset(outptr, 0, sizeof(tran_low_t) * 32);
|
||||
memset(outptr, 0, sizeof(tran_low_t) * 32);
|
||||
input += 32;
|
||||
outptr += 32;
|
||||
}
|
||||
@ -1676,7 +1676,7 @@ static void highbd_iadst4(const tran_low_t *input, tran_low_t *output, int bd) {
|
||||
(void) bd;
|
||||
|
||||
if (!(x0 | x1 | x2 | x3)) {
|
||||
vpx_memset(output, 0, 4 * sizeof(*output));
|
||||
memset(output, 0, 4 * sizeof(*output));
|
||||
return;
|
||||
}
|
||||
|
||||
@ -1752,7 +1752,7 @@ static void highbd_iadst8(const tran_low_t *input, tran_low_t *output, int bd) {
|
||||
(void) bd;
|
||||
|
||||
if (!(x0 | x1 | x2 | x3 | x4 | x5 | x6 | x7)) {
|
||||
vpx_memset(output, 0, 8 * sizeof(*output));
|
||||
memset(output, 0, 8 * sizeof(*output));
|
||||
return;
|
||||
}
|
||||
|
||||
@ -2095,7 +2095,7 @@ static void highbd_iadst16(const tran_low_t *input, tran_low_t *output,
|
||||
|
||||
if (!(x0 | x1 | x2 | x3 | x4 | x5 | x6 | x7 | x8
|
||||
| x9 | x10 | x11 | x12 | x13 | x14 | x15)) {
|
||||
vpx_memset(output, 0, 16 * sizeof(*output));
|
||||
memset(output, 0, 16 * sizeof(*output));
|
||||
return;
|
||||
}
|
||||
|
||||
@ -2712,7 +2712,7 @@ void vp9_highbd_idct32x32_1024_add_c(const tran_low_t *input, uint8_t *dest8,
|
||||
if (zero_coeff[0] | zero_coeff[1])
|
||||
highbd_idct32(input, outptr, bd);
|
||||
else
|
||||
vpx_memset(outptr, 0, sizeof(tran_low_t) * 32);
|
||||
memset(outptr, 0, sizeof(tran_low_t) * 32);
|
||||
input += 32;
|
||||
outptr += 32;
|
||||
}
|
||||
|
@ -222,9 +222,9 @@ static void update_sharpness(loop_filter_info_n *lfi, int sharpness_lvl) {
|
||||
if (block_inside_limit < 1)
|
||||
block_inside_limit = 1;
|
||||
|
||||
vpx_memset(lfi->lfthr[lvl].lim, block_inside_limit, SIMD_WIDTH);
|
||||
vpx_memset(lfi->lfthr[lvl].mblim, (2 * (lvl + 2) + block_inside_limit),
|
||||
SIMD_WIDTH);
|
||||
memset(lfi->lfthr[lvl].lim, block_inside_limit, SIMD_WIDTH);
|
||||
memset(lfi->lfthr[lvl].mblim, (2 * (lvl + 2) + block_inside_limit),
|
||||
SIMD_WIDTH);
|
||||
}
|
||||
}
|
||||
|
||||
@ -245,7 +245,7 @@ void vp9_loop_filter_init(VP9_COMMON *cm) {
|
||||
|
||||
// init hev threshold const vectors
|
||||
for (lvl = 0; lvl <= MAX_LOOP_FILTER; lvl++)
|
||||
vpx_memset(lfi->lfthr[lvl].hev_thr, (lvl >> 4), SIMD_WIDTH);
|
||||
memset(lfi->lfthr[lvl].hev_thr, (lvl >> 4), SIMD_WIDTH);
|
||||
}
|
||||
|
||||
void vp9_loop_filter_frame_init(VP9_COMMON *cm, int default_filt_lvl) {
|
||||
@ -276,7 +276,7 @@ void vp9_loop_filter_frame_init(VP9_COMMON *cm, int default_filt_lvl) {
|
||||
if (!lf->mode_ref_delta_enabled) {
|
||||
// we could get rid of this if we assume that deltas are set to
|
||||
// zero when not in use; encoder always uses deltas
|
||||
vpx_memset(lfi->lvl[seg_id], lvl_seg, sizeof(lfi->lvl[seg_id]));
|
||||
memset(lfi->lvl[seg_id], lvl_seg, sizeof(lfi->lvl[seg_id]));
|
||||
} else {
|
||||
int ref, mode;
|
||||
const int intra_lvl = lvl_seg + lf->ref_deltas[INTRA_FRAME] * scale;
|
||||
@ -727,7 +727,7 @@ static void build_masks(const loop_filter_info_n *const lfi_n,
|
||||
const int h = num_8x8_blocks_high_lookup[block_size];
|
||||
int index = shift_y;
|
||||
for (i = 0; i < h; i++) {
|
||||
vpx_memset(&lfm->lfl_y[index], filter_level, w);
|
||||
memset(&lfm->lfl_y[index], filter_level, w);
|
||||
index += 8;
|
||||
}
|
||||
}
|
||||
@ -801,7 +801,7 @@ static void build_y_mask(const loop_filter_info_n *const lfi_n,
|
||||
const int h = num_8x8_blocks_high_lookup[block_size];
|
||||
int index = shift_y;
|
||||
for (i = 0; i < h; i++) {
|
||||
vpx_memset(&lfm->lfl_y[index], filter_level, w);
|
||||
memset(&lfm->lfl_y[index], filter_level, w);
|
||||
index += 8;
|
||||
}
|
||||
}
|
||||
|
@ -28,7 +28,7 @@ static void find_mv_refs_idx(const VP9_COMMON *cm, const MACROBLOCKD *xd,
|
||||
cm->prev_frame->mvs + mi_row * cm->mi_cols + mi_col : NULL;
|
||||
|
||||
// Blank the reference vector list
|
||||
vpx_memset(mv_ref_list, 0, sizeof(*mv_ref_list) * MAX_MV_REF_CANDIDATES);
|
||||
memset(mv_ref_list, 0, sizeof(*mv_ref_list) * MAX_MV_REF_CANDIDATES);
|
||||
|
||||
// The nearest 2 blocks are treated differently
|
||||
// if the size < 8x8 we get the mv from the bmi substructure,
|
||||
|
@ -408,8 +408,8 @@ static INLINE void update_partition_context(MACROBLOCKD *xd,
|
||||
// update the partition context at the end notes. set partition bits
|
||||
// of block sizes larger than the current one to be one, and partition
|
||||
// bits of smaller block sizes to be zero.
|
||||
vpx_memset(above_ctx, partition_context_lookup[subsize].above, bs);
|
||||
vpx_memset(left_ctx, partition_context_lookup[subsize].left, bs);
|
||||
memset(above_ctx, partition_context_lookup[subsize].above, bs);
|
||||
memset(left_ctx, partition_context_lookup[subsize].left, bs);
|
||||
}
|
||||
|
||||
static INLINE int partition_plane_context(const MACROBLOCKD *xd,
|
||||
|
@ -651,8 +651,8 @@ int vp9_post_proc_frame(struct VP9Common *cm,
|
||||
return 1;
|
||||
}
|
||||
ppstate->prev_mi = ppstate->prev_mip + cm->mi_stride + 1;
|
||||
vpx_memset(ppstate->prev_mip, 0,
|
||||
cm->mi_stride * (cm->mi_rows + 1) * sizeof(*cm->mip));
|
||||
memset(ppstate->prev_mip, 0,
|
||||
cm->mi_stride * (cm->mi_rows + 1) * sizeof(*cm->mip));
|
||||
}
|
||||
|
||||
// Allocate post_proc_buffer_int if needed.
|
||||
@ -674,8 +674,8 @@ int vp9_post_proc_frame(struct VP9Common *cm,
|
||||
|
||||
// Ensure that postproc is set to all 0s so that post proc
|
||||
// doesn't pull random data in from edge.
|
||||
vpx_memset(cm->post_proc_buffer_int.buffer_alloc, 128,
|
||||
cm->post_proc_buffer.frame_size);
|
||||
memset(cm->post_proc_buffer_int.buffer_alloc, 128,
|
||||
cm->post_proc_buffer.frame_size);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -500,7 +500,7 @@ static INLINE void h_predictor(uint8_t *dst, ptrdiff_t stride, int bs,
|
||||
(void) above;
|
||||
|
||||
for (r = 0; r < bs; r++) {
|
||||
vpx_memset(dst, left[r], bs);
|
||||
memset(dst, left[r], bs);
|
||||
dst += stride;
|
||||
}
|
||||
}
|
||||
@ -526,7 +526,7 @@ static INLINE void dc_128_predictor(uint8_t *dst, ptrdiff_t stride, int bs,
|
||||
(void) left;
|
||||
|
||||
for (r = 0; r < bs; r++) {
|
||||
vpx_memset(dst, 128, bs);
|
||||
memset(dst, 128, bs);
|
||||
dst += stride;
|
||||
}
|
||||
}
|
||||
@ -543,7 +543,7 @@ static INLINE void dc_left_predictor(uint8_t *dst, ptrdiff_t stride, int bs,
|
||||
expected_dc = (sum + (bs >> 1)) / bs;
|
||||
|
||||
for (r = 0; r < bs; r++) {
|
||||
vpx_memset(dst, expected_dc, bs);
|
||||
memset(dst, expected_dc, bs);
|
||||
dst += stride;
|
||||
}
|
||||
}
|
||||
@ -559,7 +559,7 @@ static INLINE void dc_top_predictor(uint8_t *dst, ptrdiff_t stride, int bs,
|
||||
expected_dc = (sum + (bs >> 1)) / bs;
|
||||
|
||||
for (r = 0; r < bs; r++) {
|
||||
vpx_memset(dst, expected_dc, bs);
|
||||
memset(dst, expected_dc, bs);
|
||||
dst += stride;
|
||||
}
|
||||
}
|
||||
@ -578,7 +578,7 @@ static INLINE void dc_predictor(uint8_t *dst, ptrdiff_t stride, int bs,
|
||||
expected_dc = (sum + (count >> 1)) / count;
|
||||
|
||||
for (r = 0; r < bs; r++) {
|
||||
vpx_memset(dst, expected_dc, bs);
|
||||
memset(dst, expected_dc, bs);
|
||||
dst += stride;
|
||||
}
|
||||
}
|
||||
@ -830,7 +830,7 @@ static void build_intra_predictors(const MACROBLOCKD *xd, const uint8_t *ref,
|
||||
left_col[i] = ref[i * ref_stride - 1];
|
||||
}
|
||||
} else {
|
||||
vpx_memset(left_col, 129, bs);
|
||||
memset(left_col, 129, bs);
|
||||
}
|
||||
}
|
||||
|
||||
@ -845,8 +845,7 @@ static void build_intra_predictors(const MACROBLOCKD *xd, const uint8_t *ref,
|
||||
} else if (x0 <= frame_width) {
|
||||
const int r = frame_width - x0;
|
||||
memcpy(above_row, above_ref, r);
|
||||
vpx_memset(above_row + r, above_row[r - 1],
|
||||
x0 + bs - frame_width);
|
||||
memset(above_row + r, above_row[r - 1], x0 + bs - frame_width);
|
||||
}
|
||||
} else {
|
||||
/* faster path if the block does not need extension */
|
||||
@ -858,7 +857,7 @@ static void build_intra_predictors(const MACROBLOCKD *xd, const uint8_t *ref,
|
||||
}
|
||||
above_row[-1] = left_available ? above_ref[-1] : 129;
|
||||
} else {
|
||||
vpx_memset(above_row, 127, bs);
|
||||
memset(above_row, 127, bs);
|
||||
above_row[-1] = 127;
|
||||
}
|
||||
}
|
||||
@ -874,23 +873,21 @@ static void build_intra_predictors(const MACROBLOCKD *xd, const uint8_t *ref,
|
||||
memcpy(above_row, above_ref, 2 * bs);
|
||||
} else {
|
||||
memcpy(above_row, above_ref, bs);
|
||||
vpx_memset(above_row + bs, above_row[bs - 1], bs);
|
||||
memset(above_row + bs, above_row[bs - 1], bs);
|
||||
}
|
||||
} else if (x0 + bs <= frame_width) {
|
||||
const int r = frame_width - x0;
|
||||
if (right_available && bs == 4) {
|
||||
memcpy(above_row, above_ref, r);
|
||||
vpx_memset(above_row + r, above_row[r - 1],
|
||||
x0 + 2 * bs - frame_width);
|
||||
memset(above_row + r, above_row[r - 1], x0 + 2 * bs - frame_width);
|
||||
} else {
|
||||
memcpy(above_row, above_ref, bs);
|
||||
vpx_memset(above_row + bs, above_row[bs - 1], bs);
|
||||
memset(above_row + bs, above_row[bs - 1], bs);
|
||||
}
|
||||
} else if (x0 <= frame_width) {
|
||||
const int r = frame_width - x0;
|
||||
memcpy(above_row, above_ref, r);
|
||||
vpx_memset(above_row + r, above_row[r - 1],
|
||||
x0 + 2 * bs - frame_width);
|
||||
memset(above_row + r, above_row[r - 1], x0 + 2 * bs - frame_width);
|
||||
}
|
||||
} else {
|
||||
/* faster path if the block does not need extension */
|
||||
@ -901,12 +898,12 @@ static void build_intra_predictors(const MACROBLOCKD *xd, const uint8_t *ref,
|
||||
if (bs == 4 && right_available)
|
||||
memcpy(above_row + bs, above_ref + bs, bs);
|
||||
else
|
||||
vpx_memset(above_row + bs, above_row[bs - 1], bs);
|
||||
memset(above_row + bs, above_row[bs - 1], bs);
|
||||
}
|
||||
}
|
||||
above_row[-1] = left_available ? above_ref[-1] : 129;
|
||||
} else {
|
||||
vpx_memset(above_row, 127, bs * 2);
|
||||
memset(above_row, 127, bs * 2);
|
||||
above_row[-1] = 127;
|
||||
}
|
||||
}
|
||||
|
@ -175,7 +175,7 @@ static void loop_filter_rows_mt(YV12_BUFFER_CONFIG *frame,
|
||||
}
|
||||
|
||||
// Initialize cur_sb_col to -1 for all SB rows.
|
||||
vpx_memset(lf_sync->cur_sb_col, -1, sizeof(*lf_sync->cur_sb_col) * sb_rows);
|
||||
memset(lf_sync->cur_sb_col, -1, sizeof(*lf_sync->cur_sb_col) * sb_rows);
|
||||
|
||||
// Set up loopfilter thread data.
|
||||
// The decoder is capping num_workers because it has been observed that using
|
||||
|
@ -276,14 +276,14 @@ static void inverse_transform_block(MACROBLOCKD* xd, int plane, int block,
|
||||
#endif // CONFIG_VP9_HIGHBITDEPTH
|
||||
|
||||
if (eob == 1) {
|
||||
vpx_memset(dqcoeff, 0, 2 * sizeof(dqcoeff[0]));
|
||||
memset(dqcoeff, 0, 2 * sizeof(dqcoeff[0]));
|
||||
} else {
|
||||
if (tx_type == DCT_DCT && tx_size <= TX_16X16 && eob <= 10)
|
||||
vpx_memset(dqcoeff, 0, 4 * (4 << tx_size) * sizeof(dqcoeff[0]));
|
||||
memset(dqcoeff, 0, 4 * (4 << tx_size) * sizeof(dqcoeff[0]));
|
||||
else if (tx_size == TX_32X32 && eob <= 34)
|
||||
vpx_memset(dqcoeff, 0, 256 * sizeof(dqcoeff[0]));
|
||||
memset(dqcoeff, 0, 256 * sizeof(dqcoeff[0]));
|
||||
else
|
||||
vpx_memset(dqcoeff, 0, (16 << (tx_size << 1)) * sizeof(dqcoeff[0]));
|
||||
memset(dqcoeff, 0, (16 << (tx_size << 1)) * sizeof(dqcoeff[0]));
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -952,11 +952,11 @@ static const uint8_t *decode_tiles(VP9Decoder *pbi,
|
||||
|
||||
// Note: this memset assumes above_context[0], [1] and [2]
|
||||
// are allocated as part of the same buffer.
|
||||
vpx_memset(cm->above_context, 0,
|
||||
sizeof(*cm->above_context) * MAX_MB_PLANE * 2 * aligned_cols);
|
||||
memset(cm->above_context, 0,
|
||||
sizeof(*cm->above_context) * MAX_MB_PLANE * 2 * aligned_cols);
|
||||
|
||||
vpx_memset(cm->above_seg_context, 0,
|
||||
sizeof(*cm->above_seg_context) * aligned_cols);
|
||||
memset(cm->above_seg_context, 0,
|
||||
sizeof(*cm->above_seg_context) * aligned_cols);
|
||||
|
||||
get_tile_buffers(pbi, data, data_end, tile_cols, tile_rows, tile_buffers);
|
||||
|
||||
@ -1153,10 +1153,10 @@ static const uint8_t *decode_tiles_mt(VP9Decoder *pbi,
|
||||
|
||||
// Note: this memset assumes above_context[0], [1] and [2]
|
||||
// are allocated as part of the same buffer.
|
||||
vpx_memset(cm->above_context, 0,
|
||||
sizeof(*cm->above_context) * MAX_MB_PLANE * 2 * aligned_mi_cols);
|
||||
vpx_memset(cm->above_seg_context, 0,
|
||||
sizeof(*cm->above_seg_context) * aligned_mi_cols);
|
||||
memset(cm->above_context, 0,
|
||||
sizeof(*cm->above_context) * MAX_MB_PLANE * 2 * aligned_mi_cols);
|
||||
memset(cm->above_seg_context, 0,
|
||||
sizeof(*cm->above_seg_context) * aligned_mi_cols);
|
||||
|
||||
// Load tile data into tile_buffers
|
||||
get_tile_buffers(pbi, data, data_end, tile_cols, tile_rows, tile_buffers);
|
||||
@ -1378,7 +1378,7 @@ static size_t read_uncompressed_header(VP9Decoder *pbi,
|
||||
|
||||
setup_frame_size(cm, rb);
|
||||
if (pbi->need_resync) {
|
||||
vpx_memset(&cm->ref_frame_map, -1, sizeof(cm->ref_frame_map));
|
||||
memset(&cm->ref_frame_map, -1, sizeof(cm->ref_frame_map));
|
||||
pbi->need_resync = 0;
|
||||
}
|
||||
} else {
|
||||
@ -1409,7 +1409,7 @@ static size_t read_uncompressed_header(VP9Decoder *pbi,
|
||||
pbi->refresh_frame_flags = vp9_rb_read_literal(rb, REF_FRAMES);
|
||||
setup_frame_size(cm, rb);
|
||||
if (pbi->need_resync) {
|
||||
vpx_memset(&cm->ref_frame_map, -1, sizeof(cm->ref_frame_map));
|
||||
memset(&cm->ref_frame_map, -1, sizeof(cm->ref_frame_map));
|
||||
pbi->need_resync = 0;
|
||||
}
|
||||
} else if (pbi->need_resync != 1) { /* Skip if need resync */
|
||||
|
@ -48,10 +48,10 @@ static void initialize_dec(void) {
|
||||
|
||||
static void vp9_dec_setup_mi(VP9_COMMON *cm) {
|
||||
cm->mi = cm->mip + cm->mi_stride + 1;
|
||||
vpx_memset(cm->mip, 0, cm->mi_stride * (cm->mi_rows + 1) * sizeof(*cm->mip));
|
||||
memset(cm->mip, 0, cm->mi_stride * (cm->mi_rows + 1) * sizeof(*cm->mip));
|
||||
cm->mi_grid_visible = cm->mi_grid_base + cm->mi_stride + 1;
|
||||
vpx_memset(cm->mi_grid_base, 0,
|
||||
cm->mi_stride * (cm->mi_rows + 1) * sizeof(*cm->mi_grid_base));
|
||||
memset(cm->mi_grid_base, 0,
|
||||
cm->mi_stride * (cm->mi_rows + 1) * sizeof(*cm->mi_grid_base));
|
||||
}
|
||||
|
||||
static int vp9_dec_alloc_mi(VP9_COMMON *cm, int mi_size) {
|
||||
@ -99,8 +99,8 @@ VP9Decoder *vp9_decoder_create(BufferPool *const pool) {
|
||||
once(initialize_dec);
|
||||
|
||||
// Initialize the references to not point to any frame buffers.
|
||||
vpx_memset(&cm->ref_frame_map, -1, sizeof(cm->ref_frame_map));
|
||||
vpx_memset(&cm->next_ref_frame_map, -1, sizeof(cm->next_ref_frame_map));
|
||||
memset(&cm->ref_frame_map, -1, sizeof(cm->ref_frame_map));
|
||||
memset(&cm->next_ref_frame_map, -1, sizeof(cm->next_ref_frame_map));
|
||||
|
||||
cm->current_video_frame = 0;
|
||||
pbi->ready_for_new_data = 1;
|
||||
|
@ -111,8 +111,8 @@ void vp9_quantize_fp_neon(const int16_t *coeff_ptr, intptr_t count,
|
||||
*eob_ptr = (uint16_t)vget_lane_s16(v_eobmax_final, 0);
|
||||
}
|
||||
} else {
|
||||
vpx_memset(qcoeff_ptr, 0, count * sizeof(int16_t));
|
||||
vpx_memset(dqcoeff_ptr, 0, count * sizeof(int16_t));
|
||||
memset(qcoeff_ptr, 0, count * sizeof(int16_t));
|
||||
memset(dqcoeff_ptr, 0, count * sizeof(int16_t));
|
||||
*eob_ptr = 0;
|
||||
}
|
||||
}
|
||||
|
@ -55,8 +55,7 @@ void vp9_setup_in_frame_q_adj(VP9_COMP *cpi) {
|
||||
const int aq_strength = get_aq_c_strength(cm->base_qindex, cm->bit_depth);
|
||||
|
||||
// Clear down the segment map.
|
||||
vpx_memset(cpi->segmentation_map, DEFAULT_AQ2_SEG,
|
||||
cm->mi_rows * cm->mi_cols);
|
||||
memset(cpi->segmentation_map, DEFAULT_AQ2_SEG, cm->mi_rows * cm->mi_cols);
|
||||
|
||||
vp9_clearall_segfeatures(seg);
|
||||
|
||||
|
@ -324,7 +324,7 @@ void vp9_cyclic_refresh_update_map(VP9_COMP *const cpi) {
|
||||
unsigned char *const seg_map = cpi->segmentation_map;
|
||||
int i, block_count, bl_index, sb_rows, sb_cols, sbs_in_frame;
|
||||
int xmis, ymis, x, y;
|
||||
vpx_memset(seg_map, CR_SEGMENT_ID_BASE, cm->mi_rows * cm->mi_cols);
|
||||
memset(seg_map, CR_SEGMENT_ID_BASE, cm->mi_rows * cm->mi_cols);
|
||||
sb_cols = (cm->mi_cols + MI_BLOCK_SIZE - 1) / MI_BLOCK_SIZE;
|
||||
sb_rows = (cm->mi_rows + MI_BLOCK_SIZE - 1) / MI_BLOCK_SIZE;
|
||||
sbs_in_frame = sb_cols * sb_rows;
|
||||
@ -411,7 +411,7 @@ void vp9_cyclic_refresh_setup(VP9_COMP *const cpi) {
|
||||
(cpi->svc.spatial_layer_id > 0)) {
|
||||
// Set segmentation map to 0 and disable.
|
||||
unsigned char *const seg_map = cpi->segmentation_map;
|
||||
vpx_memset(seg_map, 0, cm->mi_rows * cm->mi_cols);
|
||||
memset(seg_map, 0, cm->mi_rows * cm->mi_cols);
|
||||
vp9_disable_segmentation(&cm->seg);
|
||||
if (cm->frame_type == KEY_FRAME)
|
||||
cr->sb_index = 0;
|
||||
|
@ -928,8 +928,8 @@ static size_t encode_tiles(VP9_COMP *cpi, uint8_t *data_ptr) {
|
||||
const int tile_cols = 1 << cm->log2_tile_cols;
|
||||
const int tile_rows = 1 << cm->log2_tile_rows;
|
||||
|
||||
vpx_memset(cm->above_seg_context, 0, sizeof(*cm->above_seg_context) *
|
||||
mi_cols_aligned_to_sb(cm->mi_cols));
|
||||
memset(cm->above_seg_context, 0,
|
||||
sizeof(*cm->above_seg_context) * mi_cols_aligned_to_sb(cm->mi_cols));
|
||||
|
||||
for (tile_row = 0; tile_row < tile_rows; tile_row++) {
|
||||
for (tile_col = 0; tile_col < tile_cols; tile_col++) {
|
||||
|
@ -417,8 +417,8 @@ void vp9_fdct8x8_quant_c(const int16_t *input, int stride,
|
||||
(void)quant_shift_ptr;
|
||||
(void)iscan;
|
||||
|
||||
vpx_memset(qcoeff_ptr, 0, n_coeffs * sizeof(*qcoeff_ptr));
|
||||
vpx_memset(dqcoeff_ptr, 0, n_coeffs * sizeof(*dqcoeff_ptr));
|
||||
memset(qcoeff_ptr, 0, n_coeffs * sizeof(*qcoeff_ptr));
|
||||
memset(dqcoeff_ptr, 0, n_coeffs * sizeof(*dqcoeff_ptr));
|
||||
|
||||
if (!skip_block) {
|
||||
// Quantization pass: All coefficients with index >= zero_flag are
|
||||
|
@ -1595,7 +1595,7 @@ static void set_source_var_based_partition(VP9_COMP *cpi,
|
||||
int use32x32 = 0;
|
||||
unsigned int thr = cpi->source_var_thresh;
|
||||
|
||||
vpx_memset(d32, 0, 4 * sizeof(diff));
|
||||
memset(d32, 0, 4 * sizeof(diff));
|
||||
|
||||
for (i = 0; i < 4; i++) {
|
||||
diff *d16[4];
|
||||
@ -2832,8 +2832,8 @@ static void encode_rd_sb_row(VP9_COMP *cpi,
|
||||
int mi_col;
|
||||
|
||||
// Initialize the left context for the new SB row
|
||||
vpx_memset(&xd->left_context, 0, sizeof(xd->left_context));
|
||||
vpx_memset(xd->left_seg_context, 0, sizeof(xd->left_seg_context));
|
||||
memset(&xd->left_context, 0, sizeof(xd->left_context));
|
||||
memset(xd->left_seg_context, 0, sizeof(xd->left_seg_context));
|
||||
|
||||
// Code each SB in the row
|
||||
for (mi_col = tile_info->mi_col_start; mi_col < tile_info->mi_col_end;
|
||||
@ -2917,11 +2917,11 @@ static void init_encode_frame_mb_context(VP9_COMP *cpi) {
|
||||
|
||||
// Note: this memset assumes above_context[0], [1] and [2]
|
||||
// are allocated as part of the same buffer.
|
||||
vpx_memset(xd->above_context[0], 0,
|
||||
sizeof(*xd->above_context[0]) *
|
||||
2 * aligned_mi_cols * MAX_MB_PLANE);
|
||||
vpx_memset(xd->above_seg_context, 0,
|
||||
sizeof(*xd->above_seg_context) * aligned_mi_cols);
|
||||
memset(xd->above_context[0], 0,
|
||||
sizeof(*xd->above_context[0]) *
|
||||
2 * aligned_mi_cols * MAX_MB_PLANE);
|
||||
memset(xd->above_seg_context, 0,
|
||||
sizeof(*xd->above_seg_context) * aligned_mi_cols);
|
||||
}
|
||||
|
||||
static int check_dual_ref_flags(VP9_COMP *cpi) {
|
||||
@ -3594,8 +3594,8 @@ static void encode_nonrd_sb_row(VP9_COMP *cpi,
|
||||
int mi_col;
|
||||
|
||||
// Initialize the left context for the new SB row
|
||||
vpx_memset(&xd->left_context, 0, sizeof(xd->left_context));
|
||||
vpx_memset(xd->left_seg_context, 0, sizeof(xd->left_seg_context));
|
||||
memset(&xd->left_context, 0, sizeof(xd->left_context));
|
||||
memset(xd->left_seg_context, 0, sizeof(xd->left_seg_context));
|
||||
|
||||
// Code each SB in the row
|
||||
for (mi_col = tile_info->mi_col_start; mi_col < tile_info->mi_col_end;
|
||||
@ -3689,7 +3689,7 @@ static int set_var_thresh_from_histogram(VP9_COMP *cpi) {
|
||||
int sum = 0;
|
||||
int i, j;
|
||||
|
||||
vpx_memset(hist, 0, VAR_HIST_BINS * sizeof(hist[0]));
|
||||
memset(hist, 0, VAR_HIST_BINS * sizeof(hist[0]));
|
||||
|
||||
for (i = 0; i < cm->mb_rows; i++) {
|
||||
for (j = 0; j < cm->mb_cols; j++) {
|
||||
@ -4187,7 +4187,7 @@ static void encode_superblock(VP9_COMP *cpi, ThreadData *td,
|
||||
cpi->sf.allow_skip_recode;
|
||||
|
||||
if (!x->skip_recode && !cpi->sf.use_nonrd_pick_mode)
|
||||
vpx_memset(x->skip_txfm, 0, sizeof(x->skip_txfm));
|
||||
memset(x->skip_txfm, 0, sizeof(x->skip_txfm));
|
||||
|
||||
x->skip_optimize = ctx->is_coded;
|
||||
ctx->is_coded = 1;
|
||||
|
@ -319,8 +319,8 @@ static int optimize_b(MACROBLOCK *mb, int plane, int block,
|
||||
UPDATE_RD_COST();
|
||||
best = rd_cost1 < rd_cost0;
|
||||
final_eob = -1;
|
||||
vpx_memset(qcoeff, 0, sizeof(*qcoeff) * (16 << (tx_size * 2)));
|
||||
vpx_memset(dqcoeff, 0, sizeof(*dqcoeff) * (16 << (tx_size * 2)));
|
||||
memset(qcoeff, 0, sizeof(*qcoeff) * (16 << (tx_size * 2)));
|
||||
memset(dqcoeff, 0, sizeof(*dqcoeff) * (16 << (tx_size * 2)));
|
||||
for (i = next; i < eob; i = next) {
|
||||
const int x = tokens[i][best].qc;
|
||||
const int rc = scan[i];
|
||||
|
@ -193,7 +193,7 @@ int vp9_get_active_map(VP9_COMP* cpi,
|
||||
unsigned char* const seg_map_8x8 = cpi->segmentation_map;
|
||||
const int mi_rows = cpi->common.mi_rows;
|
||||
const int mi_cols = cpi->common.mi_cols;
|
||||
vpx_memset(new_map_16x16, !cpi->active_map.enabled, rows * cols);
|
||||
memset(new_map_16x16, !cpi->active_map.enabled, rows * cols);
|
||||
if (cpi->active_map.enabled) {
|
||||
int r, c;
|
||||
for (r = 0; r < mi_rows; ++r) {
|
||||
@ -251,19 +251,19 @@ static void setup_frame(VP9_COMP *cpi) {
|
||||
static void vp9_enc_setup_mi(VP9_COMMON *cm) {
|
||||
int i;
|
||||
cm->mi = cm->mip + cm->mi_stride + 1;
|
||||
vpx_memset(cm->mip, 0, cm->mi_stride * (cm->mi_rows + 1) * sizeof(*cm->mip));
|
||||
memset(cm->mip, 0, cm->mi_stride * (cm->mi_rows + 1) * sizeof(*cm->mip));
|
||||
cm->prev_mi = cm->prev_mip + cm->mi_stride + 1;
|
||||
// Clear top border row
|
||||
vpx_memset(cm->prev_mip, 0, sizeof(*cm->prev_mip) * cm->mi_stride);
|
||||
memset(cm->prev_mip, 0, sizeof(*cm->prev_mip) * cm->mi_stride);
|
||||
// Clear left border column
|
||||
for (i = 1; i < cm->mi_rows + 1; ++i)
|
||||
vpx_memset(&cm->prev_mip[i * cm->mi_stride], 0, sizeof(*cm->prev_mip));
|
||||
memset(&cm->prev_mip[i * cm->mi_stride], 0, sizeof(*cm->prev_mip));
|
||||
|
||||
cm->mi_grid_visible = cm->mi_grid_base + cm->mi_stride + 1;
|
||||
cm->prev_mi_grid_visible = cm->prev_mi_grid_base + cm->mi_stride + 1;
|
||||
|
||||
vpx_memset(cm->mi_grid_base, 0,
|
||||
cm->mi_stride * (cm->mi_rows + 1) * sizeof(*cm->mi_grid_base));
|
||||
memset(cm->mi_grid_base, 0,
|
||||
cm->mi_stride * (cm->mi_rows + 1) * sizeof(*cm->mi_grid_base));
|
||||
}
|
||||
|
||||
static int vp9_enc_alloc_mi(VP9_COMMON *cm, int mi_size) {
|
||||
@ -399,11 +399,11 @@ static void dealloc_compressor_data(VP9_COMP *cpi) {
|
||||
for (i = 0; i < MAX_LAG_BUFFERS; ++i) {
|
||||
vp9_free_frame_buffer(&cpi->svc.scaled_frames[i]);
|
||||
}
|
||||
vpx_memset(&cpi->svc.scaled_frames[0], 0,
|
||||
MAX_LAG_BUFFERS * sizeof(cpi->svc.scaled_frames[0]));
|
||||
memset(&cpi->svc.scaled_frames[0], 0,
|
||||
MAX_LAG_BUFFERS * sizeof(cpi->svc.scaled_frames[0]));
|
||||
|
||||
vp9_free_frame_buffer(&cpi->svc.empty_frame.img);
|
||||
vpx_memset(&cpi->svc.empty_frame, 0, sizeof(cpi->svc.empty_frame));
|
||||
memset(&cpi->svc.empty_frame, 0, sizeof(cpi->svc.empty_frame));
|
||||
}
|
||||
|
||||
static void save_coding_context(VP9_COMP *cpi) {
|
||||
@ -474,7 +474,7 @@ static void configure_static_seg_features(VP9_COMP *cpi) {
|
||||
// Disable and clear down for KF
|
||||
if (cm->frame_type == KEY_FRAME) {
|
||||
// Clear down the global segmentation map
|
||||
vpx_memset(cpi->segmentation_map, 0, cm->mi_rows * cm->mi_cols);
|
||||
memset(cpi->segmentation_map, 0, cm->mi_rows * cm->mi_cols);
|
||||
seg->update_map = 0;
|
||||
seg->update_data = 0;
|
||||
cpi->static_mb_pct = 0;
|
||||
@ -487,7 +487,7 @@ static void configure_static_seg_features(VP9_COMP *cpi) {
|
||||
} else if (cpi->refresh_alt_ref_frame) {
|
||||
// If this is an alt ref frame
|
||||
// Clear down the global segmentation map
|
||||
vpx_memset(cpi->segmentation_map, 0, cm->mi_rows * cm->mi_cols);
|
||||
memset(cpi->segmentation_map, 0, cm->mi_rows * cm->mi_cols);
|
||||
seg->update_map = 0;
|
||||
seg->update_data = 0;
|
||||
cpi->static_mb_pct = 0;
|
||||
@ -548,7 +548,7 @@ static void configure_static_seg_features(VP9_COMP *cpi) {
|
||||
|
||||
vp9_disable_segmentation(seg);
|
||||
|
||||
vpx_memset(cpi->segmentation_map, 0, cm->mi_rows * cm->mi_cols);
|
||||
memset(cpi->segmentation_map, 0, cm->mi_rows * cm->mi_cols);
|
||||
|
||||
seg->update_map = 0;
|
||||
seg->update_data = 0;
|
||||
@ -3515,8 +3515,8 @@ static void encode_frame_to_data_rate(VP9_COMP *cpi,
|
||||
vp9_clear_system_state();
|
||||
|
||||
#if CONFIG_INTERNAL_STATS
|
||||
vpx_memset(cpi->mode_chosen_counts, 0,
|
||||
MAX_MODES * sizeof(*cpi->mode_chosen_counts));
|
||||
memset(cpi->mode_chosen_counts, 0,
|
||||
MAX_MODES * sizeof(*cpi->mode_chosen_counts));
|
||||
#endif
|
||||
|
||||
if (cpi->sf.recode_loop == DISALLOW_RECODE) {
|
||||
|
@ -27,9 +27,9 @@ static void copy_and_extend_plane(const uint8_t *src, int src_pitch,
|
||||
uint8_t *dst_ptr2 = dst + w;
|
||||
|
||||
for (i = 0; i < h; i++) {
|
||||
vpx_memset(dst_ptr1, src_ptr1[0], extend_left);
|
||||
memset(dst_ptr1, src_ptr1[0], extend_left);
|
||||
memcpy(dst_ptr1 + extend_left, src_ptr1, w);
|
||||
vpx_memset(dst_ptr2, src_ptr2[0], extend_right);
|
||||
memset(dst_ptr2, src_ptr2[0], extend_right);
|
||||
src_ptr1 += src_pitch;
|
||||
src_ptr2 += src_pitch;
|
||||
dst_ptr1 += dst_pitch;
|
||||
|
@ -389,9 +389,8 @@ void vp9_update_mbgraph_stats(VP9_COMP *cpi) {
|
||||
cpi->mbgraph_n_frames = n_frames;
|
||||
for (i = 0; i < n_frames; i++) {
|
||||
MBGRAPH_FRAME_STATS *frame_stats = &cpi->mbgraph_stats[i];
|
||||
vpx_memset(frame_stats->mb_stats, 0,
|
||||
cm->mb_rows * cm->mb_cols *
|
||||
sizeof(*cpi->mbgraph_stats[i].mb_stats));
|
||||
memset(frame_stats->mb_stats, 0,
|
||||
cm->mb_rows * cm->mb_cols * sizeof(*cpi->mbgraph_stats[i].mb_stats));
|
||||
}
|
||||
|
||||
// do motion search to find contribution of each reference to data
|
||||
|
@ -81,7 +81,7 @@ static int search_filter_level(const YV12_BUFFER_CONFIG *sd, VP9_COMP *cpi,
|
||||
int64_t ss_err[MAX_LOOP_FILTER + 1];
|
||||
|
||||
// Set each entry to -1
|
||||
vpx_memset(ss_err, 0xFF, sizeof(ss_err));
|
||||
memset(ss_err, 0xFF, sizeof(ss_err));
|
||||
|
||||
// Make a copy of the unfiltered / processed recon buffer
|
||||
vpx_yv12_copy_y(cm->frame_to_show, &cpi->last_frame_uf);
|
||||
|
@ -51,7 +51,7 @@ static int mv_refs_rt(const VP9_COMMON *cm, const MACROBLOCKD *xd,
|
||||
int const_motion = 0;
|
||||
|
||||
// Blank the reference vector list
|
||||
vpx_memset(mv_ref_list, 0, sizeof(*mv_ref_list) * MAX_MV_REF_CANDIDATES);
|
||||
memset(mv_ref_list, 0, sizeof(*mv_ref_list) * MAX_MV_REF_CANDIDATES);
|
||||
|
||||
// The nearest 2 blocks are treated differently
|
||||
// if the size < 8x8 we get the mv from the bmi substructure,
|
||||
@ -957,7 +957,7 @@ void vp9_pick_intra_mode(VP9_COMP *cpi, MACROBLOCK *x, RD_COST *rd_cost,
|
||||
mbmi->ref_frame[0] = INTRA_FRAME;
|
||||
mbmi->mv[0].as_int = INVALID_MV;
|
||||
mbmi->uv_mode = DC_PRED;
|
||||
vpx_memset(x->skip_txfm, 0, sizeof(x->skip_txfm));
|
||||
memset(x->skip_txfm, 0, sizeof(x->skip_txfm));
|
||||
|
||||
// Change the limit of this loop to add other intra prediction
|
||||
// mode tests.
|
||||
|
@ -30,8 +30,8 @@ void vp9_quantize_dc(const tran_low_t *coeff_ptr,
|
||||
const int abs_coeff = (coeff ^ coeff_sign) - coeff_sign;
|
||||
int tmp, eob = -1;
|
||||
|
||||
vpx_memset(qcoeff_ptr, 0, n_coeffs * sizeof(*qcoeff_ptr));
|
||||
vpx_memset(dqcoeff_ptr, 0, n_coeffs * sizeof(*dqcoeff_ptr));
|
||||
memset(qcoeff_ptr, 0, n_coeffs * sizeof(*qcoeff_ptr));
|
||||
memset(dqcoeff_ptr, 0, n_coeffs * sizeof(*dqcoeff_ptr));
|
||||
|
||||
if (!skip_block) {
|
||||
tmp = clamp(abs_coeff + round_ptr[rc != 0], INT16_MIN, INT16_MAX);
|
||||
@ -52,8 +52,8 @@ void vp9_highbd_quantize_dc(const tran_low_t *coeff_ptr,
|
||||
const int16_t dequant_ptr, uint16_t *eob_ptr) {
|
||||
int eob = -1;
|
||||
|
||||
vpx_memset(qcoeff_ptr, 0, n_coeffs * sizeof(*qcoeff_ptr));
|
||||
vpx_memset(dqcoeff_ptr, 0, n_coeffs * sizeof(*dqcoeff_ptr));
|
||||
memset(qcoeff_ptr, 0, n_coeffs * sizeof(*qcoeff_ptr));
|
||||
memset(dqcoeff_ptr, 0, n_coeffs * sizeof(*dqcoeff_ptr));
|
||||
|
||||
if (!skip_block) {
|
||||
const int rc = 0;
|
||||
@ -84,8 +84,8 @@ void vp9_quantize_dc_32x32(const tran_low_t *coeff_ptr, int skip_block,
|
||||
const int abs_coeff = (coeff ^ coeff_sign) - coeff_sign;
|
||||
int tmp, eob = -1;
|
||||
|
||||
vpx_memset(qcoeff_ptr, 0, n_coeffs * sizeof(*qcoeff_ptr));
|
||||
vpx_memset(dqcoeff_ptr, 0, n_coeffs * sizeof(*dqcoeff_ptr));
|
||||
memset(qcoeff_ptr, 0, n_coeffs * sizeof(*qcoeff_ptr));
|
||||
memset(dqcoeff_ptr, 0, n_coeffs * sizeof(*dqcoeff_ptr));
|
||||
|
||||
if (!skip_block) {
|
||||
|
||||
@ -112,8 +112,8 @@ void vp9_highbd_quantize_dc_32x32(const tran_low_t *coeff_ptr,
|
||||
const int n_coeffs = 1024;
|
||||
int eob = -1;
|
||||
|
||||
vpx_memset(qcoeff_ptr, 0, n_coeffs * sizeof(*qcoeff_ptr));
|
||||
vpx_memset(dqcoeff_ptr, 0, n_coeffs * sizeof(*dqcoeff_ptr));
|
||||
memset(qcoeff_ptr, 0, n_coeffs * sizeof(*qcoeff_ptr));
|
||||
memset(dqcoeff_ptr, 0, n_coeffs * sizeof(*dqcoeff_ptr));
|
||||
|
||||
if (!skip_block) {
|
||||
const int rc = 0;
|
||||
@ -148,8 +148,8 @@ void vp9_quantize_fp_c(const tran_low_t *coeff_ptr, intptr_t n_coeffs,
|
||||
(void)quant_shift_ptr;
|
||||
(void)iscan;
|
||||
|
||||
vpx_memset(qcoeff_ptr, 0, n_coeffs * sizeof(*qcoeff_ptr));
|
||||
vpx_memset(dqcoeff_ptr, 0, n_coeffs * sizeof(*dqcoeff_ptr));
|
||||
memset(qcoeff_ptr, 0, n_coeffs * sizeof(*qcoeff_ptr));
|
||||
memset(dqcoeff_ptr, 0, n_coeffs * sizeof(*dqcoeff_ptr));
|
||||
|
||||
if (!skip_block) {
|
||||
// Quantization pass: All coefficients with index >= zero_flag are
|
||||
@ -195,8 +195,8 @@ void vp9_highbd_quantize_fp_c(const tran_low_t *coeff_ptr,
|
||||
(void)quant_shift_ptr;
|
||||
(void)iscan;
|
||||
|
||||
vpx_memset(qcoeff_ptr, 0, count * sizeof(*qcoeff_ptr));
|
||||
vpx_memset(dqcoeff_ptr, 0, count * sizeof(*dqcoeff_ptr));
|
||||
memset(qcoeff_ptr, 0, count * sizeof(*qcoeff_ptr));
|
||||
memset(dqcoeff_ptr, 0, count * sizeof(*dqcoeff_ptr));
|
||||
|
||||
if (!skip_block) {
|
||||
// Quantization pass: All coefficients with index >= zero_flag are
|
||||
@ -238,8 +238,8 @@ void vp9_quantize_fp_32x32_c(const tran_low_t *coeff_ptr, intptr_t n_coeffs,
|
||||
(void)quant_shift_ptr;
|
||||
(void)iscan;
|
||||
|
||||
vpx_memset(qcoeff_ptr, 0, n_coeffs * sizeof(*qcoeff_ptr));
|
||||
vpx_memset(dqcoeff_ptr, 0, n_coeffs * sizeof(*dqcoeff_ptr));
|
||||
memset(qcoeff_ptr, 0, n_coeffs * sizeof(*qcoeff_ptr));
|
||||
memset(dqcoeff_ptr, 0, n_coeffs * sizeof(*dqcoeff_ptr));
|
||||
|
||||
if (!skip_block) {
|
||||
for (i = 0; i < n_coeffs; i++) {
|
||||
@ -281,8 +281,8 @@ void vp9_highbd_quantize_fp_32x32_c(const tran_low_t *coeff_ptr,
|
||||
(void)quant_shift_ptr;
|
||||
(void)iscan;
|
||||
|
||||
vpx_memset(qcoeff_ptr, 0, n_coeffs * sizeof(*qcoeff_ptr));
|
||||
vpx_memset(dqcoeff_ptr, 0, n_coeffs * sizeof(*dqcoeff_ptr));
|
||||
memset(qcoeff_ptr, 0, n_coeffs * sizeof(*qcoeff_ptr));
|
||||
memset(dqcoeff_ptr, 0, n_coeffs * sizeof(*dqcoeff_ptr));
|
||||
|
||||
if (!skip_block) {
|
||||
for (i = 0; i < n_coeffs; i++) {
|
||||
@ -321,8 +321,8 @@ void vp9_quantize_b_c(const tran_low_t *coeff_ptr, intptr_t n_coeffs,
|
||||
const int nzbins[2] = {zbins[0] * -1, zbins[1] * -1};
|
||||
(void)iscan;
|
||||
|
||||
vpx_memset(qcoeff_ptr, 0, n_coeffs * sizeof(*qcoeff_ptr));
|
||||
vpx_memset(dqcoeff_ptr, 0, n_coeffs * sizeof(*dqcoeff_ptr));
|
||||
memset(qcoeff_ptr, 0, n_coeffs * sizeof(*qcoeff_ptr));
|
||||
memset(dqcoeff_ptr, 0, n_coeffs * sizeof(*dqcoeff_ptr));
|
||||
|
||||
if (!skip_block) {
|
||||
// Pre-scan pass
|
||||
@ -373,8 +373,8 @@ void vp9_highbd_quantize_b_c(const tran_low_t *coeff_ptr, intptr_t n_coeffs,
|
||||
const int nzbins[2] = {zbins[0] * -1, zbins[1] * -1};
|
||||
(void)iscan;
|
||||
|
||||
vpx_memset(qcoeff_ptr, 0, n_coeffs * sizeof(*qcoeff_ptr));
|
||||
vpx_memset(dqcoeff_ptr, 0, n_coeffs * sizeof(*dqcoeff_ptr));
|
||||
memset(qcoeff_ptr, 0, n_coeffs * sizeof(*qcoeff_ptr));
|
||||
memset(dqcoeff_ptr, 0, n_coeffs * sizeof(*dqcoeff_ptr));
|
||||
|
||||
if (!skip_block) {
|
||||
// Pre-scan pass
|
||||
@ -431,8 +431,8 @@ void vp9_quantize_b_32x32_c(const tran_low_t *coeff_ptr, intptr_t n_coeffs,
|
||||
int i, eob = -1;
|
||||
(void)iscan;
|
||||
|
||||
vpx_memset(qcoeff_ptr, 0, n_coeffs * sizeof(*qcoeff_ptr));
|
||||
vpx_memset(dqcoeff_ptr, 0, n_coeffs * sizeof(*dqcoeff_ptr));
|
||||
memset(qcoeff_ptr, 0, n_coeffs * sizeof(*qcoeff_ptr));
|
||||
memset(dqcoeff_ptr, 0, n_coeffs * sizeof(*dqcoeff_ptr));
|
||||
|
||||
if (!skip_block) {
|
||||
// Pre-scan pass
|
||||
@ -490,8 +490,8 @@ void vp9_highbd_quantize_b_32x32_c(const tran_low_t *coeff_ptr,
|
||||
int i, eob = -1;
|
||||
(void)iscan;
|
||||
|
||||
vpx_memset(qcoeff_ptr, 0, n_coeffs * sizeof(*qcoeff_ptr));
|
||||
vpx_memset(dqcoeff_ptr, 0, n_coeffs * sizeof(*dqcoeff_ptr));
|
||||
memset(qcoeff_ptr, 0, n_coeffs * sizeof(*qcoeff_ptr));
|
||||
memset(dqcoeff_ptr, 0, n_coeffs * sizeof(*dqcoeff_ptr));
|
||||
|
||||
if (!skip_block) {
|
||||
// Pre-scan pass
|
||||
|
@ -728,7 +728,7 @@ static void super_block_yrd(VP9_COMP *cpi, MACROBLOCK *x, int *rate,
|
||||
assert(bs == xd->mi[0]->mbmi.sb_type);
|
||||
|
||||
if (cpi->sf.tx_size_search_method == USE_LARGESTALL || xd->lossless) {
|
||||
vpx_memset(txfm_cache, 0, TX_MODES * sizeof(int64_t));
|
||||
memset(txfm_cache, 0, TX_MODES * sizeof(int64_t));
|
||||
choose_largest_tx_size(cpi, x, rate, distortion, skip, ret_sse, ref_best_rd,
|
||||
bs);
|
||||
} else {
|
||||
@ -1084,7 +1084,7 @@ static int64_t rd_pick_intra_sby_mode(VP9_COMP *cpi, MACROBLOCK *x,
|
||||
for (i = 0; i < TX_MODES; i++)
|
||||
tx_cache[i] = INT64_MAX;
|
||||
|
||||
vpx_memset(x->skip_txfm, 0, sizeof(x->skip_txfm));
|
||||
memset(x->skip_txfm, 0, sizeof(x->skip_txfm));
|
||||
/* Y Search for intra prediction mode */
|
||||
for (mode = DC_PRED; mode <= TM_PRED; mode++) {
|
||||
int64_t local_tx_cache[TX_MODES];
|
||||
@ -1201,7 +1201,7 @@ static int64_t rd_pick_intra_sbuv_mode(VP9_COMP *cpi, MACROBLOCK *x,
|
||||
int this_rate_tokenonly, this_rate, s;
|
||||
int64_t this_distortion, this_sse;
|
||||
|
||||
vpx_memset(x->skip_txfm, 0, sizeof(x->skip_txfm));
|
||||
memset(x->skip_txfm, 0, sizeof(x->skip_txfm));
|
||||
for (mode = DC_PRED; mode <= TM_PRED; ++mode) {
|
||||
if (!(cpi->sf.intra_uv_mode_mask[max_tx_size] & (1 << mode)))
|
||||
continue;
|
||||
@ -1239,7 +1239,7 @@ static int64_t rd_sbuv_dcpred(const VP9_COMP *cpi, MACROBLOCK *x,
|
||||
int64_t unused;
|
||||
|
||||
x->e_mbd.mi[0]->mbmi.uv_mode = DC_PRED;
|
||||
vpx_memset(x->skip_txfm, 0, sizeof(x->skip_txfm));
|
||||
memset(x->skip_txfm, 0, sizeof(x->skip_txfm));
|
||||
super_block_uvrd(cpi, x, rate_tokenonly, distortion,
|
||||
skippable, &unused, bsize, INT64_MAX);
|
||||
*rate = *rate_tokenonly + cpi->intra_uv_mode_cost[cm->frame_type][DC_PRED];
|
||||
@ -2120,8 +2120,8 @@ static void estimate_ref_frame_costs(const VP9_COMMON *cm,
|
||||
int seg_ref_active = vp9_segfeature_active(&cm->seg, segment_id,
|
||||
SEG_LVL_REF_FRAME);
|
||||
if (seg_ref_active) {
|
||||
vpx_memset(ref_costs_single, 0, MAX_REF_FRAMES * sizeof(*ref_costs_single));
|
||||
vpx_memset(ref_costs_comp, 0, MAX_REF_FRAMES * sizeof(*ref_costs_comp));
|
||||
memset(ref_costs_single, 0, MAX_REF_FRAMES * sizeof(*ref_costs_single));
|
||||
memset(ref_costs_comp, 0, MAX_REF_FRAMES * sizeof(*ref_costs_comp));
|
||||
*comp_mode_p = 128;
|
||||
} else {
|
||||
vp9_prob intra_inter_p = vp9_get_intra_inter_prob(cm, xd);
|
||||
@ -2700,7 +2700,7 @@ static int64_t handle_inter_mode(VP9_COMP *cpi, MACROBLOCK *x,
|
||||
if (is_comp_pred)
|
||||
if (single_skippable[this_mode][refs[0]] &&
|
||||
single_skippable[this_mode][refs[1]])
|
||||
vpx_memset(skip_txfm, 1, sizeof(skip_txfm));
|
||||
memset(skip_txfm, 1, sizeof(skip_txfm));
|
||||
|
||||
if (cpi->sf.use_rd_breakout && ref_best_rd < INT64_MAX) {
|
||||
// if current pred_error modeled rd is substantially more than the best
|
||||
@ -3265,7 +3265,7 @@ void vp9_rd_pick_inter_mode_sb(VP9_COMP *cpi,
|
||||
if (ref_frame == INTRA_FRAME) {
|
||||
TX_SIZE uv_tx;
|
||||
struct macroblockd_plane *const pd = &xd->plane[1];
|
||||
vpx_memset(x->skip_txfm, 0, sizeof(x->skip_txfm));
|
||||
memset(x->skip_txfm, 0, sizeof(x->skip_txfm));
|
||||
super_block_yrd(cpi, x, &rate_y, &distortion_y, &skippable,
|
||||
NULL, bsize, tx_cache, best_rd);
|
||||
if (rate_y == INT_MAX)
|
||||
@ -3750,7 +3750,7 @@ void vp9_rd_pick_inter_mode_sub8x8(VP9_COMP *cpi,
|
||||
int64_t filter_cache[SWITCHABLE_FILTER_CONTEXTS];
|
||||
|
||||
x->skip_encode = sf->skip_encode_frame && x->q_index < QIDX_SKIP_THRESH;
|
||||
vpx_memset(x->zcoeff_blk[TX_4X4], 0, 4);
|
||||
memset(x->zcoeff_blk[TX_4X4], 0, 4);
|
||||
vp9_zero(best_mbmode);
|
||||
|
||||
for (i = 0; i < SWITCHABLE_FILTER_CONTEXTS; ++i)
|
||||
@ -4074,7 +4074,7 @@ void vp9_rd_pick_inter_mode_sub8x8(VP9_COMP *cpi,
|
||||
// then dont bother looking at UV
|
||||
vp9_build_inter_predictors_sbuv(&x->e_mbd, mi_row, mi_col,
|
||||
BLOCK_8X8);
|
||||
vpx_memset(x->skip_txfm, 0, sizeof(x->skip_txfm));
|
||||
memset(x->skip_txfm, 0, sizeof(x->skip_txfm));
|
||||
if (!super_block_uvrd(cpi, x, &rate_uv, &distortion_uv, &uv_skippable,
|
||||
&uv_sse, BLOCK_8X8, tmp_best_rdu))
|
||||
continue;
|
||||
|
@ -213,8 +213,8 @@ void vp9_choose_segmap_coding_method(VP9_COMMON *cm, MACROBLOCKD *xd) {
|
||||
|
||||
// Set default state for the segment tree probabilities and the
|
||||
// temporal coding probabilities
|
||||
vpx_memset(seg->tree_probs, 255, sizeof(seg->tree_probs));
|
||||
vpx_memset(seg->pred_probs, 255, sizeof(seg->pred_probs));
|
||||
memset(seg->tree_probs, 255, sizeof(seg->tree_probs));
|
||||
memset(seg->pred_probs, 255, sizeof(seg->pred_probs));
|
||||
|
||||
// First of all generate stats regarding how well the last segment map
|
||||
// predicts this one
|
||||
@ -276,6 +276,6 @@ void vp9_reset_segment_features(struct segmentation *seg) {
|
||||
seg->enabled = 0;
|
||||
seg->update_map = 0;
|
||||
seg->update_data = 0;
|
||||
vpx_memset(seg->tree_probs, 255, sizeof(seg->tree_probs));
|
||||
memset(seg->tree_probs, 255, sizeof(seg->tree_probs));
|
||||
vp9_clearall_segfeatures(seg);
|
||||
}
|
||||
|
@ -60,14 +60,14 @@ void vp9_compute_skin_map(VP9_COMP *const cpi, FILE *yuv_skinmap_file) {
|
||||
const int src_ystride = cpi->Source->y_stride;
|
||||
const int src_uvstride = cpi->Source->uv_stride;
|
||||
YV12_BUFFER_CONFIG skinmap;
|
||||
vpx_memset(&skinmap, 0, sizeof(YV12_BUFFER_CONFIG));
|
||||
memset(&skinmap, 0, sizeof(YV12_BUFFER_CONFIG));
|
||||
if (vp9_alloc_frame_buffer(&skinmap, cm->width, cm->height,
|
||||
cm->subsampling_x, cm->subsampling_y,
|
||||
VP9_ENC_BORDER_IN_PIXELS, cm->byte_alignment)) {
|
||||
vp9_free_frame_buffer(&skinmap);
|
||||
return;
|
||||
}
|
||||
vpx_memset(skinmap.buffer_alloc, 128, skinmap.frame_size);
|
||||
memset(skinmap.buffer_alloc, 128, skinmap.frame_size);
|
||||
y = skinmap.y_buffer;
|
||||
// Loop through 8x8 blocks and set skin map based on center pixel of block.
|
||||
// Set y to white for skin block, otherwise set to source with gray scale.
|
||||
|
@ -46,8 +46,8 @@ void vp9_init_layer_context(VP9_COMP *const cpi) {
|
||||
"Failed to allocate empty frame for multiple frame "
|
||||
"contexts");
|
||||
|
||||
vpx_memset(cpi->svc.empty_frame.img.buffer_alloc, 0x80,
|
||||
cpi->svc.empty_frame.img.buffer_alloc_sz);
|
||||
memset(cpi->svc.empty_frame.img.buffer_alloc, 0x80,
|
||||
cpi->svc.empty_frame.img.buffer_alloc_sz);
|
||||
cpi->svc.empty_frame_width = cpi->common.width;
|
||||
cpi->svc.empty_frame_height = cpi->common.height;
|
||||
}
|
||||
|
@ -329,8 +329,8 @@ static void temporal_filter_iterate_c(VP9_COMP *cpi,
|
||||
int i, j, k;
|
||||
int stride;
|
||||
|
||||
vpx_memset(accumulator, 0, 16 * 16 * 3 * sizeof(accumulator[0]));
|
||||
vpx_memset(count, 0, 16 * 16 * 3 * sizeof(count[0]));
|
||||
memset(accumulator, 0, 16 * 16 * 3 * sizeof(accumulator[0]));
|
||||
memset(count, 0, 16 * 16 * 3 * sizeof(count[0]));
|
||||
|
||||
cpi->td.mb.mv_col_min = -((mb_col * 16) + (17 - 2 * VP9_INTERP_EXTEND));
|
||||
cpi->td.mb.mv_col_max = ((mb_cols - 1 - mb_col) * 16)
|
||||
|
@ -44,8 +44,8 @@ void vp9_highbd_quantize_b_sse2(const tran_low_t *coeff_ptr,
|
||||
|
||||
(void)scan;
|
||||
|
||||
vpx_memset(qcoeff_ptr, 0, count * sizeof(*qcoeff_ptr));
|
||||
vpx_memset(dqcoeff_ptr, 0, count * sizeof(*dqcoeff_ptr));
|
||||
memset(qcoeff_ptr, 0, count * sizeof(*qcoeff_ptr));
|
||||
memset(dqcoeff_ptr, 0, count * sizeof(*dqcoeff_ptr));
|
||||
|
||||
if (!skip_block) {
|
||||
// Pre-scan pass
|
||||
@ -132,8 +132,8 @@ void vp9_highbd_quantize_b_32x32_sse2(const tran_low_t *coeff_ptr,
|
||||
nzbins[0] = _mm_sub_epi32(nzbins[0], zbins[0]);
|
||||
nzbins[1] = _mm_sub_epi32(nzbins[1], zbins[1]);
|
||||
|
||||
vpx_memset(qcoeff_ptr, 0, n_coeffs * sizeof(*qcoeff_ptr));
|
||||
vpx_memset(dqcoeff_ptr, 0, n_coeffs * sizeof(*dqcoeff_ptr));
|
||||
memset(qcoeff_ptr, 0, n_coeffs * sizeof(*qcoeff_ptr));
|
||||
memset(dqcoeff_ptr, 0, n_coeffs * sizeof(*dqcoeff_ptr));
|
||||
|
||||
if (!skip_block) {
|
||||
// Pre-scan pass
|
||||
|
@ -91,10 +91,6 @@ void vpx_free(void *memblk) {
|
||||
}
|
||||
}
|
||||
|
||||
void *vpx_memset(void *dest, int val, size_t length) {
|
||||
return memset(dest, val, length);
|
||||
}
|
||||
|
||||
#if CONFIG_VP9 && CONFIG_VP9_HIGHBITDEPTH
|
||||
void *vpx_memset16(void *dest, int val, size_t length) {
|
||||
int i;
|
||||
|
@ -30,15 +30,11 @@ extern "C" {
|
||||
void *vpx_realloc(void *memblk, size_t size);
|
||||
void vpx_free(void *memblk);
|
||||
|
||||
void *vpx_memset(void *dest, int val, size_t length);
|
||||
#if CONFIG_VP9 && CONFIG_VP9_HIGHBITDEPTH
|
||||
void *vpx_memset16(void *dest, int val, size_t length);
|
||||
#endif
|
||||
|
||||
#ifndef __VPX_MEM_C__
|
||||
# include <string.h>
|
||||
# define vpx_memset memset
|
||||
#endif
|
||||
#include <string.h>
|
||||
|
||||
#ifdef VPX_MEM_PLTFRM
|
||||
# include VPX_MEM_PLTFRM
|
||||
|
@ -498,7 +498,7 @@ void vpx_scale_frame
|
||||
|
||||
if (dw < (int)dst->y_width)
|
||||
for (i = 0; i < dh; i++)
|
||||
vpx_memset(dst->y_buffer + i * dst->y_stride + dw - 1, dst->y_buffer[i * dst->y_stride + dw - 2], dst->y_width - dw + 1);
|
||||
memset(dst->y_buffer + i * dst->y_stride + dw - 1, dst->y_buffer[i * dst->y_stride + dw - 2], dst->y_width - dw + 1);
|
||||
|
||||
if (dh < (int)dst->y_height)
|
||||
for (i = dh - 1; i < (int)dst->y_height; i++)
|
||||
@ -510,7 +510,7 @@ void vpx_scale_frame
|
||||
|
||||
if (dw / 2 < (int)dst->uv_width)
|
||||
for (i = 0; i < dst->uv_height; i++)
|
||||
vpx_memset(dst->u_buffer + i * dst->uv_stride + dw / 2 - 1, dst->u_buffer[i * dst->uv_stride + dw / 2 - 2], dst->uv_width - dw / 2 + 1);
|
||||
memset(dst->u_buffer + i * dst->uv_stride + dw / 2 - 1, dst->u_buffer[i * dst->uv_stride + dw / 2 - 2], dst->uv_width - dw / 2 + 1);
|
||||
|
||||
if (dh / 2 < (int)dst->uv_height)
|
||||
for (i = dh / 2 - 1; i < (int)dst->y_height / 2; i++)
|
||||
@ -522,7 +522,7 @@ void vpx_scale_frame
|
||||
|
||||
if (dw / 2 < (int)dst->uv_width)
|
||||
for (i = 0; i < dst->uv_height; i++)
|
||||
vpx_memset(dst->v_buffer + i * dst->uv_stride + dw / 2 - 1, dst->v_buffer[i * dst->uv_stride + dw / 2 - 2], dst->uv_width - dw / 2 + 1);
|
||||
memset(dst->v_buffer + i * dst->uv_stride + dw / 2 - 1, dst->v_buffer[i * dst->uv_stride + dw / 2 - 2], dst->uv_width - dw / 2 + 1);
|
||||
|
||||
if (dh / 2 < (int) dst->uv_height)
|
||||
for (i = dh / 2 - 1; i < (int)dst->y_height / 2; i++)
|
||||
|
@ -38,7 +38,7 @@ vp8_yv12_de_alloc_frame_buffer(YV12_BUFFER_CONFIG *ybf) {
|
||||
/* buffer_alloc isn't accessed by most functions. Rather y_buffer,
|
||||
u_buffer and v_buffer point to buffer_alloc and are used. Clear out
|
||||
all of this so that a freed pointer isn't inadvertently used */
|
||||
vpx_memset(ybf, 0, sizeof(YV12_BUFFER_CONFIG));
|
||||
memset(ybf, 0, sizeof(YV12_BUFFER_CONFIG));
|
||||
} else {
|
||||
return -1;
|
||||
}
|
||||
@ -128,7 +128,7 @@ int vp9_free_frame_buffer(YV12_BUFFER_CONFIG *ybf) {
|
||||
/* buffer_alloc isn't accessed by most functions. Rather y_buffer,
|
||||
u_buffer and v_buffer point to buffer_alloc and are used. Clear out
|
||||
all of this so that a freed pointer isn't inadvertently used */
|
||||
vpx_memset(ybf, 0, sizeof(YV12_BUFFER_CONFIG));
|
||||
memset(ybf, 0, sizeof(YV12_BUFFER_CONFIG));
|
||||
} else {
|
||||
return -1;
|
||||
}
|
||||
@ -222,7 +222,7 @@ int vp9_realloc_frame_buffer(YV12_BUFFER_CONFIG *ybf,
|
||||
// This memset is needed for fixing valgrind error from C loop filter
|
||||
// due to access uninitialized memory in frame border. It could be
|
||||
// removed if border is totally removed.
|
||||
vpx_memset(ybf->buffer_alloc, 0, ybf->buffer_alloc_sz);
|
||||
memset(ybf->buffer_alloc, 0, ybf->buffer_alloc_sz);
|
||||
}
|
||||
|
||||
/* Only support allocating buffers that have a border that's a multiple
|
||||
|
@ -31,8 +31,8 @@ static void extend_plane(uint8_t *const src, int src_stride,
|
||||
uint8_t *dst_ptr2 = src + width;
|
||||
|
||||
for (i = 0; i < height; ++i) {
|
||||
vpx_memset(dst_ptr1, src_ptr1[0], extend_left);
|
||||
vpx_memset(dst_ptr2, src_ptr2[0], extend_right);
|
||||
memset(dst_ptr1, src_ptr1[0], extend_left);
|
||||
memset(dst_ptr2, src_ptr2[0], extend_right);
|
||||
src_ptr1 += src_stride;
|
||||
src_ptr2 += src_stride;
|
||||
dst_ptr1 += src_stride;
|
||||
|
Loading…
x
Reference in New Issue
Block a user