libavcodec/indeo3.c File Reference

#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include "avcodec.h"
#include "dsputil.h"
#include "bytestream.h"
#include "indeo3data.h"

Go to the source code of this file.

Data Structures

struct  YUVBufs
struct  Indeo3DecodeContext
struct  ustr

Defines

#define LV1_CHECK(buf1, rle_v3, lv1, lp2)
#define RLE_V3_CHECK(buf1, rle_v1, rle_v2, rle_v3)
#define LP2_CHECK(buf1, rle_v3, lp2)
#define RLE_V2_CHECK(buf1, rle_v2, rle_v3, lp2)

Functions

static av_cold int build_modpred (Indeo3DecodeContext *s)
static av_cold int iv_alloc_frames (Indeo3DecodeContext *s)
static av_cold void iv_free_func (Indeo3DecodeContext *s)
static void iv_Decode_Chunk (Indeo3DecodeContext *s, uint8_t *cur, uint8_t *ref, int width, int height, const uint8_t *buf1, long cb_offset, const uint8_t *hdr, const uint8_t *buf2, int min_width_160)
static av_cold int indeo3_decode_init (AVCodecContext *avctx)
static int iv_decode_frame (AVCodecContext *avctx, const uint8_t *buf, int buf_size)
static int indeo3_decode_frame (AVCodecContext *avctx, void *data, int *data_size, AVPacket *avpkt)
static av_cold int indeo3_decode_end (AVCodecContext *avctx)

Variables

static const uint8_t corrector_type_0 [24]
static const uint8_t corrector_type_2 [8] = { 9, 7, 6, 8, 5, 4, 3, 2 }
AVCodec indeo3_decoder


Define Documentation

#define LP2_CHECK ( buf1,
rle_v3,
lp2   ) 

Value:

if(lp2 == 0 && rle_v3 != 0)     \
        rle_v3 = 0;                 \
    else {                          \
        buf1--;                     \
        rle_v3 = 1;                 \
    }

Definition at line 186 of file indeo3.c.

Referenced by iv_Decode_Chunk().

#define LV1_CHECK ( buf1,
rle_v3,
lv1,
lp2   ) 

Value:

if((lv1 & 0x80) != 0) {             \
        if(rle_v3 != 0)                 \
            rle_v3 = 0;                 \
        else {                          \
            rle_v3 = 1;                 \
            buf1 -= 2;                  \
        }                               \
    }                                   \
    lp2 = 4;

Definition at line 161 of file indeo3.c.

Referenced by iv_Decode_Chunk().

#define RLE_V2_CHECK ( buf1,
rle_v2,
rle_v3,
lp2   ) 

Value:

rle_v2--;                                 \
    if(rle_v2 == 0) {                         \
        rle_v3 = 0;                           \
        buf1 += 2;                            \
    }                                         \
    lp2 = 4;

Definition at line 195 of file indeo3.c.

Referenced by iv_Decode_Chunk().

#define RLE_V3_CHECK ( buf1,
rle_v1,
rle_v2,
rle_v3   ) 

Value:

if(rle_v3 == 0) {                            \
        rle_v2 = *buf1;                          \
        rle_v1 = 1;                              \
        if(rle_v2 > 32) {                        \
            rle_v2 -= 32;                        \
            rle_v1 = 0;                          \
        }                                        \
        rle_v3 = 1;                              \
    }                                            \
    buf1--;

Definition at line 173 of file indeo3.c.

Referenced by iv_Decode_Chunk().


Function Documentation

static av_cold int build_modpred ( Indeo3DecodeContext s  )  [static]

Definition at line 63 of file indeo3.c.

Referenced by indeo3_decode_init().

static av_cold int indeo3_decode_end ( AVCodecContext avctx  )  [static]

Definition at line 1130 of file indeo3.c.

static int indeo3_decode_frame ( AVCodecContext avctx,
void *  data,
int *  data_size,
AVPacket avpkt 
) [static]

Definition at line 1075 of file indeo3.c.

static av_cold int indeo3_decode_init ( AVCodecContext avctx  )  [static]

Definition at line 960 of file indeo3.c.

static av_cold int iv_alloc_frames ( Indeo3DecodeContext s  )  [static]

Definition at line 97 of file indeo3.c.

Referenced by indeo3_decode_init(), and iv_decode_frame().

static void iv_Decode_Chunk ( Indeo3DecodeContext s,
uint8_t *  cur,
uint8_t *  ref,
int  width,
int  height,
const uint8_t *  buf1,
long  cb_offset,
const uint8_t *  hdr,
const uint8_t *  buf2,
int  min_width_160 
) [static]

Definition at line 203 of file indeo3.c.

Referenced by iv_decode_frame().

static int iv_decode_frame ( AVCodecContext avctx,
const uint8_t *  buf,
int  buf_size 
) [static]

Definition at line 978 of file indeo3.c.

Referenced by indeo3_decode_frame().

static av_cold void iv_free_func ( Indeo3DecodeContext s  )  [static]

Definition at line 143 of file indeo3.c.

Referenced by indeo3_decode_end(), and indeo3_decode_init().


Variable Documentation

const uint8_t corrector_type_0[24] [static]

Initial value:

 {
    195, 159, 133, 115, 101,  93,  87,  77,
    195, 159, 133, 115, 101,  93,  87,  77,
    128,  79,  79,  79,  79,  79,  79,  79
}

Definition at line 55 of file indeo3.c.

Referenced by build_modpred().

const uint8_t corrector_type_2[8] = { 9, 7, 6, 8, 5, 4, 3, 2 } [static]

Definition at line 61 of file indeo3.c.

Referenced by build_modpred().

Initial value:

Definition at line 1139 of file indeo3.c.


Generated on Fri Oct 26 02:36:52 2012 for FFmpeg by  doxygen 1.5.8