#include <stdlib.h>#include <stdio.h>#include <limits.h>#include "avcodec.h"#include "dsputil.h"#include "mpegvideo.h"#include <assert.h>#include "motion_est_template.c"

Go to the source code of this file.
Data Structures | |
| struct | Minima |
Defines | |
| #define | SQ(a) ((a)*(a)) |
| #define | P_LEFT P[1] |
| #define | P_TOP P[2] |
| #define | P_TOPRIGHT P[3] |
| #define | P_MEDIAN P[4] |
| #define | P_MV1 P[9] |
| #define | FLAG_QPEL 1 |
| #define | FLAG_CHROMA 2 |
| #define | FLAG_DIRECT 4 |
| #define | Z_THRESHOLD 256 |
| #define | CHECK_SAD_HALF_MV(suffix, x, y) |
Functions | |
| static int | sad_hpel_motion_search (MpegEncContext *s, int *mx_ptr, int *my_ptr, int dmin, int src_index, int ref_index, int size, int h) |
| static int | update_map_generation (MotionEstContext *c) |
| static int | minima_cmp (const void *a, const void *b) |
| static void | init_ref (MotionEstContext *c, uint8_t *src[3], uint8_t *ref[3], uint8_t *ref2[3], int x, int y, int ref_index) |
| static int | get_flags (MotionEstContext *c, int direct, int chroma) |
| static always_inline int | cmp (MpegEncContext *s, const int x, const int y, const int subx, const int suby, const int size, const int h, int ref_index, int src_index, me_cmp_func cmp_func, me_cmp_func chroma_cmp_func, const int flags) |
| static int | zero_cmp (void *s, uint8_t *a, uint8_t *b, int stride, int h) |
| static void | zero_hpel (uint8_t *a, const uint8_t *b, int stride, int h) |
| void | ff_init_me (MpegEncContext *s) |
| static void | no_motion_search (MpegEncContext *s, int *mx_ptr, int *my_ptr) |
| static void | set_p_mv_tables (MpegEncContext *s, int mx, int my, int mv4) |
| static void | get_limits (MpegEncContext *s, int x, int y) |
| static void | init_mv4_ref (MotionEstContext *c) |
| static int | h263_mv4_search (MpegEncContext *s, int mx, int my, int shift) |
| static void | init_interlaced_ref (MpegEncContext *s, int ref_index) |
| static int | interlaced_search (MpegEncContext *s, int ref_index, int16_t(*mv_tables[2][2])[2], uint8_t *field_select_tables[2], int mx, int my, int user_field_select) |
| static void | clip_input_mv (MpegEncContext *s, int16_t *mv, int interlaced) |
| static int | check_input_motion (MpegEncContext *s, int mb_x, int mb_y, int p_type) |
| void | ff_estimate_p_frame_motion (MpegEncContext *s, int mb_x, int mb_y) |
| int | ff_pre_estimate_p_frame_motion (MpegEncContext *s, int mb_x, int mb_y) |
| static int | ff_estimate_motion_b (MpegEncContext *s, int mb_x, int mb_y, int16_t(*mv_table)[2], int ref_index, int f_code) |
| static int | check_bidir_mv (MpegEncContext *s, int motion_fx, int motion_fy, int motion_bx, int motion_by, int pred_fx, int pred_fy, int pred_bx, int pred_by, int size, int h) |
| static int | bidir_refine (MpegEncContext *s, int mb_x, int mb_y) |
| static int | direct_search (MpegEncContext *s, int mb_x, int mb_y) |
| void | ff_estimate_b_frame_motion (MpegEncContext *s, int mb_x, int mb_y) |
| int | ff_get_best_fcode (MpegEncContext *s, int16_t(*mv_table)[2], int type) |
| void | ff_fix_long_p_mvs (MpegEncContext *s) |
| void | ff_fix_long_mvs (MpegEncContext *s, uint8_t *field_select_table, int field_select, int16_t(*mv_table)[2], int f_code, int type, int truncate) |
Definition in file motion_est.c.
| #define CHECK_SAD_HALF_MV | ( | suffix, | |||
| x, | |||||
| y | ) |
Value:
{\
d= s->dsp.pix_abs[size][(x?1:0)+(y?2:0)](NULL, pix, ptr+((x)>>1), stride, h);\
d += (mv_penalty[pen_x + x] + mv_penalty[pen_y + y])*penalty_factor;\
COPY3_IF_LT(dminh, d, dx, x, dy, y)\
}
Definition at line 545 of file motion_est.c.
Referenced by sad_hpel_motion_search().
| #define FLAG_CHROMA 2 |
Definition at line 77 of file motion_est.c.
Referenced by cmp(), get_flags(), and init_interlaced_ref().
| #define FLAG_DIRECT 4 |
| #define FLAG_QPEL 1 |
Definition at line 76 of file motion_est.c.
Referenced by check_input_motion(), cmp(), direct_search(), ff_get_mb_score(), and get_flags().
| #define P_LEFT P[1] |
Definition at line 41 of file motion_est.c.
Referenced by direct_search(), encode_q_branch(), epzs_motion_search2(), epzs_motion_search4(), epzs_motion_search_internal(), ff_estimate_motion_b(), ff_estimate_p_frame_motion(), ff_pre_estimate_p_frame_motion(), h263_mv4_search(), and interlaced_search().
| #define P_MEDIAN P[4] |
Definition at line 44 of file motion_est.c.
Referenced by direct_search(), encode_q_branch(), epzs_motion_search2(), epzs_motion_search4(), epzs_motion_search_internal(), ff_estimate_motion_b(), ff_estimate_p_frame_motion(), ff_pre_estimate_p_frame_motion(), h263_mv4_search(), and interlaced_search().
| #define P_MV1 P[9] |
Definition at line 45 of file motion_est.c.
Referenced by epzs_motion_search2(), epzs_motion_search4(), h263_mv4_search(), and interlaced_search().
| #define P_TOP P[2] |
Definition at line 42 of file motion_est.c.
Referenced by direct_search(), encode_q_branch(), epzs_motion_search2(), epzs_motion_search4(), epzs_motion_search_internal(), ff_estimate_motion_b(), ff_estimate_p_frame_motion(), ff_pre_estimate_p_frame_motion(), h263_mv4_search(), and interlaced_search().
| #define P_TOPRIGHT P[3] |
Definition at line 43 of file motion_est.c.
Referenced by direct_search(), encode_q_branch(), epzs_motion_search2(), epzs_motion_search4(), epzs_motion_search_internal(), ff_estimate_motion_b(), ff_estimate_p_frame_motion(), ff_pre_estimate_p_frame_motion(), h263_mv4_search(), and interlaced_search().
Definition at line 39 of file motion_est.c.
| #define Z_THRESHOLD 256 |
Definition at line 543 of file motion_est.c.
| static int bidir_refine | ( | MpegEncContext * | s, | |
| int | mb_x, | |||
| int | mb_y | |||
| ) | [inline, static] |
Definition at line 1618 of file motion_est.c.
References MpegEncContext::b_back_mv_table, MpegEncContext::b_bidir_back_mv_table, MpegEncContext::b_bidir_forw_mv_table, MpegEncContext::b_forw_mv_table, check_bidir_mv(), and MpegEncContext::mb_stride.
Referenced by ff_estimate_b_frame_motion().

| static int check_bidir_mv | ( | MpegEncContext * | s, | |
| int | motion_fx, | |||
| int | motion_fy, | |||
| int | motion_bx, | |||
| int | motion_by, | |||
| int | pred_fx, | |||
| int | pred_fy, | |||
| int | pred_bx, | |||
| int | pred_by, | |||
| int | size, | |||
| int | h | |||
| ) | [inline, static] |
Definition at line 1553 of file motion_est.c.
References MotionEstContext::avctx, DSPContext::avg_pixels_tab, DSPContext::avg_qpel_pixels_tab, c, MpegEncContext::dsp, MpegEncContext::f_code, FF_CMP_CHROMA, MAX_MV, AVCodecContext::mb_cmp, DSPContext::mb_cmp, MotionEstContext::mb_penalty_factor, MpegEncContext::me, MotionEstContext::mv_penalty, DSPContext::put_pixels_tab, DSPContext::put_qpel_pixels_tab, MpegEncContext::quarter_sample, MotionEstContext::ref, MotionEstContext::scratchpad, MotionEstContext::src, MotionEstContext::stride, stride, and MotionEstContext::uvstride.
Referenced by bidir_refine().
| static int check_input_motion | ( | MpegEncContext * | s, | |
| int | mb_x, | |||
| int | mb_y, | |||
| int | p_type | |||
| ) | [inline, static] |
Definition at line 1003 of file motion_est.c.
References av_log(), AV_LOG_ERROR, MotionEstContext::avctx, MpegEncContext::b8_stride, MpegEncContext::b_back_mv_table, MpegEncContext::b_bidir_back_mv_table, MpegEncContext::b_bidir_forw_mv_table, MpegEncContext::b_field_mv_table, MpegEncContext::b_field_select_table, MpegEncContext::b_forw_mv_table, MpegEncContext::block_index, c, CANDIDATE_MB_TYPE_BACKWARD, CANDIDATE_MB_TYPE_BACKWARD_I, CANDIDATE_MB_TYPE_BIDIR, CANDIDATE_MB_TYPE_BIDIR_I, CANDIDATE_MB_TYPE_FORWARD, CANDIDATE_MB_TYPE_FORWARD_I, CANDIDATE_MB_TYPE_INTER, CANDIDATE_MB_TYPE_INTER4V, CANDIDATE_MB_TYPE_INTER_I, CANDIDATE_MB_TYPE_INTRA, clip_input_mv(), cmp, CODEC_FLAG_4MV, CODEC_FLAG_INTERLACED_ME, MpegEncContext::current_picture, MpegEncContext::current_picture_ptr, MpegEncContext::dsp, FLAG_QPEL, MpegEncContext::flags, MotionEstContext::flags, init_interlaced_ref(), init_mv4_ref(), IS_8X8, IS_INTERLACED, IS_INTRA, MpegEncContext::mb_stride, MpegEncContext::mb_type, MpegEncContext::me, MpegEncContext::p_field_mv_table, MpegEncContext::p_field_select_table, MpegEncContext::p_mv_table, shift(), DSPContext::sse, MotionEstContext::stride, USES_LIST, and MotionEstContext::uvstride.
Referenced by ff_estimate_b_frame_motion(), and ff_estimate_p_frame_motion().

| static void clip_input_mv | ( | MpegEncContext * | s, | |
| int16_t * | mv, | |||
| int | interlaced | |||
| ) | [static] |
Definition at line 993 of file motion_est.c.
References MpegEncContext::me, MotionEstContext::xmax, MotionEstContext::xmin, MotionEstContext::ymax, and MotionEstContext::ymin.
Referenced by check_input_motion().
| static always_inline int cmp | ( | MpegEncContext * | s, | |
| const int | x, | |||
| const int | y, | |||
| const int | subx, | |||
| const int | suby, | |||
| const int | size, | |||
| const int | h, | |||
| int | ref_index, | |||
| int | src_index, | |||
| me_cmp_func | cmp_func, | |||
| me_cmp_func | chroma_cmp_func, | |||
| const int | flags | |||
| ) | [static] |
Definition at line 104 of file motion_est.c.
References c, MotionEstContext::co_located_mv, MotionEstContext::direct_basis_mv, FLAG_CHROMA, FLAG_DIRECT, FLAG_QPEL, MpegEncContext::height, MotionEstContext::hpel_avg, MotionEstContext::hpel_put, MpegEncContext::mb_x, MpegEncContext::mb_y, MpegEncContext::me, ME_MAP_SHIFT, ME_MAP_SIZE, MotionEstContext::mv_penalty, MpegEncContext::mv_type, MV_TYPE_8X8, MpegEncContext::pb_time, MotionEstContext::penalty_factor, MpegEncContext::pp_time, MotionEstContext::pred_x, MotionEstContext::pred_y, MotionEstContext::qpel_avg, MotionEstContext::qpel_put, MotionEstContext::ref, MotionEstContext::src, src, MotionEstContext::stride, stride, MotionEstContext::temp, MotionEstContext::uvstride, MpegEncContext::width, MotionEstContext::xmin, and MotionEstContext::ymin.
| static int direct_search | ( | MpegEncContext * | s, | |
| int | mb_x, | |||
| int | mb_y | |||
| ) | [inline, static] |
Definition at line 1643 of file motion_est.c.
References MotionEstContext::avctx, MpegEncContext::b_direct_mv_table, MpegEncContext::block_index, c, MotionEstContext::co_located_mv, MotionEstContext::current_mv_penalty, MotionEstContext::direct_basis_mv, ff_epzs_motion_search(), ff_get_mb_score(), MpegEncContext::first_slice_line, FLAG_DIRECT, FLAG_QPEL, MotionEstContext::flags, get_limits(), MpegEncContext::height, hpel_motion_search(), IS_8X8, MAX_MV, AVCodecContext::mb_cmp, MpegEncContext::mb_stride, MpegEncContext::me, AVCodecContext::me_sub_cmp, min, MotionEstContext::mv_penalty, MpegEncContext::mv_type, MV_TYPE_16X16, MV_TYPE_8X8, MpegEncContext::next_picture, P, P_LEFT, P_MEDIAN, P_TOP, P_TOPRIGHT, MpegEncContext::pb_time, MpegEncContext::pp_time, MotionEstContext::pred_x, MotionEstContext::pred_y, qpel_motion_search(), MpegEncContext::quarter_sample, shift(), MotionEstContext::skip, MotionEstContext::sub_flags, MpegEncContext::width, MotionEstContext::xmax, MotionEstContext::xmin, MotionEstContext::ymax, and MotionEstContext::ymin.
Referenced by ff_estimate_b_frame_motion().

| void ff_estimate_b_frame_motion | ( | MpegEncContext * | s, | |
| int | mb_x, | |||
| int | mb_y | |||
| ) |
Definition at line 1745 of file motion_est.c.
References MotionEstContext::avctx, MpegEncContext::b_back_mv_table, MpegEncContext::b_code, MpegEncContext::b_field_mv_table, MpegEncContext::b_field_select_table, MpegEncContext::b_forw_mv_table, bidir_refine(), c, CANDIDATE_MB_TYPE_BACKWARD, CANDIDATE_MB_TYPE_BACKWARD_I, CANDIDATE_MB_TYPE_BIDIR, CANDIDATE_MB_TYPE_BIDIR_I, CANDIDATE_MB_TYPE_DIRECT, CANDIDATE_MB_TYPE_FORWARD, CANDIDATE_MB_TYPE_FORWARD_I, CANDIDATE_MB_TYPE_INTRA, check_input_motion(), CODEC_FLAG_INTERLACED_ME, MpegEncContext::codec_id, CODEC_ID_MPEG4, MotionEstContext::current_mv_penalty, MpegEncContext::current_picture, direct_search(), MpegEncContext::f_code, ff_estimate_motion_b(), FF_MB_DECISION_SIMPLE, MpegEncContext::flags, FMT_MPEG1, get_limits(), init_ref(), interlaced_search(), MpegEncContext::last_picture, MAX_MV, AVCodecContext::mb_decision, MotionEstContext::mb_penalty_factor, MpegEncContext::mb_stride, MpegEncContext::mb_type, Picture::mc_mb_var, MotionEstContext::mc_mb_var_sum_temp, MpegEncContext::me, AVCodecContext::me_threshold, MotionEstContext::mv_penalty, MpegEncContext::new_picture, MpegEncContext::next_picture, MpegEncContext::out_format, and MotionEstContext::skip.

| static int ff_estimate_motion_b | ( | MpegEncContext * | s, | |
| int | mb_x, | |||
| int | mb_y, | |||
| int16_t(*) | mv_table[2], | |||
| int | ref_index, | |||
| int | f_code | |||
| ) | [static] |
Definition at line 1460 of file motion_est.c.
References MotionEstContext::avctx, MpegEncContext::b_forw_mv_table, c, MotionEstContext::current_mv_penalty, ff_epzs_motion_search(), ff_get_mb_score(), MpegEncContext::first_slice_line, get_limits(), get_penalty_factor(), MpegEncContext::lambda, MpegEncContext::lambda2, MAX_MV, AVCodecContext::mb_cmp, MotionEstContext::mb_penalty_factor, MpegEncContext::mb_stride, MpegEncContext::me, AVCodecContext::me_cmp, ME_EPZS, ME_FULL, ME_LOG, MpegEncContext::me_method, ME_PHODS, AVCodecContext::me_sub_cmp, ME_X1, ME_ZERO, MotionEstContext::mv_penalty, no_motion_search(), P, P_LEFT, P_MEDIAN, MpegEncContext::p_mv_table, P_TOP, P_TOPRIGHT, MpegEncContext::pb_time, MotionEstContext::penalty_factor, MpegEncContext::pp_time, MotionEstContext::pred_x, MotionEstContext::pred_y, MpegEncContext::quarter_sample, shift(), MotionEstContext::skip, MotionEstContext::sub_motion_search, MotionEstContext::sub_penalty_factor, MotionEstContext::xmax, MotionEstContext::xmin, and MotionEstContext::ymax.
Referenced by ff_estimate_b_frame_motion().

| void ff_estimate_p_frame_motion | ( | MpegEncContext * | s, | |
| int | mb_x, | |||
| int | mb_y | |||
| ) |
Definition at line 1139 of file motion_est.c.
References MotionEstContext::avctx, MpegEncContext::b8_stride, MpegEncContext::block_index, c, CANDIDATE_MB_TYPE_INTER, CANDIDATE_MB_TYPE_INTER4V, CANDIDATE_MB_TYPE_INTER_I, CANDIDATE_MB_TYPE_INTRA, CANDIDATE_MB_TYPE_SKIPPED, check_input_motion(), CODEC_FLAG_4MV, CODEC_FLAG_INTERLACED_ME, CODEC_FLAG_MV0, MotionEstContext::current_mv_penalty, MpegEncContext::current_picture, MpegEncContext::dc_val, MpegEncContext::dsp, MpegEncContext::f_code, FF_CMP_CHROMA, FF_CMP_SSE, ff_epzs_motion_search(), ff_get_mb_score(), FF_MB_DECISION_SIMPLE, MpegEncContext::first_slice_line, MpegEncContext::flags, FMT_H263, get_limits(), get_penalty_factor(), h263_mv4_search(), init_ref(), interlaced_search(), MpegEncContext::lambda, MpegEncContext::lambda2, MpegEncContext::last_dc, MpegEncContext::last_picture, MpegEncContext::linesize, MAX_MV, DSPContext::mb_cmp, AVCodecContext::mb_cmp, AVCodecContext::mb_decision, Picture::mb_mean, MotionEstContext::mb_penalty_factor, MpegEncContext::mb_stride, MpegEncContext::mb_type, Picture::mb_var, MotionEstContext::mb_var_sum_temp, Picture::mc_mb_var, MotionEstContext::mc_mb_var_sum_temp, MpegEncContext::me, AVCodecContext::me_cmp, ME_EPZS, ME_FULL, ME_LOG, MpegEncContext::me_method, ME_PHODS, AVCodecContext::me_sub_cmp, AVCodecContext::me_threshold, ME_X1, ME_ZERO, MotionEstContext::mv_penalty, MpegEncContext::new_picture, no_motion_search(), NULL, MpegEncContext::out_format, P, MpegEncContext::p_field_mv_table, MpegEncContext::p_field_select_table, P_LEFT, P_MEDIAN, MpegEncContext::p_mv_table, P_TOP, P_TOPRIGHT, MotionEstContext::penalty_factor, DSPContext::pix_norm1, DSPContext::pix_sum, MotionEstContext::pred_x, MotionEstContext::pred_y, MpegEncContext::qscale, MpegEncContext::quarter_sample, MotionEstContext::ref, MotionEstContext::scene_change_score, MotionEstContext::scratchpad, set_p_mv_tables(), shift(), MotionEstContext::skip, MotionEstContext::src, DSPContext::sse, MotionEstContext::stride, MotionEstContext::sub_motion_search, MotionEstContext::sub_penalty_factor, MpegEncContext::uvlinesize, MotionEstContext::uvstride, MotionEstContext::xmax, MotionEstContext::xmin, and MotionEstContext::ymax.

| void ff_fix_long_mvs | ( | MpegEncContext * | s, | |
| uint8_t * | field_select_table, | |||
| int | field_select, | |||
| int16_t(*) | mv_table[2], | |||
| int | f_code, | |||
| int | type, | |||
| int | truncate | |||
| ) |
| truncate | 1 for truncation, 0 for using intra |
Definition at line 1996 of file motion_est.c.
References MotionEstContext::avctx, c, CANDIDATE_MB_TYPE_INTRA, FMT_MPEG1, MpegEncContext::mb_height, MpegEncContext::mb_stride, MpegEncContext::mb_type, MpegEncContext::mb_width, MpegEncContext::me, AVCodecContext::me_range, MpegEncContext::msmpeg4_version, NULL, and MpegEncContext::out_format.
| void ff_fix_long_p_mvs | ( | MpegEncContext * | s | ) |
Definition at line 1946 of file motion_est.c.
References MotionEstContext::avctx, MpegEncContext::b8_stride, c, CANDIDATE_MB_TYPE_INTER4V, CANDIDATE_MB_TYPE_INTRA, CODEC_FLAG_4MV, MpegEncContext::current_picture, MpegEncContext::f_code, MpegEncContext::flags, FMT_MPEG1, MpegEncContext::mb_height, MpegEncContext::mb_stride, MpegEncContext::mb_type, MpegEncContext::mb_width, MpegEncContext::me, AVCodecContext::me_range, MpegEncContext::msmpeg4_version, MpegEncContext::out_format, P_TYPE, and MpegEncContext::pict_type.
| int ff_get_best_fcode | ( | MpegEncContext * | s, | |
| int16_t(*) | mv_table[2], | |||
| int | type | |||
| ) |
Definition at line 1890 of file motion_est.c.
References MpegEncContext::avctx, B_TYPE, MpegEncContext::current_picture, MpegEncContext::fcode_tab, MAX_MV, MpegEncContext::mb_height, MpegEncContext::mb_num, MpegEncContext::mb_stride, MpegEncContext::mb_type, Picture::mb_var, MpegEncContext::mb_width, Picture::mc_mb_var, ME_EPZS, MpegEncContext::me_method, AVCodecContext::me_range, and MpegEncContext::pict_type.
| void ff_init_me | ( | MpegEncContext * | s | ) |
Definition at line 229 of file motion_est.c.
References MpegEncContext::avctx, MotionEstContext::avctx, DSPContext::avg_pixels_tab, DSPContext::avg_qpel_pixels_tab, c, CODEC_FLAG_QPEL, MpegEncContext::codec_id, CODEC_ID_H261, CODEC_ID_SNOW, MpegEncContext::dsp, FF_CMP_CHROMA, FF_CMP_SAD, ff_set_cmp(), MpegEncContext::flags, MotionEstContext::flags, get_flags(), MotionEstContext::hpel_avg, hpel_motion_search(), MotionEstContext::hpel_put, MpegEncContext::linesize, mb_cmp, AVCodecContext::mb_cmp, DSPContext::mb_cmp, MotionEstContext::mb_flags, MpegEncContext::mb_width, MpegEncContext::me, AVCodecContext::me_cmp, DSPContext::me_cmp, AVCodecContext::me_pre_cmp, DSPContext::me_pre_cmp, AVCodecContext::me_sub_cmp, DSPContext::me_sub_cmp, MpegEncContext::no_rounding, no_sub_motion_search(), DSPContext::put_no_rnd_pixels_tab, DSPContext::put_no_rnd_qpel_pixels_tab, DSPContext::put_pixels_tab, DSPContext::put_qpel_pixels_tab, MotionEstContext::qpel_avg, qpel_motion_search(), MotionEstContext::qpel_put, sad_hpel_motion_search(), MotionEstContext::scratchpad, MotionEstContext::stride, MotionEstContext::sub_flags, MotionEstContext::sub_motion_search, MotionEstContext::temp, MpegEncContext::uvlinesize, MotionEstContext::uvstride, zero_cmp(), and zero_hpel().
Referenced by encode_frame().

| int ff_pre_estimate_p_frame_motion | ( | MpegEncContext * | s, | |
| int | mb_x, | |||
| int | mb_y | |||
| ) |
Definition at line 1407 of file motion_est.c.
References MotionEstContext::avctx, c, MotionEstContext::current_mv_penalty, MpegEncContext::f_code, ff_epzs_motion_search(), MpegEncContext::first_slice_line, get_limits(), get_penalty_factor(), init_ref(), MpegEncContext::lambda, MpegEncContext::lambda2, MpegEncContext::last_picture, MAX_MV, MpegEncContext::mb_stride, MpegEncContext::me, AVCodecContext::me_pre_cmp, MotionEstContext::mv_penalty, MpegEncContext::new_picture, NULL, P, P_LEFT, P_MEDIAN, MpegEncContext::p_mv_table, P_TOP, P_TOPRIGHT, MotionEstContext::pre_penalty_factor, MotionEstContext::pred_x, MotionEstContext::pred_y, MpegEncContext::quarter_sample, shift(), MotionEstContext::skip, MotionEstContext::xmax, MotionEstContext::xmin, and MotionEstContext::ymin.

| static int get_flags | ( | MotionEstContext * | c, | |
| int | direct, | |||
| int | chroma | |||
| ) | [static] |
Definition at line 98 of file motion_est.c.
References MotionEstContext::avctx, CODEC_FLAG_QPEL, FLAG_CHROMA, FLAG_DIRECT, FLAG_QPEL, and AVCodecContext::flags.
Referenced by ff_init_me().
| static void get_limits | ( | MpegEncContext * | s, | |
| int | x, | |||
| int | y | |||
| ) | [inline, static] |
get fullpel ME search limits.
Definition at line 687 of file motion_est.c.
References c, FMT_H261, MpegEncContext::mb_height, MpegEncContext::mb_width, MpegEncContext::me, MpegEncContext::out_format, MpegEncContext::unrestricted_mv, MotionEstContext::xmax, MotionEstContext::xmin, MotionEstContext::ymax, and MotionEstContext::ymin.
Referenced by direct_search(), ff_estimate_b_frame_motion(), ff_estimate_motion_b(), ff_estimate_p_frame_motion(), and ff_pre_estimate_p_frame_motion().
| static int h263_mv4_search | ( | MpegEncContext * | s, | |
| int | mx, | |||
| int | my, | |||
| int | shift | |||
| ) | [inline, static] |
Definition at line 724 of file motion_est.c.
References MotionEstContext::avctx, MpegEncContext::b8_stride, MpegEncContext::block_index, c, MotionEstContext::current_mv_penalty, MpegEncContext::current_picture, MpegEncContext::dsp, epzs_motion_search4(), FF_CMP_CHROMA, FF_CMP_RD, ff_h263_round_chroma(), MpegEncContext::first_slice_line, init_mv4_ref(), MpegEncContext::last_picture, AVCodecContext::mb_cmp, DSPContext::mb_cmp, MotionEstContext::mb_penalty_factor, MpegEncContext::mb_x, MpegEncContext::mb_y, MpegEncContext::me, DSPContext::me_sub_cmp, MpegEncContext::new_picture, MpegEncContext::no_rounding, offset, P, P_LEFT, P_MEDIAN, P_MV1, MpegEncContext::p_mv_table, P_TOP, P_TOPRIGHT, MotionEstContext::pred_x, MotionEstContext::pred_y, DSPContext::put_no_rnd_pixels_tab, DSPContext::put_no_rnd_qpel_pixels_tab, DSPContext::put_pixels_tab, DSPContext::put_qpel_pixels_tab, MpegEncContext::quarter_sample, MotionEstContext::ref, MotionEstContext::scratchpad, MotionEstContext::stride, stride, MotionEstContext::sub_motion_search, MpegEncContext::uvlinesize, MotionEstContext::xmax, MotionEstContext::xmin, and MotionEstContext::ymax.
Referenced by ff_estimate_p_frame_motion().

| static void init_interlaced_ref | ( | MpegEncContext * | s, | |
| int | ref_index | |||
| ) | [inline, static] |
Definition at line 860 of file motion_est.c.
References c, FLAG_CHROMA, MotionEstContext::flags, MpegEncContext::linesize, MpegEncContext::me, MotionEstContext::ref, MotionEstContext::src, and MpegEncContext::uvlinesize.
Referenced by check_input_motion(), and interlaced_search().
| static void init_mv4_ref | ( | MotionEstContext * | c | ) | [inline, static] |
Definition at line 713 of file motion_est.c.
References MotionEstContext::ref, MotionEstContext::src, MotionEstContext::stride, and stride.
Referenced by check_input_motion(), and h263_mv4_search().
| static void init_ref | ( | MotionEstContext * | c, | |
| uint8_t * | src[3], | |||
| uint8_t * | ref[3], | |||
| uint8_t * | ref2[3], | |||
| int | x, | |||
| int | y, | |||
| int | ref_index | |||
| ) | [inline, static] |
Definition at line 80 of file motion_est.c.
References offset, MotionEstContext::ref, MotionEstContext::src, stride, and MotionEstContext::uvstride.
Referenced by encode_q_branch(), ff_estimate_b_frame_motion(), ff_estimate_p_frame_motion(), and ff_pre_estimate_p_frame_motion().
| static int interlaced_search | ( | MpegEncContext * | s, | |
| int | ref_index, | |||
| int16_t(*[2][2]) | mv_tables[2], | |||
| uint8_t * | field_select_tables[2], | |||
| int | mx, | |||
| int | my, | |||
| int | user_field_select | |||
| ) | [static] |
Definition at line 873 of file motion_est.c.
References MotionEstContext::avctx, c, MotionEstContext::current_mv_penalty, MpegEncContext::dsp, epzs_motion_search2(), FF_CMP_RD, MpegEncContext::first_slice_line, init_interlaced_ref(), MpegEncContext::linesize, AVCodecContext::mb_cmp, DSPContext::mb_cmp, MotionEstContext::mb_penalty_factor, MpegEncContext::mb_stride, MpegEncContext::mb_x, MpegEncContext::mb_y, MpegEncContext::me, DSPContext::me_sub_cmp, mv_tables, MpegEncContext::no_rounding, P, P_LEFT, P_MEDIAN, P_MV1, P_TOP, P_TOPRIGHT, MotionEstContext::pred_x, MotionEstContext::pred_y, DSPContext::put_no_rnd_pixels_tab, DSPContext::put_pixels_tab, MotionEstContext::ref, MotionEstContext::scratchpad, MotionEstContext::src, MotionEstContext::stride, stride, MotionEstContext::sub_motion_search, MotionEstContext::uvstride, MotionEstContext::xmax, MotionEstContext::xmin, MotionEstContext::ymax, and MotionEstContext::ymin.
Referenced by ff_estimate_b_frame_motion(), and ff_estimate_p_frame_motion().

| static int minima_cmp | ( | const void * | a, | |
| const void * | b | |||
| ) | [static] |
Definition at line 69 of file motion_est.c.
References Minima::height.
Referenced by sab_diamond_search().
| static void no_motion_search | ( | MpegEncContext * | s, | |
| int * | mx_ptr, | |||
| int * | my_ptr | |||
| ) | [inline, static] |
Definition at line 313 of file motion_est.c.
References MpegEncContext::mb_x, and MpegEncContext::mb_y.
Referenced by ff_estimate_motion_b(), and ff_estimate_p_frame_motion().
| static int sad_hpel_motion_search | ( | MpegEncContext * | s, | |
| int * | mx_ptr, | |||
| int * | my_ptr, | |||
| int | dmin, | |||
| int | src_index, | |||
| int | ref_index, | |||
| int | size, | |||
| int | h | |||
| ) | [inline, static] |
Definition at line 552 of file motion_est.c.
References b, c, CHECK_SAD_HALF_MV, LOAD_COMMON, MpegEncContext::me, ME_MAP_SHIFT, ME_MAP_SIZE, r, MotionEstContext::ref, MotionEstContext::skip, MotionEstContext::src, MotionEstContext::stride, stride, MotionEstContext::sub_flags, MotionEstContext::sub_penalty_factor, and t.
Referenced by ff_init_me().
| static void set_p_mv_tables | ( | MpegEncContext * | s, | |
| int | mx, | |||
| int | my, | |||
| int | mv4 | |||
| ) | [inline, static] |
Definition at line 660 of file motion_est.c.
References MpegEncContext::b8_stride, MpegEncContext::block_index, MpegEncContext::current_picture, MpegEncContext::mb_stride, MpegEncContext::mb_x, MpegEncContext::mb_y, and MpegEncContext::p_mv_table.
Referenced by ff_estimate_p_frame_motion().
| static int update_map_generation | ( | MotionEstContext * | c | ) | [inline, static] |
Definition at line 52 of file motion_est.c.
References MotionEstContext::map, MotionEstContext::map_generation, ME_MAP_MV_BITS, and ME_MAP_SIZE.
Referenced by epzs_motion_search2(), epzs_motion_search4(), and epzs_motion_search_internal().
| static int zero_cmp | ( | void * | s, | |
| uint8_t * | a, | |||
| uint8_t * | b, | |||
| int | stride, | |||
| int | h | |||
| ) | [static] |
Definition at line 222 of file motion_est.c.
| static void zero_hpel | ( | uint8_t * | a, | |
| const uint8_t * | b, | |||
| int | stride, | |||
| int | h | |||
| ) | [static] |
1.5.5