hvirtual/quicktime/ffmpeg/libavcodec/h261.c File Reference

#include "common.h"
#include "dsputil.h"
#include "avcodec.h"
#include "mpegvideo.h"
#include "h261data.h"

Include dependency graph for h261.c:

Go to the source code of this file.

Data Structures

struct  H261Context

Defines

#define H261_MBA_VLC_BITS   9
#define H261_MTYPE_VLC_BITS   6
#define H261_MV_VLC_BITS   7
#define H261_CBP_VLC_BITS   9
#define TCOEFF_VLC_BITS   9
#define MBA_STUFFING   33
#define MBA_STARTCODE   34
#define IS_FIL(a)   ((a)&MB_TYPE_H261_FIL)

Functions

void ff_h261_loop_filter (MpegEncContext *s)
static int ff_h261_get_picture_format (int width, int height)
static void h261_encode_block (H261Context *h, DCTELEM *block, int n)
static int h261_decode_block (H261Context *h, DCTELEM *block, int n, int coded)
void ff_h261_encode_picture_header (MpegEncContext *s, int picture_number)
static void h261_encode_gob_header (MpegEncContext *s, int mb_line)
void ff_h261_reorder_mb_index (MpegEncContext *s)
static void h261_encode_motion (H261Context *h, int val)
static int get_cbp (MpegEncContext *s, DCTELEM block[6][64])
void ff_h261_encode_mb (MpegEncContext *s, DCTELEM block[6][64], int motion_x, int motion_y)
void ff_h261_encode_init (MpegEncContext *s)
void init_vlc_rl (RLTable *rl, int use_static)
static void h261_decode_init_vlc (H261Context *h)
static int h261_decode_init (AVCodecContext *avctx)
static int h261_decode_gob_header (H261Context *h)
static int ff_h261_resync (H261Context *h)
static int h261_decode_mb_skipped (H261Context *h, int mba1, int mba2)
static int decode_mv_component (GetBitContext *gb, int v)
static int h261_decode_mb (H261Context *h)
int h261_decode_picture_header (H261Context *h)
static int h261_decode_gob (H261Context *h)
static int h261_find_frame_end (ParseContext *pc, AVCodecContext *avctx, const uint8_t *buf, int buf_size)
static int h261_parse (AVCodecParserContext *s, AVCodecContext *avctx, uint8_t **poutbuf, int *poutbuf_size, const uint8_t *buf, int buf_size)
static int get_consumed_bytes (MpegEncContext *s, int buf_size)
static int h261_decode_frame (AVCodecContext *avctx, void *data, int *data_size, uint8_t *buf, int buf_size)
static int h261_decode_end (AVCodecContext *avctx)

Variables

static VLC h261_mba_vlc
static VLC h261_mtype_vlc
static VLC h261_mv_vlc
static VLC h261_cbp_vlc
AVCodec h261_decoder
AVCodecParser h261_parser


Detailed Description

h261codec.

Definition in file h261.c.


Define Documentation

#define H261_CBP_VLC_BITS   9

Definition at line 36 of file h261.c.

Referenced by h261_decode_init_vlc(), and h261_decode_mb().

#define H261_MBA_VLC_BITS   9

Definition at line 33 of file h261.c.

Referenced by h261_decode_init_vlc(), and h261_decode_mb().

#define H261_MTYPE_VLC_BITS   6

Definition at line 34 of file h261.c.

Referenced by h261_decode_init_vlc(), and h261_decode_mb().

#define H261_MV_VLC_BITS   7

Definition at line 35 of file h261.c.

Referenced by decode_mv_component(), and h261_decode_init_vlc().

#define IS_FIL ( a   )     ((a)&MB_TYPE_H261_FIL)

Definition at line 41 of file h261.c.

Referenced by ff_h261_loop_filter().

#define MBA_STARTCODE   34

Definition at line 40 of file h261.c.

Referenced by h261_decode_mb().

#define MBA_STUFFING   33

Definition at line 39 of file h261.c.

Referenced by h261_decode_gob(), and h261_decode_mb().

#define TCOEFF_VLC_BITS   9

Definition at line 37 of file h261.c.

Referenced by h261_decode_block().


Function Documentation

static int decode_mv_component ( GetBitContext gb,
int  v 
) [static]

Definition at line 552 of file h261.c.

References get_bits1(), get_vlc2(), H261_MV_VLC_BITS, mvmap, and VLC::table.

Referenced by h261_decode_mb().

Here is the call graph for this function:

void ff_h261_encode_init ( MpegEncContext s  ) 

void ff_h261_encode_mb ( MpegEncContext s,
DCTELEM  block[6][64],
int  motion_x,
int  motion_y 
)

void ff_h261_encode_picture_header ( MpegEncContext s,
int  picture_number 
)

static int ff_h261_get_picture_format ( int  width,
int  height 
) [static]

void ff_h261_loop_filter ( MpegEncContext s  ) 

void ff_h261_reorder_mb_index ( MpegEncContext s  ) 

static int ff_h261_resync ( H261Context h  )  [static]

decodes the group of blocks / video packet header.

Returns:
<0 if no resync found

Definition at line 478 of file h261.c.

References align_get_bits(), MpegEncContext::gb, get_bits_count(), H261Context::gob_start_code_skipped, h261_decode_gob_header(), MpegEncContext::last_resync_gb, H261Context::s, s, show_bits(), GetBitContext::size_in_bits, and skip_bits().

Referenced by h261_decode_frame().

Here is the call graph for this function:

static int get_cbp ( MpegEncContext s,
DCTELEM  block[6][64] 
) [inline, static]

Definition at line 188 of file h261.c.

References MpegEncContext::block_last_index.

Referenced by ff_h261_encode_mb().

static int get_consumed_bytes ( MpegEncContext s,
int  buf_size 
) [static]

returns the number of bytes consumed for building the current frame

Definition at line 906 of file h261.c.

References MpegEncContext::gb, and get_bits_count().

Referenced by decode_frame(), ff_h263_decode_frame(), and h261_decode_frame().

Here is the call graph for this function:

static int h261_decode_block ( H261Context h,
DCTELEM block,
int  n,
int  coded 
) [static]

static int h261_decode_end ( AVCodecContext avctx  )  [static]

Definition at line 1008 of file h261.c.

References MPV_common_end(), AVCodecContext::priv_data, H261Context::s, and s.

Here is the call graph for this function:

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

static int h261_decode_gob ( H261Context h  )  [static]

static int h261_decode_gob_header ( H261Context h  )  [static]

decodes the group of blocks header or slice header.

Returns:
<0 if an error occured

Definition at line 428 of file h261.c.

References H261Context::current_mba, MpegEncContext::gb, get_bits(), get_bits1(), H261Context::gob_number, H261Context::gob_start_code_skipped, MpegEncContext::mb_height, H261Context::mba_diff, MpegEncContext::qscale, H261Context::s, s, show_bits(), and skip_bits().

Referenced by ff_h261_resync().

Here is the call graph for this function:

static int h261_decode_init ( AVCodecContext avctx  )  [static]

static void h261_decode_init_vlc ( H261Context h  )  [static]

static int h261_decode_mb ( H261Context h  )  [static]

static int h261_decode_mb_skipped ( H261Context h,
int  mba1,
int  mba2 
) [static]

int h261_decode_picture_header ( H261Context h  ) 

static void h261_encode_block ( H261Context h,
DCTELEM block,
int  n 
) [static]

encodes a 8x8 block.

Parameters:
block the 8x8 block
n block index (0-3 are luma, 4-5 are chroma)

Definition at line 300 of file h261.c.

References MpegEncContext::block_last_index, get_rl_index(), h261_rl_tcoeff, MpegEncContext::intra_scantable, level, MpegEncContext::mb_intra, RLTable::n, MpegEncContext::pb, ScanTable::permutated, put_bits(), run, H261Context::s, s, and RLTable::table_vlc.

Referenced by ff_h261_encode_mb().

Here is the call graph for this function:

static void h261_encode_gob_header ( MpegEncContext s,
int  mb_line 
) [static]

static void h261_encode_motion ( H261Context h,
int  val 
) [static]

Definition at line 169 of file h261.c.

References h261_mv_tab, MpegEncContext::pb, put_bits(), H261Context::s, and s.

Referenced by ff_h261_encode_mb().

Here is the call graph for this function:

static int h261_find_frame_end ( ParseContext pc,
AVCodecContext avctx,
const uint8_t *  buf,
int  buf_size 
) [static]

Definition at line 849 of file h261.c.

References END_NOT_FOUND, ParseContext::frame_start_found, and ParseContext::state.

Referenced by h261_parse().

static int h261_parse ( AVCodecParserContext s,
AVCodecContext avctx,
uint8_t **  poutbuf,
int *  poutbuf_size,
const uint8_t *  buf,
int  buf_size 
) [static]

Definition at line 884 of file h261.c.

References ff_combine_frame(), h261_find_frame_end(), NULL, and AVCodecParserContext::priv_data.

Here is the call graph for this function:

void init_vlc_rl ( RLTable rl,
int  use_static 
)

Definition at line 2865 of file h263.c.

Referenced by ff_msmpeg4_decode_init(), h261_decode_init_vlc(), and h263_decode_init_vlc().


Variable Documentation

VLC h261_cbp_vlc [static]

Definition at line 373 of file h261.c.

Initial value:

Definition at line 1029 of file h261.c.

Referenced by avcodec_register_all().

VLC h261_mba_vlc [static]

Definition at line 370 of file h261.c.

VLC h261_mtype_vlc [static]

Definition at line 371 of file h261.c.

VLC h261_mv_vlc [static]

Definition at line 372 of file h261.c.

Initial value:

Definition at line 1041 of file h261.c.

Referenced by avcodec_register_all().


Generated on Mon Apr 28 14:04:10 2008 for Cinelerra by  doxygen 1.5.5