Lines Matching defs:frame

302  * Adjust the frame size to make the average bit rate match the target bit rate.
489 reused in the next frame */
531 /* for E-AC-3, determine frame exponent strategy */
771 * Count frame bits that are based solely on fixed parameters.
798 /* audio frame header */
915 * Count the bits used to encode the frame, minus exponents and mantissas.
1157 * Count the number of mantissa bits in the frame based on the bap values.
1197 blocks within a frame are the exponent values. We can take
1214 * Find the largest SNR offset that will allow data to fit in the frame.
1228 /* if previous frame SNR offset was 1023, check if current frame can also
1264 * frame size. Output is the SNR offset and a set of bit allocation pointers
1449 * Write the AC-3 frame header to the output bitstream.
1455 put_bits(&s->pb, 16, 0x0b77); /* frame header */
1732 * Fill the end of the frame with 0's and compute the two CRCs.
1738 uint8_t *frame;
1742 /* pad the remainder of the frame with zeros */
1745 frame = s->pb.buf;
1746 pad_bytes = s->frame_size - (put_bits_ptr(&s->pb) - frame) - 2;
1753 crc2_partial = av_crc(crc_ctx, 0, frame + 2, s->frame_size - 5);
1757 crc1 = av_bswap16(av_crc(crc_ctx, 0, frame + 4, frame_size_58 - 4));
1760 AV_WB16(frame + 2, crc1);
1763 crc2_partial = av_crc(crc_ctx, 0, frame + frame_size_58,
1766 crc2 = av_crc(crc_ctx, crc2_partial, frame + s->frame_size - 3, 1);
1769 frame[s->frame_size - 3] ^= 0x1;
1770 crc2 = av_crc(crc_ctx, crc2_partial, frame + s->frame_size - 3, 1);
1773 AV_WB16(frame + s->frame_size - 2, crc2);
1778 * Write the frame to the output bitstream.
1781 * @param frame output data buffer
1783 static void ac3_output_frame(AC3EncodeContext *s, unsigned char *frame)
1787 init_put_bits(&s->pb, frame, s->frame_size);
1798 const AVFrame *frame, int *got_packet_ptr)
1822 if (frame->pts != AV_NOPTS_VALUE)
1823 avpkt->pts = frame->pts - ff_samples_to_time_base(avctx, avctx->initial_padding);
1850 ff_dlog(avctx, "blocks/frame: %d (code=%d)\n", s->num_blocks, s->num_blks_code);
1982 * These values can optionally be changed per-frame.
2335 /* calculate words-per-frame for the selected bitrate */
2352 /* make sure the minimum frame size is below the average frame size */
2588 /* calculate crc_inv for both possible frame sizes */