| 361 | } |
| 362 | |
| 363 | static int encode_frame(WMACodecContext *s, float (*src_coefs)[BLOCK_MAX_SIZE], |
| 364 | uint8_t *buf, int buf_size, int total_gain) |
| 365 | { |
| 366 | init_put_bits(&s->pb, buf, buf_size); |
| 367 | |
| 368 | if (s->use_bit_reservoir) |
| 369 | av_unreachable("use_bit_reseroir unimplemented, set to 0 during init"); |
| 370 | else if (encode_block(s, src_coefs, total_gain) < 0) |
| 371 | return INT_MAX; |
| 372 | |
| 373 | align_put_bits(&s->pb); |
| 374 | |
| 375 | return put_bits_count(&s->pb) / 8 - s->avctx->block_align; |
| 376 | } |
| 377 | |
| 378 | static int encode_superframe(AVCodecContext *avctx, AVPacket *avpkt, |
| 379 | const AVFrame *frame, int *got_packet_ptr) |
no test coverage detected