FFmpeg  4.3
videodsp.h
Go to the documentation of this file.
1 /*
2  * Copyright (C) 2012 Ronald S. Bultje
3  *
4  * This file is part of FFmpeg.
5  *
6  * FFmpeg is free software; you can redistribute it and/or
7  * modify it under the terms of the GNU Lesser General Public
8  * License as published by the Free Software Foundation; either
9  * version 2.1 of the License, or (at your option) any later version.
10  *
11  * FFmpeg is distributed in the hope that it will be useful,
12  * but WITHOUT ANY WARRANTY; without even the implied warranty of
13  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
14  * Lesser General Public License for more details.
15  *
16  * You should have received a copy of the GNU Lesser General Public
17  * License along with FFmpeg; if not, write to the Free Software
18  * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
19  */
20 
21 /**
22  * @file
23  * Core video DSP helper functions
24  */
25 
26 #ifndef AVCODEC_VIDEODSP_H
27 #define AVCODEC_VIDEODSP_H
28 
29 #include <stddef.h>
30 #include <stdint.h>
31 
32 #define EMULATED_EDGE(depth) \
33 void ff_emulated_edge_mc_ ## depth(uint8_t *dst, const uint8_t *src, \
34  ptrdiff_t dst_stride, ptrdiff_t src_stride, \
35  int block_w, int block_h,\
36  int src_x, int src_y, int w, int h);
37 
39 EMULATED_EDGE(16)
40 
41 typedef struct VideoDSPContext {
42  /**
43  * Copy a rectangular area of samples to a temporary buffer and replicate
44  * the border samples.
45  *
46  * @param dst destination buffer
47  * @param dst_stride number of bytes between 2 vertically adjacent samples
48  * in destination buffer
49  * @param src source buffer
50  * @param dst_linesize number of bytes between 2 vertically adjacent
51  * samples in the destination buffer
52  * @param src_linesize number of bytes between 2 vertically adjacent
53  * samples in both the source buffer
54  * @param block_w width of block
55  * @param block_h height of block
56  * @param src_x x coordinate of the top left sample of the block in the
57  * source buffer
58  * @param src_y y coordinate of the top left sample of the block in the
59  * source buffer
60  * @param w width of the source buffer
61  * @param h height of the source buffer
62  */
63  void (*emulated_edge_mc)(uint8_t *dst, const uint8_t *src,
64  ptrdiff_t dst_linesize,
65  ptrdiff_t src_linesize,
66  int block_w, int block_h,
67  int src_x, int src_y, int w, int h);
68 
69  /**
70  * Prefetch memory into cache (if supported by hardware).
71  *
72  * @param buf pointer to buffer to prefetch memory from
73  * @param stride distance between two lines of buf (in bytes)
74  * @param h number of lines to prefetch
75  */
76  void (*prefetch)(uint8_t *buf, ptrdiff_t stride, int h);
78 
79 void ff_videodsp_init(VideoDSPContext *ctx, int bpc);
80 
81 /* for internal use only (i.e. called by ff_videodsp_init() */
87 
88 #endif /* AVCODEC_VIDEODSP_H */
stride
int stride
Definition: mace.c:144
ff_videodsp_init_arm
void ff_videodsp_init_arm(VideoDSPContext *ctx, int bpc)
Definition: videodsp_init_arm.c:26
ff_videodsp_init_x86
void ff_videodsp_init_x86(VideoDSPContext *ctx, int bpc)
Definition: videodsp_init.c:279
ff_videodsp_init_mips
void ff_videodsp_init_mips(VideoDSPContext *ctx, int bpc)
Definition: videodsp_init.c:46
ctx
AVFormatContext * ctx
Definition: movenc.c:48
prefetch
#define prefetch(p)
Definition: asm.h:103
ff_videodsp_init_ppc
void ff_videodsp_init_ppc(VideoDSPContext *ctx, int bpc)
Definition: videodsp.c:33
src
#define src
Definition: vp8dsp.c:254
ff_videodsp_init_aarch64
void ff_videodsp_init_aarch64(VideoDSPContext *ctx, int bpc)
Definition: videodsp_init.c:26
EMULATED_EDGE
#define EMULATED_EDGE(depth)
Definition: videodsp.h:32
uint8_t
uint8_t
Definition: audio_convert.c:194
w
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 ug o o w
Definition: fate.txt:150
void
typedef void(RENAME(mix_any_func_type))
Definition: rematrix_template.c:52
VideoDSPContext
Definition: videodsp.h:41
h
h
Definition: vp9dsp_template.c:2038
ff_videodsp_init
void ff_videodsp_init(VideoDSPContext *ctx, int bpc)
Definition: videodsp.c:38