FFmpeg
Data Structures | Macros | Functions | Variables
mpegvideo.h File Reference
#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 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_OPT_FLAGS   (AV_OPT_FLAG_VIDEO_PARAM | AV_OPT_FLAG_ENCODING_PARAM)
 
#define FF_MPV_COMMON_OPTS
 
#define FF_MPV_COMMON_BFRAME_OPTS
 
#define FF_MPV_DEPRECATED_MPEG_QUANT_OPT   { "mpeg_quant", "Deprecated, does nothing", FF_MPV_OFFSET(mpeg_quant), AV_OPT_TYPE_INT, {.i64 = 0 }, 0, 0, FF_MPV_OPT_FLAGS | AV_OPT_FLAG_DEPRECATED },
 
#define FF_MPV_DEPRECATED_A53_CC_OPT   { "a53cc", "Deprecated, does nothing", FF_MPV_OFFSET(a53_cc), AV_OPT_TYPE_BOOL, { .i64 = 1 }, 0, 1, FF_MPV_OPT_FLAGS | AV_OPT_FLAG_DEPRECATED },
 
#define FF_MPV_DEPRECATED_MATRIX_OPT   { "force_duplicated_matrix", "Deprecated, does nothing", FF_MPV_OFFSET(force_duplicated_matrix), AV_OPT_TYPE_BOOL, {.i64 = 0 }, 0, 1, FF_MPV_OPT_FLAGS | AV_OPT_FLAG_DEPRECATED },
 
#define FF_MPV_DEPRECATED_BFRAME_OPTS
 

Functions

void ff_mpv_common_defaults (MpegEncContext *s)
 Set the given MpegEncContext to common defaults (same for encoding and decoding). More...
 
void ff_dct_encode_init_x86 (MpegEncContext *s)
 
int ff_mpv_common_init (MpegEncContext *s)
 init common structure for both encoder and decoder. More...
 
void ff_mpv_common_init_arm (MpegEncContext *s)
 
void ff_mpv_common_init_axp (MpegEncContext *s)
 
void ff_mpv_common_init_neon (MpegEncContext *s)
 
void ff_mpv_common_init_ppc (MpegEncContext *s)
 
void ff_mpv_common_init_x86 (MpegEncContext *s)
 
void ff_mpv_common_init_mips (MpegEncContext *s)
 
int ff_mpv_common_frame_size_change (MpegEncContext *s)
 
void ff_mpv_common_end (MpegEncContext *s)
 
void ff_mpv_decode_init (MpegEncContext *s, AVCodecContext *avctx)
 Initialize the given MpegEncContext for decoding. More...
 
void ff_mpv_reconstruct_mb (MpegEncContext *s, int16_t block[12][64])
 
void ff_mpv_report_decode_progress (MpegEncContext *s)
 
int ff_mpv_frame_start (MpegEncContext *s, AVCodecContext *avctx)
 generic function called after decoding the header and before a frame is decoded. More...
 
void ff_mpv_frame_end (MpegEncContext *s)
 
int ff_mpv_encode_init (AVCodecContext *avctx)
 
void ff_mpv_encode_init_x86 (MpegEncContext *s)
 
int ff_mpv_encode_end (AVCodecContext *avctx)
 
int ff_mpv_encode_picture (AVCodecContext *avctx, AVPacket *pkt, const AVFrame *frame, int *got_packet)
 
int ff_mpv_reallocate_putbitbuffer (MpegEncContext *s, size_t threshold, size_t size_increase)
 
void ff_clean_intra_table_entries (MpegEncContext *s)
 Clean dc, ac, coded_block for the current non-intra MB. More...
 
void ff_mpeg_draw_horiz_band (MpegEncContext *s, int y, int h)
 
void ff_mpeg_flush (AVCodecContext *avctx)
 
void ff_print_debug_info (MpegEncContext *s, Picture *p, AVFrame *pict)
 
int ff_mpv_export_qp_table (MpegEncContext *s, AVFrame *f, Picture *p, int qp_type)
 
void ff_write_quant_matrix (PutBitContext *pb, uint16_t *matrix)
 
int ff_update_duplicate_context (MpegEncContext *dst, MpegEncContext *src)
 
int ff_mpeg_update_thread_context (AVCodecContext *dst, const AVCodecContext *src)
 
void ff_set_qscale (MpegEncContext *s, int qscale)
 set qscale and update qscale dependent variables. More...
 
void ff_mpv_idct_init (MpegEncContext *s)
 
int ff_dct_encode_init (MpegEncContext *s)
 
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)
 
int ff_dct_quantize_c (MpegEncContext *s, int16_t *block, int n, int qscale, int *overflow)
 
void ff_block_permute (int16_t *block, uint8_t *permutation, const uint8_t *scantable, int last)
 Permute an 8x8 block according to permutation. More...
 
void ff_init_block_index (MpegEncContext *s)
 
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])
 
static void ff_update_block_index (MpegEncContext *s)
 
static int get_bits_diff (MpegEncContext *s)
 
static int mpeg_get_qscale (MpegEncContext *s)
 

Variables

const AVClass ff_mpv_enc_class
 

Detailed Description

mpegvideo header.

Definition in file mpegvideo.h.

Macro Definition Documentation

◆ MAX_THREADS

#define MAX_THREADS   32

Definition at line 64 of file mpegvideo.h.

◆ MAX_B_FRAMES

#define MAX_B_FRAMES   16

Definition at line 66 of file mpegvideo.h.

◆ MV_DIR_FORWARD

#define MV_DIR_FORWARD   1

Definition at line 251 of file mpegvideo.h.

◆ MV_DIR_BACKWARD

#define MV_DIR_BACKWARD   2

Definition at line 252 of file mpegvideo.h.

◆ MV_DIRECT

#define MV_DIRECT   4

bidirectional mode where the difference equals the MV of the last P/S/I-Frame (MPEG-4)

Definition at line 253 of file mpegvideo.h.

◆ MV_TYPE_16X16

#define MV_TYPE_16X16   0

1 vector for the whole mb

Definition at line 255 of file mpegvideo.h.

◆ MV_TYPE_8X8

#define MV_TYPE_8X8   1

4 vectors (H.263, MPEG-4 4MV)

Definition at line 256 of file mpegvideo.h.

◆ MV_TYPE_16X8

#define MV_TYPE_16X8   2

2 vectors, one per 16x8 block

Definition at line 257 of file mpegvideo.h.

◆ MV_TYPE_FIELD

#define MV_TYPE_FIELD   3

2 vectors, one per field

Definition at line 258 of file mpegvideo.h.

◆ MV_TYPE_DMV

#define MV_TYPE_DMV   4

2 vectors, special mpeg2 Dual Prime Vectors

Definition at line 259 of file mpegvideo.h.

◆ UNI_AC_ENC_INDEX

#define UNI_AC_ENC_INDEX (   run,
  level 
)    ((run)*128 + (level))

Definition at line 307 of file mpegvideo.h.

◆ VIDEO_FORMAT_COMPONENT

#define VIDEO_FORMAT_COMPONENT   0

Definition at line 467 of file mpegvideo.h.

◆ VIDEO_FORMAT_PAL

#define VIDEO_FORMAT_PAL   1

Definition at line 468 of file mpegvideo.h.

◆ VIDEO_FORMAT_NTSC

#define VIDEO_FORMAT_NTSC   2

Definition at line 469 of file mpegvideo.h.

◆ VIDEO_FORMAT_SECAM

#define VIDEO_FORMAT_SECAM   3

Definition at line 470 of file mpegvideo.h.

◆ VIDEO_FORMAT_MAC

#define VIDEO_FORMAT_MAC   4

Definition at line 471 of file mpegvideo.h.

◆ VIDEO_FORMAT_UNSPECIFIED

#define VIDEO_FORMAT_UNSPECIFIED   5

Definition at line 472 of file mpegvideo.h.

◆ CHROMA_420

#define CHROMA_420   1

Definition at line 476 of file mpegvideo.h.

◆ CHROMA_422

#define CHROMA_422   2

Definition at line 477 of file mpegvideo.h.

◆ CHROMA_444

#define CHROMA_444   3

Definition at line 478 of file mpegvideo.h.

◆ SLICE_OK

#define SLICE_OK   0

Definition at line 509 of file mpegvideo.h.

◆ SLICE_ERROR

#define SLICE_ERROR   -1

Definition at line 510 of file mpegvideo.h.

◆ SLICE_END

#define SLICE_END   -2

end marker found

Definition at line 511 of file mpegvideo.h.

◆ SLICE_NOEND

#define SLICE_NOEND   -3

no end marker or error found but mb count exceeded

Definition at line 512 of file mpegvideo.h.

◆ FF_MPV_FLAG_SKIP_RD

#define FF_MPV_FLAG_SKIP_RD   0x0001

Definition at line 581 of file mpegvideo.h.

◆ FF_MPV_FLAG_STRICT_GOP

#define FF_MPV_FLAG_STRICT_GOP   0x0002

Definition at line 582 of file mpegvideo.h.

◆ FF_MPV_FLAG_QP_RD

#define FF_MPV_FLAG_QP_RD   0x0004

Definition at line 583 of file mpegvideo.h.

◆ FF_MPV_FLAG_CBP_RD

#define FF_MPV_FLAG_CBP_RD   0x0008

Definition at line 584 of file mpegvideo.h.

◆ FF_MPV_FLAG_NAQ

#define FF_MPV_FLAG_NAQ   0x0010

Definition at line 585 of file mpegvideo.h.

◆ FF_MPV_FLAG_MV0

#define FF_MPV_FLAG_MV0   0x0020

Definition at line 586 of file mpegvideo.h.

◆ FF_MPV_OPT_CMP_FUNC

#define FF_MPV_OPT_CMP_FUNC
Value:
{ "sad", "Sum of absolute differences, fast", 0, AV_OPT_TYPE_CONST, {.i64 = FF_CMP_SAD }, INT_MIN, INT_MAX, FF_MPV_OPT_FLAGS, "cmp_func" }, \
{ "sse", "Sum of squared errors", 0, AV_OPT_TYPE_CONST, {.i64 = FF_CMP_SSE }, INT_MIN, INT_MAX, FF_MPV_OPT_FLAGS, "cmp_func" }, \
{ "satd", "Sum of absolute Hadamard transformed differences", 0, AV_OPT_TYPE_CONST, {.i64 = FF_CMP_SATD }, INT_MIN, INT_MAX, FF_MPV_OPT_FLAGS, "cmp_func" }, \
{ "dct", "Sum of absolute DCT transformed differences", 0, AV_OPT_TYPE_CONST, {.i64 = FF_CMP_DCT }, INT_MIN, INT_MAX, FF_MPV_OPT_FLAGS, "cmp_func" }, \
{ "psnr", "Sum of squared quantization errors, low quality", 0, AV_OPT_TYPE_CONST, {.i64 = FF_CMP_PSNR }, INT_MIN, INT_MAX, FF_MPV_OPT_FLAGS, "cmp_func" }, \
{ "bit", "Number of bits needed for the block", 0, AV_OPT_TYPE_CONST, {.i64 = FF_CMP_BIT }, INT_MIN, INT_MAX, FF_MPV_OPT_FLAGS, "cmp_func" }, \
{ "rd", "Rate distortion optimal, slow", 0, AV_OPT_TYPE_CONST, {.i64 = FF_CMP_RD }, INT_MIN, INT_MAX, FF_MPV_OPT_FLAGS, "cmp_func" }, \
{ "zero", "Zero", 0, AV_OPT_TYPE_CONST, {.i64 = FF_CMP_ZERO }, INT_MIN, INT_MAX, FF_MPV_OPT_FLAGS, "cmp_func" }, \
{ "vsad", "Sum of absolute vertical differences", 0, AV_OPT_TYPE_CONST, {.i64 = FF_CMP_VSAD }, INT_MIN, INT_MAX, FF_MPV_OPT_FLAGS, "cmp_func" }, \
{ "vsse", "Sum of squared vertical differences", 0, AV_OPT_TYPE_CONST, {.i64 = FF_CMP_VSSE }, INT_MIN, INT_MAX, FF_MPV_OPT_FLAGS, "cmp_func" }, \
{ "nsse", "Noise preserving sum of squared differences", 0, AV_OPT_TYPE_CONST, {.i64 = FF_CMP_NSSE }, INT_MIN, INT_MAX, FF_MPV_OPT_FLAGS, "cmp_func" }, \
{ "dct264", NULL, 0, AV_OPT_TYPE_CONST, {.i64 = FF_CMP_DCT264 }, INT_MIN, INT_MAX, FF_MPV_OPT_FLAGS, "cmp_func" }, \
{ "dctmax", NULL, 0, AV_OPT_TYPE_CONST, {.i64 = FF_CMP_DCTMAX }, INT_MIN, INT_MAX, FF_MPV_OPT_FLAGS, "cmp_func" }, \
{ "chroma", NULL, 0, AV_OPT_TYPE_CONST, {.i64 = FF_CMP_CHROMA }, INT_MIN, INT_MAX, FF_MPV_OPT_FLAGS, "cmp_func" }, \
{ "msad", "Sum of absolute differences, median predicted", 0, AV_OPT_TYPE_CONST, {.i64 = FF_CMP_MEDIAN_SAD }, INT_MIN, INT_MAX, FF_MPV_OPT_FLAGS, "cmp_func" }

Definition at line 588 of file mpegvideo.h.

◆ FF_MPV_OFFSET

#define FF_MPV_OFFSET (   x)    offsetof(MpegEncContext, x)

Definition at line 606 of file mpegvideo.h.

◆ FF_MPV_OPT_FLAGS

#define FF_MPV_OPT_FLAGS   (AV_OPT_FLAG_VIDEO_PARAM | AV_OPT_FLAG_ENCODING_PARAM)

Definition at line 608 of file mpegvideo.h.

◆ FF_MPV_COMMON_OPTS

#define FF_MPV_COMMON_OPTS

Definition at line 609 of file mpegvideo.h.

◆ FF_MPV_COMMON_BFRAME_OPTS

#define FF_MPV_COMMON_BFRAME_OPTS
Value:
{"b_strategy", "Strategy to choose between I/P/B-frames", FF_MPV_OFFSET(b_frame_strategy), AV_OPT_TYPE_INT, {.i64 = 0 }, 0, 2, FF_MPV_OPT_FLAGS }, \
{"b_sensitivity", "Adjust sensitivity of b_frame_strategy 1", FF_MPV_OFFSET(b_sensitivity), AV_OPT_TYPE_INT, {.i64 = 40 }, 1, INT_MAX, FF_MPV_OPT_FLAGS }, \
{"brd_scale", "Downscale frames for dynamic B-frame decision", FF_MPV_OFFSET(brd_scale), AV_OPT_TYPE_INT, {.i64 = 0 }, 0, 3, FF_MPV_OPT_FLAGS },

Definition at line 656 of file mpegvideo.h.

◆ FF_MPV_DEPRECATED_MPEG_QUANT_OPT

#define FF_MPV_DEPRECATED_MPEG_QUANT_OPT   { "mpeg_quant", "Deprecated, does nothing", FF_MPV_OFFSET(mpeg_quant), AV_OPT_TYPE_INT, {.i64 = 0 }, 0, 0, FF_MPV_OPT_FLAGS | AV_OPT_FLAG_DEPRECATED },

Definition at line 662 of file mpegvideo.h.

◆ FF_MPV_DEPRECATED_A53_CC_OPT

#define FF_MPV_DEPRECATED_A53_CC_OPT   { "a53cc", "Deprecated, does nothing", FF_MPV_OFFSET(a53_cc), AV_OPT_TYPE_BOOL, { .i64 = 1 }, 0, 1, FF_MPV_OPT_FLAGS | AV_OPT_FLAG_DEPRECATED },

Definition at line 664 of file mpegvideo.h.

◆ FF_MPV_DEPRECATED_MATRIX_OPT

#define FF_MPV_DEPRECATED_MATRIX_OPT   { "force_duplicated_matrix", "Deprecated, does nothing", FF_MPV_OFFSET(force_duplicated_matrix), AV_OPT_TYPE_BOOL, {.i64 = 0 }, 0, 1, FF_MPV_OPT_FLAGS | AV_OPT_FLAG_DEPRECATED },

Definition at line 666 of file mpegvideo.h.

◆ FF_MPV_DEPRECATED_BFRAME_OPTS

#define FF_MPV_DEPRECATED_BFRAME_OPTS
Value:
{ "b_strategy", "Deprecated, does nothing", FF_MPV_OFFSET(b_frame_strategy), AV_OPT_TYPE_INT, { .i64 = 0 }, 0, 2, FF_MPV_OPT_FLAGS | AV_OPT_FLAG_DEPRECATED }, \
{ "b_sensitivity", "Deprecated, does nothing", FF_MPV_OFFSET(b_sensitivity), AV_OPT_TYPE_INT, { .i64 = 40 }, 1, INT_MAX, FF_MPV_OPT_FLAGS | AV_OPT_FLAG_DEPRECATED }, \
{ "brd_scale", "Deprecated, does nothing", FF_MPV_OFFSET(brd_scale), AV_OPT_TYPE_INT, { .i64 = 0 }, 0, 3, FF_MPV_OPT_FLAGS | AV_OPT_FLAG_DEPRECATED },

Definition at line 668 of file mpegvideo.h.

Function Documentation

◆ ff_mpv_common_defaults()

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 670 of file mpegvideo.c.

Referenced by ff_mpv_decode_init(), and mpv_encode_defaults().

◆ ff_dct_encode_init_x86()

void ff_dct_encode_init_x86 ( MpegEncContext s)

Definition at line 214 of file mpegvideoenc.c.

Referenced by ff_dct_encode_init().

◆ ff_mpv_common_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 926 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().

◆ ff_mpv_common_init_arm()

void ff_mpv_common_init_arm ( MpegEncContext s)

Definition at line 44 of file mpegvideo_arm.c.

Referenced by dct_init().

◆ ff_mpv_common_init_axp()

void ff_mpv_common_init_axp ( MpegEncContext s)

Definition at line 106 of file mpegvideo_alpha.c.

Referenced by dct_init().

◆ ff_mpv_common_init_neon()

void ff_mpv_common_init_neon ( MpegEncContext s)

Definition at line 127 of file mpegvideo.c.

Referenced by dct_init().

◆ ff_mpv_common_init_ppc()

void ff_mpv_common_init_ppc ( MpegEncContext s)

Definition at line 119 of file mpegvideo_altivec.c.

Referenced by dct_init().

◆ ff_mpv_common_init_x86()

void ff_mpv_common_init_x86 ( MpegEncContext s)

Definition at line 454 of file mpegvideo.c.

Referenced by dct_init().

◆ ff_mpv_common_init_mips()

void ff_mpv_common_init_mips ( MpegEncContext s)

Definition at line 26 of file mpegvideo_init_mips.c.

Referenced by dct_init().

◆ ff_mpv_common_frame_size_change()

int ff_mpv_common_frame_size_change ( MpegEncContext s)

◆ ff_mpv_common_end()

void ff_mpv_common_end ( MpegEncContext s)

◆ ff_mpv_decode_init()

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 693 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().

◆ ff_mpv_reconstruct_mb()

void ff_mpv_reconstruct_mb ( MpegEncContext s,
int16_t  block[12][64] 
)

◆ ff_mpv_report_decode_progress()

void ff_mpv_report_decode_progress ( MpegEncContext s)

Definition at line 2365 of file mpegvideo.c.

Referenced by decode_slice(), and mpeg_decode_slice().

◆ ff_mpv_frame_start()

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 1200 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().

◆ ff_mpv_frame_end()

void ff_mpv_frame_end ( MpegEncContext s)

◆ ff_mpv_encode_init()

int ff_mpv_encode_init ( AVCodecContext avctx)

Definition at line 310 of file mpegvideo_enc.c.

Referenced by encode_init(), and wmv2_encode_init().

◆ ff_mpv_encode_init_x86()

void ff_mpv_encode_init_x86 ( MpegEncContext s)

◆ ff_mpv_encode_end()

int ff_mpv_encode_end ( AVCodecContext avctx)

Definition at line 965 of file mpegvideo_enc.c.

◆ ff_mpv_encode_picture()

int ff_mpv_encode_picture ( AVCodecContext avctx,
AVPacket pkt,
const AVFrame frame,
int got_packet 
)

Definition at line 1712 of file mpegvideo_enc.c.

◆ ff_mpv_reallocate_putbitbuffer()

int ff_mpv_reallocate_putbitbuffer ( MpegEncContext s,
size_t  threshold,
size_t  size_increase 
)

Definition at line 2745 of file mpegvideo_enc.c.

Referenced by encode_thread(), and ff_mjpeg_encode_stuffing().

◆ ff_clean_intra_table_entries()

void ff_clean_intra_table_entries ( MpegEncContext s)

Clean dc, ac, coded_block for the current non-intra MB.

Definition at line 1923 of file mpegvideo.c.

Referenced by encode_thread(), mpeg4_decode_partition_a(), and mpv_reconstruct_mb_internal().

◆ ff_mpeg_draw_horiz_band()

void ff_mpeg_draw_horiz_band ( MpegEncContext s,
int  y,
int  h 
)

◆ ff_mpeg_flush()

void ff_mpeg_flush ( AVCodecContext avctx)

Definition at line 2319 of file mpegvideo.c.

Referenced by decode_wmv9(), and flush().

◆ ff_print_debug_info()

void ff_print_debug_info ( MpegEncContext s,
Picture p,
AVFrame pict 
)

◆ ff_mpv_export_qp_table()

int ff_mpv_export_qp_table ( MpegEncContext s,
AVFrame f,
Picture p,
int  qp_type 
)

Definition at line 1439 of file mpegvideo.c.

Referenced by ff_h263_decode_frame(), finish_frame(), rv10_decode_frame(), and slice_end().

◆ ff_write_quant_matrix()

void ff_write_quant_matrix ( PutBitContext pb,
uint16_t *  matrix 
)

Definition at line 218 of file mpegvideo_enc.c.

Referenced by mpeg4_encode_vol_header().

◆ ff_update_duplicate_context()

int ff_update_duplicate_context ( MpegEncContext dst,
MpegEncContext src 
)

Definition at line 499 of file mpegvideo.c.

Referenced by decode_chunks(), and encode_picture().

◆ ff_mpeg_update_thread_context()

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().

◆ ff_set_qscale()

void ff_set_qscale ( MpegEncContext s,
int  qscale 
)

◆ ff_mpv_idct_init()

void ff_mpv_idct_init ( MpegEncContext s)

◆ ff_dct_encode_init()

int ff_dct_encode_init ( MpegEncContext s)

Definition at line 291 of file mpegvideo_enc.c.

Referenced by dnxhd_encode_init(), and ff_mpv_encode_init().

◆ ff_convert_matrix()

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 106 of file mpegvideo_enc.c.

Referenced by dnxhd_init_qmat(), encode_picture(), and ff_mpv_encode_init().

◆ ff_dct_quantize_c()

int ff_dct_quantize_c ( MpegEncContext s,
int16_t *  block,
int  n,
int  qscale,
int overflow 
)

Definition at line 4506 of file mpegvideo_enc.c.

Referenced by dnxhd_encode_init(), encode_mb_internal(), and ff_dct_encode_init().

◆ ff_block_permute()

void ff_block_permute ( int16_t *  block,
uint8_t *  permutation,
const uint8_t *  scantable,
int  last 
)

Permute an 8x8 block according to permutation.

Parameters
blockthe block which will be permuted according to the given permutation vector
permutationthe permutation vector
lastthe last non zero coefficient in scantable order, used to speed the permutation up
scantablethe used scantable, this is only used to speed the permutation up, the block is not (inverse) permutated to scantable order!

Definition at line 4481 of file mpegvideo_enc.c.

Referenced by dnxhd_10bit_dct_quantize(), dnxhd_10bit_dct_quantize_444(), and ff_dct_quantize_c().

◆ ff_init_block_index()

void ff_init_block_index ( MpegEncContext s)

◆ ff_mpv_motion()

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().

◆ ff_update_block_index()

static void ff_update_block_index ( MpegEncContext s)
inlinestatic

◆ get_bits_diff()

static int get_bits_diff ( MpegEncContext s)
inlinestatic

◆ mpeg_get_qscale()

static int mpeg_get_qscale ( MpegEncContext s)
inlinestatic

Variable Documentation

◆ ff_mpv_enc_class

const AVClass ff_mpv_enc_class

Definition at line 99 of file mpegvideo_enc.c.

FF_CMP_VSSE
#define FF_CMP_VSSE
Definition: avcodec.h:788
FF_CMP_CHROMA
#define FF_CMP_CHROMA
Definition: avcodec.h:795
FF_CMP_SSE
#define FF_CMP_SSE
Definition: avcodec.h:780
FF_CMP_BIT
#define FF_CMP_BIT
Definition: avcodec.h:784
FF_MPV_OFFSET
#define FF_MPV_OFFSET(x)
Definition: mpegvideo.h:606
NULL
#define NULL
Definition: coverity.c:32
FF_CMP_MEDIAN_SAD
#define FF_CMP_MEDIAN_SAD
Definition: avcodec.h:794
FF_CMP_PSNR
#define FF_CMP_PSNR
Definition: avcodec.h:783
FF_CMP_SATD
#define FF_CMP_SATD
Definition: avcodec.h:781
FF_CMP_ZERO
#define FF_CMP_ZERO
Definition: avcodec.h:786
FF_CMP_SAD
#define FF_CMP_SAD
Definition: avcodec.h:779
FF_CMP_RD
#define FF_CMP_RD
Definition: avcodec.h:785
FF_CMP_NSSE
#define FF_CMP_NSSE
Definition: avcodec.h:789
FF_MPV_OPT_FLAGS
#define FF_MPV_OPT_FLAGS
Definition: mpegvideo.h:608
AV_OPT_TYPE_INT
@ AV_OPT_TYPE_INT
Definition: opt.h:224
FF_CMP_DCT
#define FF_CMP_DCT
Definition: avcodec.h:782
FF_CMP_DCTMAX
#define FF_CMP_DCTMAX
Definition: avcodec.h:792
FF_CMP_DCT264
#define FF_CMP_DCT264
Definition: avcodec.h:793
FF_CMP_VSAD
#define FF_CMP_VSAD
Definition: avcodec.h:787
AV_OPT_TYPE_CONST
@ AV_OPT_TYPE_CONST
Definition: opt.h:233
AV_OPT_FLAG_DEPRECATED
#define AV_OPT_FLAG_DEPRECATED
set if option is deprecated, users should refer to AVOption.help text for more information
Definition: opt.h:294