Go to the documentation of this file.
29 #define BITSTREAM_READER_LE
43 #define CODE_VLC_BITS 14
69 for (
i = 0;
i <
c * 2;
i++)
80 for (j = 1; j <
height; j++) {
91 for (
i = 0;
i <
c * 2;
i++) {
92 dst[
out] = dst[
out - pitch];
99 t = dst[
out - pitch] + (
table[
c * 2] - 128);
100 t = av_clip_uint8(t);
103 t = dst[
out - pitch] + (
table[(
c * 2) + 1] - 128);
104 t = av_clip_uint8(t);
125 for (j = 0; j <
height; j++) {
137 t = dst[
out] + (((
table[
c * 2] - 128)*3) >> 2);
138 t = av_clip_uint8(t);
141 t = dst[
out] + (((
table[(
c * 2) + 1] - 128)*3) >> 2);
142 t = av_clip_uint8(t);
153 void *
data,
int *got_frame,
158 int buf_size = avpkt->
size;
169 if (
start >= buf_size) {
174 s->decode_delta =
buf[18];
177 #ifndef BITSTREAM_READER_LE
178 for (
i = 0;
i < buf_size;
i++)
185 ltab =
buf[0x22] & 3;
186 ctab =
buf[0x22] >> 2;
193 if (
s->decode_delta) {
247 #ifdef BITSTREAM_READER_LE
static av_cold int init(AVCodecContext *avctx)
static int get_bits_left(GetBitContext *gb)
Filter the word “frame” indicates either a video frame or a group of audio as stored in an AVFrame structure Format for each input and each output the list of supported formats For video that means pixel format For audio that means channel sample they are references to shared objects When the negotiation mechanism computes the intersection of the formats supported at each end of a all references to both lists are replaced with a reference to the intersection And when a single format is eventually chosen for a link amongst the remaining all references to the list are updated That means that if a filter requires that its input and output have the same format amongst a supported all it has to do is use a reference to the same list of formats query_formats can leave some formats unset and return AVERROR(EAGAIN) to cause the negotiation mechanism toagain later. That can be used by filters with complex requirements to use the format negotiated on one link to set the formats supported on another. Frame references ownership and permissions
static int ir2_decode_plane_inter(Ir2Context *ctx, int width, int height, uint8_t *dst, int pitch, const uint8_t *table)
void av_frame_free(AVFrame **frame)
Free the frame and any dynamically allocated objects in it, e.g.
This structure describes decoded (raw) audio or video data.
static const uint8_t ir2_delta_table[4][256]
#define init_vlc(vlc, nb_bits, nb_codes, bits, bits_wrap, bits_size, codes, codes_wrap, codes_size, flags)
const uint8_t ff_reverse[256]
static const uint16_t table[]
static av_always_inline int get_vlc2(GetBitContext *s, VLC_TYPE(*table)[2], int bits, int max_depth)
Parse a vlc code.
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...
uint8_t * data[AV_NUM_DATA_POINTERS]
pointer to the picture/channel planes.
static av_cold int ir2_decode_end(AVCodecContext *avctx)
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 init_get_bits8(GetBitContext *s, const uint8_t *buffer, int byte_size)
Initialize GetBitContext.
static void decode(AVCodecContext *dec_ctx, AVPacket *pkt, AVFrame *frame, FILE *outfile)
static int ir2_get_code(GetBitContext *gb)
#define INIT_VLC_USE_NEW_STATIC
Undefined Behavior In the C some operations are like signed integer dereferencing freed accessing outside allocated Undefined Behavior must not occur in a C it is not safe even if the output of undefined operations is unused The unsafety may seem nit picking but Optimizing compilers have in fact optimized code on the assumption that no undefined Behavior occurs Optimizing code based on wrong assumptions can and has in some cases lead to effects beyond the output of computations The signed integer overflow problem in speed critical code Code which is highly optimized and works with signed integers sometimes has the problem that often the output of the computation does not c
#define AV_CODEC_CAP_DR1
Codec uses get_buffer() for allocating buffers and supports custom allocators.
#define NULL_IF_CONFIG_SMALL(x)
Return NULL if CONFIG_SMALL is true, otherwise the argument without modification.
static int ir2_decode_plane(Ir2Context *ctx, int width, int height, uint8_t *dst, int pitch, const uint8_t *table)
int av_frame_ref(AVFrame *dst, const AVFrame *src)
Set up a new reference to the data described by the source frame.
static VLC_TYPE vlc_tables[VLC_TABLES_SIZE][2]
#define i(width, name, range_min, range_max)
const char * name
Name of the codec implementation.
enum AVPixelFormat pix_fmt
Pixel format, see AV_PIX_FMT_xxx.
static const uint16_t ir2_codes[IR2_CODES][2]
main external API structure.
static int ir2_decode_frame(AVCodecContext *avctx, void *data, int *got_frame, AVPacket *avpkt)
AVCodec ff_indeo2_decoder
static av_cold int ir2_decode_init(AVCodecContext *avctx)
This structure stores compressed data.
int width
picture width / height.
int linesize[AV_NUM_DATA_POINTERS]
For video, size in bytes of each picture line.
@ AV_PIX_FMT_YUV410P
planar YUV 4:1:0, 9bpp, (1 Cr & Cb sample per 4x4 Y samples)
#define AVERROR_INVALIDDATA
Invalid data found when processing input.
VLC_TYPE(* table)[2]
code, bits