Go to the documentation of this file.
57 #define BS_8BIT_PEL (1 << 1)
58 #define BS_KEYFRAME (1 << 2)
59 #define BS_MV_Y_HALF (1 << 4)
60 #define BS_MV_X_HALF (1 << 5)
61 #define BS_NONREF (1 << 8)
65 typedef struct Plane {
73 #define CELL_STACK_MAX 20
122 static const int8_t
offsets[8] = { 1, 1, 2, -3, -3, 3, 4, 4 };
123 static const int8_t deltas [8] = { 0, 1, 0, 4, 4, 1, 0, 1 };
127 for (
i = 0;
i < 8;
i++) {
129 for (j = 0; j < 128; j++)
156 ctx->width =
ctx->height = 0;
158 for (p = 0; p < 3; p++) {
161 ctx->planes[p].pixels[0] =
ctx->planes[p].pixels[1] = 0;
169 int p, chroma_width, chroma_height;
170 int luma_size, chroma_size;
171 ptrdiff_t luma_pitch, chroma_pitch;
173 if (luma_width < 16 || luma_width > 640 ||
174 luma_height < 16 || luma_height > 480 ||
175 luma_width & 1 || luma_height & 1) {
177 luma_width, luma_height);
181 ctx->width = luma_width ;
182 ctx->height = luma_height;
184 chroma_width =
FFALIGN(luma_width >> 2, 4);
185 chroma_height =
FFALIGN(luma_height >> 2, 4);
187 luma_pitch =
FFALIGN(luma_width, 16);
188 chroma_pitch =
FFALIGN(chroma_width, 16);
192 luma_size = luma_pitch * (luma_height + 1);
196 chroma_size = chroma_pitch * (chroma_height + 1);
199 for (p = 0; p < 3; p++) {
200 ctx->planes[p].pitch = !p ? luma_pitch : chroma_pitch;
201 ctx->planes[p].width = !p ? luma_width : chroma_width;
202 ctx->planes[p].height = !p ? luma_height : chroma_height;
204 ctx->planes[p].buffers[0] =
av_malloc(!p ? luma_size : chroma_size);
205 ctx->planes[p].buffers[1] =
av_malloc(!p ? luma_size : chroma_size);
207 if (!
ctx->planes[p].buffers[0] || !
ctx->planes[p].buffers[1])
211 memset(
ctx->planes[p].buffers[0], 0x40,
ctx->planes[p].pitch);
212 memset(
ctx->planes[p].buffers[1], 0x40,
ctx->planes[p].pitch);
215 ctx->planes[p].pixels[0] =
ctx->planes[p].buffers[0] +
ctx->planes[p].pitch;
216 ctx->planes[p].pixels[1] =
ctx->planes[p].buffers[1] +
ctx->planes[p].pitch;
217 memset(
ctx->planes[p].pixels[0], 0,
ctx->planes[p].pitch *
ctx->planes[p].height);
218 memset(
ctx->planes[p].pixels[1], 0,
ctx->planes[p].pitch *
ctx->planes[p].height);
234 int h,
w, mv_x, mv_y,
offset, offset_dst;
238 offset_dst = (cell->
ypos << 2) * plane->
pitch + (cell->
xpos << 2);
239 dst = plane->
pixels[
ctx->buf_sel] + offset_dst;
247 if ((cell->
ypos << 2) + mv_y < -1 || (cell->
xpos << 2) + mv_x < 0 ||
251 "Motion vectors point out of the frame.\n");
260 for (
w = cell->
width;
w > 0;) {
262 if (!((cell->
xpos << 2) & 15) &&
w >= 4) {
263 for (;
w >= 4;
src += 16, dst += 16,
w -= 4)
264 ctx->hdsp.put_pixels_tab[0][0](dst,
src, plane->
pitch,
h);
268 if (!((cell->
xpos << 2) & 7) &&
w >= 2) {
269 ctx->hdsp.put_pixels_tab[1][0](dst,
src, plane->
pitch,
h);
274 ctx->hdsp.put_pixels_tab[2][0](dst,
src, plane->
pitch,
h);
286 #define AVG_32(dst, src, ref) \
287 AV_WN32A(dst, ((AV_RN32(src) + AV_RN32(ref)) >> 1) & 0x7F7F7F7FUL)
289 #define AVG_64(dst, src, ref) \
290 AV_WN64A(dst, ((AV_RN64(src) + AV_RN64(ref)) >> 1) & 0x7F7F7F7F7F7F7F7FULL)
299 a &= 0xFF00FF00FF00FF00ULL;
302 a &= 0x00FF00FF00FF00FFULL;
324 for (; n > 0; dst += row_offset, n--)
340 #define BUFFER_PRECHECK \
341 if (*data_ptr >= last_ptr) \
342 return IV3_OUT_OF_DATA; \
344 #define RLE_BLOCK_COPY \
345 if (cell->mv_ptr || !skip_flag) \
346 copy_block4(dst, ref, row_offset, row_offset, 4 << v_zoom)
348 #define RLE_BLOCK_COPY_8 \
349 pix64 = AV_RN64(ref);\
351 pix64 = replicate64(pix64);\
352 fill_64(dst + row_offset, pix64, 7, row_offset);\
353 AVG_64(dst, ref, dst + row_offset);\
355 fill_64(dst, pix64, 8, row_offset)
357 #define RLE_LINES_COPY \
358 copy_block4(dst, ref, row_offset, row_offset, num_lines << v_zoom)
360 #define RLE_LINES_COPY_M10 \
361 pix64 = AV_RN64(ref);\
362 if (is_top_of_cell) {\
363 pix64 = replicate64(pix64);\
364 fill_64(dst + row_offset, pix64, (num_lines << 1) - 1, row_offset);\
365 AVG_64(dst, ref, dst + row_offset);\
367 fill_64(dst, pix64, num_lines << 1, row_offset)
369 #define APPLY_DELTA_4 \
370 AV_WN16A(dst + line_offset ,\
371 (AV_RN16(ref ) + delta_tab->deltas[dyad1]) & 0x7F7F);\
372 AV_WN16A(dst + line_offset + 2,\
373 (AV_RN16(ref + 2) + delta_tab->deltas[dyad2]) & 0x7F7F);\
375 if (is_top_of_cell && !cell->ypos) {\
376 AV_COPY32U(dst, dst + row_offset);\
378 AVG_32(dst, ref, dst + row_offset);\
382 #define APPLY_DELTA_8 \
384 if (is_top_of_cell) { \
385 AV_WN32A(dst + row_offset , \
386 (replicate32(AV_RN32(ref )) + delta_tab->deltas_m10[dyad1]) & 0x7F7F7F7F);\
387 AV_WN32A(dst + row_offset + 4, \
388 (replicate32(AV_RN32(ref + 4)) + delta_tab->deltas_m10[dyad2]) & 0x7F7F7F7F);\
390 AV_WN32A(dst + row_offset , \
391 (AV_RN32(ref ) + delta_tab->deltas_m10[dyad1]) & 0x7F7F7F7F);\
392 AV_WN32A(dst + row_offset + 4, \
393 (AV_RN32(ref + 4) + delta_tab->deltas_m10[dyad2]) & 0x7F7F7F7F);\
398 if (is_top_of_cell && !cell->ypos) {\
399 AV_COPY64U(dst, dst + row_offset);\
401 AVG_64(dst, ref, dst + row_offset);
404 #define APPLY_DELTA_1011_INTER \
407 (AV_RN32(dst ) + delta_tab->deltas_m10[dyad1]) & 0x7F7F7F7F);\
409 (AV_RN32(dst + 4 ) + delta_tab->deltas_m10[dyad2]) & 0x7F7F7F7F);\
410 AV_WN32A(dst + row_offset , \
411 (AV_RN32(dst + row_offset ) + delta_tab->deltas_m10[dyad1]) & 0x7F7F7F7F);\
412 AV_WN32A(dst + row_offset + 4, \
413 (AV_RN32(dst + row_offset + 4) + delta_tab->deltas_m10[dyad2]) & 0x7F7F7F7F);\
416 (AV_RN16(dst ) + delta_tab->deltas[dyad1]) & 0x7F7F);\
418 (AV_RN16(dst + 2 ) + delta_tab->deltas[dyad2]) & 0x7F7F);\
419 AV_WN16A(dst + row_offset , \
420 (AV_RN16(dst + row_offset ) + delta_tab->deltas[dyad1]) & 0x7F7F);\
421 AV_WN16A(dst + row_offset + 2, \
422 (AV_RN16(dst + row_offset + 2) + delta_tab->deltas[dyad2]) & 0x7F7F);\
427 uint8_t *
block, uint8_t *ref_block,
428 ptrdiff_t row_offset,
int h_zoom,
int v_zoom,
int mode,
430 const uint8_t **data_ptr,
const uint8_t *last_ptr)
432 int x, y,
line, num_lines;
436 unsigned int dyad1, dyad2;
438 int skip_flag = 0, is_top_of_cell, is_first_row = 1;
439 int blk_row_offset, line_offset;
441 blk_row_offset = (row_offset << (2 + v_zoom)) - (cell->
width << 2);
442 line_offset = v_zoom ? row_offset : 0;
447 for (y = 0; y < cell->
height; is_first_row = 0, y += 1 + v_zoom) {
448 for (x = 0; x < cell->
width; x += 1 + h_zoom) {
452 if (rle_blocks > 0) {
462 is_top_of_cell = is_first_row && !
line;
468 delta_tab =
delta[1];
470 code = bytestream_get_byte(data_ptr);
472 if (code < delta_tab->num_dyads) {
474 dyad1 = bytestream_get_byte(data_ptr);
476 if (dyad1 >= delta_tab->
num_dyads || dyad1 >= 248)
483 if (swap_quads[
line & 1])
484 FFSWAP(
unsigned int, dyad1, dyad2);
515 code = bytestream_get_byte(data_ptr);
516 rle_blocks = (
code & 0x1F) - 1;
517 if (
code >= 64 || rle_blocks < 0)
519 skip_flag =
code & 0x20;
520 num_lines = 4 -
line;
521 if (
mode >= 10 || (cell->
mv_ptr || !skip_flag)) {
551 ref += row_offset * (num_lines << v_zoom);
552 dst += row_offset * (num_lines << v_zoom);
557 block += 4 << h_zoom;
558 ref_block += 4 << h_zoom;
562 ref_block += blk_row_offset;
563 block += blk_row_offset;
583 Plane *plane,
Cell *cell,
const uint8_t *data_ptr,
584 const uint8_t *last_ptr)
586 int x, mv_x, mv_y,
mode, vq_index, prim_indx, second_indx;
591 const uint8_t *data_start = data_ptr;
596 vq_index =
code & 0xF;
605 }
else if (
mode >= 10) {
617 if ((cell->
ypos << 2) + mv_y < -1 || (cell->
xpos << 2) + mv_x < 0 ||
621 "Motion vectors point out of the frame.\n");
633 code =
ctx->alt_quant[vq_index];
634 prim_indx = (
code >> 4) +
ctx->cb_offset;
635 second_indx = (
code & 0xF) +
ctx->cb_offset;
637 vq_index +=
ctx->cb_offset;
638 prim_indx = second_indx = vq_index;
641 if (prim_indx >= 24 || second_indx >= 24) {
642 av_log(avctx,
AV_LOG_ERROR,
"Invalid VQ table indexes! Primary: %d, secondary: %d!\n",
643 prim_indx, second_indx);
649 swap_quads[0] = second_indx >= 16;
650 swap_quads[1] = prim_indx >= 16;
654 if (vq_index >= 8 && ref_block) {
655 for (x = 0; x < cell->
width << 2; x++)
656 ref_block[x] =
requant_tab[vq_index & 7][ref_block[x] & 127];
671 zoom_fac =
mode >= 3;
674 &data_ptr, last_ptr);
681 &data_ptr, last_ptr);
688 zoom_fac =
mode == 10;
691 &data_ptr, last_ptr);
701 av_log(avctx,
AV_LOG_ERROR,
"Mode %d: RLE code %X is not allowed at the current line\n",
718 return data_ptr - data_start;
731 #define SPLIT_CELL(size, new_size) (new_size) = ((size) > 2) ? ((((size) + 2) >> 2) << 1) : 1
733 #define UPDATE_BITPOS(n) \
734 ctx->skip_bits += (n); \
737 #define RESYNC_BITSTREAM \
738 if (ctx->need_resync && !(get_bits_count(&ctx->gb) & 7)) { \
739 skip_bits_long(&ctx->gb, ctx->skip_bits); \
740 ctx->skip_bits = 0; \
741 ctx->need_resync = 0; \
745 if (curr_cell.xpos + curr_cell.width > (plane->width >> 2) || \
746 curr_cell.ypos + curr_cell.height > (plane->height >> 2)) { \
747 av_log(avctx, AV_LOG_ERROR, "Invalid cell: x=%d, y=%d, w=%d, h=%d\n", \
748 curr_cell.xpos, curr_cell.ypos, curr_cell.width, curr_cell.height); \
749 return AVERROR_INVALIDDATA; \
755 const int depth,
const int strip_width)
765 curr_cell = *ref_cell;
773 if (curr_cell.
width > strip_width) {
775 curr_cell.
width = (curr_cell.
width <= (strip_width << 1) ? 1 : 2) * strip_width;
780 if (ref_cell->
width <= 0 || curr_cell.
width <= 0)
793 if (!curr_cell.
tree) {
815 if (!curr_cell.
tree) {
818 if (!
ctx->need_resync)
820 if (
ctx->next_cell_data >=
ctx->last_byte) {
824 mv_idx = *(
ctx->next_cell_data++);
825 if (mv_idx >=
ctx->num_vectors) {
829 curr_cell.
mv_ptr = &
ctx->mc_vectors[mv_idx << 1];
833 if (!
ctx->need_resync)
838 ctx->next_cell_data,
ctx->last_byte);
843 ctx->next_cell_data += bytes_used;
859 unsigned num_vectors;
863 num_vectors = bytestream_get_le32(&
data); data_size -= 4;
864 if (num_vectors > 256) {
866 "Read invalid number of motion vectors %d\n", num_vectors);
869 if (num_vectors * 2 > data_size)
872 ctx->num_vectors = num_vectors;
873 ctx->mc_vectors = num_vectors ?
data : 0;
878 ctx->need_resync = 0;
880 ctx->last_byte =
data + data_size;
883 curr_cell.
xpos = curr_cell.
ypos = 0;
893 #define OS_HDR_ID MKBETAG('F', 'R', 'M', 'H')
896 const uint8_t *buf,
int buf_size)
899 const uint8_t *bs_hdr;
900 uint32_t frame_num, word2, check_sum, data_size;
901 int y_offset, u_offset, v_offset;
902 uint32_t starts[3], ends[3];
909 frame_num = bytestream2_get_le32(&gb);
910 word2 = bytestream2_get_le32(&gb);
911 check_sum = bytestream2_get_le32(&gb);
912 data_size = bytestream2_get_le32(&gb);
914 if ((frame_num ^ word2 ^ data_size ^
OS_HDR_ID) != check_sum) {
922 if (bytestream2_get_le16(&gb) != 32) {
927 ctx->frame_num = frame_num;
928 ctx->frame_flags = bytestream2_get_le16(&gb);
929 ctx->data_size = (bytestream2_get_le32(&gb) + 7) >> 3;
930 ctx->cb_offset = bytestream2_get_byte(&gb);
932 if (
ctx->data_size == 16)
934 ctx->data_size =
FFMIN(
ctx->data_size, buf_size - 16);
939 height = bytestream2_get_le16(&gb);
940 width = bytestream2_get_le16(&gb);
947 ff_dlog(avctx,
"Frame dimensions changed!\n");
949 if (width < 16 || width > 640 ||
950 height < 16 || height > 480 ||
953 "Invalid picture dimensions: %d x %d!\n",
width,
height);
963 y_offset = bytestream2_get_le32(&gb);
964 v_offset = bytestream2_get_le32(&gb);
965 u_offset = bytestream2_get_le32(&gb);
970 starts[0] = y_offset;
971 starts[1] = v_offset;
972 starts[2] = u_offset;
974 for (j = 0; j < 3; j++) {
975 ends[j] =
ctx->data_size;
976 for (
i = 2;
i >= 0;
i--)
977 if (starts[
i] < ends[j] && starts[
i] > starts[j])
981 ctx->y_data_size = ends[0] - starts[0];
982 ctx->v_data_size = ends[1] - starts[1];
983 ctx->u_data_size = ends[2] - starts[2];
984 if (
FFMIN3(y_offset, v_offset, u_offset) < 0 ||
985 FFMAX3(y_offset, v_offset, u_offset) >=
ctx->data_size - 16 ||
986 FFMIN3(y_offset, v_offset, u_offset) < gb.
buffer - bs_hdr + 16 ||
992 ctx->y_data_ptr = bs_hdr + y_offset;
993 ctx->v_data_ptr = bs_hdr + v_offset;
994 ctx->u_data_ptr = bs_hdr + u_offset;
997 if (
ctx->data_size == 16) {
1027 ptrdiff_t dst_pitch,
int dst_height)
1030 const uint8_t *
src = plane->
pixels[buf_sel];
1031 ptrdiff_t pitch = plane->
pitch;
1034 for (y = 0; y < dst_height; y++) {
1036 for (x = 0; x < plane->
width >> 2; x++) {
1042 for (x <<= 2; x < plane->
width; x++)
1043 *dst++ = *
src++ << 1;
1046 dst += dst_pitch - plane->
width;
1071 const uint8_t *buf = avpkt->
data;
1072 int buf_size = avpkt->
size;
1118 (avctx->
height + 3) >> 2);
1121 (avctx->
height + 3) >> 2);
static void error(const char *err)
#define FF_CODEC_CAP_INIT_THREADSAFE
The codec does not modify any global variables in the init function, allowing to call the init functi...
static const vqEntry vq_tab[24]
#define BS_NONREF
nonref (discardable) frame indicator
static int get_bits_left(GetBitContext *gb)
Filter the word “frame” indicates either a video frame or a group of audio as stored in an AVFrame structure Format for each input and each output the list of supported formats For video that means pixel format For audio that means channel sample they are references to shared objects When the negotiation mechanism computes the intersection of the formats supported at each end of a all references to both lists are replaced with a reference to the intersection And when a single format is eventually chosen for a link amongst the remaining all references to the list are updated That means that if a filter requires that its input and output have the same format amongst a supported all it has to do is use a reference to the same list of formats query_formats can leave some formats unset and return AVERROR(EAGAIN) to cause the negotiation mechanism toagain later. That can be used by filters with complex requirements to use the format negotiated on one link to set the formats supported on another. Frame references ownership and permissions
int16_t height
cell height in 4x4 blocks
@ RLE_ESC_FE
apply null delta to all lines up to the 3rd line
static int get_bits_count(const GetBitContext *s)
static av_cold int decode_close(AVCodecContext *avctx)
This structure describes decoded (raw) audio or video data.
trying all byte sequences megabyte in length and selecting the best looking sequence will yield cases to try But a word about which is also called distortion Distortion can be quantified by almost any quality measurement one chooses the sum of squared differences is used but more complex methods that consider psychovisual effects can be used as well It makes no difference in this discussion First step
#define BS_MV_Y_HALF
vertical mv halfpel resolution indicator
@ RLE_ESC_FC
same as RLE_ESC_FD + do the same with next block
static int decode_frame_headers(Indeo3DecodeContext *ctx, AVCodecContext *avctx, const uint8_t *buf, int buf_size)
const uint8_t * alt_quant
secondary VQ table set for the modes 1 and 4
#define BS_MV_X_HALF
horizontal mv halfpel resolution indicator
static int decode_cell(Indeo3DecodeContext *ctx, AVCodecContext *avctx, Plane *plane, Cell *cell, const uint8_t *data_ptr, const uint8_t *last_ptr)
Decode a vector-quantized cell.
const int8_t * mc_vectors
@ RLE_ESC_FB
apply null delta to N blocks / skip N blocks
static int init_get_bits(GetBitContext *s, const uint8_t *buffer, int bit_size)
Initialize GetBitContext.
static av_always_inline void bytestream2_skip(GetByteContext *g, unsigned int size)
static unsigned int get_bits(GetBitContext *s, int n)
Read 1-25 bits.
static int decode_cell_data(Indeo3DecodeContext *ctx, Cell *cell, uint8_t *block, uint8_t *ref_block, ptrdiff_t row_offset, int h_zoom, int v_zoom, int mode, const vqEntry *delta[2], int swap_quads[2], const uint8_t **data_ptr, const uint8_t *last_ptr)
int16_t xpos
cell coordinates in 4x4 blocks
enum AVDiscard skip_frame
Skip decoding for selected frames.
static uint8_t requant_tab[8][128]
int flags
AV_CODEC_FLAG_*.
#define BS_BUFFER
indicates which of two frame buffers should be used
static int ff_thread_once(char *control, void(*routine)(void))
#define AV_LOG_ERROR
Something went wrong and cannot losslessly be recovered.
static av_cold void build_requant_tab(void)
static void decode(AVCodecContext *dec_ctx, AVPacket *pkt, AVFrame *frame, FILE *outfile)
static const int offsets[]
uint8_t buf_sel
active frame buffer: 0 - primary, 1 -secondary
static int copy_cell(Indeo3DecodeContext *ctx, Plane *plane, Cell *cell)
Copy pixels of the cell(x + mv_x, y + mv_y) from the previous frame into the cell(x,...
@ RLE_ESC_FF
apply null delta to all lines up to the 2nd line
#define RLE_LINES_COPY_M10
#define AV_LOG_DEBUG
Stuff which is only useful for libav* developers.
static av_cold int decode_init(AVCodecContext *avctx)
#define BS_KEYFRAME
intra frame indicator
av_cold void ff_hpeldsp_init(HpelDSPContext *c, int flags)
static int parse_bintree(Indeo3DecodeContext *ctx, AVCodecContext *avctx, Plane *plane, int code, Cell *ref_cell, const int depth, const int strip_width)
#define AVERROR_PATCHWELCOME
Not yet implemented in FFmpeg, patches welcome.
static int decode_frame(AVCodecContext *avctx, void *data, int *got_frame, AVPacket *avpkt)
const uint8_t * y_data_ptr
const uint8_t * next_cell_data
const AVCodec ff_indeo3_decoder
unsigned num_vectors
number of motion vectors in mc_vectors
const uint8_t * u_data_ptr
const uint8_t * last_byte
#define SPLIT_CELL(size, new_size)
uint8_t * pixels[2]
pointer to the actual pixel data of the buffers above
int16_t width
cell width in 4x4 blocks
@ AVDISCARD_NONKEY
discard all frames except keyframes
int ff_get_buffer(AVCodecContext *avctx, AVFrame *frame, int flags)
Get a buffer for a frame.
#define AV_CODEC_CAP_DR1
Codec uses get_buffer() or get_encode_buffer() for allocating buffers and supports custom allocators.
#define NULL_IF_CONFIG_SMALL(x)
Return NULL if CONFIG_SMALL is true, otherwise the argument without modification.
uint8_t cb_offset
needed for selecting VQ tables
static int decode_plane(Indeo3DecodeContext *ctx, AVCodecContext *avctx, Plane *plane, const uint8_t *data, int32_t data_size, int32_t strip_width)
const uint8_t * v_data_ptr
The reader does not expect b to be semantically here and if the code is changed by maybe adding a a division or other the signedness will almost certainly be mistaken To avoid this confusion a new type was SUINT is the C unsigned type but it holds a signed int to use the same example SUINT a
static av_cold int allocate_frame_buffers(Indeo3DecodeContext *ctx, AVCodecContext *avctx, int luma_width, int luma_height)
it s the only field you need to keep assuming you have a context There is some magic you don t need to care about around this just let it vf offset
@ RLE_ESC_F9
same as RLE_ESC_FA + do the same with next block
int data_size
size of the frame data in bytes
#define i(width, name, range_min, range_max)
and forward the test the status of outputs and forward it to the corresponding return FFERROR_NOT_READY If the filters stores internally one or a few frame for some it can consider them to be part of the FIFO and delay acknowledging a status change accordingly Example code
#define FF_CODEC_CAP_INIT_CLEANUP
The codec allows calling the close function for deallocation even if the init function returned a fai...
uint8_t num_dyads
number of two-pixel deltas
const char * name
Name of the codec implementation.
const int8_t * mv_ptr
ptr to the motion vector if any
enum AVPixelFormat pix_fmt
Pixel format, see AV_PIX_FMT_xxx.
@ RLE_ESC_FA
INTRA: skip block, INTER: copy data from reference.
#define FFSWAP(type, a, b)
these buffered frames must be flushed immediately if a new input produces new the filter must not call request_frame to get more It must just process the frame or queue it The task of requesting more frames is left to the filter s request_frame method or the application If a filter has several the filter must be ready for frames arriving randomly on any input any filter with several inputs will most likely require some kind of queuing mechanism It is perfectly acceptable to have a limited queue and to drop frames when the inputs are too unbalanced request_frame For filters that do not use the this method is called when a frame is wanted on an output For a it should directly call filter_frame on the corresponding output For a if there are queued frames already one of these frames should be pushed If the filter should request a frame on one of its repeatedly until at least one frame has been pushed Return or at least make progress towards producing a frame
uint32_t frame_num
current frame number (zero-based)
static uint64_t replicate64(uint64_t a)
static av_cold void free_frame_buffers(Indeo3DecodeContext *ctx)
#define BS_8BIT_PEL
8-bit pixel bitdepth indicator
@ RLE_ESC_FD
apply null delta to all remaining lines of this block
main external API structure.
#define APPLY_DELTA_1011_INTER
static void output_plane(const Plane *plane, int buf_sel, uint8_t *dst, ptrdiff_t dst_pitch, int dst_height)
Convert and output the current plane.
static int ref[MAX_W *MAX_W]
uint8_t tree
tree id: 0- MC tree, 1 - VQ tree
int ff_set_dimensions(AVCodecContext *s, int width, int height)
Check that the provided frame dimensions are valid and set them on the codec context.
#define avpriv_request_sample(...)
static uint32_t replicate32(uint32_t a)
This structure stores compressed data.
int width
picture width / height.
static av_always_inline void bytestream2_init(GetByteContext *g, const uint8_t *buf, int buf_size)
@ AV_PIX_FMT_YUV410P
planar YUV 4:1:0, 9bpp, (1 Cr & Cb sample per 4x4 Y samples)
The exact code depends on how similar the blocks are and how related they are to the block
#define AVERROR_INVALIDDATA
Invalid data found when processing input.
int av_image_check_size(unsigned int w, unsigned int h, int log_offset, void *log_ctx)
Check if the given dimension of an image is valid, meaning that all bytes of the image can be address...
@ AVDISCARD_NONREF
discard all non reference
uint16_t frame_flags
frame properties
uint8_t quad_exp
log2 of four-pixel deltas
The official guide to swscale for confused that consecutive non overlapping rectangles of slice_bottom special converter These generally are unscaled converters of common like for each output line the vertical scaler pulls lines from a ring buffer When the ring buffer does not contain the wanted line
static void fill_64(uint8_t *dst, const uint64_t pix, int32_t n, int32_t row_offset)