FFmpeg
Macros | Functions | Variables
h263.h File Reference
#include <stdint.h>
#include "libavutil/rational.h"
#include "get_bits.h"
#include "mpegvideo.h"
#include "h263data.h"
#include "rl.h"

Go to the source code of this file.

Macros

#define FF_ASPECT_EXTENDED   15
 
#define INT_BIT   (CHAR_BIT * sizeof(int))
 
#define H263_MV_VLC_BITS   9
 
#define INTRA_MCBPC_VLC_BITS   6
 
#define INTER_MCBPC_VLC_BITS   7
 
#define CBPY_VLC_BITS   6
 
#define TEX_VLC_BITS   9
 
#define H263_GOB_HEIGHT(h)   ((h) <= 400 ? 1 : (h) <= 800 ? 2 : 4)
 

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. More...
 
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. More...
 
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)
 
void ff_h263_init_rl_inter (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 More...
 
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. More...
 
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 3-bit "source format" syntax element. More...
 
void ff_clean_h263_qscales (MpegEncContext *s)
 modify qscale so that encoding is actually possible in H.263 (limit difference to -2..2) More...
 
int ff_h263_resync (MpegEncContext *s)
 Decode the group of blocks / video packet header / slice header (MPEG-4 Studio). More...
 
void ff_h263_encode_motion (PutBitContext *pb, int val, int f_code)
 
static int h263_get_motion_length (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)
 

Variables

VLC ff_h263_intra_MCBPC_vlc
 
VLC ff_h263_inter_MCBPC_vlc
 
VLC ff_h263_cbpy_vlc
 
VLC ff_h263_mv_vlc
 
enum AVPixelFormat ff_h263_hwaccel_pixfmt_list_420 []
 

Macro Definition Documentation

◆ FF_ASPECT_EXTENDED

#define FF_ASPECT_EXTENDED   15

Definition at line 30 of file h263.h.

◆ INT_BIT

#define INT_BIT   (CHAR_BIT * sizeof(int))

Definition at line 31 of file h263.h.

◆ H263_MV_VLC_BITS

#define H263_MV_VLC_BITS   9

Definition at line 37 of file h263.h.

◆ INTRA_MCBPC_VLC_BITS

#define INTRA_MCBPC_VLC_BITS   6

Definition at line 38 of file h263.h.

◆ INTER_MCBPC_VLC_BITS

#define INTER_MCBPC_VLC_BITS   7

Definition at line 39 of file h263.h.

◆ CBPY_VLC_BITS

#define CBPY_VLC_BITS   6

Definition at line 40 of file h263.h.

◆ TEX_VLC_BITS

#define TEX_VLC_BITS   9

Definition at line 41 of file h263.h.

◆ H263_GOB_HEIGHT

#define H263_GOB_HEIGHT (   h)    ((h) <= 400 ? 1 : (h) <= 800 ? 2 : 4)

Definition at line 43 of file h263.h.

Function Documentation

◆ ff_h263_decode_motion()

int ff_h263_decode_motion ( MpegEncContext s,
int  pred,
int  f_code 
)

◆ ff_h263_aspect_to_info()

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 89 of file ituh263enc.c.

Referenced by ff_h263_encode_picture_header(), and mpeg4_encode_vol_header().

◆ ff_h263_decode_init()

int ff_h263_decode_init ( AVCodecContext avctx)

Definition at line 70 of file h263dec.c.

Referenced by decode_init(), and ff_msmpeg4_decode_init().

◆ ff_h263_decode_frame()

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

Definition at line 422 of file h263dec.c.

◆ ff_h263_decode_end()

int ff_h263_decode_end ( AVCodecContext avctx)

Definition at line 156 of file h263dec.c.

Referenced by wmv2_decode_end().

◆ ff_h263_encode_mb()

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

Definition at line 447 of file ituh263enc.c.

Referenced by encode_mb_internal().

◆ ff_h263_encode_picture_header()

void ff_h263_encode_picture_header ( MpegEncContext s,
int  picture_number 
)

Definition at line 103 of file ituh263enc.c.

Referenced by encode_picture().

◆ ff_h263_encode_gob_header()

void ff_h263_encode_gob_header ( MpegEncContext s,
int  mb_line 
)

Encode a group of blocks header.

Definition at line 240 of file ituh263enc.c.

Referenced by encode_thread().

◆ ff_h263_pred_motion()

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

◆ ff_h263_encode_init()

void ff_h263_encode_init ( MpegEncContext s)

Definition at line 757 of file ituh263enc.c.

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

◆ ff_h263_decode_init_vlc()

void ff_h263_decode_init_vlc ( void  )

Definition at line 108 of file ituh263dec.c.

Referenced by ff_h263_decode_init(), and rv10_init_static().

◆ ff_h263_init_rl_inter()

void ff_h263_init_rl_inter ( void  )

Definition at line 48 of file h263.c.

Referenced by ff_h263_decode_init_vlc(), and ff_h263_encode_init().

◆ ff_h263_decode_picture_header()

int ff_h263_decode_picture_header ( MpegEncContext s)

Definition at line 998 of file ituh263dec.c.

Referenced by ff_h263_decode_frame().

◆ ff_h263_decode_gob_header()

int ff_h263_decode_gob_header ( MpegEncContext s)

◆ ff_h263_update_motion_val()

void ff_h263_update_motion_val ( MpegEncContext s)

Definition at line 54 of file h263.c.

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

◆ ff_h263_loop_filter()

void ff_h263_loop_filter ( MpegEncContext s)

Definition at line 147 of file h263.c.

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

◆ ff_h263_decode_mba()

int ff_h263_decode_mba ( MpegEncContext s)

◆ ff_h263_encode_mba()

void ff_h263_encode_mba ( MpegEncContext s)

◆ ff_init_qscale_tab()

void ff_init_qscale_tab ( MpegEncContext s)

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

Definition at line 220 of file mpegvideo_enc.c.

Referenced by estimate_qp(), and ff_clean_h263_qscales().

◆ ff_h263_pred_dc()

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

Definition at line 106 of file h263.c.

Referenced by ff_h263_encode_mb().

◆ ff_h263_pred_acdc()

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

Definition at line 232 of file h263.c.

Referenced by h263_decode_block().

◆ ff_h263_show_pict_info()

void ff_h263_show_pict_info ( MpegEncContext s)

Print picture info if FF_DEBUG_PICT_INFO is set.

Definition at line 76 of file ituh263dec.c.

Referenced by ff_h263_decode_picture_header(), and ff_intel_h263_decode_picture_header().

◆ ff_intel_h263_decode_picture_header()

int ff_intel_h263_decode_picture_header ( MpegEncContext s)

Definition at line 27 of file intelh263dec.c.

Referenced by ff_h263_decode_frame().

◆ ff_h263_decode_mb()

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

Definition at line 696 of file ituh263dec.c.

Referenced by ff_h263_decode_init(), and rv10_decode_packet().

◆ h263_get_picture_format()

int av_const h263_get_picture_format ( int  width,
int  height 
)

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

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

◆ ff_clean_h263_qscales()

void ff_clean_h263_qscales ( MpegEncContext s)

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

Definition at line 266 of file ituh263enc.c.

Referenced by estimate_qp(), and ff_clean_mpeg4_qscales().

◆ ff_h263_resync()

int ff_h263_resync ( MpegEncContext s)

Decode the group of blocks / video packet header / slice header (MPEG-4 Studio).

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

Definition at line 212 of file ituh263dec.c.

Referenced by ff_h263_decode_frame().

◆ ff_h263_encode_motion()

void ff_h263_encode_motion ( PutBitContext pb,
int  val,
int  f_code 
)

Definition at line 646 of file ituh263enc.c.

Referenced by ff_h263_encode_motion_vector(), and svq1_encode_plane().

◆ h263_get_motion_length()

static int h263_get_motion_length ( int  val,
int  f_code 
)
inlinestatic

Definition at line 102 of file h263.h.

Referenced by ff_h263_encode_motion_vector().

◆ 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 120 of file h263.h.

Referenced by ff_h263_encode_mb(), and ff_mpeg4_encode_mb().

◆ get_p_cbp()

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

Definition at line 131 of file h263.h.

Referenced by ff_h263_encode_mb(), and ff_mpeg4_encode_mb().

Variable Documentation

◆ ff_h263_intra_MCBPC_vlc

VLC ff_h263_intra_MCBPC_vlc

◆ ff_h263_inter_MCBPC_vlc

VLC ff_h263_inter_MCBPC_vlc

◆ ff_h263_cbpy_vlc

VLC ff_h263_cbpy_vlc

◆ ff_h263_mv_vlc

VLC ff_h263_mv_vlc

◆ ff_h263_hwaccel_pixfmt_list_420

enum AVPixelFormat ff_h263_hwaccel_pixfmt_list_420[]

Definition at line 730 of file h263dec.c.