ESP32 motion
epzs.c File Reference

Implementation of EPZS from : More...

#include "motion.h"
#include <string.h>
#include <math.h>

Macros

#define FFMPEG   1
 if 1 will use FFMPEG version else it is from paper MPG4/AVC More...
 
#define mid_pred   mid_pred
 
#define COST_P_MV(x, y)
 
#define ADD_PRED(preds, px, py)
 

Functions

bool motionEstEPZS (MotionEstContext *me_ctx)
 Enhance Predictive Zonal Search block matching algo. More...
 

Detailed Description

Implementation of EPZS from :

  • from article DOI: 10.15406/oajs.2017.01.00002 (FFMPEG set to 0)
  • from library ffmpeg libavfilter (FFMPEG set to 1)
    Author
    Thomas Pegot

Macro Definition Documentation

◆ ADD_PRED

#define ADD_PRED (   preds,
  px,
  py 
)
Value:
do {\
preds.mvs[preds.nb][0] = px;\
preds.mvs[preds.nb][1] = py;\
preds.nb++;\
} while(0)

◆ COST_P_MV

#define COST_P_MV (   x,
 
)
Value:
do {\
if (x >= x_min && x <= x_max && y >= y_min && y <= y_max) {\
cost = me_ctx->get_cost(me_ctx, x_mb, y_mb, x, y);\
if (cost < cost_min) {\
cost_min = cost;\
mv[0] = x;\
mv[1] = y;\
}\
}\
} while(0)

◆ FFMPEG

#define FFMPEG   1

if 1 will use FFMPEG version else it is from paper MPG4/AVC

Todo:
: Paper result are erratic

◆ mid_pred

#define mid_pred   mid_pred
MotionEstContext::preds
MotionEstPredictor preds[2]
predictor for EPZS ([1] : Set B, [2] : Set C)
Definition: motion.h:100
MotionEstPredictor::nb
int nb
Definition: motion.h:69