FFmpeg
|
#include <float.h>
#include "avcodec.h"
#include "blockdsp.h"
#include "error_resilience.h"
#include "fdctdsp.h"
#include "get_bits.h"
#include "h264chroma.h"
#include "h263dsp.h"
#include "hpeldsp.h"
#include "idctdsp.h"
#include "internal.h"
#include "me_cmp.h"
#include "motion_est.h"
#include "mpegpicture.h"
#include "mpegvideodsp.h"
#include "mpegvideoencdsp.h"
#include "mpegvideodata.h"
#include "pixblockdsp.h"
#include "put_bits.h"
#include "ratecontrol.h"
#include "parser.h"
#include "mpegutils.h"
#include "mpeg12data.h"
#include "qpeldsp.h"
#include "thread.h"
#include "videodsp.h"
#include "libavutil/opt.h"
#include "libavutil/timecode.h"
Go to the source code of this file.
Data Structures | |
struct | MpegEncContext |
MpegEncContext. More... | |
Macros | |
#define | MAX_THREADS 32 |
#define | MAX_B_FRAMES 16 |
#define | SEQ_END_CODE 0x000001b7 |
#define | SEQ_START_CODE 0x000001b3 |
#define | GOP_START_CODE 0x000001b8 |
#define | PICTURE_START_CODE 0x00000100 |
#define | SLICE_MIN_START_CODE 0x00000101 |
#define | SLICE_MAX_START_CODE 0x000001af |
#define | EXT_START_CODE 0x000001b5 |
#define | USER_START_CODE 0x000001b2 |
#define | SLICE_START_CODE 0x000001b7 |
#define | MV_DIR_FORWARD 1 |
#define | MV_DIR_BACKWARD 2 |
#define | MV_DIRECT 4 |
bidirectional mode where the difference equals the MV of the last P/S/I-Frame (MPEG-4) More... | |
#define | MV_TYPE_16X16 0 |
1 vector for the whole mb More... | |
#define | MV_TYPE_8X8 1 |
4 vectors (H.263, MPEG-4 4MV) More... | |
#define | MV_TYPE_16X8 2 |
2 vectors, one per 16x8 block More... | |
#define | MV_TYPE_FIELD 3 |
2 vectors, one per field More... | |
#define | MV_TYPE_DMV 4 |
2 vectors, special mpeg2 Dual Prime Vectors More... | |
#define | UNI_AC_ENC_INDEX(run, level) ((run)*128 + (level)) |
#define | VIDEO_FORMAT_COMPONENT 0 |
#define | VIDEO_FORMAT_PAL 1 |
#define | VIDEO_FORMAT_NTSC 2 |
#define | VIDEO_FORMAT_SECAM 3 |
#define | VIDEO_FORMAT_MAC 4 |
#define | VIDEO_FORMAT_UNSPECIFIED 5 |
#define | CHROMA_420 1 |
#define | CHROMA_422 2 |
#define | CHROMA_444 3 |
#define | SLICE_OK 0 |
#define | SLICE_ERROR -1 |
#define | SLICE_END -2 |
end marker found More... | |
#define | SLICE_NOEND -3 |
no end marker or error found but mb count exceeded More... | |
#define | FF_MPV_FLAG_SKIP_RD 0x0001 |
#define | FF_MPV_FLAG_STRICT_GOP 0x0002 |
#define | FF_MPV_FLAG_QP_RD 0x0004 |
#define | FF_MPV_FLAG_CBP_RD 0x0008 |
#define | FF_MPV_FLAG_NAQ 0x0010 |
#define | FF_MPV_FLAG_MV0 0x0020 |
#define | FF_MPV_OPT_CMP_FUNC |
#define | FF_MPV_OFFSET(x) offsetof(MpegEncContext, x) |
#define | FF_MPV_RC_STRATEGY_OPTS |
#define | FF_MPV_OPT_FLAGS (AV_OPT_FLAG_VIDEO_PARAM | AV_OPT_FLAG_ENCODING_PARAM) |
#define | FF_MPV_COMMON_OPTS |
Variables | |
const AVOption | ff_mpv_generic_options [] |
mpegvideo header.
Definition in file mpegvideo.h.
#define MAX_THREADS 32 |
Definition at line 62 of file mpegvideo.h.
#define MAX_B_FRAMES 16 |
Definition at line 64 of file mpegvideo.h.
#define SEQ_END_CODE 0x000001b7 |
Definition at line 67 of file mpegvideo.h.
#define SEQ_START_CODE 0x000001b3 |
Definition at line 68 of file mpegvideo.h.
#define GOP_START_CODE 0x000001b8 |
Definition at line 69 of file mpegvideo.h.
#define PICTURE_START_CODE 0x00000100 |
Definition at line 70 of file mpegvideo.h.
#define SLICE_MIN_START_CODE 0x00000101 |
Definition at line 71 of file mpegvideo.h.
#define SLICE_MAX_START_CODE 0x000001af |
Definition at line 72 of file mpegvideo.h.
#define EXT_START_CODE 0x000001b5 |
Definition at line 73 of file mpegvideo.h.
#define USER_START_CODE 0x000001b2 |
Definition at line 74 of file mpegvideo.h.
#define SLICE_START_CODE 0x000001b7 |
Definition at line 75 of file mpegvideo.h.
#define MV_DIR_FORWARD 1 |
Definition at line 262 of file mpegvideo.h.
#define MV_DIR_BACKWARD 2 |
Definition at line 263 of file mpegvideo.h.
#define MV_DIRECT 4 |
bidirectional mode where the difference equals the MV of the last P/S/I-Frame (MPEG-4)
Definition at line 264 of file mpegvideo.h.
#define MV_TYPE_16X16 0 |
1 vector for the whole mb
Definition at line 266 of file mpegvideo.h.
#define MV_TYPE_8X8 1 |
4 vectors (H.263, MPEG-4 4MV)
Definition at line 267 of file mpegvideo.h.
#define MV_TYPE_16X8 2 |
2 vectors, one per 16x8 block
Definition at line 268 of file mpegvideo.h.
#define MV_TYPE_FIELD 3 |
2 vectors, one per field
Definition at line 269 of file mpegvideo.h.
#define MV_TYPE_DMV 4 |
2 vectors, special mpeg2 Dual Prime Vectors
Definition at line 270 of file mpegvideo.h.
Definition at line 318 of file mpegvideo.h.
#define VIDEO_FORMAT_COMPONENT 0 |
Definition at line 479 of file mpegvideo.h.
#define VIDEO_FORMAT_PAL 1 |
Definition at line 480 of file mpegvideo.h.
#define VIDEO_FORMAT_NTSC 2 |
Definition at line 481 of file mpegvideo.h.
#define VIDEO_FORMAT_SECAM 3 |
Definition at line 482 of file mpegvideo.h.
#define VIDEO_FORMAT_MAC 4 |
Definition at line 483 of file mpegvideo.h.
#define VIDEO_FORMAT_UNSPECIFIED 5 |
Definition at line 484 of file mpegvideo.h.
#define CHROMA_420 1 |
Definition at line 488 of file mpegvideo.h.
#define CHROMA_422 2 |
Definition at line 489 of file mpegvideo.h.
#define CHROMA_444 3 |
Definition at line 490 of file mpegvideo.h.
#define SLICE_OK 0 |
Definition at line 521 of file mpegvideo.h.
#define SLICE_ERROR -1 |
Definition at line 522 of file mpegvideo.h.
#define SLICE_END -2 |
end marker found
Definition at line 523 of file mpegvideo.h.
#define SLICE_NOEND -3 |
no end marker or error found but mb count exceeded
Definition at line 524 of file mpegvideo.h.
#define FF_MPV_FLAG_SKIP_RD 0x0001 |
Definition at line 593 of file mpegvideo.h.
#define FF_MPV_FLAG_STRICT_GOP 0x0002 |
Definition at line 594 of file mpegvideo.h.
#define FF_MPV_FLAG_QP_RD 0x0004 |
Definition at line 595 of file mpegvideo.h.
#define FF_MPV_FLAG_CBP_RD 0x0008 |
Definition at line 596 of file mpegvideo.h.
#define FF_MPV_FLAG_NAQ 0x0010 |
Definition at line 597 of file mpegvideo.h.
#define FF_MPV_FLAG_MV0 0x0020 |
Definition at line 598 of file mpegvideo.h.
#define FF_MPV_OPT_CMP_FUNC |
Definition at line 600 of file mpegvideo.h.
#define FF_MPV_OFFSET | ( | x | ) | offsetof(MpegEncContext, x) |
Definition at line 618 of file mpegvideo.h.
#define FF_MPV_RC_STRATEGY_OPTS |
Definition at line 621 of file mpegvideo.h.
#define FF_MPV_OPT_FLAGS (AV_OPT_FLAG_VIDEO_PARAM | AV_OPT_FLAG_ENCODING_PARAM) |
Definition at line 628 of file mpegvideo.h.
#define FF_MPV_COMMON_OPTS |
Definition at line 629 of file mpegvideo.h.
void ff_mpv_common_defaults | ( | MpegEncContext * | s | ) |
Set the given MpegEncContext to common defaults (same for encoding and decoding).
The changed fields will not depend upon the prior state of the MpegEncContext.
Definition at line 676 of file mpegvideo.c.
Referenced by ff_mpv_decode_init(), and mpv_encode_defaults().
void ff_dct_encode_init_x86 | ( | MpegEncContext * | s | ) |
Definition at line 214 of file mpegvideoenc.c.
Referenced by ff_dct_encode_init().
int ff_mpv_common_init | ( | MpegEncContext * | s | ) |
init common structure for both encoder and decoder.
this assumes that some variables like width/height are already set
Definition at line 913 of file mpegvideo.c.
Referenced by ff_h263_decode_frame(), ff_h263_decode_init(), ff_mpeg_update_thread_context(), ff_mpv_encode_init(), ff_rv34_decode_init(), h261_decode_frame(), mpeg_decode_postinit(), rv10_decode_init(), rv20_decode_picture_header(), svq1_encode_init(), and vcr2_init_sequence().
void ff_mpv_common_init_arm | ( | MpegEncContext * | s | ) |
Definition at line 43 of file mpegvideo_arm.c.
Referenced by dct_init().
void ff_mpv_common_init_axp | ( | MpegEncContext * | s | ) |
Definition at line 106 of file mpegvideo_alpha.c.
Referenced by dct_init().
void ff_mpv_common_init_neon | ( | MpegEncContext * | s | ) |
Definition at line 126 of file mpegvideo.c.
Referenced by dct_init().
void ff_mpv_common_init_ppc | ( | MpegEncContext * | s | ) |
Definition at line 119 of file mpegvideo_altivec.c.
Referenced by dct_init().
void ff_mpv_common_init_x86 | ( | MpegEncContext * | s | ) |
Definition at line 454 of file mpegvideo.c.
Referenced by dct_init().
void ff_mpv_common_init_mips | ( | MpegEncContext * | s | ) |
Definition at line 25 of file mpegvideo_init_mips.c.
Referenced by dct_init().
int ff_mpv_common_frame_size_change | ( | MpegEncContext * | s | ) |
Definition at line 1055 of file mpegvideo.c.
Referenced by ff_h263_decode_frame(), ff_mpeg_update_thread_context(), ff_rv34_decode_frame(), and ff_rv34_decode_update_thread_context().
void ff_mpv_common_end | ( | MpegEncContext * | s | ) |
Definition at line 1111 of file mpegvideo.c.
Referenced by ff_h263_decode_end(), ff_mpv_common_init(), ff_mpv_encode_end(), ff_rv34_decode_end(), ff_rv34_decode_init(), ff_vc1_decode_end(), h261_decode_end(), h261_decode_frame(), ipu_decode_end(), mpeg_decode_end(), mpeg_decode_postinit(), rv10_decode_end(), rv20_decode_picture_header(), svq1_encode_end(), vc1_decode_frame(), and vcr2_init_sequence().
void ff_mpv_decode_init | ( | MpegEncContext * | s, |
AVCodecContext * | avctx | ||
) |
Initialize the given MpegEncContext for decoding.
the changed fields will not depend upon the prior state of the MpegEncContext.
Definition at line 699 of file mpegvideo.c.
Referenced by ff_h263_decode_init(), ff_rv34_decode_init(), h261_decode_init(), ipu_decode_init(), mpeg_decode_init(), and rv10_decode_init().
void ff_mpv_reconstruct_mb | ( | MpegEncContext * | s, |
int16_t | block[12][64] | ||
) |
Definition at line 2248 of file mpegvideo.c.
Referenced by decode_slice(), encode_mb_hq(), encode_thread(), h261_decode_mb(), h261_decode_mb_skipped(), mpeg_decode_slice(), mpeg_er_decode_mb(), and rv10_decode_packet().
void ff_mpv_report_decode_progress | ( | MpegEncContext * | s | ) |
Definition at line 2345 of file mpegvideo.c.
Referenced by decode_slice(), and mpeg_decode_slice().
int ff_mpv_frame_start | ( | MpegEncContext * | s, |
AVCodecContext * | avctx | ||
) |
generic function called after decoding the header and before a frame is decoded.
Definition at line 1181 of file mpegvideo.c.
Referenced by decode_wmv9(), ff_h263_decode_frame(), ff_rv34_decode_frame(), h261_decode_frame(), mpeg_field_start(), rv10_decode_packet(), and vc1_decode_frame().
void ff_mpv_frame_end | ( | MpegEncContext * | s | ) |
Definition at line 1405 of file mpegvideo.c.
Referenced by decode_wmv9(), ff_h263_decode_frame(), ff_rv34_decode_frame(), finish_frame(), h261_decode_frame(), rv10_decode_frame(), rv10_decode_packet(), slice_end(), and vc1_decode_frame().
int ff_mpv_encode_init | ( | AVCodecContext * | avctx | ) |
Definition at line 296 of file mpegvideo_enc.c.
Referenced by encode_init(), and wmv2_encode_init().
void ff_mpv_encode_init_x86 | ( | MpegEncContext * | s | ) |
int ff_mpv_encode_end | ( | AVCodecContext * | avctx | ) |
Definition at line 1096 of file mpegvideo_enc.c.
int ff_mpv_encode_picture | ( | AVCodecContext * | avctx, |
AVPacket * | pkt, | ||
const AVFrame * | frame, | ||
int * | got_packet | ||
) |
Definition at line 1859 of file mpegvideo_enc.c.
int ff_mpv_reallocate_putbitbuffer | ( | MpegEncContext * | s, |
size_t | threshold, | ||
size_t | size_increase | ||
) |
Definition at line 2917 of file mpegvideo_enc.c.
Referenced by encode_thread(), ff_mjpeg_encode_stuffing(), and mjpeg_encode_picture_frame().
void ff_clean_intra_table_entries | ( | MpegEncContext * | s | ) |
Clean dc, ac, coded_block for the current non-intra MB.
Definition at line 1904 of file mpegvideo.c.
Referenced by encode_thread(), mpeg4_decode_partition_a(), and mpv_reconstruct_mb_internal().
void ff_mpeg_draw_horiz_band | ( | MpegEncContext * | s, |
int | y, | ||
int | h | ||
) |
Definition at line 2260 of file mpegvideo.c.
Referenced by decode_slice(), dxva2_mpeg2_end_frame(), dxva2_vc1_end_frame(), ff_xvmc_decode_mb(), ff_xvmc_field_end(), mpeg_decode_slice(), vaapi_mpeg2_end_frame(), vaapi_mpeg4_end_frame(), vaapi_vc1_end_frame(), vc1_decode_b_blocks(), vc1_decode_i_blocks(), vc1_decode_i_blocks_adv(), vc1_decode_p_blocks(), and vc1_decode_skip_blocks().
void ff_mpeg_flush | ( | AVCodecContext * | avctx | ) |
Definition at line 2300 of file mpegvideo.c.
Referenced by decode_wmv9(), and flush().
void ff_print_debug_info | ( | MpegEncContext * | s, |
Picture * | p, | ||
AVFrame * | pict | ||
) |
Definition at line 1413 of file mpegvideo.c.
Referenced by ff_h263_decode_frame(), finish_frame(), h261_decode_frame(), rv10_decode_frame(), slice_end(), and vc1_decode_frame().
int ff_mpv_export_qp_table | ( | MpegEncContext * | s, |
AVFrame * | f, | ||
Picture * | p, | ||
int | qp_type | ||
) |
Definition at line 1420 of file mpegvideo.c.
Referenced by ff_h263_decode_frame(), finish_frame(), rv10_decode_frame(), and slice_end().
void ff_write_quant_matrix | ( | PutBitContext * | pb, |
uint16_t * | matrix | ||
) |
Definition at line 204 of file mpegvideo_enc.c.
Referenced by mpeg4_encode_vol_header().
int ff_update_duplicate_context | ( | MpegEncContext * | dst, |
MpegEncContext * | src | ||
) |
Definition at line 499 of file mpegvideo.c.
Referenced by decode_chunks(), and encode_picture().
int ff_mpeg_update_thread_context | ( | AVCodecContext * | dst, |
const AVCodecContext * | src | ||
) |
Definition at line 524 of file mpegvideo.c.
Referenced by ff_rv34_decode_update_thread_context().
void ff_set_qscale | ( | MpegEncContext * | s, |
int | qscale | ||
) |
set qscale and update qscale dependent variables.
Definition at line 2331 of file mpegvideo.c.
Referenced by decode_slice(), encode_mb_internal(), encode_thread(), ff_h261_encode_mb(), h261_decode_gob(), h261_decode_mb(), h263_decode_dquant(), mpeg4_decode_mb(), mpeg4_decode_partition_a(), mpeg4_decode_partition_b(), mpeg4_decode_partitioned_mb(), and rv10_decode_packet().
void ff_mpv_idct_init | ( | MpegEncContext * | s | ) |
Definition at line 331 of file mpegvideo.c.
Referenced by dnxhd_encode_init(), ff_h263_decode_frame(), ff_h263_decode_init(), ff_mpeg4_workaround_bugs(), ff_mpeg_update_thread_context(), ff_mpv_encode_init(), ff_rv34_decode_init(), h261_decode_frame(), ipu_decode_init(), mpeg_decode_init(), mpeg_decode_postinit(), rv10_decode_init(), and vcr2_init_sequence().
int ff_dct_encode_init | ( | MpegEncContext * | s | ) |
Definition at line 277 of file mpegvideo_enc.c.
Referenced by dnxhd_encode_init(), and ff_mpv_encode_init().
void ff_convert_matrix | ( | MpegEncContext * | s, |
int(*) | qmat[64], | ||
uint16_t(*) | qmat16[2][64], | ||
const uint16_t * | quant_matrix, | ||
int | bias, | ||
int | qmin, | ||
int | qmax, | ||
int | intra | ||
) |
Definition at line 92 of file mpegvideo_enc.c.
Referenced by dnxhd_init_qmat(), encode_picture(), and ff_mpv_encode_init().
int ff_dct_quantize_c | ( | MpegEncContext * | s, |
int16_t * | block, | ||
int | n, | ||
int | qscale, | ||
int * | overflow | ||
) |
Definition at line 4696 of file mpegvideo_enc.c.
Referenced by dnxhd_encode_init(), encode_mb_internal(), and ff_dct_encode_init().
void ff_block_permute | ( | int16_t * | block, |
uint8_t * | permutation, | ||
const uint8_t * | scantable, | ||
int | last | ||
) |
Permute an 8x8 block according to permutation.
block | the block which will be permuted according to the given permutation vector |
permutation | the permutation vector |
last | the last non zero coefficient in scantable order, used to speed the permutation up |
scantable | the used scantable, this is only used to speed the permutation up, the block is not (inverse) permutated to scantable order! |
Definition at line 4671 of file mpegvideo_enc.c.
Referenced by dnxhd_10bit_dct_quantize(), dnxhd_10bit_dct_quantize_444(), and ff_dct_quantize_c().
void ff_init_block_index | ( | MpegEncContext * | s | ) |
Definition at line 2267 of file mpegvideo.c.
Referenced by decode_slice(), encode_thread(), estimate_motion_thread(), ff_h261_reorder_mb_index(), h261_decode_mb(), h261_decode_mb_skipped(), init_block_index(), mpeg4_decode_partition_a(), mpeg4_decode_partition_b(), mpeg_decode_slice(), mpeg_er_decode_mb(), rv10_decode_packet(), and rv34_decode_slice().
void ff_mpv_motion | ( | MpegEncContext * | s, |
uint8_t * | dest_y, | ||
uint8_t * | dest_cb, | ||
uint8_t * | dest_cr, | ||
int | dir, | ||
uint8_t ** | ref_picture, | ||
op_pixels_func(*) | pix_op[4], | ||
qpel_mc_func(*) | qpix_op[16] | ||
) |
Definition at line 974 of file mpegvideo_motion.c.
Referenced by encode_mb_internal(), and mpv_reconstruct_mb_internal().
|
inlinestatic |
Definition at line 750 of file mpegvideo.h.
Referenced by decode_slice(), encode_thread(), ff_h261_reorder_mb_index(), h261_decode_mb(), h261_decode_mb_skipped(), mpeg4_decode_partition_a(), mpeg4_decode_partition_b(), mpeg_er_decode_mb(), rv10_decode_packet(), rv34_decode_slice(), vc1_decode_b_blocks(), vc1_decode_i_blocks(), vc1_decode_i_blocks_adv(), vc1_decode_p_blocks(), and vc1_decode_skip_blocks().
|
inlinestatic |
Definition at line 765 of file mpegvideo.h.
Referenced by ff_h263_encode_mb(), ff_mjpeg_encode_mb(), ff_mpeg4_encode_mb(), ff_msmpeg4_encode_mb(), ff_speedhq_encode_mb(), ff_wmv2_encode_mb(), mjpeg_encode_picture_frame(), and write_slice_end().
|
inlinestatic |
Definition at line 774 of file mpegvideo.h.
Referenced by ff_mpeg4_decode_studio_slice_header(), ipu_decode_frame(), mpeg4_decode_studio_mb(), mpeg_decode_mb(), and mpeg_decode_slice().
const AVOption ff_mpv_generic_options[] |
Definition at line 87 of file mpegvideo_enc.c.