Skip to content

Commit e1a83f1

Browse files
committed
1 parent 9c377ea commit e1a83f1

112 files changed

Lines changed: 360 additions & 360 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

examples/set_maps.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,7 @@ static void set_roi_map(const vpx_codec_enc_cfg_t *cfg,
6464
vpx_codec_ctx_t *codec) {
6565
unsigned int i;
6666
vpx_roi_map_t roi;
67-
memset(&roi, 0, sizeof(roi));
67+
bzero(&roi, sizeof(roi));
6868

6969
roi.rows = (cfg->g_h + 15) / 16;
7070
roi.cols = (cfg->g_w + 15) / 16;
@@ -166,7 +166,7 @@ int main(int argc, char **argv) {
166166
exec_name = argv[0];
167167
if (argc != 6) die("Invalid number of arguments");
168168

169-
memset(&info, 0, sizeof(info));
169+
bzero(&info, sizeof(info));
170170

171171
encoder = get_vpx_encoder_by_name(argv[1]);
172172
if (encoder == NULL) {

examples/svc_encodeframe.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -84,7 +84,7 @@ static SvcInternal_t *get_svc_internal(SvcContext *svc_ctx) {
8484
if (svc_ctx->internal == NULL) {
8585
SvcInternal_t *const si = (SvcInternal_t *)malloc(sizeof(*si));
8686
if (si != NULL) {
87-
memset(si, 0, sizeof(*si));
87+
bzero(si, sizeof(*si));
8888
}
8989
svc_ctx->internal = si;
9090
}

examples/vp9_spatial_svc_encoder.c

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -900,11 +900,11 @@ int main(int argc, const char **argv) {
900900
int mismatch_seen = 0;
901901
vpx_codec_ctx_t decoder;
902902
#endif
903-
memset(&svc_ctx, 0, sizeof(svc_ctx));
904-
memset(&app_input, 0, sizeof(AppInput));
905-
memset(&info, 0, sizeof(VpxVideoInfo));
906-
memset(&layer_id, 0, sizeof(vpx_svc_layer_id_t));
907-
memset(&rc, 0, sizeof(struct RateControlStats));
903+
bzero(&svc_ctx, sizeof(svc_ctx));
904+
bzero(&app_input, sizeof(AppInput));
905+
bzero(&info, sizeof(VpxVideoInfo));
906+
bzero(&layer_id, sizeof(vpx_svc_layer_id_t));
907+
bzero(&rc, sizeof(struct RateControlStats));
908908
exec_name = argv[0];
909909

910910
/* Setup default input stream settings */

examples/vpx_temporal_svc_encoder.c

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@
3030

3131
#define ROI_MAP 0
3232

33-
#define zero(Dest) memset(&(Dest), 0, sizeof(Dest))
33+
#define zero(Dest) bzero(&(Dest), sizeof(Dest))
3434

3535
static const char *exec_name;
3636

@@ -671,8 +671,8 @@ int main(int argc, char **argv) {
671671
int *prev_mask_map;
672672
#endif
673673
zero(rc.layer_target_bitrate);
674-
memset(&layer_id, 0, sizeof(vpx_svc_layer_id_t));
675-
memset(&input_ctx, 0, sizeof(input_ctx));
674+
bzero(&layer_id, sizeof(vpx_svc_layer_id_t));
675+
bzero(&input_ctx, sizeof(input_ctx));
676676
/* Setup default input stream settings */
677677
input_ctx.framerate.numerator = 30;
678678
input_ctx.framerate.denominator = 1;
@@ -898,7 +898,7 @@ int main(int argc, char **argv) {
898898
#endif
899899
} else if (strncmp(encoder->name, "vp9", 3) == 0) {
900900
vpx_svc_extra_cfg_t svc_params;
901-
memset(&svc_params, 0, sizeof(svc_params));
901+
bzero(&svc_params, sizeof(svc_params));
902902
vpx_codec_control(&codec, VP9E_SET_POSTENCODE_DROP, 0);
903903
vpx_codec_control(&codec, VP9E_SET_DISABLE_OVERSHOOT_MAXQ_CBR, 0);
904904
vpx_codec_control(&codec, VP8E_SET_CPUUSED, speed);

md5_utils.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -112,14 +112,14 @@ void MD5Final(md5byte digest[16], struct MD5Context *ctx) {
112112
count = 56 - 1 - count;
113113

114114
if (count < 0) { /* Padding forces an extra block */
115-
memset(p, 0, count + 8);
115+
bzero(p, count + 8);
116116
byteSwap(ctx->in, 16);
117117
MD5Transform(ctx->buf, ctx->in);
118118
p = (md5byte *)ctx->in;
119119
count = 56;
120120
}
121121

122-
memset(p, 0, count);
122+
bzero(p, count);
123123
byteSwap(ctx->in, 14);
124124

125125
/* Append length in bits and transform */
@@ -129,7 +129,7 @@ void MD5Final(md5byte digest[16], struct MD5Context *ctx) {
129129

130130
byteSwap(ctx->buf, 4);
131131
memcpy(digest, ctx->buf, 16);
132-
memset(ctx, 0, sizeof(*ctx)); /* In case it's sensitive */
132+
bzero(ctx, sizeof(*ctx)); /* In case it's sensitive */
133133
}
134134

135135
#ifndef ASM_MD5

test/add_noise_test.cc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -83,7 +83,7 @@ TEST_P(AddNoiseTest, CheckNoiseAdded) {
8383
}
8484

8585
// Initialize pixels in the image to 0 and check for roll under.
86-
memset(s, 0, image_size);
86+
bzero(s, image_size);
8787

8888
ASM_REGISTER_STATE_CHECK(
8989
GET_PARAM(1)(s, noise, clamp, clamp, width, height, width));

test/consistency_test.cc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@ class ConsistencyTestBase : public ::testing::Test {
5151
ssim_array_ = new Ssimv[kDataBufferSize / 16];
5252
}
5353

54-
static void ClearSsim() { memset(ssim_array_, 0, kDataBufferSize / 16); }
54+
static void ClearSsim() { bzero(ssim_array_, kDataBufferSize / 16); }
5555
static void TearDownTestSuite() {
5656
vpx_free(source_data_[0]);
5757
source_data_[0] = nullptr;

test/dct16x16_test.cc

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -459,11 +459,11 @@ class Trans16x16TestBase {
459459
fwd_txfm_ref(input_extreme_block, output_ref_block, pitch_, tx_type_);
460460

461461
// clear reconstructed pixel buffers
462-
memset(dst, 0, kNumCoeffs * sizeof(uint8_t));
463-
memset(ref, 0, kNumCoeffs * sizeof(uint8_t));
462+
bzero(dst, kNumCoeffs * sizeof(uint8_t));
463+
bzero(ref, kNumCoeffs * sizeof(uint8_t));
464464
#if CONFIG_VP9_HIGHBITDEPTH
465-
memset(dst16, 0, kNumCoeffs * sizeof(uint16_t));
466-
memset(ref16, 0, kNumCoeffs * sizeof(uint16_t));
465+
bzero(dst16, kNumCoeffs * sizeof(uint16_t));
466+
bzero(ref16, kNumCoeffs * sizeof(uint16_t));
467467
#endif
468468

469469
// quantization with maximum allowed step sizes

test/decode_test_driver.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -40,12 +40,12 @@ class Decoder {
4040
public:
4141
explicit Decoder(vpx_codec_dec_cfg_t cfg)
4242
: cfg_(cfg), flags_(0), init_done_(false) {
43-
memset(&decoder_, 0, sizeof(decoder_));
43+
bzero(&decoder_, sizeof(decoder_));
4444
}
4545

4646
Decoder(vpx_codec_dec_cfg_t cfg, const vpx_codec_flags_t flag)
4747
: cfg_(cfg), flags_(flag), init_done_(false) {
48-
memset(&decoder_, 0, sizeof(decoder_));
48+
bzero(&decoder_, sizeof(decoder_));
4949
}
5050

5151
virtual ~Decoder() { vpx_codec_destroy(&decoder_); }

test/encode_api_test.cc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -141,7 +141,7 @@ TEST(EncodeAPI, MultiResEncode) {
141141
vpx_codec_enc_cfg_t cfg[2];
142142
vpx_rational_t dsf[2] = { { 2, 1 }, { 2, 1 } };
143143

144-
memset(enc, 0, sizeof(enc));
144+
bzero(enc, sizeof(enc));
145145

146146
for (int i = 0; i < 2; i++) {
147147
vpx_codec_enc_config_default(iface, &cfg[i], 0);

0 commit comments

Comments
 (0)