65 for (j = 0; j < 2; j++)
66 memset(dst + j * linesize, v[0], 2);
71 for (j = 0; j < 2; j++)
72 for (i = 0; i < 2; i++)
76 for (j = 0; j < 2; j++)
77 for (i = 0; i < 2; i++)
78 dst[j * linesize + i] =
get_bits(gb, 8);
92 for (j = 0; j < 4; j++)
93 memset(dst + j * linesize, v[0], 4);
98 for (j = 2; j >= 0; j -= 2) {
99 for (i = 0; i < 4; i++)
100 dst[j * linesize + i] = v[
get_bits1(gb)];
101 for (i = 0; i < 4; i++)
102 dst[(j + 1) * linesize + i] = v[
get_bits1(gb)];
106 for (j = 0; j < 4; j += 2)
107 for (i = 0; i < 4; i += 2)
108 decode2x2(gb, dst + j * linesize + i, linesize);
128 for (j = 7; j >= 0; j--)
129 for (i = 0; i < 8; i++)
130 dst[j * linesize + i] = v[
get_bits1(gb)];
133 for (j = 0; j < 8; j += 4)
134 for (i = 0; i < 8; i += 4)
135 decode4x4(gb, dst + j * linesize + i, linesize);
143 int buf_size = avpkt->
size;
145 const uint8_t *buf_end = buf + buf_size;
146 int video_size, video_type, i, j, ret;
158 if (video_type == 0 || video_type == 1) {
162 for (j = 0; j < avctx->
height; j += 8)
163 for (i = 0; i < avctx->
width; i += 8)
169 }
else if (video_type == 2) {
170 if (buf + 1 <= buf_end) {
172 for (j = 0; j < avctx->
height; j++)
178 "unsupported frame type %i\n", video_type);
#define AVERROR_INVALIDDATA
Invalid data found when processing input.
This structure describes decoded (raw) audio or video data.
static unsigned int get_bits(GetBitContext *s, int n)
Read 1-25 bits.
#define AV_LOG_WARNING
Something somehow does not look correct.
static void decode8x8(GetBitContext *gb, uint8_t *dst, int linesize, BlockDSPContext *bdsp)
Decode 8x8 block.
enum AVPixelFormat pix_fmt
Pixel format, see AV_PIX_FMT_xxx.
static av_cold int decode_init(AVCodecContext *avctx)
static int decode(MimicContext *ctx, int quality, int num_coeffs, int is_iframe)
AVFrame * av_frame_alloc(void)
Allocate an AVFrame and set its fields to default values.
8 bit with PIX_FMT_RGB32 palette
uint32_t palette[AVPALETTE_COUNT]
int av_frame_ref(AVFrame *dst, const AVFrame *src)
Set up a new reference to the data described by the source frame.
#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.
void av_frame_free(AVFrame **frame)
Free the frame and any dynamically allocated objects in it, e.g.
#define NULL_IF_CONFIG_SMALL(x)
Return NULL if CONFIG_SMALL is true, otherwise the argument without modification. ...
void av_log(void *avcl, int level, const char *fmt,...)
const char * name
Name of the codec implementation.
static int decode_frame(AVCodecContext *avctx, void *data, int *got_frame, AVPacket *avpkt)
int ff_reget_buffer(AVCodecContext *avctx, AVFrame *frame)
Identical in function to av_frame_make_writable(), except it uses ff_get_buffer() to allocate the buf...
enum AVPictureType pict_type
Picture type of the frame.
int width
picture width / height.
Libavcodec external API header.
av_cold void ff_blockdsp_init(BlockDSPContext *c, AVCodecContext *avctx)
int linesize[AV_NUM_DATA_POINTERS]
For video, size in bytes of each picture line.
main external API structure.
static void close(AVCodecParserContext *s)
static unsigned int get_bits1(GetBitContext *s)
static int init_get_bits(GetBitContext *s, const uint8_t *buffer, int bit_size)
Initialize GetBitContext.
int palette_has_changed
Tell user application that palette has changed from previous frame.
static av_cold int decode_close(AVCodecContext *avctx)
uint8_t * data[AV_NUM_DATA_POINTERS]
pointer to the picture/channel planes.
static void decode2x2(GetBitContext *gb, uint8_t *dst, int linesize)
Decode 2x2 block.
common internal api header.
static void decode4x4(GetBitContext *gb, uint8_t *dst, int linesize)
Decode 4x4 block.
static av_cold int init(AVCodecParserContext *s)
int key_frame
1 -> keyframe, 0-> not
This structure stores compressed data.
op_fill_func fill_block_tab[2]