56 {{1, 2, 3, 4}, {1, 2, 0, 3},
57 {1, 2, 1, 3}, {1, 2, 2, 3},
58 {1, 0, 2, 3}, {1, 0, 0, 2},
59 {1, 0, 1, 2}, {1, 1, 2, 3},
60 {0, 1, 2, 3}, {0, 1, 0, 2},
61 {1, 1, 0, 2}, {0, 1, 1, 2},
62 {0, 0, 1, 2}, {0, 0, 0, 1},
106 "YOP: palette parameters invalid, header probably corrupt\n");
148 "YOP: cannot decode, file probably corrupt\n");
154 s->
dstptr[linesize] = bufptr[linesize];
155 s->
dstptr[linesize + 1] = bufptr[linesize + 1];
183 int tag, firstcolor, is_odd_frame;
207 is_odd_frame = avpkt->
data[0];
209 palette = (uint32_t *)frame->
data[1];
212 palette[i + firstcolor] = (s->
srcptr[0] << 18) |
218 for (y = 0; y < avctx->
height; y += 2) {
219 for (x = 0; x < avctx->
width; x += 2) {
static int copy_tag(AVIOContext *in, AVIOContext *out, int32_t tag_name)
#define AVERROR_INVALIDDATA
Invalid data found when processing input.
This structure describes decoded (raw) audio or video data.
static uint8_t yop_get_next_nibble(YopDecContext *s)
Return the next nibble in sequence, consuming a new byte on the input only if necessary.
enum AVPixelFormat pix_fmt
Pixel format, see AV_PIX_FMT_xxx.
static int decode(MimicContext *ctx, int quality, int num_coeffs, int is_iframe)
8 bit with PIX_FMT_RGB32 palette
static int yop_decode_frame(AVCodecContext *avctx, void *data, int *got_frame, AVPacket *avpkt)
uint8_t * extradata
some codecs need / can use extradata like Huffman tables.
#define CODEC_CAP_DR1
Codec uses get_buffer() for allocating buffers and supports custom allocators.
bitstream reader API header.
#define AV_LOG_ERROR
Something went wrong and cannot losslessly be recovered.
#define NULL_IF_CONFIG_SMALL(x)
Return NULL if CONFIG_SMALL is true, otherwise the argument without modification. ...
static const int8_t motion_vector[16][2]
Lookup table for copying macroblocks.
void av_log(void *avcl, int level, const char *fmt,...)
const char * name
Name of the codec implementation.
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...
int width
picture width / height.
static const uint8_t paint_lut[15][4]
Lookup table for painting macroblocks.
Libavcodec external API header.
int linesize[AV_NUM_DATA_POINTERS]
For video, size in bytes of each picture line.
main external API structure.
int ff_get_buffer(AVCodecContext *avctx, AVFrame *frame, int flags)
Get a buffer for a frame.
static int yop_paint_block(YopDecContext *s, int linesize, int tag)
Paint a macroblock using the pattern in paint_lut.
int palette_has_changed
Tell user application that palette has changed from previous frame.
uint8_t * data[AV_NUM_DATA_POINTERS]
pointer to the picture/channel planes.
static int yop_copy_previous_block(YopDecContext *s, int linesize, int copy_tag)
Copy a previously painted macroblock to the current_block.
common internal api header.
static av_cold int init(AVCodecParserContext *s)
static av_cold int yop_decode_init(AVCodecContext *avctx)
int frame_number
Frame counter, set by libavcodec.
This structure stores compressed data.