libavcodec/indeo3.c File Reference

#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <unistd.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 (Indeo3DecodeContext *s, const uint8_t *buf, int buf_size)
static int indeo3_decode_frame (AVCodecContext *avctx, void *data, int *data_size, const uint8_t *buf, int buf_size)
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 64 of file indeo3.c.

Referenced by indeo3_decode_init().

static av_cold int indeo3_decode_end ( AVCodecContext avctx  )  [static]

Definition at line 1116 of file indeo3.c.

static int indeo3_decode_frame ( AVCodecContext avctx,
void *  data,
int *  data_size,
const uint8_t *  buf,
int  buf_size 
) [static]

Definition at line 1063 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 98 of file indeo3.c.

Referenced by indeo3_decode_init().

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 ( Indeo3DecodeContext s,
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 56 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 62 of file indeo3.c.

Referenced by build_modpred().

Initial value:

Definition at line 1125 of file indeo3.c.


Generated on Fri Oct 26 02:35:43 2012 for FFmpeg by  doxygen 1.5.8