57 {{1, 2, 3, 4}, {1, 2, 0, 3},
58 {1, 2, 1, 3}, {1, 2, 2, 3},
59 {1, 0, 2, 3}, {1, 0, 0, 2},
60 {1, 0, 1, 2}, {1, 1, 2, 3},
61 {0, 1, 2, 3}, {0, 1, 0, 2},
62 {1, 1, 0, 2}, {0, 1, 1, 2},
63 {0, 0, 1, 2}, {0, 0, 0, 1},
102 "YOP: palette parameters invalid, header probably corrupt\n");
144 if (bufptr < s->dstbuf) {
146 "YOP: cannot decode, file probably corrupt\n");
195 int tag, firstcolor, is_odd_frame;
216 is_odd_frame = avpkt->
data[0];
221 palette[i + firstcolor] = (s->
srcptr[0] << 18) |
enum PixelFormat pix_fmt
Pixel format, see PIX_FMT_xxx.
#define AVERROR_INVALIDDATA
Invalid data found when processing input.
void(* release_buffer)(struct AVCodecContext *c, AVFrame *pic)
Called to release buffers which were allocated with get_buffer.
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.
static int yop_copy_previous_block(YopDecContext *s, int copy_tag)
Copy a previously painted macroblock to the current_block.
static void yop_paint_block(YopDecContext *s, int tag)
Paint a macroblock using the pattern in paint_lut.
static int decode(MimicContext *ctx, int quality, int num_coeffs, int is_iframe)
uint8_t * extradata
some codecs need / can use extradata like Huffman tables.
bitstream reader API header.
static int init(AVCodecParserContext *s)
static int yop_decode_frame(AVCodecContext *avctx, void *data, int *data_size, AVPacket *avpkt)
static void yop_next_macroblock(YopDecContext *s)
Take s->dstptr to the next macroblock in sequence.
#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.
struct AVFrame AVFrame
Audio Video Frame.
int ff_get_buffer(AVCodecContext *avctx, AVFrame *frame)
static const uint8_t paint_lut[15][4]
Lookup table for painting macroblocks.
int linesize[AV_NUM_DATA_POINTERS]
Size, in bytes, of the data for each picture/channel plane.
main external API structure.
static void close(AVCodecParserContext *s)
static av_cold int yop_decode_close(AVCodecContext *avctx)
#define AV_LOG_ERROR
Something went wrong and cannot losslessly be recovered.
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.
common internal api header.
8 bit with PIX_FMT_RGB32 palette
static av_cold int yop_decode_init(AVCodecContext *avctx)
struct YopDecContext YopDecContext