42 int num_lens, num_codes, num_codes_sum, prefix;
51 for (i = 0; i < num_lens; i++) {
53 num_codes_sum += num_codes;
55 if (num_codes_sum > 256) {
59 "Too many VLCs (%d) to be read.\n", num_codes_sum);
63 for (j = 0; j < num_codes; j++) {
66 codes[count] = prefix++;
75 codes, 2, 2, symbols, 1, 1, 0);
93 pred[0] = top_left[0];
94 pred[1] = top_left[1];
95 pred[2] = top_left[2];
96 pred[3] = top_left[3];
140 top_left[0] = dst[0];
144 top_left[1] = dst[1];
145 top_left[2] = dst[2];
146 top_left[3] = dst[3];
201 for (i = 0; i < 4; i++) {
204 for (j = 0; j <= i; j++)
208 "Could not read code table %d.\n", i);
214 for (i = 0; i < avctx->
height; i++) {
220 for (i = 0; i < 4; i++)
244 for (i = 0; i < 3; i++) {
247 for (j = 0; j <= i; j++)
251 "Could not read code table %d.\n", i);
257 for (i = 0; i < avctx->
height; i++) {
258 for (j = 0; j < 3; j++)
264 for (i = 0; i < 3; i++)
271 int *got_picture_ptr,
AVPacket *avpkt)
276 uint32_t info_tag, info_offset;
279 int coding_type, ret;
289 if (info_tag ==
MKTAG(
'I',
'N',
'F',
'O')) {
290 info_offset =
AV_RL32(src + 4);
291 if (info_offset > UINT32_MAX - 8 || info_offset + 8 > avpkt->
size) {
293 "Invalid INFO header offset: 0x%08X is too large.\n",
304 data_size = (avpkt->
size - info_offset) & ~1;
328 coding_type = (
AV_RL32(src) >> 8) & 0xFF;
331 switch (coding_type) {
371 *got_picture_ptr = 1;
av_cold void ff_dsputil_init(DSPContext *c, AVCodecContext *avctx)
static int read_rgb24_component_line(CLLCContext *ctx, GetBitContext *gb, int *top_left, VLC *vlc, uint8_t *outbuf)
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.
packed RGB 8:8:8, 24bpp, RGBRGB...
AVFrame * coded_frame
the picture in the bitstream
enum AVPixelFormat pix_fmt
Pixel format, see AV_PIX_FMT_xxx.
void av_fast_padded_malloc(void *ptr, unsigned int *size, size_t min_size)
Allocate a buffer with padding, reusing the given one if large enough.
static int cllc_decode_frame(AVCodecContext *avctx, void *data, int *got_picture_ptr, AVPacket *avpkt)
int bits_per_raw_sample
Bits per sample/pixel of internal libavcodec pixel/sample format.
void av_freep(void *arg)
Free a memory block which has been allocated with av_malloc(z)() or av_realloc() and set the pointer ...
static int decode(MimicContext *ctx, int quality, int num_coeffs, int is_iframe)
int ff_init_vlc_sparse(VLC *vlc, int nb_bits, int nb_codes, const void *bits, int bits_wrap, int bits_size, const void *codes, int codes_wrap, int codes_size, const void *symbols, int symbols_wrap, int symbols_size, int flags)
bitstream reader API header.
#define MKTAG(a, b, c, d)
static av_cold int cllc_decode_close(AVCodecContext *avctx)
static int init(AVCodecParserContext *s)
static int read_code_table(CLLCContext *ctx, GetBitContext *gb, VLC *vlc)
#define UPDATE_CACHE(name, gb)
void(* bswap16_buf)(uint16_t *dst, const uint16_t *src, int len)
int reference
is this picture used as reference The values for this are the same as the MpegEncContext.picture_structure variable, that is 1->top field, 2->bottom field, 3->frame/both fields.
#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.
#define CLOSE_READER(name, gb)
packed ARGB 8:8:8:8, 32bpp, ARGBARGB...
AVFrame * avcodec_alloc_frame(void)
Allocate an AVFrame and set its fields to default values.
static int decode_rgb24_frame(CLLCContext *ctx, GetBitContext *gb, AVFrame *pic)
static int decode_argb_frame(CLLCContext *ctx, GetBitContext *gb, AVFrame *pic)
enum AVPictureType pict_type
Picture type of the frame, see ?_TYPE below.
int width
picture width / height.
int ff_get_buffer(AVCodecContext *avctx, AVFrame *frame)
Get a buffer for a frame.
#define GET_VLC(code, name, gb, table, bits, max_depth)
If the vlc code is invalid and max_depth=1, then no bits will be removed.
static const float pred[4]
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)
#define OPEN_READER(name, gb)
static void skip_bits(GetBitContext *s, int n)
static int init_get_bits(GetBitContext *s, const uint8_t *buffer, int bit_size)
Initialize GetBitContext.
struct CLLCContext CLLCContext
uint8_t * data[AV_NUM_DATA_POINTERS]
pointer to the picture/channel planes.
static av_cold int cllc_decode_init(AVCodecContext *avctx)
common internal api header.
#define AVERROR_INVALIDDATA
static int read_argb_line(CLLCContext *ctx, GetBitContext *gb, int *top_left, VLC *vlc, uint8_t *outbuf)
VLC_TYPE(* table)[2]
code, bits
int key_frame
1 -> keyframe, 0-> not
This structure stores compressed data.
void ff_free_vlc(VLC *vlc)