66 for (j = 0; j < 2; j++)
67 memset(dst + j*linesize, v[0], 2);
72 for (j = 0; j < 2; j++)
73 for (i = 0; i < 2; i++)
77 for (j = 0; j < 2; j++)
78 for (i = 0; i < 2; i++)
79 dst[j*linesize + i] =
get_bits(gb, 8);
93 for (j = 0; j < 4; j++)
94 memset(dst + j*linesize, v[0], 4);
99 for (j = 2; j >= 0; j -= 2) {
100 for (i = 0; i < 4; i++)
102 for (i = 0; i < 4; i++)
103 dst[(j+1)*linesize + i] = v[
get_bits1(gb)];
107 for (j = 0; j < 4; j += 2)
108 for (i = 0; i < 4; i += 2)
109 decode2x2(gb, dst + j*linesize + i, linesize);
128 for (j = 7; j >= 0; j--)
129 for (i = 0; i < 8; i++)
133 for (j = 0; j < 8; j += 4)
134 for (i = 0; i < 8; i += 4)
135 decode4x4(gb, dst + j*linesize + i, linesize);
140 void *
data,
int *got_frame,
144 int buf_size = avpkt->
size;
146 const uint8_t *buf_end = buf + buf_size;
159 if (video_type == 0 || video_type == 1) {
163 for (j = 0; j < avctx->
height; j += 8)
164 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++)
av_cold void ff_dsputil_init(DSPContext *c, AVCodecContext *avctx)
This structure describes decoded (raw) audio or video data.
void(* release_buffer)(struct AVCodecContext *c, AVFrame *pic)
Called to release buffers which were allocated with get_buffer.
static unsigned int get_bits(GetBitContext *s, int n)
Read 1-25 bits.
enum AVPixelFormat pix_fmt
Pixel format, see AV_PIX_FMT_xxx.
struct JvContext JvContext
static av_cold int decode_init(AVCodecContext *avctx)
int(* reget_buffer)(struct AVCodecContext *c, AVFrame *pic)
Called at the beginning of a frame to get cr buffer for it.
static int decode(MimicContext *ctx, int quality, int num_coeffs, int is_iframe)
8 bit with PIX_FMT_RGB32 palette
uint32_t palette[AVPALETTE_COUNT]
bitstream reader API header.
static int init(AVCodecParserContext *s)
#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)
static void decode8x8(GetBitContext *gb, uint8_t *dst, int linesize, DSPContext *dsp)
Decode 8x8 block.
enum AVPictureType pict_type
Picture type of the frame, see ?_TYPE below.
int width
picture width / height.
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)
op_fill_func fill_block_tab[2]
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.
static void decode4x4(GetBitContext *gb, uint8_t *dst, int linesize)
Decode 4x4 block.
#define AVERROR_INVALIDDATA
static int64_t video_size
int key_frame
1 -> keyframe, 0-> not
This structure stores compressed data.