FFmpeg
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
Macros | Functions | Variables
h263.h File Reference
#include <stdint.h>
#include "libavutil/rational.h"
#include "get_bits.h"
#include "mpegvideo.h"
#include "rl.h"

Go to the source code of this file.

Macros

#define FF_ASPECT_EXTENDED   15
 
#define INTRA_MCBPC_VLC_BITS   6
 
#define INTER_MCBPC_VLC_BITS   7
 
#define CBPY_VLC_BITS   6
 
#define TEX_VLC_BITS   9
 

Functions

int ff_h263_decode_motion (MpegEncContext *s, int pred, int f_code)
 
av_const int ff_h263_aspect_to_info (AVRational aspect)
 Return the 4 bit value that specifies the given aspect ratio.
 
int ff_h263_decode_init (AVCodecContext *avctx)
 
int ff_h263_decode_frame (AVCodecContext *avctx, void *data, int *got_frame, AVPacket *avpkt)
 
int ff_h263_decode_end (AVCodecContext *avctx)
 
void ff_h263_encode_mb (MpegEncContext *s, int16_t block[6][64], int motion_x, int motion_y)
 
void ff_h263_encode_picture_header (MpegEncContext *s, int picture_number)
 
void ff_h263_encode_gob_header (MpegEncContext *s, int mb_line)
 Encode a group of blocks header.
 
int16_t * ff_h263_pred_motion (MpegEncContext *s, int block, int dir, int *px, int *py)
 
void ff_h263_encode_init (MpegEncContext *s)
 
void ff_h263_decode_init_vlc (void)
 
int ff_h263_decode_picture_header (MpegEncContext *s)
 
int ff_h263_decode_gob_header (MpegEncContext *s)
 
void ff_h263_update_motion_val (MpegEncContext *s)
 
void ff_h263_loop_filter (MpegEncContext *s)
 
int ff_h263_decode_mba (MpegEncContext *s)
 
void ff_h263_encode_mba (MpegEncContext *s)
 
void ff_init_qscale_tab (MpegEncContext *s)
 init s->current_picture.qscale_table from s->lambda_table
 
int ff_h263_pred_dc (MpegEncContext *s, int n, int16_t **dc_val_ptr)
 
void ff_h263_pred_acdc (MpegEncContext *s, int16_t *block, int n)
 
void ff_h263_show_pict_info (MpegEncContext *s)
 Print picture info if FF_DEBUG_PICT_INFO is set.
 
int ff_intel_h263_decode_picture_header (MpegEncContext *s)
 
int ff_h263_decode_mb (MpegEncContext *s, int16_t block[6][64])
 
int av_const h263_get_picture_format (int width, int height)
 Return the value of the 3bit "source format" syntax element.
 
void ff_clean_h263_qscales (MpegEncContext *s)
 modify qscale so that encoding is actually possible in h263 (limit difference to -2..2)
 
int ff_h263_resync (MpegEncContext *s)
 Decode the group of blocks / video packet header.
 
int ff_h263_get_gob_height (MpegEncContext *s)
 Get the GOB height based on picture height.
 
void ff_h263_encode_motion (MpegEncContext *s, int val, int f_code)
 
static int h263_get_motion_length (MpegEncContext *s, int val, int f_code)
 
static void ff_h263_encode_motion_vector (MpegEncContext *s, int x, int y, int f_code)
 
static int get_p_cbp (MpegEncContext *s, int16_t block[6][64], int motion_x, int motion_y)
 
static void memsetw (short *tab, int val, int n)
 

Variables

const AVRational ff_h263_pixel_aspect [16]
 
const uint8_t ff_h263_cbpy_tab [16][2]
 
const uint8_t ff_cbpc_b_tab [4][2]
 
const uint8_t ff_mvtab [33][2]
 
const uint8_t ff_h263_intra_MCBPC_code [9]
 
const uint8_t ff_h263_intra_MCBPC_bits [9]
 
const uint8_t ff_h263_inter_MCBPC_code [28]
 
const uint8_t ff_h263_inter_MCBPC_bits [28]
 
const uint8_t ff_h263_mbtype_b_tab [15][2]
 
VLC ff_h263_intra_MCBPC_vlc
 
VLC ff_h263_inter_MCBPC_vlc
 
VLC ff_h263_cbpy_vlc
 
const uint16_t ff_inter_vlc [103][2]
 
const int8_t ff_inter_level [102]
 
const int8_t ff_inter_run [102]
 
RLTable ff_h263_rl_inter
 
RLTable ff_rl_intra_aic
 
const uint16_t ff_h263_format [8][2]
 
const uint8_t ff_modified_quant_tab [2][32]
 
const uint16_t ff_mba_max [6]
 
const uint8_t ff_mba_length [7]
 
uint8_t ff_h263_static_rl_table_store [2][2][2 *MAX_RUN+MAX_LEVEL+3]
 
enum AVPixelFormat ff_h263_hwaccel_pixfmt_list_420 []
 

Macro Definition Documentation

#define FF_ASPECT_EXTENDED   15

Definition at line 30 of file h263.h.

#define INTRA_MCBPC_VLC_BITS   6
#define INTER_MCBPC_VLC_BITS   7
#define CBPY_VLC_BITS   6
#define TEX_VLC_BITS   9

Definition at line 40 of file h263.h.

Function Documentation

int ff_h263_decode_motion ( MpegEncContext s,
int  pred,
int  f_code 
)
av_const int ff_h263_aspect_to_info ( AVRational  aspect)

Return the 4 bit value that specifies the given aspect ratio.

This may be one of the standard aspect ratios or it specifies that the aspect will be stored explicitly later.

Definition at line 87 of file ituh263enc.c.

Referenced by ff_h263_encode_picture_header(), and mpeg4_encode_vol_header().

int ff_h263_decode_init ( AVCodecContext avctx)

Definition at line 44 of file h263dec.c.

Referenced by decode_init(), and ff_msmpeg4_decode_init().

int ff_h263_decode_frame ( AVCodecContext avctx,
void data,
int *  got_frame,
AVPacket avpkt 
)

Definition at line 369 of file h263dec.c.

int ff_h263_decode_end ( AVCodecContext avctx)

Definition at line 133 of file h263dec.c.

Referenced by wmv2_decode_end().

void ff_h263_encode_mb ( MpegEncContext s,
int16_t  block[6][64],
int  motion_x,
int  motion_y 
)

Definition at line 453 of file ituh263enc.c.

Referenced by encode_mb_internal().

void ff_h263_encode_picture_header ( MpegEncContext s,
int  picture_number 
)

Definition at line 101 of file ituh263enc.c.

Referenced by encode_picture().

void ff_h263_encode_gob_header ( MpegEncContext s,
int  mb_line 
)

Encode a group of blocks header.

Definition at line 246 of file ituh263enc.c.

Referenced by encode_thread().

int16_t* ff_h263_pred_motion ( MpegEncContext s,
int  block,
int  dir,
int *  px,
int *  py 
)
void ff_h263_encode_init ( MpegEncContext s)

Definition at line 769 of file ituh263enc.c.

Referenced by encode_init(), ff_MPV_encode_init(), and svq1_encode_init().

void ff_h263_decode_init_vlc ( void  )

Definition at line 102 of file ituh263dec.c.

Referenced by ff_h263_decode_init(), and rv10_decode_init().

int ff_h263_decode_picture_header ( MpegEncContext s)

Definition at line 846 of file ituh263dec.c.

Referenced by ff_h263_decode_frame().

int ff_h263_decode_gob_header ( MpegEncContext s)
void ff_h263_update_motion_val ( MpegEncContext s)

Definition at line 45 of file h263.c.

Referenced by decode_slice(), encode_thread(), and rv10_decode_packet().

void ff_h263_loop_filter ( MpegEncContext s)

Definition at line 138 of file h263.c.

Referenced by decode_slice(), encode_thread(), and rv10_decode_packet().

int ff_h263_decode_mba ( MpegEncContext s)
void ff_h263_encode_mba ( MpegEncContext s)
void ff_init_qscale_tab ( MpegEncContext s)

init s->current_picture.qscale_table from s->lambda_table

Definition at line 175 of file mpegvideo_enc.c.

Referenced by estimate_qp(), and ff_clean_h263_qscales().

int ff_h263_pred_dc ( MpegEncContext s,
int  n,
int16_t **  dc_val_ptr 
)

Definition at line 97 of file h263.c.

Referenced by ff_h263_encode_mb().

void ff_h263_pred_acdc ( MpegEncContext s,
int16_t *  block,
int  n 
)

Definition at line 225 of file h263.c.

Referenced by h263_decode_block().

void ff_h263_show_pict_info ( MpegEncContext s)

Print picture info if FF_DEBUG_PICT_INFO is set.

Definition at line 70 of file ituh263dec.c.

Referenced by ff_h263_decode_picture_header(), and ff_intel_h263_decode_picture_header().

int ff_intel_h263_decode_picture_header ( MpegEncContext s)

Definition at line 25 of file intelh263dec.c.

Referenced by ff_h263_decode_frame().

int ff_h263_decode_mb ( MpegEncContext s,
int16_t  block[6][64] 
)

Definition at line 580 of file ituh263dec.c.

Referenced by ff_h263_decode_init(), and rv10_decode_packet().

int av_const h263_get_picture_format ( int  width,
int  height 
)

Return the value of the 3bit "source format" syntax element.

This represents some standard picture dimensions or indicates that width&height are explicitly stored later.

void ff_clean_h263_qscales ( MpegEncContext s)

modify qscale so that encoding is actually possible in h263 (limit difference to -2..2)

Definition at line 272 of file ituh263enc.c.

Referenced by estimate_qp(), and ff_clean_mpeg4_qscales().

int ff_h263_resync ( MpegEncContext s)

Decode the group of blocks / video packet header.

Returns
bit position of the resync_marker, or <0 if none was found

Definition at line 206 of file ituh263dec.c.

Referenced by ff_h263_decode_frame().

int ff_h263_get_gob_height ( MpegEncContext s)

Get the GOB height based on picture height.

Definition at line 374 of file h263.c.

Referenced by encode_thread(), ff_h263_decode_frame(), and vaapi_mpeg4_start_frame().

void ff_h263_encode_motion ( MpegEncContext s,
int  val,
int  f_code 
)

Definition at line 654 of file ituh263enc.c.

Referenced by ff_h263_encode_motion_vector(), and svq1_encode_plane().

static int h263_get_motion_length ( MpegEncContext s,
int  val,
int  f_code 
)
inlinestatic

Definition at line 127 of file h263.h.

Referenced by ff_h263_encode_motion_vector().

static void ff_h263_encode_motion_vector ( MpegEncContext s,
int  x,
int  y,
int  f_code 
)
inlinestatic

Definition at line 144 of file h263.h.

Referenced by ff_h263_encode_mb(), and ff_mpeg4_encode_mb().

static int get_p_cbp ( MpegEncContext s,
int16_t  block[6][64],
int  motion_x,
int  motion_y 
)
inlinestatic

Definition at line 155 of file h263.h.

Referenced by ff_h263_encode_mb(), and ff_mpeg4_encode_mb().

static void memsetw ( short *  tab,
int  val,
int  n 
)
inlinestatic

Definition at line 212 of file h263.h.

Referenced by ff_mpeg4_clean_buffers().

Variable Documentation

const AVRational ff_h263_pixel_aspect[16]
const uint8_t ff_h263_cbpy_tab[16][2]
const uint8_t ff_cbpc_b_tab[4][2]

Definition at line 78 of file h263data.h.

Referenced by ff_h263_decode_init_vlc().

const uint8_t ff_mvtab[33][2]
const uint8_t ff_h263_intra_MCBPC_code[9]

Definition at line 36 of file h263data.h.

Referenced by ff_h263_decode_init_vlc(), ff_h263_encode_mb(), and ff_mpeg4_encode_mb().

const uint8_t ff_h263_intra_MCBPC_bits[9]

Definition at line 37 of file h263data.h.

Referenced by ff_h263_decode_init_vlc(), ff_h263_encode_mb(), and ff_mpeg4_encode_mb().

const uint8_t ff_h263_inter_MCBPC_code[28]

Definition at line 41 of file h263data.h.

Referenced by ff_h263_decode_init_vlc(), ff_h263_encode_mb(), and ff_mpeg4_encode_mb().

const uint8_t ff_h263_inter_MCBPC_bits[28]
const uint8_t ff_h263_mbtype_b_tab[15][2]

Definition at line 60 of file h263data.h.

Referenced by ff_h263_decode_init_vlc().

VLC ff_h263_intra_MCBPC_vlc

Definition at line 92 of file ituh263dec.c.

Referenced by mpeg4_decode_mb(), mpeg4_decode_partition_a(), and msmpeg4v12_decode_mb().

VLC ff_h263_inter_MCBPC_vlc

Definition at line 93 of file ituh263dec.c.

Referenced by mpeg4_decode_mb(), mpeg4_decode_partition_a(), and msmpeg4v12_decode_mb().

VLC ff_h263_cbpy_vlc

Definition at line 94 of file ituh263dec.c.

Referenced by mpeg4_decode_mb(), mpeg4_decode_partition_b(), and msmpeg4v12_decode_mb().

const uint16_t ff_inter_vlc[103][2]

Definition at line 101 of file h263data.h.

const int8_t ff_inter_level[102]

Definition at line 130 of file h263data.h.

const int8_t ff_inter_run[102]

Definition at line 146 of file h263data.h.

RLTable ff_h263_rl_inter
RLTable ff_rl_intra_aic
const uint16_t ff_h263_format[8][2]
const uint8_t ff_modified_quant_tab[2][32]

Definition at line 253 of file h263data.h.

Referenced by h263_decode_dquant().

const uint16_t ff_mba_max[6]

Definition at line 267 of file h263data.h.

Referenced by ff_h263_decode_mba(), and ff_h263_encode_mba().

const uint8_t ff_mba_length[7]

Definition at line 271 of file h263data.h.

Referenced by ff_h263_decode_mba(), and ff_h263_encode_mba().

uint8_t ff_h263_static_rl_table_store[2][2][2 *MAX_RUN+MAX_LEVEL+3]

Definition at line 42 of file h263.c.

Referenced by ff_h263_decode_init_vlc(), and ff_h263_encode_init().

enum AVPixelFormat ff_h263_hwaccel_pixfmt_list_420[]

Definition at line 671 of file h263dec.c.