FFmpeg
Macros | Functions | Variables
ituh263dec.c File Reference
#include "config_components.h"
#include "libavutil/attributes.h"
#include "libavutil/imgutils.h"
#include "libavutil/internal.h"
#include "libavutil/mathematics.h"
#include "libavutil/mem_internal.h"
#include "libavutil/thread.h"
#include "avcodec.h"
#include "mpegvideo.h"
#include "h263.h"
#include "h263data.h"
#include "h263dec.h"
#include "mathops.h"
#include "mpegutils.h"
#include "unary.h"
#include "rv10dec.h"
#include "mpeg4video.h"
#include "mpegvideodata.h"
#include "mpegvideodec.h"
#include "mpeg4videodec.h"
#include "mpeg4videodefs.h"

Go to the source code of this file.

Macros

#define UNCHECKED_BITSTREAM_READER   1
 
#define H263_MBTYPE_B_VLC_BITS   6
 
#define CBPC_B_VLC_BITS   3
 
#define tab_size   ((signed)FF_ARRAY_ELEMS(s->direct_scale_mv[0]))
 
#define tab_bias   (tab_size / 2)
 

Functions

void ff_h263_show_pict_info (H263DecContext *const h, int h263_plus)
 Print picture info if FF_DEBUG_PICT_INFO is set. More...
 
static av_cold void h263_decode_init_vlc (void)
 
av_cold void ff_h263_decode_init_vlc (void)
 
int ff_h263_decode_mba (H263DecContext *const h)
 
static int h263_decode_gob_header (H263DecContext *const h)
 Decode the group of blocks header or slice header. More...
 
int ff_h263_resync (H263DecContext *const h)
 Decode the group of blocks / video packet header / slice header (MPEG-4 Studio). More...
 
int ff_h263_decode_motion (H263DecContext *const h, int pred, int f_code)
 
static int h263p_decode_umotion (H263DecContext *const h, int pred)
 
static void preview_obmc (H263DecContext *const h)
 read the next MVs for OBMC. More...
 
static void h263_decode_dquant (H263DecContext *const h)
 
static void h263_pred_acdc (MpegEncContext *s, int16_t *block, int n)
 
static int h263_decode_block (H263DecContext *const h, int16_t block[64], int n, int coded)
 
static int h263_skip_b_part (H263DecContext *const h, int cbp)
 
static int h263_get_modb (GetBitContext *gb, int pb_frame, int *cbpb)
 
static void set_one_direct_mv (MpegEncContext *s, const MPVPicture *p, int i)
 
static int set_direct_mv (MpegEncContext *s)
 
int ff_h263_decode_mb (H263DecContext *const h)
 
int ff_h263_decode_picture_header (H263DecContext *const h)
 

Variables

static const int16_t h263_mb_type_b_map [15]
 
VLCElem ff_h263_intra_MCBPC_vlc [72]
 
VLCElem ff_h263_inter_MCBPC_vlc [198]
 
VLCElem ff_h263_cbpy_vlc [64]
 
VLCElem ff_h263_mv_vlc [538]
 
static VLCElem h263_mbtype_b_vlc [80]
 
static VLCElem cbpc_b_vlc [8]
 

Detailed Description

H.263 decoder.

Definition in file ituh263dec.c.

Macro Definition Documentation

◆ UNCHECKED_BITSTREAM_READER

#define UNCHECKED_BITSTREAM_READER   1

Definition at line 30 of file ituh263dec.c.

◆ H263_MBTYPE_B_VLC_BITS

#define H263_MBTYPE_B_VLC_BITS   6

Definition at line 59 of file ituh263dec.c.

◆ CBPC_B_VLC_BITS

#define CBPC_B_VLC_BITS   3

Definition at line 60 of file ituh263dec.c.

◆ tab_size

#define tab_size   ((signed)FF_ARRAY_ELEMS(s->direct_scale_mv[0]))

Definition at line 713 of file ituh263dec.c.

◆ tab_bias

#define tab_bias   (tab_size / 2)

Definition at line 714 of file ituh263dec.c.

Function Documentation

◆ ff_h263_show_pict_info()

void ff_h263_show_pict_info ( H263DecContext *const  h,
int  h263_plus 
)

Print picture info if FF_DEBUG_PICT_INFO is set.

Definition at line 80 of file ituh263dec.c.

Referenced by ff_h263_decode_picture_header(), and ff_intel_h263_decode_picture_header().

◆ h263_decode_init_vlc()

static av_cold void h263_decode_init_vlc ( void  )
static

Definition at line 111 of file ituh263dec.c.

Referenced by ff_h263_decode_init_vlc().

◆ ff_h263_decode_init_vlc()

av_cold void ff_h263_decode_init_vlc ( void  )

Definition at line 136 of file ituh263dec.c.

Referenced by ff_h263_decode_init().

◆ ff_h263_decode_mba()

int ff_h263_decode_mba ( H263DecContext *const  h)

◆ h263_decode_gob_header()

static int h263_decode_gob_header ( H263DecContext *const  h)
static

Decode the group of blocks header or slice header.

Returns
<0 if an error occurred

Definition at line 160 of file ituh263dec.c.

Referenced by ff_h263_resync().

◆ ff_h263_resync()

int ff_h263_resync ( H263DecContext *const  h)

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 217 of file ituh263dec.c.

Referenced by ff_h263_decode_frame().

◆ ff_h263_decode_motion()

int ff_h263_decode_motion ( H263DecContext *const  h,
int  pred,
int  f_code 
)

◆ h263p_decode_umotion()

static int h263p_decode_umotion ( H263DecContext *const  h,
int  pred 
)
static

Definition at line 313 of file ituh263dec.c.

Referenced by ff_h263_decode_mb(), and preview_obmc().

◆ preview_obmc()

static void preview_obmc ( H263DecContext *const  h)
static

read the next MVs for OBMC.

yes this is an ugly hack, feel free to send a patch :)

Definition at line 343 of file ituh263dec.c.

Referenced by ff_h263_decode_mb().

◆ h263_decode_dquant()

static void h263_decode_dquant ( H263DecContext *const  h)
static

Definition at line 432 of file ituh263dec.c.

Referenced by ff_h263_decode_mb().

◆ h263_pred_acdc()

static void h263_pred_acdc ( MpegEncContext s,
int16_t *  block,
int  n 
)
static

Definition at line 447 of file ituh263dec.c.

Referenced by h263_decode_block().

◆ h263_decode_block()

static int h263_decode_block ( H263DecContext *const  h,
int16_t  block[64],
int  n,
int  coded 
)
static

Definition at line 525 of file ituh263dec.c.

Referenced by ff_h263_decode_mb(), and h263_skip_b_part().

◆ h263_skip_b_part()

static int h263_skip_b_part ( H263DecContext *const  h,
int  cbp 
)
static

Definition at line 673 of file ituh263dec.c.

Referenced by ff_h263_decode_mb().

◆ h263_get_modb()

static int h263_get_modb ( GetBitContext gb,
int  pb_frame,
int *  cbpb 
)
static

Definition at line 695 of file ituh263dec.c.

Referenced by ff_h263_decode_mb().

◆ set_one_direct_mv()

static void set_one_direct_mv ( MpegEncContext s,
const MPVPicture p,
int  i 
)
inlinestatic

Definition at line 715 of file ituh263dec.c.

Referenced by set_direct_mv().

◆ set_direct_mv()

static int set_direct_mv ( MpegEncContext s)
static
Returns
the mb_type

Definition at line 743 of file ituh263dec.c.

Referenced by ff_h263_decode_mb().

◆ ff_h263_decode_mb()

int ff_h263_decode_mb ( H263DecContext *const  h)

Definition at line 780 of file ituh263dec.c.

Referenced by ff_h263_decode_init(), and rv10_decode_packet().

◆ ff_h263_decode_picture_header()

int ff_h263_decode_picture_header ( H263DecContext *const  h)

Definition at line 1088 of file ituh263dec.c.

Referenced by ff_h263_decode_init().

Variable Documentation

◆ h263_mb_type_b_map

const int16_t h263_mb_type_b_map[15]
static

◆ ff_h263_intra_MCBPC_vlc

VLCElem ff_h263_intra_MCBPC_vlc[72]

◆ ff_h263_inter_MCBPC_vlc

VLCElem ff_h263_inter_MCBPC_vlc[198]

◆ ff_h263_cbpy_vlc

VLCElem ff_h263_cbpy_vlc[64]

◆ ff_h263_mv_vlc

VLCElem ff_h263_mv_vlc[538]

◆ h263_mbtype_b_vlc

VLCElem h263_mbtype_b_vlc[80]
static

Definition at line 106 of file ituh263dec.c.

Referenced by ff_h263_decode_mb(), and h263_decode_init_vlc().

◆ cbpc_b_vlc

VLCElem cbpc_b_vlc[8]
static

Definition at line 107 of file ituh263dec.c.

Referenced by ff_h263_decode_mb(), and h263_decode_init_vlc().

MB_TYPE_INTRA4x4
#define MB_TYPE_INTRA4x4
Definition: mpegutils.h:38
MB_TYPE_16x16
#define MB_TYPE_16x16
Definition: mpegutils.h:41
MB_TYPE_CBP
#define MB_TYPE_CBP
Definition: mpegutils.h:47
MB_TYPE_QUANT
#define MB_TYPE_QUANT
Definition: mpegutils.h:48
MB_TYPE_BIDIR_MV
#define MB_TYPE_BIDIR_MV
Definition: mpegutils.h:51
MB_TYPE_BACKWARD_MV
#define MB_TYPE_BACKWARD_MV
Definition: mpegutils.h:50
MB_TYPE_DIRECT2
#define MB_TYPE_DIRECT2
Definition: mpegutils.h:46
MB_TYPE_FORWARD_MV
#define MB_TYPE_FORWARD_MV
Definition: mpegutils.h:49