27 #define BITSTREAM_READER_LE
41 #define CODE_VLC_BITS 14
69 for (i = 0; i < c * 2; i++)
72 dst[out++] = table[c * 2];
73 dst[out++] = table[(c * 2) + 1];
78 for (j = 1; j <
height; j++){
86 for (i = 0; i < c * 2; i++) {
87 dst[out] = dst[out -
stride];
91 t = dst[out -
stride] + (table[c * 2] - 128);
95 t = dst[out -
stride] + (table[(c * 2) + 1] - 128);
117 for (j = 0; j <
height; j++){
125 t = dst[out] + (((table[c * 2] - 128)*3) >> 2);
129 t = dst[out] + (((table[(c * 2) + 1] - 128)*3) >> 2);
141 void *
data,
int *got_frame,
145 int buf_size = avpkt->
size;
163 if (start >= buf_size) {
171 #ifndef BITSTREAM_READER_LE
172 for (i = 0; i < buf_size; i++)
212 #ifdef BITSTREAM_READER_LE
static int ir2_get_code(GetBitContext *gb)
This structure describes decoded (raw) audio or video data.
int buffer_hints
codec suggestion on buffer type if != 0
void(* release_buffer)(struct AVCodecContext *c, AVFrame *pic)
Called to release buffers which were allocated with get_buffer.
enum AVPixelFormat pix_fmt
Pixel format, see AV_PIX_FMT_xxx.
Macro definitions for various function/variable attributes.
int(* reget_buffer)(struct AVCodecContext *c, AVFrame *pic)
Called at the beginning of a frame to get cr buffer for it.
AVCodec ff_indeo2_decoder
static int decode(MimicContext *ctx, int quality, int num_coeffs, int is_iframe)
bitstream reader API header.
static av_cold int ir2_decode_init(AVCodecContext *avctx)
static int init(AVCodecParserContext *s)
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.
struct Ir2Context Ir2Context
static av_cold int ir2_decode_end(AVCodecContext *avctx)
int width
picture width / height.
static av_always_inline int get_vlc2(GetBitContext *s, VLC_TYPE(*table)[2], int bits, int max_depth)
Parse a vlc code.
#define INIT_VLC_USE_NEW_STATIC
static int ir2_decode_plane(Ir2Context *ctx, int width, int height, uint8_t *dst, int stride, const uint8_t *table)
static int ir2_decode_frame(AVCodecContext *avctx, void *data, int *got_frame, AVPacket *avpkt)
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 int ir2_decode_plane_inter(Ir2Context *ctx, int width, int height, uint8_t *dst, int stride, const uint8_t *table)
#define init_vlc(vlc, nb_bits, nb_codes,bits, bits_wrap, bits_size,codes, codes_wrap, codes_size,flags)
planar YUV 4:1:0, 9bpp, (1 Cr & Cb sample per 4x4 Y samples)
static int init_get_bits(GetBitContext *s, const uint8_t *buffer, int bit_size)
Initialize GetBitContext.
#define FF_BUFFER_HINTS_REUSABLE
static VLC_TYPE vlc_tables[VLC_TABLES_SIZE][2]
static const uint8_t ir2_luma_table[256]
#define FF_BUFFER_HINTS_PRESERVE
uint8_t * data[AV_NUM_DATA_POINTERS]
pointer to the picture/channel planes.
#define AVERROR_INVALIDDATA
VLC_TYPE(* table)[2]
code, bits
#define FF_BUFFER_HINTS_VALID
const uint8_t ff_reverse[256]
This structure stores compressed data.
static const uint16_t ir2_codes[IR2_CODES][2]