Go to the documentation of this file.
19 ({ __typeof__ (a) _a = (a); \
20 __typeof__ (b) _b = (b); \
25 ({ __typeof__ (a) _a = (a); \
26 __typeof__ (b) _b = (b); \
36 #define LK_OPTICAL_FLOW_8BIT 0
37 #define LK_OPTICAL_FLOW 1
38 #define BLOCK_MATCHING_ARPS 2
39 #define BLOCK_MATCHING_EPZS 3
bool(* motion_func)(struct MotionEstContext *self)
Definition: motion.h:107
b_width
blocks width
Definition: motion.h:90
MotionVector16_t * mv_table[3]
motion vectors of current & prev
Definition: motion.h:102
void uninit(MotionEstContext *ctx)
Definition: motion.c:35
int log2_mbSize
log2 of macro block size
Definition: motion.h:95
int mbSize
macro block size
Definition: motion.h:94
int16_t y
Definition: motion.h:42
uint8_t * data_ref
prev image
Definition: motion.h:80
b_height
blocks height
Definition: motion.h:91
int width
images width
Definition: motion.h:83
struct MotionEstContext MotionEstContext
MotionEstPredictor preds[2]
predictor for EPZS ([1] : Set B, [2] : Set C)
Definition: motion.h:100
int max
max motion vector magĀ²
Definition: motion.h:82
int pred_y
median predictor y in Set A
Definition: motion.h:99
int8_t vy
Definition: motion.h:60
int nb
Definition: motion.h:69
int8_t vx
Definition: motion.h:59
bool LK_optical_flow(MotionEstContext *)
Implement LK optical flow source from wiki and matlab : https://en.wikipedia.org/wiki/Lucas%E2%80%93K...
Definition: lucas_kanade_opitcal_flow.c:47
int height
images height
Definition: motion.h:84
int16_t vy
Definition: motion.h:50
uint16_t mag2
Definition: motion.h:51
MotionVector 2D with amplitude squared (for speed)
Definition: motion.h:48
bool LK_optical_flow8(const uint8_t *src1, const uint8_t *src2, uint8_t *v, int w, int h)
Lucas Kanade optical 8 bit version.
Definition: lucas_kanade_opitcal_flow.c:157
char name[20]
Definition: motion.h:78
b_count
nb of blocks
Definition: motion.h:92
Exhaustive struct representing all parameter needed for all motion estimation type.
Definition: motion.h:77
unsigned char uint8_t
Definition: deflicker.h:10
Used for EPZS algorithm.
Definition: motion.h:67
int16_t vx
Definition: motion.h:49
uint8_t * motionComp(const uint8_t *imgI, const MotionVector16_t *motionVect, size_t w, size_t h, size_t mbSize)
Compute motion compensated image's PSNR .
Definition: block_matching.c:52
uint8_t * data_cur
current image
Definition: motion.h:79
MotionVector 2D 8bit.
Definition: motion.h:58
uint64_t me_comp_sad(MotionEstContext *me_ctx, int x_mb, int y_mb, int x_mv, int y_mv)
omputes the Sum of Absolute Difference (SAD) for the given two blocks
Definition: motion.c:161
uint64_t(* get_cost)(struct MotionEstContext *self, int x_mb, int y_mb, int x_mv, int y_mv)
pointer to motion estimation function
Definition: motion.h:106
bool motionEstARPS(MotionEstContext *)
Perform Adaptive Rood Pattern Search algorithm.
Definition: block_matching.c:95
bool init_context(MotionEstContext *ctx)
Init & allocate context ctx accordingly to the method used.
Definition: motion.c:62
bool motionEstEPZS(MotionEstContext *)
Enhance Predictive Zonal Search block matching algo.
Definition: epzs.c:117
bool motion_estimation(MotionEstContext *ctx, uint8_t *img_prev, uint8_t *img_cur)
motion estimation wrapper
Definition: motion.c:137
int method
motion estimation method (LK_OPTICAL_FLOW, BLOCK_MATCHING_ARPS, ...)
Definition: motion.h:81
int mvs[10][2]
Definition: motion.h:68
struct MotionEstPredictor MotionEstPredictor
int search_param
parameter p in ARPS
Definition: motion.h:96
int pred_x
median predictor x in Set A
Definition: motion.h:98