FFmpeg  4.3
Macros | Functions
mpegvideo_motion.c File Reference
#include <string.h>
#include "libavutil/avassert.h"
#include "libavutil/internal.h"
#include "avcodec.h"
#include "h261.h"
#include "mpegutils.h"
#include "mpegvideo.h"
#include "mjpegenc.h"
#include "msmpeg4.h"
#include "qpeldsp.h"
#include "wmv2.h"
#include <limits.h>

Go to the source code of this file.

Macros

#define OBMC_FILTER(x, t, l, m, r, b)   dst[x]= (t*top[x] + l*left[x] + m*mid[x] + r*right[x] + b*bottom[x] + 4)>>3
 
#define OBMC_FILTER4(x, t, l, m, r, b)
 
#define MID   0
 

Functions

static void gmc1_motion (MpegEncContext *s, uint8_t *dest_y, uint8_t *dest_cb, uint8_t *dest_cr, uint8_t **ref_picture)
 
static void gmc_motion (MpegEncContext *s, uint8_t *dest_y, uint8_t *dest_cb, uint8_t *dest_cr, uint8_t **ref_picture)
 
static int hpel_motion (MpegEncContext *s, uint8_t *dest, uint8_t *src, int src_x, int src_y, op_pixels_func *pix_op, int motion_x, int motion_y)
 
static av_always_inline void mpeg_motion_internal (MpegEncContext *s, uint8_t *dest_y, uint8_t *dest_cb, uint8_t *dest_cr, int field_based, int bottom_field, int field_select, uint8_t **ref_picture, op_pixels_func(*pix_op)[4], int motion_x, int motion_y, int h, int is_mpeg12, int is_16x8, int mb_y)
 
static void mpeg_motion (MpegEncContext *s, uint8_t *dest_y, uint8_t *dest_cb, uint8_t *dest_cr, int field_select, uint8_t **ref_picture, op_pixels_func(*pix_op)[4], int motion_x, int motion_y, int h, int is_16x8, int mb_y)
 
static void mpeg_motion_field (MpegEncContext *s, uint8_t *dest_y, uint8_t *dest_cb, uint8_t *dest_cr, int bottom_field, int field_select, uint8_t **ref_picture, op_pixels_func(*pix_op)[4], int motion_x, int motion_y, int h, int mb_y)
 
static void put_obmc (uint8_t *dst, uint8_t *src[5], int stride)
 
static void obmc_motion (MpegEncContext *s, uint8_t *dest, uint8_t *src, int src_x, int src_y, op_pixels_func *pix_op, int16_t mv[5][2])
 
static void qpel_motion (MpegEncContext *s, uint8_t *dest_y, uint8_t *dest_cb, uint8_t *dest_cr, int field_based, int bottom_field, int field_select, uint8_t **ref_picture, op_pixels_func(*pix_op)[4], qpel_mc_func(*qpix_op)[16], int motion_x, int motion_y, int h)
 
static void chroma_4mv_motion (MpegEncContext *s, uint8_t *dest_cb, uint8_t *dest_cr, uint8_t **ref_picture, op_pixels_func *pix_op, int mx, int my)
 H.263 chroma 4mv motion compensation. More...
 
static void prefetch_motion (MpegEncContext *s, uint8_t **pix, int dir)
 
static void apply_obmc (MpegEncContext *s, uint8_t *dest_y, uint8_t *dest_cb, uint8_t *dest_cr, uint8_t **ref_picture, op_pixels_func(*pix_op)[4])
 
static void apply_8x8 (MpegEncContext *s, uint8_t *dest_y, uint8_t *dest_cb, uint8_t *dest_cr, int dir, uint8_t **ref_picture, qpel_mc_func(*qpix_op)[16], op_pixels_func(*pix_op)[4])
 
static av_always_inline void mpv_motion_internal (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], int is_mpeg12)
 motion compensation of a single macroblock More...
 
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])
 

Macro Definition Documentation

◆ OBMC_FILTER

#define OBMC_FILTER (   x,
  t,
  l,
  m,
  r,
  b 
)    dst[x]= (t*top[x] + l*left[x] + m*mid[x] + r*right[x] + b*bottom[x] + 4)>>3

◆ OBMC_FILTER4

#define OBMC_FILTER4 (   x,
  t,
  l,
  m,
  r,
  b 
)
Value:
OBMC_FILTER(x , t, l, m, r, b);\
OBMC_FILTER(x+1 , t, l, m, r, b);\
OBMC_FILTER(x +stride, t, l, m, r, b);\
OBMC_FILTER(x+1+stride, t, l, m, r, b);

◆ MID

#define MID   0

Function Documentation

◆ gmc1_motion()

static void gmc1_motion ( MpegEncContext s,
uint8_t dest_y,
uint8_t dest_cb,
uint8_t dest_cr,
uint8_t **  ref_picture 
)
static

Definition at line 38 of file mpegvideo_motion.c.

Referenced by mpv_motion_internal().

◆ gmc_motion()

static void gmc_motion ( MpegEncContext s,
uint8_t dest_y,
uint8_t dest_cb,
uint8_t dest_cr,
uint8_t **  ref_picture 
)
static

Definition at line 135 of file mpegvideo_motion.c.

Referenced by mpv_motion_internal().

◆ hpel_motion()

static int hpel_motion ( MpegEncContext s,
uint8_t dest,
uint8_t src,
int  src_x,
int  src_y,
op_pixels_func pix_op,
int  motion_x,
int  motion_y 
)
inlinestatic

Definition at line 193 of file mpegvideo_motion.c.

Referenced by apply_8x8(), and obmc_motion().

◆ mpeg_motion_internal()

static av_always_inline void mpeg_motion_internal ( MpegEncContext s,
uint8_t dest_y,
uint8_t dest_cb,
uint8_t dest_cr,
int  field_based,
int  bottom_field,
int  field_select,
uint8_t **  ref_picture,
op_pixels_func(*)  pix_op[4],
int  motion_x,
int  motion_y,
int  h,
int  is_mpeg12,
int  is_16x8,
int  mb_y 
)
static

Definition at line 229 of file mpegvideo_motion.c.

Referenced by mpeg_motion(), and mpeg_motion_field().

◆ mpeg_motion()

static void mpeg_motion ( MpegEncContext s,
uint8_t dest_y,
uint8_t dest_cb,
uint8_t dest_cr,
int  field_select,
uint8_t **  ref_picture,
op_pixels_func(*)  pix_op[4],
int  motion_x,
int  motion_y,
int  h,
int  is_16x8,
int  mb_y 
)
static

Definition at line 371 of file mpegvideo_motion.c.

Referenced by mpv_motion_internal().

◆ mpeg_motion_field()

static void mpeg_motion_field ( MpegEncContext s,
uint8_t dest_y,
uint8_t dest_cb,
uint8_t dest_cr,
int  bottom_field,
int  field_select,
uint8_t **  ref_picture,
op_pixels_func(*)  pix_op[4],
int  motion_x,
int  motion_y,
int  h,
int  mb_y 
)
static

Definition at line 389 of file mpegvideo_motion.c.

Referenced by mpv_motion_internal().

◆ put_obmc()

static void put_obmc ( uint8_t dst,
uint8_t src[5],
int  stride 
)
inlinestatic

Definition at line 409 of file mpegvideo_motion.c.

Referenced by obmc_motion().

◆ obmc_motion()

static void obmc_motion ( MpegEncContext s,
uint8_t dest,
uint8_t src,
int  src_x,
int  src_y,
op_pixels_func pix_op,
int16_t  mv[5][2] 
)
inlinestatic

Definition at line 462 of file mpegvideo_motion.c.

Referenced by apply_obmc().

◆ qpel_motion()

static void qpel_motion ( MpegEncContext s,
uint8_t dest_y,
uint8_t dest_cb,
uint8_t dest_cr,
int  field_based,
int  bottom_field,
int  field_select,
uint8_t **  ref_picture,
op_pixels_func(*)  pix_op[4],
qpel_mc_func(*)  qpix_op[16],
int  motion_x,
int  motion_y,
int  h 
)
inlinestatic

Definition at line 488 of file mpegvideo_motion.c.

Referenced by mpv_motion_internal().

◆ chroma_4mv_motion()

static void chroma_4mv_motion ( MpegEncContext s,
uint8_t dest_cb,
uint8_t dest_cr,
uint8_t **  ref_picture,
op_pixels_func pix_op,
int  mx,
int  my 
)
static

H.263 chroma 4mv motion compensation.

Definition at line 595 of file mpegvideo_motion.c.

Referenced by apply_8x8(), and apply_obmc().

◆ prefetch_motion()

static void prefetch_motion ( MpegEncContext s,
uint8_t **  pix,
int  dir 
)
inlinestatic

Definition at line 647 of file mpegvideo_motion.c.

Referenced by mpv_motion_internal().

◆ apply_obmc()

static void apply_obmc ( MpegEncContext s,
uint8_t dest_y,
uint8_t dest_cb,
uint8_t dest_cr,
uint8_t **  ref_picture,
op_pixels_func(*)  pix_op[4] 
)
inlinestatic

Definition at line 661 of file mpegvideo_motion.c.

Referenced by mpv_motion_internal().

◆ apply_8x8()

static void apply_8x8 ( MpegEncContext s,
uint8_t dest_y,
uint8_t dest_cb,
uint8_t dest_cr,
int  dir,
uint8_t **  ref_picture,
qpel_mc_func(*)  qpix_op[16],
op_pixels_func(*)  pix_op[4] 
)
inlinestatic

Definition at line 748 of file mpegvideo_motion.c.

Referenced by mpv_motion_internal().

◆ mpv_motion_internal()

static av_always_inline void mpv_motion_internal ( 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],
int  is_mpeg12 
)
static

motion compensation of a single macroblock

Parameters
scontext
dest_yluma destination pointer
dest_cbchroma cb/u destination pointer
dest_crchroma cr/v destination pointer
dirdirection (0->forward, 1->backward)
ref_picturearray[3] of pointers to the 3 planes of the reference picture
pix_ophalfpel motion compensation function (average or put normally)
qpix_opqpel motion compensation function (average or put normally) the motion vectors are taken from s->mv and the MV type from s->mv_type

Definition at line 832 of file mpegvideo_motion.c.

Referenced by ff_mpv_motion().

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

stride
int stride
Definition: mace.c:144
b
#define b
Definition: input.c:41
x
FFmpeg Automated Testing Environment ************************************Introduction Using FATE from your FFmpeg source directory Submitting the results to the FFmpeg result aggregation server Uploading new samples to the fate suite FATE makefile targets and variables Makefile targets Makefile variables Examples Introduction **************FATE is an extended regression suite on the client side and a means for results aggregation and presentation on the server side The first part of this document explains how you can use FATE from your FFmpeg source directory to test your ffmpeg binary The second part describes how you can run FATE to submit the results to FFmpeg’s FATE server In any way you can have a look at the publicly viewable FATE results by visiting this as it can be seen if some test on some platform broke with their recent contribution This usually happens on the platforms the developers could not test on The second part of this document describes how you can run FATE to submit your results to FFmpeg’s FATE server If you want to submit your results be sure to check that your combination of OS and compiler is not already listed on the above mentioned website In the third part you can find a comprehensive listing of FATE makefile targets and variables Using FATE from your FFmpeg source directory **********************************************If you want to run FATE on your machine you need to have the samples in place You can get the samples via the build target fate rsync Use this command from the top level source this will cause FATE to fail NOTE To use a custom wrapper to run the pass ‘ target exec’ to ‘configure’ or set the TARGET_EXEC Make variable Submitting the results to the FFmpeg result aggregation server ****************************************************************To submit your results to the server you should run fate through the shell script ‘tests fate sh’ from the FFmpeg sources This script needs to be invoked with a configuration file as its first argument tests fate sh path to fate_config A configuration file template with comments describing the individual configuration variables can be found at ‘doc fate_config sh template’ Create a configuration that suits your based on the configuration template The ‘slot’ configuration variable can be any string that is not yet but it is suggested that you name it adhering to the following pattern ‘ARCH OS COMPILER COMPILER VERSION’ The configuration file itself will be sourced in a shell therefore all shell features may be used This enables you to setup the environment as you need it for your build For your first test runs the ‘fate_recv’ variable should be empty or commented out This will run everything as normal except that it will omit the submission of the results to the server The following files should be present in $workdir as specified in the configuration it may help to try out the ‘ssh’ command with one or more ‘ v’ options You should get detailed output concerning your SSH configuration and the authentication process The only thing left is to automate the execution of the fate sh script and the synchronisation of the samples directory Uploading new samples to the fate suite *****************************************If you need a sample uploaded send a mail to samples request This is for developers who have an account on the fate suite server If you upload new please make sure they are as small as space on each network bandwidth and so on benefit from smaller test cases Also keep in mind older checkouts use existing sample that means in practice generally do not remove or overwrite files as it likely would break older checkouts or releases Also all needed samples for a commit should be ideally before the push If you need an account for frequently uploading samples or you wish to help others by doing that send a mail to ffmpeg devel rsync vauL Duo x
Definition: fate.txt:150
OBMC_FILTER
#define OBMC_FILTER(x, t, l, m, r, b)
r
#define r
Definition: input.c:40