FFmpeg
Loading...
Searching...
No Matches
motion_est.h File Reference
#include <stdint.h>
#include "avcodec.h"
#include "hpeldsp.h"
#include "me_cmp.h"
#include "qpeldsp.h"

Go to the source code of this file.

Data Structures

struct  MotionEstContext
 Motion estimation context. More...
 

Macros

#define MAX_MV   4096
 
#define MAX_DMV   (2*MAX_MV)
 
#define ME_MAP_SIZE   64
 
#define FF_ME_ZERO   0
 
#define FF_ME_EPZS   1
 
#define FF_ME_XONE   2
 

Functions

int ff_me_init (MotionEstContext *c, struct AVCodecContext *avctx, const struct MECmpContext *mecc, int mpvenc)
 Performs one-time initialization of the MotionEstContext.
 
void ff_me_init_pic (MPVEncContext *s)
 
void ff_estimate_p_frame_motion (MPVEncContext *s, int mb_x, int mb_y)
 
void ff_estimate_b_frame_motion (MPVEncContext *s, int mb_x, int mb_y)
 
int ff_pre_estimate_p_frame_motion (MPVEncContext *s, int mb_x, int mb_y)
 
int ff_epzs_motion_search (MPVEncContext *s, int *mx_ptr, int *my_ptr, int P[10][2], int src_index, int ref_index, const int16_t(*last_mv)[2], int ref_mv_scale, int size, int h)
 
int ff_get_mb_score (MPVEncContext *s, int mx, int my, int src_index, int ref_index, int size, int h, int add_rate)
 
int ff_get_best_fcode (MPVMainEncContext *m, const int16_t(*mv_table)[2], int type)
 
void ff_fix_long_p_mvs (MPVEncContext *s, int type)
 
void ff_fix_long_mvs (MPVEncContext *s, uint8_t *field_select_table, int field_select, int16_t(*mv_table)[2], int f_code, int type, int truncate)
 

Macro Definition Documentation

◆ MAX_MV

#define MAX_MV   4096

◆ MAX_DMV

◆ ME_MAP_SIZE

◆ FF_ME_ZERO

#define FF_ME_ZERO   0

Definition at line 42 of file motion_est.h.

Referenced by estimate_motion_b(), ff_estimate_p_frame_motion(), and ff_get_best_fcode().

◆ FF_ME_EPZS

#define FF_ME_EPZS   1

Definition at line 43 of file motion_est.h.

◆ FF_ME_XONE

#define FF_ME_XONE   2

Definition at line 44 of file motion_est.h.

Function Documentation

◆ ff_me_init()

int ff_me_init ( MotionEstContext * c,
struct AVCodecContext * avctx,
const struct MECmpContext * mecc,
int mpvenc )

Performs one-time initialization of the MotionEstContext.

◆ ff_me_init_pic()

void ff_me_init_pic ( MPVEncContext * s)

Definition at line 371 of file motion_est.c.

Referenced by encode_frame(), encode_picture(), and svq1_encode_plane().

◆ ff_estimate_p_frame_motion()

void ff_estimate_p_frame_motion ( MPVEncContext * s,
int mb_x,
int mb_y )

< the variance of the block (sum of squared (p[y][x]-average))

< sum of squared differences with the estimated motion vector

Definition at line 888 of file motion_est.c.

Referenced by estimate_motion_thread(), and svq1_encode_plane().

◆ ff_estimate_b_frame_motion()

void ff_estimate_b_frame_motion ( MPVEncContext * s,
int mb_x,
int mb_y )

Definition at line 1487 of file motion_est.c.

Referenced by estimate_motion_thread().

◆ ff_pre_estimate_p_frame_motion()

int ff_pre_estimate_p_frame_motion ( MPVEncContext * s,
int mb_x,
int mb_y )

Definition at line 1063 of file motion_est.c.

Referenced by pre_estimate_motion_thread().

◆ ff_epzs_motion_search()

int ff_epzs_motion_search ( MPVEncContext * s,
int * mx_ptr,
int * my_ptr,
int P[10][2],
int src_index,
int ref_index,
const int16_t(*) last_mv[2],
int ref_mv_scale,
int size,
int h )

◆ ff_get_mb_score()

int ff_get_mb_score ( MPVEncContext * s,
int mx,
int my,
int src_index,
int ref_index,
int size,
int h,
int add_rate )

Definition at line 192 of file motion_est_template.c.

Referenced by encode_q_branch().

◆ ff_get_best_fcode()

int ff_get_best_fcode ( MPVMainEncContext * m,
const int16_t(*) mv_table[2],
int type )

Definition at line 1599 of file motion_est.c.

Referenced by encode_picture().

◆ ff_fix_long_p_mvs()

void ff_fix_long_p_mvs ( MPVEncContext * s,
int type )

Definition at line 1655 of file motion_est.c.

Referenced by encode_picture(), and svq1_encode_plane().

◆ ff_fix_long_mvs()

void ff_fix_long_mvs ( MPVEncContext *const s,
uint8_t * field_select_table,
int field_select,
int16_t(*) mv_table[2],
int f_code,
int type,
int truncate )
Parameters
truncate1 for truncation, 0 for using intra

Definition at line 1704 of file motion_est.c.

Referenced by encode_picture(), and svq1_encode_plane().