FFmpeg
Loading...
Searching...
No Matches
mpegutils.h File Reference
#include <stdint.h>
#include "libavutil/frame.h"
#include "avcodec.h"

Go to the source code of this file.

Macros

#define PICT_TOP_FIELD   1
 
#define PICT_BOTTOM_FIELD   2
 
#define PICT_FRAME   3
 
#define MAX_MB_BYTES   (30 * 16 * 16 * 3 / 8 + 120)
 
#define MB_TYPE_INTRA4x4   (1 << 0)
 
#define MB_TYPE_INTRA16x16   (1 << 1)
 
#define MB_TYPE_INTRA_PCM   (1 << 2)
 
#define MB_TYPE_16x16   (1 << 3)
 
#define MB_TYPE_16x8   (1 << 4)
 
#define MB_TYPE_8x16   (1 << 5)
 
#define MB_TYPE_8x8   (1 << 6)
 
#define MB_TYPE_INTERLACED   (1 << 7)
 
#define MB_TYPE_DIRECT2   (1 << 8)
 
#define MB_TYPE_CBP   (1 << 10)
 
#define MB_TYPE_QUANT   (1 << 11)
 
#define MB_TYPE_FORWARD_MV   (1 << 12)
 
#define MB_TYPE_BACKWARD_MV   (1 << 13)
 
#define MB_TYPE_BIDIR_MV   (MB_TYPE_FORWARD_MV | MB_TYPE_BACKWARD_MV)
 
#define MB_TYPE_P0L0   (1 << 12)
 
#define MB_TYPE_P1L0   (1 << 13)
 
#define MB_TYPE_P0L1   (1 << 14)
 
#define MB_TYPE_P1L1   (1 << 15)
 
#define MB_TYPE_L0   (MB_TYPE_P0L0 | MB_TYPE_P1L0)
 
#define MB_TYPE_L1   (MB_TYPE_P0L1 | MB_TYPE_P1L1)
 
#define MB_TYPE_L0L1   (MB_TYPE_L0 | MB_TYPE_L1)
 
#define MB_TYPE_GMC   (1 << 16)
 
#define MB_TYPE_SKIP   (1 << 17)
 
#define MB_TYPE_ACPRED   (1 << 18)
 
#define MB_TYPE_INTRA   MB_TYPE_INTRA4x4
 
#define MB_TYPE_CODEC_SPECIFIC   (1 << 9)
 
#define IS_INTRA4x4(a)
 
#define IS_INTRA16x16(a)
 
#define IS_PCM(a)
 
#define IS_INTRA(a)
 
#define IS_INTER(a)
 
#define IS_SKIP(a)
 
#define IS_INTRA_PCM(a)
 
#define IS_INTERLACED(a)
 
#define IS_DIRECT(a)
 
#define IS_GMC(a)
 
#define IS_16X16(a)
 
#define IS_16X8(a)
 
#define IS_8X16(a)
 
#define IS_8X8(a)
 
#define IS_ACPRED(a)
 
#define IS_QUANT(a)
 
#define HAS_CBP(a)
 
#define HAS_FORWARD_MV(a)
 
#define HAS_BACKWARD_MV(a)
 
#define HAS_MV(a, dir)
 
#define MB_TYPE_MV_2_MV_DIR(a)
 

Functions

void ff_draw_horiz_band (AVCodecContext *avctx, const AVFrame *cur, const AVFrame *last, int y, int h, int picture_structure, int first_field, int low_delay)
 Draw a horizontal band if supported.
 
void ff_print_debug_info2 (AVCodecContext *avctx, AVFrame *pict, const uint32_t *mbtype_table, const int8_t *qscale_table, int16_t(*const motion_val[2])[2], int mb_width, int mb_height, int mb_stride, int quarter_sample)
 Print debugging info for the given picture.
 

Macro Definition Documentation

◆ PICT_TOP_FIELD

◆ PICT_BOTTOM_FIELD

◆ PICT_FRAME

◆ MAX_MB_BYTES

#define MAX_MB_BYTES   (30 * 16 * 16 * 3 / 8 + 120)

◆ MB_TYPE_INTRA4x4

#define MB_TYPE_INTRA4x4   (1 << 0)

Definition at line 38 of file mpegutils.h.

Referenced by ff_er_frame_end(), and svq3_decode_mb().

◆ MB_TYPE_INTRA16x16

#define MB_TYPE_INTRA16x16   (1 << 1)

◆ MB_TYPE_INTRA_PCM

#define MB_TYPE_INTRA_PCM   (1 << 2)

Definition at line 40 of file mpegutils.h.

Referenced by decode_cabac_intra_mb_type().

◆ MB_TYPE_16x16

◆ MB_TYPE_16x8

◆ MB_TYPE_8x16

#define MB_TYPE_8x16   (1 << 5)

◆ MB_TYPE_8x8

◆ MB_TYPE_INTERLACED

◆ MB_TYPE_DIRECT2

◆ MB_TYPE_CBP

#define MB_TYPE_CBP   (1 << 10)

Definition at line 47 of file mpegutils.h.

Referenced by mpeg_decode_mb().

◆ MB_TYPE_QUANT

#define MB_TYPE_QUANT   (1 << 11)

Definition at line 48 of file mpegutils.h.

Referenced by mpeg_decode_mb().

◆ MB_TYPE_FORWARD_MV

◆ MB_TYPE_BACKWARD_MV

#define MB_TYPE_BACKWARD_MV   (1 << 13)

Definition at line 50 of file mpegutils.h.

Referenced by ff_print_debug_info2(), and rv34_pred_mv_b().

◆ MB_TYPE_BIDIR_MV

#define MB_TYPE_BIDIR_MV   (MB_TYPE_FORWARD_MV | MB_TYPE_BACKWARD_MV)

Definition at line 51 of file mpegutils.h.

Referenced by ff_mpeg4_set_direct_mv(), mpeg4_decode_mb(), mpeg_decode_mb(), and set_direct_mv().

◆ MB_TYPE_P0L0

#define MB_TYPE_P0L0   (1 << 12)

Definition at line 53 of file mpegutils.h.

Referenced by decode_mb_skip(), and pred_temp_direct_motion().

◆ MB_TYPE_P1L0

#define MB_TYPE_P1L0   (1 << 13)

Definition at line 54 of file mpegutils.h.

Referenced by decode_mb_skip(), and pred_spatial_direct_motion().

◆ MB_TYPE_P0L1

#define MB_TYPE_P0L1   (1 << 14)

Definition at line 55 of file mpegutils.h.

Referenced by pred_temp_direct_motion().

◆ MB_TYPE_P1L1

#define MB_TYPE_P1L1   (1 << 15)

Definition at line 56 of file mpegutils.h.

Referenced by pred_spatial_direct_motion().

◆ MB_TYPE_L0

#define MB_TYPE_L0   (MB_TYPE_P0L0 | MB_TYPE_P1L0)

Definition at line 57 of file mpegutils.h.

Referenced by ff_er_frame_end(), ff_print_debug_info2(), and pred_spatial_direct_motion().

◆ MB_TYPE_L1

#define MB_TYPE_L1   (MB_TYPE_P0L1 | MB_TYPE_P1L1)

Definition at line 58 of file mpegutils.h.

Referenced by ff_print_debug_info2().

◆ MB_TYPE_L0L1

#define MB_TYPE_L0L1   (MB_TYPE_L0 | MB_TYPE_L1)

Definition at line 59 of file mpegutils.h.

Referenced by decode_mb_skip(), pred_spatial_direct_motion(), and pred_temp_direct_motion().

◆ MB_TYPE_GMC

#define MB_TYPE_GMC   (1 << 16)

Definition at line 60 of file mpegutils.h.

Referenced by mpeg4_decode_mb(), and mpeg4_decode_partition_a().

◆ MB_TYPE_SKIP

◆ MB_TYPE_ACPRED

#define MB_TYPE_ACPRED   (1 << 18)

Definition at line 62 of file mpegutils.h.

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

◆ MB_TYPE_INTRA

◆ MB_TYPE_CODEC_SPECIFIC

#define MB_TYPE_CODEC_SPECIFIC   (1 << 9)

Definition at line 67 of file mpegutils.h.

◆ IS_INTRA4x4

◆ IS_INTRA16x16

◆ IS_PCM

#define IS_PCM ( a)
Value:
#define MB_TYPE_INTRA_PCM
Definition mpegutils.h:40

Definition at line 71 of file mpegutils.h.

Referenced by get_type_mv_char().

◆ IS_INTRA

#define IS_INTRA ( a)
Value:
((a) & 7)

Definition at line 72 of file mpegutils.h.

◆ IS_INTER

#define IS_INTER ( a)
Value:
#define MB_TYPE_8x8
Definition mpegutils.h:44
#define MB_TYPE_8x16
Definition mpegutils.h:43
#define MB_TYPE_16x8
Definition mpegutils.h:42
#define MB_TYPE_16x16
Definition mpegutils.h:41

Definition at line 73 of file mpegutils.h.

Referenced by ff_er_frame_end(), ff_h264_decode_mb_cabac(), ff_h264_decode_mb_cavlc(), fill_decode_caches(), fill_filter_caches_inter(), guess_dc(), hl_motion(), and svq3_decode_mb().

◆ IS_SKIP

◆ IS_INTRA_PCM

#define IS_INTRA_PCM ( a)

◆ IS_INTERLACED

◆ IS_DIRECT

◆ IS_GMC

#define IS_GMC ( a)
Value:
#define MB_TYPE_GMC
Definition mpegutils.h:60

Definition at line 79 of file mpegutils.h.

Referenced by get_type_mv_char().

◆ IS_16X16

◆ IS_16X8

◆ IS_8X16

◆ IS_8X8

◆ IS_ACPRED

#define IS_ACPRED ( a)
Value:
#define MB_TYPE_ACPRED
Definition mpegutils.h:62

Definition at line 84 of file mpegutils.h.

Referenced by get_type_mv_char(), and mpeg4_decode_partitioned_mb().

◆ IS_QUANT

#define IS_QUANT ( a)
Value:
#define MB_TYPE_QUANT
Definition mpegutils.h:48

Definition at line 85 of file mpegutils.h.

Referenced by ff_h263_decode_mb(), h261_decode_mb(), h261_encode_mb(), and mpeg_decode_mb().

◆ HAS_CBP

#define HAS_CBP ( a)
Value:
#define MB_TYPE_CBP
Definition mpegutils.h:47

Definition at line 87 of file mpegutils.h.

Referenced by ff_h263_decode_mb(), h261_decode_mb(), h261_encode_mb(), and mpeg_decode_mb().

◆ HAS_FORWARD_MV

#define HAS_FORWARD_MV ( a)
Value:
#define MB_TYPE_FORWARD_MV
Definition mpegutils.h:49

Definition at line 88 of file mpegutils.h.

Referenced by ff_h263_decode_mb(), and mpeg4_decode_mb().

◆ HAS_BACKWARD_MV

#define HAS_BACKWARD_MV ( a)
Value:
#define MB_TYPE_BACKWARD_MV
Definition mpegutils.h:50

Definition at line 89 of file mpegutils.h.

Referenced by ff_h263_decode_mb(), and mpeg4_decode_mb().

◆ HAS_MV

#define HAS_MV ( a,
dir )
Value:
((a) & (MB_TYPE_FORWARD_MV << (dir)))

Definition at line 91 of file mpegutils.h.

Referenced by mpeg_decode_mb().

◆ MB_TYPE_MV_2_MV_DIR

#define MB_TYPE_MV_2_MV_DIR ( a)
Value:
(((a) >> 12) & (MV_DIR_FORWARD | MV_DIR_BACKWARD))
#define MV_DIR_BACKWARD
Definition mpegvideo.h:169
#define MV_DIR_FORWARD
Definition mpegvideo.h:168

Definition at line 93 of file mpegutils.h.

Referenced by mpeg_decode_mb().

Function Documentation

◆ ff_draw_horiz_band()

void ff_draw_horiz_band ( AVCodecContext * avctx,
const AVFrame * cur,
const AVFrame * last,
int y,
int h,
int picture_structure,
int first_field,
int low_delay )

Draw a horizontal band if supported.

Parameters
his the normal height, this will be reduced automatically if needed

Definition at line 54 of file mpegutils.c.

Referenced by ff_intrax8_decode_picture(), ff_mpeg_draw_horiz_band(), and svq3_decode_frame().

◆ ff_print_debug_info2()

void ff_print_debug_info2 ( AVCodecContext * avctx,
AVFrame * pict,
const uint32_t * mbtype_table,
const int8_t * qscale_table,
int16_t(*[2]) motion_val[2],
int mb_width,
int mb_height,
int mb_stride,
int quarter_sample )

Print debugging info for the given picture.

Definition at line 155 of file mpegutils.c.

Referenced by ff_print_debug_info(), and finalize_frame().