Go to the documentation of this file.
43 #define BITSTREAM_READER_LE
50 #define PALETTE_COUNT 256
80 int current_offset =
s->pixel_ptr - dst->
data[0];
81 int motion_offset = current_offset + delta_y * dst->
linesize[0]
82 + delta_x * (1 +
s->is_16bpp);
83 if (motion_offset < 0) {
86 }
else if (motion_offset >
s->upper_motion_limit_offset) {
88 motion_offset,
s->upper_motion_limit_offset);
95 s->hdsp.put_pixels_tab[!
s->is_16bpp][0](
s->pixel_ptr,
src->data[0] + motion_offset,
117 B = bytestream2_get_byte(&
s->stream_ptr);
119 B = bytestream2_get_byte(&
s->mv_ptr);
126 x = -14 + ((
B - 56) % 29);
127 y = 8 + ((
B - 56) / 29);
130 ff_tlog(
s->avctx,
"motion byte = %d, (x, y) = (%d, %d)\n",
B, x, y);
143 B = bytestream2_get_byte(&
s->stream_ptr);
145 B = bytestream2_get_byte(&
s->mv_ptr);
152 x = -(-14 + ((
B - 56) % 29));
153 y = -( 8 + ((
B - 56) / 29));
156 ff_tlog(
s->avctx,
"motion byte = %d, (x, y) = (%d, %d)\n",
B, x, y);
163 unsigned char B, BL, BH;
167 B = bytestream2_get_byte(&
s->stream_ptr);
169 B = bytestream2_get_byte(&
s->mv_ptr);
173 BH = (
B >> 4) & 0x0F;
177 ff_tlog(
s->avctx,
"motion byte = %d, (x, y) = (%d, %d)\n",
B, x, y);
187 x = bytestream2_get_byte(&
s->stream_ptr);
188 y = bytestream2_get_byte(&
s->stream_ptr);
190 ff_tlog(
s->avctx,
"motion bytes = %d, %d\n", x, y);
215 P[0] = bytestream2_get_byte(&
s->stream_ptr);
216 P[1] = bytestream2_get_byte(&
s->stream_ptr);
221 for (y = 0; y < 8; y++) {
222 flags = bytestream2_get_byte(&
s->stream_ptr) | 0x100;
224 *
s->pixel_ptr++ =
P[
flags & 1];
225 s->pixel_ptr +=
s->line_inc;
231 flags = bytestream2_get_le16(&
s->stream_ptr);
232 for (y = 0; y < 8; y += 2) {
233 for (x = 0; x < 8; x += 2, flags >>= 1) {
235 s->pixel_ptr[x + 1 ] =
236 s->pixel_ptr[x +
s->stride] =
237 s->pixel_ptr[x + 1 +
s->stride] =
P[
flags & 1];
239 s->pixel_ptr +=
s->stride * 2;
251 unsigned int flags = 0;
260 P[0] = bytestream2_get_byte(&
s->stream_ptr);
261 P[1] = bytestream2_get_byte(&
s->stream_ptr);
264 for (y = 0; y < 16; y++) {
268 P[0] = bytestream2_get_byte(&
s->stream_ptr);
269 P[1] = bytestream2_get_byte(&
s->stream_ptr);
271 flags = bytestream2_get_le16(&
s->stream_ptr);
274 for (x = 0; x < 4; x++, flags >>= 1)
275 *
s->pixel_ptr++ =
P[
flags & 1];
276 s->pixel_ptr +=
s->stride - 4;
278 if (y == 7)
s->pixel_ptr -= 8 *
s->stride - 4;
282 flags = bytestream2_get_le32(&
s->stream_ptr);
283 P[2] = bytestream2_get_byte(&
s->stream_ptr);
284 P[3] = bytestream2_get_byte(&
s->stream_ptr);
290 for (y = 0; y < 16; y++) {
291 for (x = 0; x < 4; x++, flags >>= 1)
292 *
s->pixel_ptr++ =
P[
flags & 1];
293 s->pixel_ptr +=
s->stride - 4;
296 s->pixel_ptr -= 8 *
s->stride - 4;
299 flags = bytestream2_get_le32(&
s->stream_ptr);
307 for (y = 0; y < 8; y++) {
311 flags = bytestream2_get_le32(&
s->stream_ptr);
314 for (x = 0; x < 8; x++, flags >>= 1)
315 *
s->pixel_ptr++ =
P[
flags & 1];
316 s->pixel_ptr +=
s->line_inc;
342 for (y = 0; y < 8; y++) {
344 int flags = bytestream2_get_le16(&
s->stream_ptr);
345 for (x = 0; x < 8; x++, flags >>= 2)
346 *
s->pixel_ptr++ =
P[
flags & 0x03];
347 s->pixel_ptr +=
s->line_inc;
354 flags = bytestream2_get_le32(&
s->stream_ptr);
356 for (y = 0; y < 8; y += 2) {
357 for (x = 0; x < 8; x += 2, flags >>= 2) {
359 s->pixel_ptr[x + 1 ] =
360 s->pixel_ptr[x +
s->stride] =
361 s->pixel_ptr[x + 1 +
s->stride] =
P[
flags & 0x03];
363 s->pixel_ptr +=
s->stride * 2;
371 flags = bytestream2_get_le64(&
s->stream_ptr);
373 for (y = 0; y < 8; y++) {
374 for (x = 0; x < 8; x += 2, flags >>= 2) {
376 s->pixel_ptr[x + 1] =
P[
flags & 0x03];
378 s->pixel_ptr +=
s->stride;
381 for (y = 0; y < 8; y += 2) {
382 for (x = 0; x < 8; x++, flags >>= 2) {
384 s->pixel_ptr[x +
s->stride] =
P[
flags & 0x03];
386 s->pixel_ptr +=
s->stride * 2;
413 for (y = 0; y < 16; y++) {
417 flags = bytestream2_get_le32(&
s->stream_ptr);
420 for (x = 0; x < 4; x++, flags >>= 2)
421 *
s->pixel_ptr++ =
P[
flags & 0x03];
423 s->pixel_ptr +=
s->stride - 4;
425 if (y == 7)
s->pixel_ptr -= 8 *
s->stride - 4;
431 uint64_t
flags = bytestream2_get_le64(&
s->stream_ptr);
439 for (y = 0; y < 16; y++) {
440 for (x = 0; x < 4; x++, flags >>= 2)
441 *
s->pixel_ptr++ =
P[
flags & 0x03];
444 s->pixel_ptr +=
s->stride - 4;
446 if (y == 7)
s->pixel_ptr -= 8 *
s->stride - 4;
447 }
else if (y & 1)
s->pixel_ptr +=
s->line_inc;
452 flags = bytestream2_get_le64(&
s->stream_ptr);
466 for (y = 0; y < 8; y++) {
468 s->pixel_ptr +=
s->stride;
480 for (y = 0; y < 8; y += 2) {
481 for (x = 0; x < 8; x += 2) {
483 s->pixel_ptr[x + 1 ] =
484 s->pixel_ptr[x +
s->stride] =
485 s->pixel_ptr[x + 1 +
s->stride] = bytestream2_get_byte(&
s->stream_ptr);
487 s->pixel_ptr +=
s->stride * 2;
505 for (y = 0; y < 8; y++) {
507 P[0] = bytestream2_get_byte(&
s->stream_ptr);
508 P[1] = bytestream2_get_byte(&
s->stream_ptr);
510 memset(
s->pixel_ptr,
P[0], 4);
511 memset(
s->pixel_ptr + 4,
P[1], 4);
512 s->pixel_ptr +=
s->stride;
525 pix = bytestream2_get_byte(&
s->stream_ptr);
527 for (y = 0; y < 8; y++) {
528 memset(
s->pixel_ptr, pix, 8);
529 s->pixel_ptr +=
s->stride;
542 sample[0] = bytestream2_get_byte(&
s->stream_ptr);
543 sample[1] = bytestream2_get_byte(&
s->stream_ptr);
545 for (y = 0; y < 8; y++) {
546 for (x = 0; x < 8; x += 2) {
547 *
s->pixel_ptr++ =
sample[ y & 1 ];
548 *
s->pixel_ptr++ =
sample[!(y & 1)];
550 s->pixel_ptr +=
s->line_inc;
562 x = bytestream2_get_byte(&
s->stream_ptr);
563 y = bytestream2_get_byte(&
s->stream_ptr);
565 ff_tlog(
s->avctx,
"motion bytes = %d, %d\n", x, y);
574 uint16_t *pixel_ptr = (uint16_t*)
s->pixel_ptr;
577 P[0] = bytestream2_get_le16(&
s->stream_ptr);
578 P[1] = bytestream2_get_le16(&
s->stream_ptr);
580 if (!(
P[0] & 0x8000)) {
582 for (y = 0; y < 8; y++) {
583 flags = bytestream2_get_byte(&
s->stream_ptr) | 0x100;
585 *pixel_ptr++ =
P[
flags & 1];
586 pixel_ptr +=
s->line_inc;
591 flags = bytestream2_get_le16(&
s->stream_ptr);
592 for (y = 0; y < 8; y += 2) {
593 for (x = 0; x < 8; x += 2, flags >>= 1) {
596 pixel_ptr[x +
s->stride] =
597 pixel_ptr[x + 1 +
s->stride] =
P[
flags & 1];
599 pixel_ptr +=
s->stride * 2;
610 unsigned int flags = 0;
611 uint16_t *pixel_ptr = (uint16_t*)
s->pixel_ptr;
615 P[0] = bytestream2_get_le16(&
s->stream_ptr);
616 P[1] = bytestream2_get_le16(&
s->stream_ptr);
618 if (!(
P[0] & 0x8000)) {
620 for (y = 0; y < 16; y++) {
624 P[0] = bytestream2_get_le16(&
s->stream_ptr);
625 P[1] = bytestream2_get_le16(&
s->stream_ptr);
627 flags = bytestream2_get_le16(&
s->stream_ptr);
630 for (x = 0; x < 4; x++, flags >>= 1)
631 *pixel_ptr++ =
P[
flags & 1];
632 pixel_ptr +=
s->stride - 4;
634 if (y == 7) pixel_ptr -= 8 *
s->stride - 4;
639 flags = bytestream2_get_le32(&
s->stream_ptr);
640 P[2] = bytestream2_get_le16(&
s->stream_ptr);
641 P[3] = bytestream2_get_le16(&
s->stream_ptr);
643 if (!(
P[2] & 0x8000)) {
647 for (y = 0; y < 16; y++) {
648 for (x = 0; x < 4; x++, flags >>= 1)
649 *pixel_ptr++ =
P[
flags & 1];
650 pixel_ptr +=
s->stride - 4;
653 pixel_ptr -= 8 *
s->stride - 4;
656 flags = bytestream2_get_le32(&
s->stream_ptr);
664 for (y = 0; y < 8; y++) {
668 flags = bytestream2_get_le32(&
s->stream_ptr);
671 for (x = 0; x < 8; x++, flags >>= 1)
672 *pixel_ptr++ =
P[
flags & 1];
673 pixel_ptr +=
s->line_inc;
686 uint16_t *pixel_ptr = (uint16_t*)
s->pixel_ptr;
689 for (x = 0; x < 4; x++)
690 P[x] = bytestream2_get_le16(&
s->stream_ptr);
692 if (!(
P[0] & 0x8000)) {
693 if (!(
P[2] & 0x8000)) {
696 for (y = 0; y < 8; y++) {
698 int flags = bytestream2_get_le16(&
s->stream_ptr);
699 for (x = 0; x < 8; x++, flags >>= 2)
700 *pixel_ptr++ =
P[
flags & 0x03];
701 pixel_ptr +=
s->line_inc;
708 flags = bytestream2_get_le32(&
s->stream_ptr);
710 for (y = 0; y < 8; y += 2) {
711 for (x = 0; x < 8; x += 2, flags >>= 2) {
714 pixel_ptr[x +
s->stride] =
715 pixel_ptr[x + 1 +
s->stride] =
P[
flags & 0x03];
717 pixel_ptr +=
s->stride * 2;
725 flags = bytestream2_get_le64(&
s->stream_ptr);
726 if (!(
P[2] & 0x8000)) {
727 for (y = 0; y < 8; y++) {
728 for (x = 0; x < 8; x += 2, flags >>= 2) {
730 pixel_ptr[x + 1] =
P[
flags & 0x03];
732 pixel_ptr +=
s->stride;
735 for (y = 0; y < 8; y += 2) {
736 for (x = 0; x < 8; x++, flags >>= 2) {
738 pixel_ptr[x +
s->stride] =
P[
flags & 0x03];
740 pixel_ptr +=
s->stride * 2;
754 uint16_t *pixel_ptr = (uint16_t*)
s->pixel_ptr;
756 for (x = 0; x < 4; x++)
757 P[x] = bytestream2_get_le16(&
s->stream_ptr);
761 if (!(
P[0] & 0x8000)) {
764 for (y = 0; y < 16; y++) {
768 for (x = 0; x < 4; x++)
769 P[x] = bytestream2_get_le16(&
s->stream_ptr);
770 flags = bytestream2_get_le32(&
s->stream_ptr);
773 for (x = 0; x < 4; x++, flags >>= 2)
774 *pixel_ptr++ =
P[
flags & 0x03];
776 pixel_ptr +=
s->stride - 4;
778 if (y == 7) pixel_ptr -= 8 *
s->stride - 4;
784 uint64_t
flags = bytestream2_get_le64(&
s->stream_ptr);
786 for (x = 4; x < 8; x++)
787 P[x] = bytestream2_get_le16(&
s->stream_ptr);
788 vert = !(
P[4] & 0x8000);
793 for (y = 0; y < 16; y++) {
794 for (x = 0; x < 4; x++, flags >>= 2)
795 *pixel_ptr++ =
P[
flags & 0x03];
798 pixel_ptr +=
s->stride - 4;
800 if (y == 7) pixel_ptr -= 8 *
s->stride - 4;
801 }
else if (y & 1) pixel_ptr +=
s->line_inc;
806 flags = bytestream2_get_le64(&
s->stream_ptr);
818 uint16_t *pixel_ptr = (uint16_t*)
s->pixel_ptr;
821 for (y = 0; y < 8; y++) {
822 for (x = 0; x < 8; x++)
823 pixel_ptr[x] = bytestream2_get_le16(&
s->stream_ptr);
824 pixel_ptr +=
s->stride;
834 uint16_t *pixel_ptr = (uint16_t*)
s->pixel_ptr;
837 for (y = 0; y < 8; y += 2) {
838 for (x = 0; x < 8; x += 2) {
841 pixel_ptr[x +
s->stride] =
842 pixel_ptr[x + 1 +
s->stride] = bytestream2_get_le16(&
s->stream_ptr);
844 pixel_ptr +=
s->stride * 2;
855 uint16_t *pixel_ptr = (uint16_t*)
s->pixel_ptr;
858 for (y = 0; y < 8; y++) {
860 P[0] = bytestream2_get_le16(&
s->stream_ptr);
861 P[1] = bytestream2_get_le16(&
s->stream_ptr);
863 for (x = 0; x < 8; x++)
864 pixel_ptr[x] =
P[x >> 2];
865 pixel_ptr +=
s->stride;
876 uint16_t *pixel_ptr = (uint16_t*)
s->pixel_ptr;
879 pix = bytestream2_get_le16(&
s->stream_ptr);
881 for (y = 0; y < 8; y++) {
882 for (x = 0; x < 8; x++)
884 pixel_ptr +=
s->stride;
920 s->pixel_ptr +=
s->stride;
924 if (
s->avctx->frame_number > 2)
934 off_x = ((uint16_t)opcode - 0xC000) %
frame->linesize[0];
935 off_y = ((uint16_t)opcode - 0xC000) /
frame->linesize[0];
937 }
else if (opcode > 0) {
938 off_x = ((uint16_t)opcode - 0x4000) %
frame->linesize[0];
939 off_y = ((uint16_t)opcode - 0x4000) /
frame->linesize[0];
956 s->stride =
frame->linesize[0];
958 s->line_inc =
s->stride - 8;
959 s->upper_motion_limit_offset = (
s->avctx->height - 8) *
frame->linesize[0]
960 + (
s->avctx->width - 8) * (1 +
s->is_16bpp);
966 for (y = 0; y <
s->avctx->height; y += 8) {
967 for (x = 0; x <
s->avctx->width; x += 8) {
968 opcode = bytestream2_get_le16(&decoding_map_ptr);
971 " block @ (%3d, %3d): opcode 0x%X, data ptr offset %d\n",
974 s->pixel_ptr =
frame->data[0] + x + y *
frame->linesize[0];
982 "decode finished with %d bytes left over\n",
994 s->pixel_ptr +=
s->stride;
1004 off_x = ((uint16_t)opcode - 0xC000) %
s->cur_decode_frame->linesize[0];
1005 off_y = ((uint16_t)opcode - 0xC000) /
s->cur_decode_frame->linesize[0];
1006 copy_from(
s,
s->prev_decode_frame,
s->cur_decode_frame, off_x, off_y);
1007 }
else if (opcode > 0) {
1008 off_x = ((uint16_t)opcode - 0x4000) %
s->cur_decode_frame->linesize[0];
1009 off_y = ((uint16_t)opcode - 0x4000) /
s->cur_decode_frame->linesize[0];
1010 copy_from(
s,
s->cur_decode_frame,
s->cur_decode_frame, off_x, off_y);
1020 int pass, x, y, changed_block;
1021 int16_t opcode, skip;
1029 s->stride =
frame->linesize[0];
1031 s->line_inc =
s->stride - 8;
1032 s->upper_motion_limit_offset = (
s->avctx->height - 8) *
frame->linesize[0]
1033 + (
s->avctx->width - 8) * (1 +
s->is_16bpp);
1041 skip = bytestream2_get_le16(&skip_map_ptr);
1043 for (y = 0; y <
s->avctx->height; y += 8) {
1044 for (x = 0; x <
s->avctx->width; x += 8) {
1045 s->pixel_ptr =
s->cur_decode_frame->data[0] + x + y *
s->cur_decode_frame->linesize[0];
1048 if (skip != -0x8000 && skip) {
1049 opcode = bytestream2_get_le16(&decoding_map_ptr);
1055 skip = bytestream2_get_le16(&skip_map_ptr);
1063 skip = bytestream2_get_le16(&skip_map_ptr);
1064 for (y = 0; y <
s->avctx->height; y += 8) {
1065 for (x = 0; x <
s->avctx->width; x += 8) {
1067 s->pixel_ptr =
frame->data[0] + x + y*
frame->linesize[0];
1070 if (skip != -0x8000 && skip) {
1076 skip = bytestream2_get_le16(&skip_map_ptr);
1079 if (changed_block) {
1083 if (
s->avctx->frame_number)
1094 "decode finished with %d bytes left over\n",
1102 unsigned char opcode;
1111 s->stride =
frame->linesize[0];
1113 s->stride =
frame->linesize[0] >> 1;
1114 s->mv_ptr =
s->stream_ptr;
1117 s->line_inc =
s->stride - 8;
1118 s->upper_motion_limit_offset = (
s->avctx->height - 8) *
frame->linesize[0]
1119 + (
s->avctx->width - 8) * (1 +
s->is_16bpp);
1122 for (y = 0; y <
s->avctx->height; y += 8) {
1123 for (x = 0; x <
s->avctx->width; x += 8) {
1129 " block @ (%3d, %3d): encoding 0x%X, data ptr offset %d\n",
1133 s->pixel_ptr =
frame->data[0] + x
1134 + y*
frame->linesize[0];
1137 s->pixel_ptr =
frame->data[0] + x*2
1138 + y*
frame->linesize[0];
1143 s->avctx->frame_number, x, y);
1150 "decode finished with %d bytes left over\n",
1171 if (!
s->last_frame || !
s->second_last_frame ||
1172 !
s->cur_decode_frame || !
s->prev_decode_frame) {
1177 s->cur_decode_frame->width = avctx->
width;
1178 s->prev_decode_frame->width = avctx->
width;
1179 s->cur_decode_frame->height = avctx->
height;
1180 s->prev_decode_frame->height = avctx->
height;
1181 s->cur_decode_frame->format = avctx->
pix_fmt;
1182 s->prev_decode_frame->format = avctx->
pix_fmt;
1202 void *
data,
int *got_frame,
1206 int buf_size = avpkt->
size;
1212 int video_data_size;
1221 if (!
s->cur_decode_frame->data[0]) {
1242 switch(frame_format) {
1244 if (
s->decoding_map_size) {
1249 if (
s->skip_map_size) {
1260 s->decoding_map_size = ((
s->avctx->width / 8) * (
s->avctx->height / 8)) * 2;
1261 s->decoding_map =
buf + 8 + 14;
1262 video_data_size -=
s->decoding_map_size + 14;
1263 if (video_data_size <= 0 || s->decoding_map_size == 0)
1266 if (buf_size < 8 + s->decoding_map_size + 14 + video_data_size)
1274 if (!
s->decoding_map_size) {
1279 if (!
s->skip_map_size) {
1289 if (buf_size < 8 + video_data_size + s->decoding_map_size +
s->skip_map_size)
1293 s->decoding_map =
buf + 8 + video_data_size;
1294 s->skip_map =
buf + 8 + video_data_size +
s->decoding_map_size;
1299 if (!
s->decoding_map_size) {
1304 if (
s->skip_map_size) {
1309 if (buf_size < 8 + video_data_size + s->decoding_map_size)
1313 s->decoding_map =
buf + 8 + video_data_size;
1322 if (buf_size < 8 + s->decoding_map_size + video_data_size +
s->skip_map_size) {
1334 frame->palette_has_changed = 1;
1341 switch(frame_format) {
1353 *got_frame = send_buffer;
1378 .
name =
"interplayvideo",
const unsigned char * decoding_map
static av_cold int ipvideo_decode_init(AVCodecContext *avctx)
static int ipvideo_decode_block_opcode_0xB(IpvideoContext *s, AVFrame *frame)
static av_cold int init(AVCodecContext *avctx)
static int ipvideo_decode_block_opcode_0x3(IpvideoContext *s, AVFrame *frame)
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
static void(*const ipvideo_format_10_passes[])(IpvideoContext *s, AVFrame *frame, int16_t op)
#define FFSWAP(type, a, b)
@ AV_PKT_DATA_PARAM_CHANGE
An AV_PKT_DATA_PARAM_CHANGE side data packet is laid out as follows:
static int ipvideo_decode_block_opcode_0x2(IpvideoContext *s, AVFrame *frame)
static int ipvideo_decode_block_opcode_0xC(IpvideoContext *s, AVFrame *frame)
void av_frame_free(AVFrame **frame)
Free the frame and any dynamically allocated objects in it, e.g.
static int ipvideo_decode_block_opcode_0x9(IpvideoContext *s, AVFrame *frame)
static av_always_inline int bytestream2_seek(GetByteContext *g, int offset, int whence)
This structure describes decoded (raw) audio or video data.
@ AV_PKT_DATA_PALETTE
An AV_PKT_DATA_PALETTE side data packet contains exactly AVPALETTE_SIZE bytes worth of palette.
AVFrame * cur_decode_frame
static void ipvideo_format_10_secondpass(IpvideoContext *s, AVFrame *frame, int16_t opcode)
static int init_get_bits(GetBitContext *s, const uint8_t *buffer, int bit_size)
Initialize GetBitContext.
uint8_t * data[AV_NUM_DATA_POINTERS]
pointer to the picture/channel planes.
static av_always_inline unsigned int bytestream2_get_bytes_left(GetByteContext *g)
static void(*const ipvideo_format_06_passes[])(IpvideoContext *s, AVFrame *frame, int16_t op)
static int(*const ipvideo_decode_block[])(IpvideoContext *s, AVFrame *frame)
static int ipvideo_decode_block_opcode_0x7_16(IpvideoContext *s, AVFrame *frame)
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.
int flags
AV_CODEC_FLAG_*.
static void ipvideo_decode_format_10_opcodes(IpvideoContext *s, AVFrame *frame)
AVFrame * av_frame_alloc(void)
Allocate an AVFrame and set its fields to default values.
AVFrame * prev_decode_frame
#define AV_LOG_ERROR
Something went wrong and cannot losslessly be recovered.
static int ipvideo_decode_block_opcode_0x8_16(IpvideoContext *s, AVFrame *frame)
static int ipvideo_decode_block_opcode_0x4(IpvideoContext *s, AVFrame *frame)
static void decode(AVCodecContext *dec_ctx, AVPacket *pkt, AVFrame *frame, FILE *outfile)
const unsigned char * skip_map
#define AV_GET_BUFFER_FLAG_REF
The decoder will keep a reference to the frame and may reuse it later.
static int op(uint8_t **dst, const uint8_t *dst_end, GetByteContext *gb, int pixel, int count, int *x, int width, int linesize)
Perform decode operation.
#define AV_LOG_DEBUG
Stuff which is only useful for libav* developers.
uint64_t_TMPL AV_WL64 unsigned int_TMPL AV_WL32 unsigned int_TMPL AV_WL24 unsigned int_TMPL AV_RL16
int upper_motion_limit_offset
static int ipvideo_decode_block_opcode_0x6(IpvideoContext *s, AVFrame *frame)
static int ipvideo_decode_block_opcode_0x9_16(IpvideoContext *s, AVFrame *frame)
GetByteContext stream_ptr
av_cold void ff_hpeldsp_init(HpelDSPContext *c, int flags)
static int ipvideo_decode_block_opcode_0xA(IpvideoContext *s, AVFrame *frame)
uint8_t * av_packet_get_side_data(const AVPacket *pkt, enum AVPacketSideDataType type, int *size)
Get side information from packet.
static int ipvideo_decode_block_opcode_0x1(IpvideoContext *s, AVFrame *frame)
static void ipvideo_format_10_firstpass(IpvideoContext *s, AVFrame *frame, int16_t opcode)
@ AV_CODEC_ID_INTERPLAY_VIDEO
static int ipvideo_decode_frame(AVCodecContext *avctx, void *data, int *got_frame, AVPacket *avpkt)
static int ipvideo_decode_block_opcode_0x6_16(IpvideoContext *s, AVFrame *frame)
static void ipvideo_decode_format_11_opcodes(IpvideoContext *s, AVFrame *frame)
static av_always_inline unsigned int bytestream2_get_buffer(GetByteContext *g, uint8_t *dst, unsigned int size)
static void ipvideo_format_06_firstpass(IpvideoContext *s, AVFrame *frame, int16_t opcode)
static int ipvideo_decode_block_opcode_0xE(IpvideoContext *s, AVFrame *frame)
static void error(const char *err)
static av_always_inline int bytestream2_tell(GetByteContext *g)
static av_cold int ipvideo_decode_end(AVCodecContext *avctx)
AVFrame * second_last_frame
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() for allocating buffers and supports custom allocators.
static int ipvideo_decode_block_opcode_0x0(IpvideoContext *s, AVFrame *frame)
static int ipvideo_decode_block_opcode_0x8(IpvideoContext *s, AVFrame *frame)
#define NULL_IF_CONFIG_SMALL(x)
Return NULL if CONFIG_SMALL is true, otherwise the argument without modification.
int av_frame_ref(AVFrame *dst, const AVFrame *src)
Set up a new reference to the data described by the source frame.
static void ipvideo_format_06_secondpass(IpvideoContext *s, AVFrame *frame, int16_t opcode)
static int ipvideo_decode_block_opcode_0x5(IpvideoContext *s, AVFrame *frame)
static int ipvideo_decode_block_opcode_0xB_16(IpvideoContext *s, AVFrame *frame)
int bits_per_coded_sample
bits per sample/pixel from the demuxer (needed for huffyuv).
static int copy_from(IpvideoContext *s, AVFrame *src, AVFrame *dst, int delta_x, int delta_y)
static int ipvideo_decode_block_opcode_0xC_16(IpvideoContext *s, AVFrame *frame)
#define AV_PIX_FMT_RGB555
void av_frame_unref(AVFrame *frame)
Unreference all the buffers referenced by frame and reset the frame fields.
const char * name
Name of the codec implementation.
enum AVPixelFormat pix_fmt
Pixel format, see AV_PIX_FMT_xxx.
static int ipvideo_decode_block_opcode_0xF(IpvideoContext *s, AVFrame *frame)
@ AV_PIX_FMT_PAL8
8 bits with AV_PIX_FMT_RGB32 palette
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
main external API structure.
static int ipvideo_decode_block_opcode_0x7(IpvideoContext *s, AVFrame *frame)
static void ipvideo_decode_format_06_opcodes(IpvideoContext *s, AVFrame *frame)
#define AV_CODEC_CAP_PARAM_CHANGE
Codec supports changed parameters at any point.
static int ipvideo_decode_block_opcode_0xE_16(IpvideoContext *s, AVFrame *frame)
This structure stores compressed data.
AVCodec ff_interplay_video_decoder
static int(*const ipvideo_decode_block16[])(IpvideoContext *s, AVFrame *frame)
int width
picture width / height.
static av_always_inline void bytestream2_init(GetByteContext *g, const uint8_t *buf, int buf_size)
#define flags(name, subs,...)
int linesize[AV_NUM_DATA_POINTERS]
For video, size in bytes of each picture line.
static int ipvideo_decode_block_opcode_0xD(IpvideoContext *s, AVFrame *frame)
#define AVERROR_INVALIDDATA
Invalid data found when processing input.
unsigned char * pixel_ptr
static int ipvideo_decode_block_opcode_0xD_16(IpvideoContext *s, AVFrame *frame)
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 int ipvideo_decode_block_opcode_0xA_16(IpvideoContext *s, AVFrame *frame)