Go to the documentation of this file.
42 #define BITSTREAM_READER_LE
50 #define PALETTE_COUNT 256
81 int current_offset =
s->pixel_ptr - dst->
data[0];
82 int x = (current_offset % dst->
linesize[0]) / (1 +
s->is_16bpp);
83 int y = current_offset / dst->
linesize[0];
84 int dx = delta_x + x - ((delta_x + x >=
width) - (delta_x + x < 0)) *
width;
85 int dy = delta_y + y + (delta_x + x >=
width) - (delta_x + x < 0);
86 int motion_offset = dy *
src->linesize[0] + dx * (1 +
s->is_16bpp);
88 if (motion_offset < 0) {
91 }
else if (motion_offset >
s->upper_motion_limit_offset) {
93 motion_offset,
s->upper_motion_limit_offset);
100 s->hdsp.put_pixels_tab[!
s->is_16bpp][0](
s->pixel_ptr,
src->data[0] + motion_offset,
122 B = bytestream2_get_byte(&
s->stream_ptr);
124 B = bytestream2_get_byte(&
s->mv_ptr);
131 x = -14 + ((
B - 56) % 29);
132 y = 8 + ((
B - 56) / 29);
135 ff_tlog(
s->avctx,
"motion byte = %d, (x, y) = (%d, %d)\n",
B, x, y);
148 B = bytestream2_get_byte(&
s->stream_ptr);
150 B = bytestream2_get_byte(&
s->mv_ptr);
157 x = -(-14 + ((
B - 56) % 29));
158 y = -( 8 + ((
B - 56) / 29));
161 ff_tlog(
s->avctx,
"motion byte = %d, (x, y) = (%d, %d)\n",
B, x, y);
168 unsigned char B,
BL, BH;
172 B = bytestream2_get_byte(&
s->stream_ptr);
174 B = bytestream2_get_byte(&
s->mv_ptr);
178 BH = (
B >> 4) & 0x0F;
182 ff_tlog(
s->avctx,
"motion byte = %d, (x, y) = (%d, %d)\n",
B, x, y);
192 x = bytestream2_get_byte(&
s->stream_ptr);
193 y = bytestream2_get_byte(&
s->stream_ptr);
195 ff_tlog(
s->avctx,
"motion bytes = %d, %d\n", x, y);
220 P[0] = bytestream2_get_byte(&
s->stream_ptr);
221 P[1] = bytestream2_get_byte(&
s->stream_ptr);
226 for (y = 0; y < 8; y++) {
227 flags = bytestream2_get_byte(&
s->stream_ptr) | 0x100;
229 *
s->pixel_ptr++ =
P[
flags & 1];
230 s->pixel_ptr +=
s->line_inc;
236 flags = bytestream2_get_le16(&
s->stream_ptr);
237 for (y = 0; y < 8; y += 2) {
238 for (x = 0; x < 8; x += 2, flags >>= 1) {
240 s->pixel_ptr[x + 1 ] =
241 s->pixel_ptr[x +
s->stride] =
242 s->pixel_ptr[x + 1 +
s->stride] =
P[
flags & 1];
244 s->pixel_ptr +=
s->stride * 2;
256 unsigned int flags = 0;
265 P[0] = bytestream2_get_byte(&
s->stream_ptr);
266 P[1] = bytestream2_get_byte(&
s->stream_ptr);
269 for (y = 0; y < 16; y++) {
273 P[0] = bytestream2_get_byte(&
s->stream_ptr);
274 P[1] = bytestream2_get_byte(&
s->stream_ptr);
276 flags = bytestream2_get_le16(&
s->stream_ptr);
279 for (x = 0; x < 4; x++, flags >>= 1)
280 *
s->pixel_ptr++ =
P[
flags & 1];
281 s->pixel_ptr +=
s->stride - 4;
283 if (y == 7)
s->pixel_ptr -= 8 *
s->stride - 4;
287 flags = bytestream2_get_le32(&
s->stream_ptr);
288 P[2] = bytestream2_get_byte(&
s->stream_ptr);
289 P[3] = bytestream2_get_byte(&
s->stream_ptr);
295 for (y = 0; y < 16; y++) {
296 for (x = 0; x < 4; x++, flags >>= 1)
297 *
s->pixel_ptr++ =
P[
flags & 1];
298 s->pixel_ptr +=
s->stride - 4;
301 s->pixel_ptr -= 8 *
s->stride - 4;
304 flags = bytestream2_get_le32(&
s->stream_ptr);
312 for (y = 0; y < 8; y++) {
316 flags = bytestream2_get_le32(&
s->stream_ptr);
319 for (x = 0; x < 8; x++, flags >>= 1)
320 *
s->pixel_ptr++ =
P[
flags & 1];
321 s->pixel_ptr +=
s->line_inc;
347 for (y = 0; y < 8; y++) {
349 int flags = bytestream2_get_le16(&
s->stream_ptr);
350 for (x = 0; x < 8; x++, flags >>= 2)
351 *
s->pixel_ptr++ =
P[
flags & 0x03];
352 s->pixel_ptr +=
s->line_inc;
359 flags = bytestream2_get_le32(&
s->stream_ptr);
361 for (y = 0; y < 8; y += 2) {
362 for (x = 0; x < 8; x += 2, flags >>= 2) {
364 s->pixel_ptr[x + 1 ] =
365 s->pixel_ptr[x +
s->stride] =
366 s->pixel_ptr[x + 1 +
s->stride] =
P[
flags & 0x03];
368 s->pixel_ptr +=
s->stride * 2;
376 flags = bytestream2_get_le64(&
s->stream_ptr);
378 for (y = 0; y < 8; y++) {
379 for (x = 0; x < 8; x += 2, flags >>= 2) {
381 s->pixel_ptr[x + 1] =
P[
flags & 0x03];
383 s->pixel_ptr +=
s->stride;
386 for (y = 0; y < 8; y += 2) {
387 for (x = 0; x < 8; x++, flags >>= 2) {
389 s->pixel_ptr[x +
s->stride] =
P[
flags & 0x03];
391 s->pixel_ptr +=
s->stride * 2;
418 for (y = 0; y < 16; y++) {
422 flags = bytestream2_get_le32(&
s->stream_ptr);
425 for (x = 0; x < 4; x++, flags >>= 2)
426 *
s->pixel_ptr++ =
P[
flags & 0x03];
428 s->pixel_ptr +=
s->stride - 4;
430 if (y == 7)
s->pixel_ptr -= 8 *
s->stride - 4;
436 uint64_t
flags = bytestream2_get_le64(&
s->stream_ptr);
444 for (y = 0; y < 16; y++) {
445 for (x = 0; x < 4; x++, flags >>= 2)
446 *
s->pixel_ptr++ =
P[
flags & 0x03];
449 s->pixel_ptr +=
s->stride - 4;
451 if (y == 7)
s->pixel_ptr -= 8 *
s->stride - 4;
452 }
else if (y & 1)
s->pixel_ptr +=
s->line_inc;
457 flags = bytestream2_get_le64(&
s->stream_ptr);
471 for (y = 0; y < 8; y++) {
473 s->pixel_ptr +=
s->stride;
485 for (y = 0; y < 8; y += 2) {
486 for (x = 0; x < 8; x += 2) {
488 s->pixel_ptr[x + 1 ] =
489 s->pixel_ptr[x +
s->stride] =
490 s->pixel_ptr[x + 1 +
s->stride] = bytestream2_get_byte(&
s->stream_ptr);
492 s->pixel_ptr +=
s->stride * 2;
510 for (y = 0; y < 8; y++) {
512 P[0] = bytestream2_get_byte(&
s->stream_ptr);
513 P[1] = bytestream2_get_byte(&
s->stream_ptr);
515 memset(
s->pixel_ptr,
P[0], 4);
516 memset(
s->pixel_ptr + 4,
P[1], 4);
517 s->pixel_ptr +=
s->stride;
530 pix = bytestream2_get_byte(&
s->stream_ptr);
532 for (y = 0; y < 8; y++) {
533 memset(
s->pixel_ptr, pix, 8);
534 s->pixel_ptr +=
s->stride;
547 sample[0] = bytestream2_get_byte(&
s->stream_ptr);
548 sample[1] = bytestream2_get_byte(&
s->stream_ptr);
550 for (y = 0; y < 8; y++) {
551 for (x = 0; x < 8; x += 2) {
552 *
s->pixel_ptr++ =
sample[ y & 1 ];
553 *
s->pixel_ptr++ =
sample[!(y & 1)];
555 s->pixel_ptr +=
s->line_inc;
567 x = bytestream2_get_byte(&
s->stream_ptr);
568 y = bytestream2_get_byte(&
s->stream_ptr);
570 ff_tlog(
s->avctx,
"motion bytes = %d, %d\n", x, y);
579 uint16_t *pixel_ptr = (uint16_t*)
s->pixel_ptr;
582 P[0] = bytestream2_get_le16(&
s->stream_ptr);
583 P[1] = bytestream2_get_le16(&
s->stream_ptr);
585 if (!(
P[0] & 0x8000)) {
587 for (y = 0; y < 8; y++) {
588 flags = bytestream2_get_byte(&
s->stream_ptr) | 0x100;
590 *pixel_ptr++ =
P[
flags & 1];
591 pixel_ptr +=
s->line_inc;
596 flags = bytestream2_get_le16(&
s->stream_ptr);
597 for (y = 0; y < 8; y += 2) {
598 for (x = 0; x < 8; x += 2, flags >>= 1) {
601 pixel_ptr[x +
s->stride] =
602 pixel_ptr[x + 1 +
s->stride] =
P[
flags & 1];
604 pixel_ptr +=
s->stride * 2;
615 unsigned int flags = 0;
616 uint16_t *pixel_ptr = (uint16_t*)
s->pixel_ptr;
620 P[0] = bytestream2_get_le16(&
s->stream_ptr);
621 P[1] = bytestream2_get_le16(&
s->stream_ptr);
623 if (!(
P[0] & 0x8000)) {
625 for (y = 0; y < 16; y++) {
629 P[0] = bytestream2_get_le16(&
s->stream_ptr);
630 P[1] = bytestream2_get_le16(&
s->stream_ptr);
632 flags = bytestream2_get_le16(&
s->stream_ptr);
635 for (x = 0; x < 4; x++, flags >>= 1)
636 *pixel_ptr++ =
P[
flags & 1];
637 pixel_ptr +=
s->stride - 4;
639 if (y == 7) pixel_ptr -= 8 *
s->stride - 4;
644 flags = bytestream2_get_le32(&
s->stream_ptr);
645 P[2] = bytestream2_get_le16(&
s->stream_ptr);
646 P[3] = bytestream2_get_le16(&
s->stream_ptr);
648 if (!(
P[2] & 0x8000)) {
652 for (y = 0; y < 16; y++) {
653 for (x = 0; x < 4; x++, flags >>= 1)
654 *pixel_ptr++ =
P[
flags & 1];
655 pixel_ptr +=
s->stride - 4;
658 pixel_ptr -= 8 *
s->stride - 4;
661 flags = bytestream2_get_le32(&
s->stream_ptr);
669 for (y = 0; y < 8; y++) {
673 flags = bytestream2_get_le32(&
s->stream_ptr);
676 for (x = 0; x < 8; x++, flags >>= 1)
677 *pixel_ptr++ =
P[
flags & 1];
678 pixel_ptr +=
s->line_inc;
691 uint16_t *pixel_ptr = (uint16_t*)
s->pixel_ptr;
694 for (x = 0; x < 4; x++)
695 P[x] = bytestream2_get_le16(&
s->stream_ptr);
697 if (!(
P[0] & 0x8000)) {
698 if (!(
P[2] & 0x8000)) {
701 for (y = 0; y < 8; y++) {
703 int flags = bytestream2_get_le16(&
s->stream_ptr);
704 for (x = 0; x < 8; x++, flags >>= 2)
705 *pixel_ptr++ =
P[
flags & 0x03];
706 pixel_ptr +=
s->line_inc;
713 flags = bytestream2_get_le32(&
s->stream_ptr);
715 for (y = 0; y < 8; y += 2) {
716 for (x = 0; x < 8; x += 2, flags >>= 2) {
719 pixel_ptr[x +
s->stride] =
720 pixel_ptr[x + 1 +
s->stride] =
P[
flags & 0x03];
722 pixel_ptr +=
s->stride * 2;
730 flags = bytestream2_get_le64(&
s->stream_ptr);
731 if (!(
P[2] & 0x8000)) {
732 for (y = 0; y < 8; y++) {
733 for (x = 0; x < 8; x += 2, flags >>= 2) {
735 pixel_ptr[x + 1] =
P[
flags & 0x03];
737 pixel_ptr +=
s->stride;
740 for (y = 0; y < 8; y += 2) {
741 for (x = 0; x < 8; x++, flags >>= 2) {
743 pixel_ptr[x +
s->stride] =
P[
flags & 0x03];
745 pixel_ptr +=
s->stride * 2;
759 uint16_t *pixel_ptr = (uint16_t*)
s->pixel_ptr;
761 for (x = 0; x < 4; x++)
762 P[x] = bytestream2_get_le16(&
s->stream_ptr);
766 if (!(
P[0] & 0x8000)) {
769 for (y = 0; y < 16; y++) {
773 for (x = 0; x < 4; x++)
774 P[x] = bytestream2_get_le16(&
s->stream_ptr);
775 flags = bytestream2_get_le32(&
s->stream_ptr);
778 for (x = 0; x < 4; x++, flags >>= 2)
779 *pixel_ptr++ =
P[
flags & 0x03];
781 pixel_ptr +=
s->stride - 4;
783 if (y == 7) pixel_ptr -= 8 *
s->stride - 4;
789 uint64_t
flags = bytestream2_get_le64(&
s->stream_ptr);
791 for (x = 4; x < 8; x++)
792 P[x] = bytestream2_get_le16(&
s->stream_ptr);
793 vert = !(
P[4] & 0x8000);
798 for (y = 0; y < 16; y++) {
799 for (x = 0; x < 4; x++, flags >>= 2)
800 *pixel_ptr++ =
P[
flags & 0x03];
803 pixel_ptr +=
s->stride - 4;
805 if (y == 7) pixel_ptr -= 8 *
s->stride - 4;
806 }
else if (y & 1) pixel_ptr +=
s->line_inc;
811 flags = bytestream2_get_le64(&
s->stream_ptr);
823 uint16_t *pixel_ptr = (uint16_t*)
s->pixel_ptr;
826 for (y = 0; y < 8; y++) {
827 for (x = 0; x < 8; x++)
828 pixel_ptr[x] = bytestream2_get_le16(&
s->stream_ptr);
829 pixel_ptr +=
s->stride;
839 uint16_t *pixel_ptr = (uint16_t*)
s->pixel_ptr;
842 for (y = 0; y < 8; y += 2) {
843 for (x = 0; x < 8; x += 2) {
846 pixel_ptr[x +
s->stride] =
847 pixel_ptr[x + 1 +
s->stride] = bytestream2_get_le16(&
s->stream_ptr);
849 pixel_ptr +=
s->stride * 2;
860 uint16_t *pixel_ptr = (uint16_t*)
s->pixel_ptr;
863 for (y = 0; y < 8; y++) {
865 P[0] = bytestream2_get_le16(&
s->stream_ptr);
866 P[1] = bytestream2_get_le16(&
s->stream_ptr);
868 for (x = 0; x < 8; x++)
869 pixel_ptr[x] =
P[x >> 2];
870 pixel_ptr +=
s->stride;
881 uint16_t *pixel_ptr = (uint16_t*)
s->pixel_ptr;
884 pix = bytestream2_get_le16(&
s->stream_ptr);
886 for (y = 0; y < 8; y++) {
887 for (x = 0; x < 8; x++)
889 pixel_ptr +=
s->stride;
925 s->pixel_ptr +=
s->stride;
929 if (
s->avctx->frame_num > 2)
939 off_x = ((uint16_t)opcode - 0xC000) %
frame->width;
940 off_y = ((uint16_t)opcode - 0xC000) /
frame->width;
942 }
else if (opcode > 0) {
943 off_x = ((uint16_t)opcode - 0x4000) %
frame->width;
944 off_y = ((uint16_t)opcode - 0x4000) /
frame->width;
961 s->stride =
frame->linesize[0];
963 s->line_inc =
s->stride - 8;
964 s->upper_motion_limit_offset = (
s->avctx->height - 8) *
frame->linesize[0]
965 + (
s->avctx->width - 8) * (1 +
s->is_16bpp);
969 for (pass = 0; pass < 2; ++pass) {
971 for (y = 0; y <
s->avctx->height; y += 8) {
972 for (x = 0; x <
s->avctx->width; x += 8) {
973 opcode = bytestream2_get_le16(&decoding_map_ptr);
976 " block @ (%3d, %3d): opcode 0x%X, data ptr offset %d\n",
979 s->pixel_ptr =
frame->data[0] + x + y *
frame->linesize[0];
987 "decode finished with %d bytes left over\n",
999 s->pixel_ptr +=
s->stride;
1009 off_x = ((uint16_t)opcode - 0xC000) %
s->cur_decode_frame->width;
1010 off_y = ((uint16_t)opcode - 0xC000) /
s->cur_decode_frame->width;
1011 copy_from(
s,
s->prev_decode_frame,
s->cur_decode_frame, off_x, off_y);
1012 }
else if (opcode > 0) {
1013 off_x = ((uint16_t)opcode - 0x4000) %
s->cur_decode_frame->width;
1014 off_y = ((uint16_t)opcode - 0x4000) /
s->cur_decode_frame->width;
1015 copy_from(
s,
s->cur_decode_frame,
s->cur_decode_frame, off_x, off_y);
1025 int pass, x, y, changed_block;
1026 int16_t opcode,
skip;
1034 s->stride =
frame->linesize[0];
1036 s->line_inc =
s->stride - 8;
1037 s->upper_motion_limit_offset = (
s->avctx->height - 8) *
frame->linesize[0]
1038 + (
s->avctx->width - 8) * (1 +
s->is_16bpp);
1043 for (pass = 0; pass < 2; ++pass) {
1046 skip = bytestream2_get_le16(&skip_map_ptr);
1048 for (y = 0; y <
s->avctx->height; y += 8) {
1049 for (x = 0; x <
s->avctx->width; x += 8) {
1050 s->pixel_ptr =
s->cur_decode_frame->data[0] + x + y *
s->cur_decode_frame->linesize[0];
1054 opcode = bytestream2_get_le16(&decoding_map_ptr);
1060 skip = bytestream2_get_le16(&skip_map_ptr);
1068 skip = bytestream2_get_le16(&skip_map_ptr);
1069 for (y = 0; y <
s->avctx->height; y += 8) {
1070 for (x = 0; x <
s->avctx->width; x += 8) {
1072 s->pixel_ptr =
frame->data[0] + x + y*
frame->linesize[0];
1081 skip = bytestream2_get_le16(&skip_map_ptr);
1084 if (changed_block) {
1088 if (
s->avctx->frame_num)
1099 "decode finished with %d bytes left over\n",
1107 unsigned char opcode;
1116 s->stride =
frame->linesize[0];
1118 s->stride =
frame->linesize[0] >> 1;
1119 s->mv_ptr =
s->stream_ptr;
1122 s->line_inc =
s->stride - 8;
1123 s->upper_motion_limit_offset = (
s->avctx->height - 8) *
frame->linesize[0]
1124 + (
s->avctx->width - 8) * (1 +
s->is_16bpp);
1127 for (y = 0; y <
s->avctx->height; y += 8) {
1128 for (x = 0; x <
s->avctx->width; x += 8) {
1134 " block @ (%3d, %3d): encoding 0x%X, data ptr offset %d\n",
1138 s->pixel_ptr =
frame->data[0] + x
1139 + y*
frame->linesize[0];
1142 s->pixel_ptr =
frame->data[0] + x*2
1143 + y*
frame->linesize[0];
1148 s->avctx->frame_num, x, y);
1155 "decode finished with %d bytes left over\n",
1175 if (!
s->last_frame || !
s->second_last_frame ||
1176 !
s->cur_decode_frame || !
s->prev_decode_frame) {
1180 s->cur_decode_frame->width = avctx->
width;
1181 s->prev_decode_frame->width = avctx->
width;
1182 s->cur_decode_frame->height = avctx->
height;
1183 s->prev_decode_frame->height = avctx->
height;
1184 s->cur_decode_frame->format = avctx->
pix_fmt;
1185 s->prev_decode_frame->format = avctx->
pix_fmt;
1193 const uint8_t *buf = avpkt->
data;
1194 int buf_size = avpkt->
size;
1199 int video_data_size;
1208 if (!
s->cur_decode_frame->data[0]) {
1223 frame_format =
AV_RL8(buf);
1224 send_buffer =
AV_RL8(buf + 1);
1225 video_data_size =
AV_RL16(buf + 2);
1226 s->decoding_map_size =
AV_RL16(buf + 4);
1227 s->skip_map_size =
AV_RL16(buf + 6);
1229 switch (frame_format) {
1231 if (
s->decoding_map_size) {
1236 if (
s->skip_map_size) {
1247 s->decoding_map_size = ((
s->avctx->width / 8) * (
s->avctx->height / 8)) * 2;
1248 s->decoding_map = buf + 8 + 14;
1249 video_data_size -=
s->decoding_map_size + 14;
1250 if (video_data_size <= 0 || s->decoding_map_size == 0)
1253 if (buf_size < 8 + s->decoding_map_size + 14 + video_data_size)
1256 bytestream2_init(&
s->stream_ptr, buf + 8 +
s->decoding_map_size + 14, video_data_size);
1261 if (!
s->decoding_map_size) {
1266 if (!
s->skip_map_size) {
1276 if (buf_size < 8 + video_data_size + s->decoding_map_size +
s->skip_map_size)
1280 s->decoding_map = buf + 8 + video_data_size;
1281 s->skip_map = buf + 8 + video_data_size +
s->decoding_map_size;
1286 if (!
s->decoding_map_size) {
1291 if (
s->skip_map_size) {
1296 if (buf_size < 8 + video_data_size + s->decoding_map_size)
1300 s->decoding_map = buf + 8 + video_data_size;
1309 if (buf_size < 8 + s->decoding_map_size + video_data_size +
s->skip_map_size) {
1318 #if FF_API_PALETTE_HAS_CHANGED
1320 frame->palette_has_changed =
1323 #if FF_API_PALETTE_HAS_CHANGED
1328 switch (frame_format) {
1340 *got_frame = send_buffer;
1364 .
p.
name =
"interplayvideo",
const unsigned char * decoding_map
static av_cold int ipvideo_decode_init(AVCodecContext *avctx)
#define FF_ENABLE_DEPRECATION_WARNINGS
static int ipvideo_decode_block_opcode_0xB(IpvideoContext *s, AVFrame *frame)
#define FF_CODEC_CAP_INIT_CLEANUP
The codec allows calling the close function for deallocation even if the init function returned a fai...
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)
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.
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 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.
AVCodec p
The public AVCodec.
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
@ AV_PKT_DATA_PARAM_CHANGE
An AV_PKT_DATA_PARAM_CHANGE side data packet is laid out as follows:
#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)
#define FF_CODEC_DECODE_CB(func)
const unsigned char * skip_map
static int ipvideo_decode_frame(AVCodecContext *avctx, AVFrame *frame, int *got_frame, AVPacket *avpkt)
#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
#define CODEC_LONG_NAME(str)
av_cold void ff_hpeldsp_init(HpelDSPContext *c, int flags)
static int ipvideo_decode_block_opcode_0xA(IpvideoContext *s, AVFrame *frame)
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_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 av_always_inline int bytestream2_get_bytes_left(GetByteContext *g)
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.
int(* init)(AVBSFContext *ctx)
#define AV_CODEC_CAP_DR1
Codec uses get_buffer() or get_encode_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)
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)
uint8_t * av_packet_get_side_data(const AVPacket *pkt, enum AVPacketSideDataType type, size_t *size)
Get side information from packet.
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
#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
int av_frame_replace(AVFrame *dst, const AVFrame *src)
Ensure the destination frame refers to the same data described by the source 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.
#define FF_DISABLE_DEPRECATION_WARNINGS
const FFCodec ff_interplay_video_decoder
static int ipvideo_decode_block_opcode_0xE_16(IpvideoContext *s, AVFrame *frame)
This structure stores compressed data.
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, a positive or negative value, which is typically indicating the size in bytes of each pict...
static int ipvideo_decode_block_opcode_0xD(IpvideoContext *s, AVFrame *frame)
#define AVERROR_INVALIDDATA
Invalid data found when processing input.
unsigned char * pixel_ptr
int ff_copy_palette(void *dst, const AVPacket *src, void *logctx)
Check whether the side-data of src contains a palette of size AVPALETTE_SIZE; if so,...
static int ipvideo_decode_block_opcode_0xD_16(IpvideoContext *s, AVFrame *frame)
static void BS_FUNC() skip(BSCTX *bc, unsigned int n)
Skip n bits in the buffer.
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)