#include "mpegvideo.h"#include "mpeg4video.h"#include "h263.h"#include "thread.h"Go to the source code of this file.
Defines | |
| #define | SPRITE_TRAJ_VLC_BITS 6 |
| #define | DC_VLC_BITS 9 |
| #define | MB_TYPE_B_VLC_BITS 4 |
Functions | |
| void | mpeg4_pred_ac (MpegEncContext *s, DCTELEM *block, int n, int dir) |
| predicts the ac. | |
| static int | mpeg4_is_resync (MpegEncContext *s) |
| check if the next stuff is a resync marker or the end. | |
| static void | mpeg4_decode_sprite_trajectory (MpegEncContext *s, GetBitContext *gb) |
| int | mpeg4_decode_video_packet_header (MpegEncContext *s) |
| decodes the next video packet. | |
| static int | get_amv (MpegEncContext *s, int n) |
| gets the average motion vector for a GMC MB. | |
| static int | mpeg4_decode_dc (MpegEncContext *s, int n, int *dir_ptr) |
| decodes the dc value. | |
| static int | mpeg4_decode_partition_a (MpegEncContext *s) |
| decodes first partition. | |
| static int | mpeg4_decode_partition_b (MpegEncContext *s, int mb_count) |
| decode second partition. | |
| int | ff_mpeg4_decode_partitions (MpegEncContext *s) |
| decodes the first & second partition | |
| static int | mpeg4_decode_block (MpegEncContext *s, DCTELEM *block, int n, int coded, int intra, int rvlc) |
| decodes a block. | |
| static int | mpeg4_decode_partitioned_mb (MpegEncContext *s, DCTELEM block[6][64]) |
| decode partition C of one MB. | |
| static int | mpeg4_decode_mb (MpegEncContext *s, DCTELEM block[6][64]) |
| static int | mpeg4_decode_gop_header (MpegEncContext *s, GetBitContext *gb) |
| static int | decode_vol_header (MpegEncContext *s, GetBitContext *gb) |
| static int | decode_user_data (MpegEncContext *s, GetBitContext *gb) |
| decodes the user data stuff in the header. | |
| static int | decode_vop_header (MpegEncContext *s, GetBitContext *gb) |
| int | ff_mpeg4_decode_picture_header (MpegEncContext *s, GetBitContext *gb) |
| decode mpeg4 headers | |
| static av_cold int | decode_init (AVCodecContext *avctx) |
Variables | |
| static VLC | dc_lum |
| static VLC | dc_chrom |
| static VLC | sprite_trajectory |
| static VLC | mb_type_b_vlc |
| static const int | mb_type_b_map [4] |
| AVCodec | ff_mpeg4_decoder |
| #define DC_VLC_BITS 9 |
Definition at line 33 of file mpeg4videodec.c.
| #define MB_TYPE_B_VLC_BITS 4 |
| #define SPRITE_TRAJ_VLC_BITS 6 |
Definition at line 32 of file mpeg4videodec.c.
Referenced by decode_init(), and mpeg4_decode_sprite_trajectory().
| static av_cold int decode_init | ( | AVCodecContext * | avctx | ) | [static] |
Definition at line 2197 of file mpeg4videodec.c.
| static int decode_user_data | ( | MpegEncContext * | s, | |
| GetBitContext * | gb | |||
| ) | [static] |
decodes the user data stuff in the header.
Also initializes divx/xvid/lavc_version/build.
Definition at line 1840 of file mpeg4videodec.c.
Referenced by ff_mpeg4_decode_picture_header().
| static int decode_vol_header | ( | MpegEncContext * | s, | |
| GetBitContext * | gb | |||
| ) | [static] |
| static int decode_vop_header | ( | MpegEncContext * | s, | |
| GetBitContext * | gb | |||
| ) | [static] |
| int ff_mpeg4_decode_partitions | ( | MpegEncContext * | s | ) |
decodes the first & second partition
Definition at line 790 of file mpeg4videodec.c.
Referenced by decode_slice().
| int ff_mpeg4_decode_picture_header | ( | MpegEncContext * | s, | |
| GetBitContext * | gb | |||
| ) |
decode mpeg4 headers
Definition at line 2111 of file mpeg4videodec.c.
Referenced by av_mpeg4_decode_header(), and ff_h263_decode_frame().
| static int get_amv | ( | MpegEncContext * | s, | |
| int | n | |||
| ) | [inline, static] |
gets the average motion vector for a GMC MB.
| n | either 0 for the x component or 1 for y |
Definition at line 446 of file mpeg4videodec.c.
Referenced by mpeg4_decode_mb(), and mpeg4_decode_partition_a().
| static int mpeg4_decode_block | ( | MpegEncContext * | s, | |
| DCTELEM * | block, | |||
| int | n, | |||
| int | coded, | |||
| int | intra, | |||
| int | rvlc | |||
| ) | [inline, static] |
decodes a block.
Definition at line 843 of file mpeg4videodec.c.
Referenced by mpeg4_decode_mb(), and mpeg4_decode_partitioned_mb().
| static int mpeg4_decode_dc | ( | MpegEncContext * | s, | |
| int | n, | |||
| int * | dir_ptr | |||
| ) | [inline, static] |
decodes the dc value.
| n | block index (0-3 are luma, 4-5 are chroma) | |
| dir_ptr | the prediction direction will be stored here |
Definition at line 493 of file mpeg4videodec.c.
Referenced by mpeg4_decode_block(), mpeg4_decode_partition_a(), and mpeg4_decode_partition_b().
| static int mpeg4_decode_gop_header | ( | MpegEncContext * | s, | |
| GetBitContext * | gb | |||
| ) | [static] |
| static int mpeg4_decode_mb | ( | MpegEncContext * | s, | |
| DCTELEM | block[6][64] | |||
| ) | [static] |
Definition at line 1171 of file mpeg4videodec.c.
Referenced by decode_init(), and decode_vop_header().
| static int mpeg4_decode_partition_a | ( | MpegEncContext * | s | ) | [static] |
decodes first partition.
Definition at line 538 of file mpeg4videodec.c.
Referenced by ff_mpeg4_decode_partitions().
| static int mpeg4_decode_partition_b | ( | MpegEncContext * | s, | |
| int | mb_count | |||
| ) | [static] |
decode second partition.
Definition at line 703 of file mpeg4videodec.c.
Referenced by ff_mpeg4_decode_partitions().
| static int mpeg4_decode_partitioned_mb | ( | MpegEncContext * | s, | |
| DCTELEM | block[6][64] | |||
| ) | [static] |
decode partition C of one MB.
Definition at line 1089 of file mpeg4videodec.c.
Referenced by decode_vop_header().
| static void mpeg4_decode_sprite_trajectory | ( | MpegEncContext * | s, | |
| GetBitContext * | gb | |||
| ) | [static] |
Definition at line 155 of file mpeg4videodec.c.
Referenced by decode_vop_header(), and mpeg4_decode_video_packet_header().
| int mpeg4_decode_video_packet_header | ( | MpegEncContext * | s | ) |
decodes the next video packet.
Definition at line 349 of file mpeg4videodec.c.
Referenced by ff_h263_resync().
| static int mpeg4_is_resync | ( | MpegEncContext * | s | ) | [inline, static] |
check if the next stuff is a resync marker or the end.
Definition at line 112 of file mpeg4videodec.c.
Referenced by mpeg4_decode_mb(), and mpeg4_decode_partitioned_mb().
| void mpeg4_pred_ac | ( | MpegEncContext * | s, | |
| DCTELEM * | block, | |||
| int | n, | |||
| int | dir | |||
| ) |
predicts the ac.
| n | block index (0-3 are luma, 4-5 are chroma) | |
| dir | the ac prediction direction |
Definition at line 53 of file mpeg4videodec.c.
Referenced by ff_msmpeg4_decode_block(), and mpeg4_decode_block().
Definition at line 37 of file mpeg4videodec.c.
Definition at line 37 of file mpeg4videodec.c.
Initial value:
{
"mpeg4",
AVMEDIA_TYPE_VIDEO,
CODEC_ID_MPEG4,
sizeof(MpegEncContext),
decode_init,
NULL,
ff_h263_decode_end,
ff_h263_decode_frame,
CODEC_CAP_DRAW_HORIZ_BAND | CODEC_CAP_DR1 | CODEC_CAP_TRUNCATED | CODEC_CAP_DELAY | CODEC_CAP_FRAME_THREADS,
.flush= ff_mpeg_flush,
.max_lowres= 3,
.long_name= NULL_IF_CONFIG_SMALL("MPEG-4 part 2"),
.pix_fmts= ff_hwaccel_pixfmt_list_420,
.update_thread_context= ONLY_IF_THREADS_ENABLED(ff_mpeg_update_thread_context)
}
Definition at line 2243 of file mpeg4videodec.c.
const int mb_type_b_map[4] [static] |
Initial value:
{
MB_TYPE_DIRECT2 | MB_TYPE_L0L1,
MB_TYPE_L0L1 | MB_TYPE_16x16,
MB_TYPE_L1 | MB_TYPE_16x16,
MB_TYPE_L0 | MB_TYPE_16x16,
}
Definition at line 41 of file mpeg4videodec.c.
Referenced by mpeg4_decode_mb().
VLC mb_type_b_vlc [static] |
Definition at line 39 of file mpeg4videodec.c.
VLC sprite_trajectory [static] |
Definition at line 38 of file mpeg4videodec.c.
1.5.8