Lines Matching defs:frame

44 #define MAX_FRAMESIZE       32768                       ///< maximum compressed frame size
55 * @brief frame-specific decoder context for a single channel
62 uint16_t subframe_offsets[MAX_SUBFRAMES]; ///< subframe positions in the current frame
75 AVFrame *frame;
77 uint8_t *frame_data; ///< compressed frame data
81 /* frame size dependent frame information (set during initialization) */
83 int len_prefix; ///< frame is prefixed with its length
84 int dynamic_range_compression; ///< frame contains DRC data
98 uint8_t packet_offset; ///< offset to the frame in the packet
101 int frame_offset; ///< frame offset in the bit reservoir
106 /* frame decode state */
107 uint32_t frame_num; ///< current frame number (not used for decoding)
253 /* frame info */
254 s->skip_frame = 1; /* skip first frame */
258 /* get frame len */
283 s->frame = av_frame_alloc();
284 if (!s->frame)
293 * @param offset sample offset in the frame
311 av_log(s->avctx, AV_LOG_ERROR, "broken frame: subframe_len %i\n",
319 * @brief Decode how the data in the frame is split into subframes.
320 * Every WMA frame contains the encoded data for a fixed number of
332 * The algorithm repeats these steps until the frame is properly divided
355 /* loop until the frame data is split between the subframes */
390 "broken frame: num subframes > 31\n");
397 av_log(s->avctx, AV_LOG_ERROR, "broken frame: "
878 /* check if the frame will be complete after processing the
916 av_frame_unref(s->frame);
1021 * @brief Decode one WMA frame.
1023 * @return 0 if the trailer bit indicates that this is the last frame,
1031 s->frame->nb_samples = s->samples_per_frame;
1032 if ((ret = ff_get_buffer(s->avctx, s->frame, 0)) < 0) {
1033 /* return an error if no frame could be decoded at all */
1035 s->frame->nb_samples = 0;
1039 s->samples_16[i] = (int16_t *)s->frame->extended_data[i];
1040 s->samples_32[i] = (int32_t *)s->frame->extended_data[i];
1043 /* get frame length */
1050 av_frame_unref(s->frame);
1063 /* usually true for the first frame */
1069 /* sometimes true for the last frame */
1073 s->frame->nb_samples -= skip;
1074 if (s->frame->nb_samples <= 0)
1092 if (s->frame->nb_samples)
1093 s->frame->nb_samples = decoded_samples;
1106 "frame[%"PRIu32"] would have to skip %i bits\n",
1113 /* skip the rest of the frame data */
1135 * @brief Fill the bit reservoir with a (partial) frame.
1138 * @param len length of the partial frame
1147 /* when the frame data does not need to be concatenated, the input buffer
1148 is reset and additional bits from the previous frame are copied
1195 s->frame->nb_samples = 0;
1219 /* get number of bits that need to be added to the previous frame */
1239 /* Append the previous frame data to the remaining data from the
1240 * previous packet to create a full frame. */
1243 /* decode the cross packet frame if it is valid */
1277 * part of a new packet belongs to the previous frame therefore we
1279 * frame" data from the next packet so that we get a buffer that
1299 *got_frame_ptr = s->frame->nb_samples > 0;
1300 av_frame_move_ref(rframe, s->frame);
1316 s->frame->nb_samples = 0;
1324 av_frame_free(&s->frame);