Cleans -Wextra/-Wunused-parameter warning: warning: unused parameter ‘cfg’
Showing the changes to examples (1 of 1 file). Show all
Unified · Split
| @@ -190,8 +190,7 @@ static void find_mismatch(const vpx_image_t *const img1, · 189 unmodified lines | ||
| 190 | 190 | } |
| 191 | 191 | |
| 192 | 192 | static void testing_decode(vpx_codec_ctx_t *encoder, vpx_codec_ctx_t *decoder, |
| 193 | − vpx_codec_enc_cfg_t *cfg, unsigned int frame_out, | |
| 194 | − int *mismatch_seen) { | |
| 193 | + unsigned int frame_out, int *mismatch_seen) { | |
| 195 | 194 | vpx_image_t enc_img, dec_img; |
| 196 | 195 | struct vp9_ref_frame ref_enc, ref_dec; |
| 197 | 196 | |
| @@ -225,11 +224,10 @@ static void testing_decode(vpx_codec_ctx_t *encoder, vpx_codec_ctx_t *decoder, · 27 unmodified lines | ||
| 225 | 224 | vpx_img_free(&dec_img); |
| 226 | 225 | } |
| 227 | 226 | |
| 228 | −static int encode_frame(vpx_codec_ctx_t *ecodec, vpx_codec_enc_cfg_t *cfg, | |
| 229 | − vpx_image_t *img, unsigned int frame_in, | |
| 230 | − VpxVideoWriter *writer, int test_decode, | |
| 231 | − vpx_codec_ctx_t *dcodec, unsigned int *frame_out, | |
| 232 | − int *mismatch_seen) { | |
| 227 | +static int encode_frame(vpx_codec_ctx_t *ecodec, vpx_image_t *img, | |
| 228 | + unsigned int frame_in, VpxVideoWriter *writer, | |
| 229 | + int test_decode, vpx_codec_ctx_t *dcodec, | |
| 230 | + unsigned int *frame_out, int *mismatch_seen) { | |
| 233 | 231 | int got_pkts = 0; |
| 234 | 232 | vpx_codec_iter_t iter = NULL; |
| 235 | 233 | const vpx_codec_cx_pkt_t *pkt = NULL; |
| @@ -270,7 +268,7 @@ static int encode_frame(vpx_codec_ctx_t *ecodec, vpx_codec_enc_cfg_t *cfg, · 34 unmodified lines | ||
| 270 | 268 | |
| 271 | 269 | // Mismatch checking |
| 272 | 270 | if (got_data && test_decode) { |
| 273 | − testing_decode(ecodec, dcodec, cfg, *frame_out, mismatch_seen); | |
| 271 | + testing_decode(ecodec, dcodec, *frame_out, mismatch_seen); | |
| 274 | 272 | } |
| 275 | 273 | |
| 276 | 274 | return got_pkts; |
| @@ -397,7 +395,7 @@ int main(int argc, char **argv) { · 120 unmodified lines | ||
| 397 | 395 | } |
| 398 | 396 | } |
| 399 | 397 | |
| 400 | − encode_frame(&ecodec, &cfg, &raw, frame_in, writer, test_decode, &dcodec, | |
| 398 | + encode_frame(&ecodec, &raw, frame_in, writer, test_decode, &dcodec, | |
| 401 | 399 | &frame_out, &mismatch_seen); |
| 402 | 400 | frame_in++; |
| 403 | 401 | if (mismatch_seen) break; |
| @@ -405,8 +403,8 @@ int main(int argc, char **argv) { · 1 unmodified line | ||
| 405 | 403 | |
| 406 | 404 | // Flush encoder. |
| 407 | 405 | if (!mismatch_seen) |
| 408 | − while (encode_frame(&ecodec, &cfg, NULL, frame_in, writer, test_decode, | |
| 409 | − &dcodec, &frame_out, &mismatch_seen)) { | |
| 406 | + while (encode_frame(&ecodec, NULL, frame_in, writer, test_decode, &dcodec, | |
| 407 | + &frame_out, &mismatch_seen)) { | |
| 410 | 408 | } |
| 411 | 409 | |
| 412 | 410 | printf("\n"); |