43 #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_number > 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;
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);
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",
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;
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);
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];
1053 if (skip != -0x8000 && skip) {
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) {
1075 if (skip != -0x8000 && skip) {
1081 skip = bytestream2_get_le16(&skip_map_ptr);
1084 if (changed_block) {
1088 if (
s->avctx->frame_number)
1099 "decode finished with %d bytes left over\n",
1107 unsigned char opcode;
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",
1148 s->avctx->frame_number, 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;
1191 void *
data,
int *got_frame,
1195 int buf_size = avpkt->
size;
1201 int video_data_size;
1210 if (!
s->cur_decode_frame->data[0]) {
1225 frame_format =
AV_RL8(buf);
1226 send_buffer =
AV_RL8(buf + 1);
1227 video_data_size =
AV_RL16(buf + 2);
1228 s->decoding_map_size =
AV_RL16(buf + 4);
1229 s->skip_map_size =
AV_RL16(buf + 6);
1231 switch (frame_format) {
1233 if (
s->decoding_map_size) {
1238 if (
s->skip_map_size) {
1249 s->decoding_map_size = ((
s->avctx->width / 8) * (
s->avctx->height / 8)) * 2;
1250 s->decoding_map = buf + 8 + 14;
1251 video_data_size -=
s->decoding_map_size + 14;
1252 if (video_data_size <= 0 || s->decoding_map_size == 0)
1255 if (buf_size < 8 + s->decoding_map_size + 14 + video_data_size)
1258 bytestream2_init(&
s->stream_ptr, buf + 8 +
s->decoding_map_size + 14, video_data_size);
1263 if (!
s->decoding_map_size) {
1268 if (!
s->skip_map_size) {
1278 if (buf_size < 8 + video_data_size + s->decoding_map_size +
s->skip_map_size)
1282 s->decoding_map = buf + 8 + video_data_size;
1283 s->skip_map = buf + 8 + video_data_size +
s->decoding_map_size;
1288 if (!
s->decoding_map_size) {
1293 if (
s->skip_map_size) {
1298 if (buf_size < 8 + video_data_size + s->decoding_map_size)
1302 s->decoding_map = buf + 8 + video_data_size;
1311 if (buf_size < 8 + s->decoding_map_size + video_data_size +
s->skip_map_size) {
1330 switch (frame_format) {
1342 *got_frame = send_buffer;
1367 .
name =
"interplayvideo",
Libavcodec external API header.
uint8_t * av_packet_get_side_data(const AVPacket *pkt, enum AVPacketSideDataType type, buffer_size_t *size)
static av_cold int init(AVCodecContext *avctx)
static av_always_inline unsigned int bytestream2_get_buffer(GetByteContext *g, uint8_t *dst, unsigned int size)
static av_always_inline int bytestream2_get_bytes_left(GetByteContext *g)
static av_always_inline void bytestream2_init(GetByteContext *g, const uint8_t *buf, int buf_size)
static av_always_inline void bytestream2_skip(GetByteContext *g, unsigned int size)
static av_always_inline int bytestream2_seek(GetByteContext *g, int offset, int whence)
static av_always_inline int bytestream2_tell(GetByteContext *g)
#define flags(name, subs,...)
#define FFSWAP(type, a, b)
int ff_get_buffer(AVCodecContext *avctx, AVFrame *frame, int flags)
Get a buffer for a frame.
static void decode(AVCodecContext *dec_ctx, AVPacket *pkt, AVFrame *frame, FILE *outfile)
bitstream reader API header.
static int get_bits_left(GetBitContext *gb)
static unsigned int get_bits(GetBitContext *s, int n)
Read 1-25 bits.
static int init_get_bits(GetBitContext *s, const uint8_t *buffer, int bit_size)
Initialize GetBitContext.
#define AV_CODEC_CAP_DR1
Codec uses get_buffer() or get_encode_buffer() for allocating buffers and supports custom allocators.
#define AV_GET_BUFFER_FLAG_REF
The decoder will keep a reference to the frame and may reuse it later.
#define AV_CODEC_CAP_PARAM_CHANGE
Codec supports changed parameters at any point.
@ AV_CODEC_ID_INTERPLAY_VIDEO
@ AV_PKT_DATA_PALETTE
An AV_PKT_DATA_PALETTE side data packet contains exactly AVPALETTE_SIZE bytes worth of palette.
@ AV_PKT_DATA_PARAM_CHANGE
An AV_PKT_DATA_PARAM_CHANGE side data packet is laid out as follows:
#define AVERROR_INVALIDDATA
Invalid data found when processing input.
void av_frame_unref(AVFrame *frame)
Unreference all the buffers referenced by frame and reset the frame fields.
int av_frame_ref(AVFrame *dst, const AVFrame *src)
Set up a new reference to the data described by the source frame.
void av_frame_free(AVFrame **frame)
Free the frame and any dynamically allocated objects in it, e.g.
AVFrame * av_frame_alloc(void)
Allocate an AVFrame and set its fields to default values.
#define AV_LOG_DEBUG
Stuff which is only useful for libav* developers.
#define AV_LOG_ERROR
Something went wrong and cannot losslessly be recovered.
av_cold void ff_hpeldsp_init(HpelDSPContext *c, int flags)
AVCodec ff_interplay_video_decoder
static void ipvideo_decode_format_06_opcodes(IpvideoContext *s, AVFrame *frame)
static void(*const ipvideo_format_10_passes[])(IpvideoContext *s, AVFrame *frame, int16_t op)
static av_cold int ipvideo_decode_end(AVCodecContext *avctx)
static void ipvideo_format_06_firstpass(IpvideoContext *s, AVFrame *frame, int16_t opcode)
static void ipvideo_decode_format_10_opcodes(IpvideoContext *s, AVFrame *frame)
static int copy_from(IpvideoContext *s, AVFrame *src, AVFrame *dst, int delta_x, int delta_y)
static int ipvideo_decode_block_opcode_0x9(IpvideoContext *s, AVFrame *frame)
static int ipvideo_decode_block_opcode_0xC(IpvideoContext *s, AVFrame *frame)
static int ipvideo_decode_block_opcode_0x7_16(IpvideoContext *s, AVFrame *frame)
static void ipvideo_decode_format_11_opcodes(IpvideoContext *s, AVFrame *frame)
static int ipvideo_decode_block_opcode_0x2(IpvideoContext *s, AVFrame *frame)
static int ipvideo_decode_block_opcode_0x9_16(IpvideoContext *s, AVFrame *frame)
static int ipvideo_decode_block_opcode_0x7(IpvideoContext *s, AVFrame *frame)
static int ipvideo_decode_block_opcode_0x8_16(IpvideoContext *s, AVFrame *frame)
static int ipvideo_decode_block_opcode_0xD_16(IpvideoContext *s, AVFrame *frame)
static int ipvideo_decode_block_opcode_0xF(IpvideoContext *s, AVFrame *frame)
static int ipvideo_decode_block_opcode_0x1(IpvideoContext *s, AVFrame *frame)
static int ipvideo_decode_block_opcode_0xA(IpvideoContext *s, AVFrame *frame)
static void ipvideo_format_06_secondpass(IpvideoContext *s, AVFrame *frame, int16_t opcode)
static void(*const ipvideo_format_06_passes[])(IpvideoContext *s, AVFrame *frame, int16_t op)
static int ipvideo_decode_block_opcode_0xB_16(IpvideoContext *s, AVFrame *frame)
static int ipvideo_decode_frame(AVCodecContext *avctx, void *data, int *got_frame, AVPacket *avpkt)
static int(*const ipvideo_decode_block[])(IpvideoContext *s, AVFrame *frame)
static int ipvideo_decode_block_opcode_0x0(IpvideoContext *s, AVFrame *frame)
static int ipvideo_decode_block_opcode_0xA_16(IpvideoContext *s, AVFrame *frame)
static int ipvideo_decode_block_opcode_0x4(IpvideoContext *s, AVFrame *frame)
static int ipvideo_decode_block_opcode_0x8(IpvideoContext *s, AVFrame *frame)
static int ipvideo_decode_block_opcode_0xB(IpvideoContext *s, AVFrame *frame)
static int ipvideo_decode_block_opcode_0xE(IpvideoContext *s, AVFrame *frame)
static int(*const ipvideo_decode_block16[])(IpvideoContext *s, AVFrame *frame)
static int ipvideo_decode_block_opcode_0x3(IpvideoContext *s, AVFrame *frame)
static int ipvideo_decode_block_opcode_0xE_16(IpvideoContext *s, AVFrame *frame)
static av_cold int ipvideo_decode_init(AVCodecContext *avctx)
static int ipvideo_decode_block_opcode_0xD(IpvideoContext *s, AVFrame *frame)
static int ipvideo_decode_block_opcode_0x5(IpvideoContext *s, AVFrame *frame)
static int ipvideo_decode_block_opcode_0xC_16(IpvideoContext *s, AVFrame *frame)
static int ipvideo_decode_block_opcode_0x6_16(IpvideoContext *s, AVFrame *frame)
static void ipvideo_format_10_secondpass(IpvideoContext *s, AVFrame *frame, int16_t opcode)
static int ipvideo_decode_block_opcode_0x6(IpvideoContext *s, AVFrame *frame)
static void ipvideo_format_10_firstpass(IpvideoContext *s, AVFrame *frame, int16_t opcode)
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 FF_CODEC_CAP_INIT_CLEANUP
The codec allows calling the close function for deallocation even if the init function returned a fai...
common internal API header
#define NULL_IF_CONFIG_SMALL(x)
Return NULL if CONFIG_SMALL is true, otherwise the argument without modification.
@ AV_PIX_FMT_PAL8
8 bits with AV_PIX_FMT_RGB32 palette
#define AV_PIX_FMT_RGB555
typedef void(RENAME(mix_any_func_type))
main external API structure.
enum AVPixelFormat pix_fmt
Pixel format, see AV_PIX_FMT_xxx.
int width
picture width / height.
int bits_per_coded_sample
bits per sample/pixel from the demuxer (needed for huffyuv).
int flags
AV_CODEC_FLAG_*.
const char * name
Name of the codec implementation.
This structure describes decoded (raw) audio or video data.
uint8_t * data[AV_NUM_DATA_POINTERS]
pointer to the picture/channel planes.
int palette_has_changed
Tell user application that palette has changed from previous frame.
int linesize[AV_NUM_DATA_POINTERS]
For video, size in bytes of each picture line.
This structure stores compressed data.
const unsigned char * decoding_map
AVFrame * second_last_frame
const unsigned char * skip_map
GetByteContext stream_ptr
unsigned char * pixel_ptr
AVFrame * cur_decode_frame
int upper_motion_limit_offset
AVFrame * prev_decode_frame