#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <unistd.h>
#include "avcodec.h"
#include "bytestream.h"
#include "dsputil.h"
Go to the source code of this file.
This decoder presently only supports a PAL8 output colorspace.
An Interplay video frame consists of 2 parts: The decoding map and the video data. A demuxer must load these 2 parts together in a single buffer before sending it through the stream to this decoder.
Definition in file interplayvideo.c.
#define CHECK_STREAM_PTR | ( | n | ) |
Value:
if ((s->stream_ptr + n) > s->stream_end) { \ av_log(s->avctx, AV_LOG_ERROR, "Interplay video warning: stream_ptr out of bounds (%p >= %p)\n", \ s->stream_ptr + n, s->stream_end); \ return -1; \ }
Definition at line 78 of file interplayvideo.c.
Referenced by ipvideo_decode_block_opcode_0x2(), ipvideo_decode_block_opcode_0x3(), ipvideo_decode_block_opcode_0x4(), ipvideo_decode_block_opcode_0x5(), ipvideo_decode_block_opcode_0x7(), ipvideo_decode_block_opcode_0x8(), ipvideo_decode_block_opcode_0x9(), ipvideo_decode_block_opcode_0xA(), ipvideo_decode_block_opcode_0xB(), ipvideo_decode_block_opcode_0xC(), ipvideo_decode_block_opcode_0xD(), ipvideo_decode_block_opcode_0xE(), ipvideo_decode_block_opcode_0xF(), msvideo1_decode_16bit(), msvideo1_decode_8bit(), qtrle_decode_16bpp(), qtrle_decode_1bpp(), qtrle_decode_24bpp(), qtrle_decode_2n4bpp(), qtrle_decode_32bpp(), and qtrle_decode_8bpp().
#define COPY_FROM_CURRENT | ( | ) |
Value:
motion_offset = current_offset; \ motion_offset += y * s->stride; \ motion_offset += x; \ if (motion_offset < 0) { \ av_log(s->avctx, AV_LOG_ERROR, " Interplay video: motion offset < 0 (%d)\n", motion_offset); \ return -1; \ } else if (motion_offset > s->upper_motion_limit_offset) { \ av_log(s->avctx, AV_LOG_ERROR, " Interplay video: motion offset above limit (%d >= %d)\n", \ motion_offset, s->upper_motion_limit_offset); \ return -1; \ } \ s->dsp.put_pixels_tab[0][0](s->pixel_ptr, \ s->current_frame.data[0] + motion_offset, s->stride, 8);
Definition at line 85 of file interplayvideo.c.
Referenced by ipvideo_decode_block_opcode_0x3().
#define COPY_FROM_PREVIOUS | ( | ) |
Value:
motion_offset = current_offset; \ motion_offset += y * s->stride; \ motion_offset += x; \ if (motion_offset < 0) { \ av_log(s->avctx, AV_LOG_ERROR, " Interplay video: motion offset < 0 (%d)\n", motion_offset); \ return -1; \ } else if (motion_offset > s->upper_motion_limit_offset) { \ av_log(s->avctx, AV_LOG_ERROR, " Interplay video: motion offset above limit (%d >= %d)\n", \ motion_offset, s->upper_motion_limit_offset); \ return -1; \ } \ s->dsp.put_pixels_tab[0][0](s->pixel_ptr, \ s->last_frame.data[0] + motion_offset, s->stride, 8);
Definition at line 100 of file interplayvideo.c.
Referenced by ipvideo_decode_block_opcode_0x0(), ipvideo_decode_block_opcode_0x4(), and ipvideo_decode_block_opcode_0x5().
#define COPY_FROM_SECOND_LAST | ( | ) |
Value:
motion_offset = current_offset; \ motion_offset += y * s->stride; \ motion_offset += x; \ if (motion_offset < 0) { \ av_log(s->avctx, AV_LOG_ERROR, " Interplay video: motion offset < 0 (%d)\n", motion_offset); \ return -1; \ } else if (motion_offset > s->upper_motion_limit_offset) { \ av_log(s->avctx, AV_LOG_ERROR, " Interplay video: motion offset above limit (%d >= %d)\n", \ motion_offset, s->upper_motion_limit_offset); \ return -1; \ } \ s->dsp.put_pixels_tab[0][0](s->pixel_ptr, \ s->second_last_frame.data[0] + motion_offset, s->stride, 8);
Definition at line 115 of file interplayvideo.c.
Referenced by ipvideo_decode_block_opcode_0x1(), and ipvideo_decode_block_opcode_0x2().
#define DEBUG_INTERPLAY 0 |
Definition at line 49 of file interplayvideo.c.
#define PALETTE_COUNT 256 |
Definition at line 46 of file interplayvideo.c.
static void debug_interplay | ( | const char * | format, | |
... | ||||
) | [inline, static] |
Definition at line 53 of file interplayvideo.c.
Referenced by ipvideo_decode_block_opcode_0x2(), ipvideo_decode_block_opcode_0x3(), ipvideo_decode_block_opcode_0x4(), ipvideo_decode_block_opcode_0x5(), and ipvideo_decode_opcodes().
static int ipvideo_decode_block_opcode_0x0 | ( | IpvideoContext * | s | ) | [static] |
static int ipvideo_decode_block_opcode_0x1 | ( | IpvideoContext * | s | ) | [static] |
static int ipvideo_decode_block_opcode_0x2 | ( | IpvideoContext * | s | ) | [static] |
static int ipvideo_decode_block_opcode_0x3 | ( | IpvideoContext * | s | ) | [static] |
static int ipvideo_decode_block_opcode_0x4 | ( | IpvideoContext * | s | ) | [static] |
static int ipvideo_decode_block_opcode_0x5 | ( | IpvideoContext * | s | ) | [static] |
static int ipvideo_decode_block_opcode_0x6 | ( | IpvideoContext * | s | ) | [static] |
static int ipvideo_decode_block_opcode_0x7 | ( | IpvideoContext * | s | ) | [static] |
static int ipvideo_decode_block_opcode_0x8 | ( | IpvideoContext * | s | ) | [static] |
static int ipvideo_decode_block_opcode_0x9 | ( | IpvideoContext * | s | ) | [static] |
static int ipvideo_decode_block_opcode_0xA | ( | IpvideoContext * | s | ) | [static] |
static int ipvideo_decode_block_opcode_0xB | ( | IpvideoContext * | s | ) | [static] |
static int ipvideo_decode_block_opcode_0xC | ( | IpvideoContext * | s | ) | [static] |
static int ipvideo_decode_block_opcode_0xD | ( | IpvideoContext * | s | ) | [static] |
static int ipvideo_decode_block_opcode_0xE | ( | IpvideoContext * | s | ) | [static] |
static int ipvideo_decode_block_opcode_0xF | ( | IpvideoContext * | s | ) | [static] |
static av_cold int ipvideo_decode_end | ( | AVCodecContext * | avctx | ) | [static] |
Definition at line 922 of file interplayvideo.c.
static int ipvideo_decode_frame | ( | AVCodecContext * | avctx, | |
void * | data, | |||
int * | data_size, | |||
const uint8_t * | buf, | |||
int | buf_size | |||
) | [static] |
Definition at line 879 of file interplayvideo.c.
static av_cold int ipvideo_decode_init | ( | AVCodecContext * | avctx | ) | [static] |
Definition at line 838 of file interplayvideo.c.
static void ipvideo_decode_opcodes | ( | IpvideoContext * | s | ) | [static] |
Initial value:
{ "interplayvideo", CODEC_TYPE_VIDEO, CODEC_ID_INTERPLAY_VIDEO, sizeof(IpvideoContext), ipvideo_decode_init, NULL, ipvideo_decode_end, ipvideo_decode_frame, CODEC_CAP_DR1, .long_name = NULL_IF_CONFIG_SMALL("Interplay MVE video"), }
Definition at line 935 of file interplayvideo.c.
int(* ipvideo_decode_block[16])(IpvideoContext *s) [static] |
Referenced by ipvideo_decode_init(), and ipvideo_decode_opcodes().