30 #define BITSTREAM_READER_LE
44 #define CODE_VLC_BITS 14
70 for (
i = 0;
i <
c * 2;
i++)
81 for (j = 1; j <
height; j++) {
92 for (
i = 0;
i <
c * 2;
i++) {
93 dst[
out] = dst[
out - pitch];
100 t = dst[
out - pitch] + (
table[
c * 2] - 128);
104 t = dst[
out - pitch] + (
table[(
c * 2) + 1] - 128);
126 for (j = 0; j <
height; j++) {
138 t = dst[
out] + (((
table[
c * 2] - 128)*3) >> 2);
142 t = dst[
out] + (((
table[(
c * 2) + 1] - 128)*3) >> 2);
154 void *
data,
int *got_frame,
159 int buf_size = avpkt->
size;
170 if (start >= buf_size) {
175 s->decode_delta = buf[18];
182 ltab = buf[0x22] & 3;
183 ctab = buf[0x22] >> 2;
190 if (
s->decode_delta) {
Macro definitions for various function/variable attributes.
Libavcodec external API header.
static av_cold int init(AVCodecContext *avctx)
int ff_reget_buffer(AVCodecContext *avctx, AVFrame *frame, int flags)
Identical in function to ff_get_buffer(), except it reuses the existing buffer if available.
static void decode(AVCodecContext *dec_ctx, AVPacket *pkt, AVFrame *frame, FILE *outfile)
bitstream reader API header.
static av_always_inline int get_vlc2(GetBitContext *s, VLC_TYPE(*table)[2], int bits, int max_depth)
Parse a vlc code.
static int get_bits_left(GetBitContext *gb)
static int init_get_bits8(GetBitContext *s, const uint8_t *buffer, int byte_size)
Initialize GetBitContext.
#define AV_CODEC_CAP_DR1
Codec uses get_buffer() or get_encode_buffer() for allocating buffers and supports custom allocators.
#define AVERROR_INVALIDDATA
Invalid data found when processing input.
int av_frame_ref(AVFrame *dst, const AVFrame *src)
Set up a new reference to the data described by the source frame.
void av_frame_free(AVFrame **frame)
Free the frame and any dynamically allocated objects in it, e.g.
AVFrame * av_frame_alloc(void)
Allocate an AVFrame and set its fields to default values.
#define AV_LOG_ERROR
Something went wrong and cannot losslessly be recovered.
static int ir2_get_code(GetBitContext *gb)
static av_cold void ir2_init_static(void)
static int ir2_decode_plane(Ir2Context *ctx, int width, int height, uint8_t *dst, int pitch, const uint8_t *table)
static av_cold int ir2_decode_init(AVCodecContext *avctx)
static int ir2_decode_frame(AVCodecContext *avctx, void *data, int *got_frame, AVPacket *avpkt)
static av_cold int ir2_decode_end(AVCodecContext *avctx)
AVCodec ff_indeo2_decoder
static int ir2_decode_plane_inter(Ir2Context *ctx, int width, int height, uint8_t *dst, int pitch, const uint8_t *table)
static const uint8_t ir2_tab[IR2_CODES][2]
static const uint8_t ir2_delta_table[4][256]
#define FF_CODEC_CAP_INIT_THREADSAFE
The codec does not modify any global variables in the init function, allowing to call the init functi...
common internal API header
#define NULL_IF_CONFIG_SMALL(x)
Return NULL if CONFIG_SMALL is true, otherwise the argument without modification.
static int ff_thread_once(char *control, void(*routine)(void))
@ AV_PIX_FMT_YUV410P
planar YUV 4:1:0, 9bpp, (1 Cr & Cb sample per 4x4 Y samples)
static const uint16_t table[]
main external API structure.
enum AVPixelFormat pix_fmt
Pixel format, see AV_PIX_FMT_xxx.
int width
picture width / height.
const char * name
Name of the codec implementation.
This structure describes decoded (raw) audio or video data.
uint8_t * data[AV_NUM_DATA_POINTERS]
pointer to the picture/channel planes.
int linesize[AV_NUM_DATA_POINTERS]
For video, size in bytes of each picture line.
This structure stores compressed data.
VLC_TYPE(* table)[2]
code, bits
#define INIT_VLC_STATIC_FROM_LENGTHS(vlc, bits, nb_codes, lens, len_wrap, symbols, symbols_wrap, symbols_size, offset, flags, static_size)
#define INIT_VLC_OUTPUT_LE