Cleans -Wextra/-Wunused-parameter warning: warning: unused parameter ‘cfg’
Unified · Split
| @@ -190,8 +190,7 @@ static void find_mismatch(const vpx_image_t *const img1, · 189 unmodified lines | |||
| 190 | } | 190 | } |
| 191 | 191 | ||
| 192 | static void testing_decode(vpx_codec_ctx_t *encoder, vpx_codec_ctx_t *decoder, | 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, | 193 | unsigned int frame_out, int *mismatch_seen) { |
| 194 | int *mismatch_seen) { | ||
| 195 | vpx_image_t enc_img, dec_img; | 194 | vpx_image_t enc_img, dec_img; |
| 196 | struct vp9_ref_frame ref_enc, ref_dec; | 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 | vpx_img_free(&dec_img); | 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, | 227 | static int encode_frame(vpx_codec_ctx_t *ecodec, vpx_image_t *img, |
| 229 | vpx_image_t *img, unsigned int frame_in, | 228 | unsigned int frame_in, VpxVideoWriter *writer, |
| 230 | VpxVideoWriter *writer, int test_decode, | 229 | int test_decode, vpx_codec_ctx_t *dcodec, |
| 231 | vpx_codec_ctx_t *dcodec, unsigned int *frame_out, | 230 | unsigned int *frame_out, int *mismatch_seen) { |
| 232 | int *mismatch_seen) { | ||
| 233 | int got_pkts = 0; | 231 | int got_pkts = 0; |
| 234 | vpx_codec_iter_t iter = NULL; | 232 | vpx_codec_iter_t iter = NULL; |
| 235 | const vpx_codec_cx_pkt_t *pkt = NULL; | 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 | // Mismatch checking | 269 | // Mismatch checking |
| 272 | if (got_data && test_decode) { | 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 | return got_pkts; | 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 | &frame_out, &mismatch_seen); | 399 | &frame_out, &mismatch_seen); |
| 402 | frame_in++; | 400 | frame_in++; |
| 403 | if (mismatch_seen) break; | 401 | if (mismatch_seen) break; |
| @@ -405,8 +403,8 @@ int main(int argc, char **argv) { · 1 unmodified line | |||
| 405 | 403 | ||
| 406 | // Flush encoder. | 404 | // Flush encoder. |
| 407 | if (!mismatch_seen) | 405 | if (!mismatch_seen) |
| 408 | while (encode_frame(&ecodec, &cfg, NULL, frame_in, writer, test_decode, | 406 | while (encode_frame(&ecodec, NULL, frame_in, writer, test_decode, &dcodec, |
| 409 | &dcodec, &frame_out, &mismatch_seen)) { | 407 | &frame_out, &mismatch_seen)) { |
| 410 | } | 408 | } |
| 411 | 409 | ||
| 412 | printf("\n"); | 410 | printf("\n"); |