Go to the documentation of this file.
80 #define OFFSET(x) offsetof(MCDeintContext, x)
81 #define FLAGS AV_OPT_FLAG_VIDEO_PARAM|AV_OPT_FLAG_FILTERING_PARAM
82 #define CONST(name, help, val, unit) { name, help, 0, AV_OPT_TYPE_CONST, {.i64=val}, INT_MIN, INT_MAX, FLAGS, unit }
133 switch (mcdeint->
mode) {
177 int x, y,
i,
ret, got_frame = 0;
195 for (
i = 0;
i < 3;
i++) {
200 int srcs =
inpic ->linesize[
i];
203 for (y = 0; y <
h; y++) {
204 if ((y ^ mcdeint->
parity) & 1) {
205 for (
x = 0;
x <
w;
x++) {
210 if (y > 0 && y <
h-1){
211 int is_edge = x < 3 || x >
w-4;
212 int diff0 =
filp[-fils] - srcp[-srcs];
213 int diff1 =
filp[+fils] - srcp[+srcs];
216 #define DELTA(j) av_clip(j, -x, w-1-x)
218 #define GET_SCORE_EDGE(j)\
219 FFABS(srcp[-srcs+DELTA(-1+(j))] - srcp[+srcs+DELTA(-1-(j))])+\
220 FFABS(srcp[-srcs+DELTA(j) ] - srcp[+srcs+DELTA( -(j))])+\
221 FFABS(srcp[-srcs+DELTA(1+(j)) ] - srcp[+srcs+DELTA( 1-(j))])
223 #define GET_SCORE(j)\
224 FFABS(srcp[-srcs-1+(j)] - srcp[+srcs-1-(j)])+\
225 FFABS(srcp[-srcs +(j)] - srcp[+srcs -(j)])+\
226 FFABS(srcp[-srcs+1+(j)] - srcp[+srcs+1-(j)])
228 #define CHECK_EDGE(j)\
229 { int score = GET_SCORE_EDGE(j);\
230 if (score < spatial_score){\
231 spatial_score = score;\
232 diff0 = filp[-fils+DELTA(j)] - srcp[-srcs+DELTA(j)];\
233 diff1 = filp[+fils+DELTA(-(j))] - srcp[+srcs+DELTA(-(j))];\
236 { int score = GET_SCORE(j);\
237 if (score < spatial_score){\
238 spatial_score= score;\
239 diff0 = filp[-fils+(j)] - srcp[-srcs+(j)];\
240 diff1 = filp[+fils-(j)] - srcp[+srcs-(j)];\
253 if (diff0 + diff1 > 0)
265 for (y = 0; y <
h; y++) {
266 if (!((y ^ mcdeint->parity) & 1)) {
267 for (
x = 0;
x <
w;
x++) {
268 frame_dec->data[
i][
x + y*fils] =
269 outpic ->data[
i][
x + y*dsts] =
inpic->data[
i][
x + y*srcs];
274 mcdeint->parity ^= 1;
312 .priv_class = &mcdeint_class,
AVFrame * ff_get_video_buffer(AVFilterLink *link, int w, int h)
Request a picture buffer with a specific set of permissions.
void av_packet_unref(AVPacket *pkt)
Wipe the packet.
AVPixelFormat
Pixel format.
Filter the word “frame” indicates either a video frame or a group of audio as stored in an AVFrame structure Format for each input and each output the list of supported formats For video that means pixel format For audio that means channel sample they are references to shared objects When the negotiation mechanism computes the intersection of the formats supported at each end of a all references to both lists are replaced with a reference to the intersection And when a single format is eventually chosen for a link amongst the remaining all references to the list are updated That means that if a filter requires that its input and output have the same format amongst a supported all it has to do is use a reference to the same list of formats query_formats can leave some formats unset and return AVERROR(EAGAIN) to cause the negotiation mechanism toagain later. That can be used by filters with complex requirements to use the format negotiated on one link to set the formats supported on another. Frame references ownership and permissions
#define FF_COMPLIANCE_EXPERIMENTAL
Allow nonstandardized experimental things.
#define AV_CODEC_FLAG_QSCALE
Use fixed qscale.
The exact code depends on how similar the blocks are and how related they are to the and needs to apply these operations to the correct inlink or outlink if there are several Macros are available to factor that when no extra processing is inlink
void av_frame_free(AVFrame **frame)
Free the frame and any dynamically allocated objects in it, e.g.
static av_cold int end(AVCodecContext *avctx)
This structure describes decoded (raw) audio or video data.
const char * name
Filter name.
A link between two filters.
@ PARITY_BFF
bottom field first
#define AV_CODEC_FLAG_4MV
4 MV per MB allowed / advanced prediction for H.263.
int mb_cmp
macroblock comparison function (not supported yet)
uint8_t * data[AV_NUM_DATA_POINTERS]
pointer to the picture/channel planes.
return ff_filter_frame(outlink, outpic)
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
int refs
number of reference frames
AVCodec * avcodec_find_encoder(enum AVCodecID id)
Find a registered encoder with a matching codec ID.
int flags
AV_CODEC_FLAG_*.
#define AV_CODEC_FLAG_LOW_DELAY
Force low delay.
static const AVOption mcdeint_options[]
A filter pad used for either input or output.
#define AV_LOG_ERROR
Something went wrong and cannot losslessly be recovered.
AVCodecContext * avcodec_alloc_context3(const AVCodec *codec)
Allocate an AVCodecContext and set its fields to default values.
int global_quality
Global quality for codecs which cannot change it per frame.
#define AV_CEIL_RSHIFT(a, b)
static const AVFilterPad outputs[]
static enum AVPixelFormat pix_fmts[]
@ AV_PIX_FMT_YUV420P
planar YUV 4:2:0, 12bpp, (1 Cr & Cb sample per 2x2 Y samples)
#define FFABS(a)
Absolute value, Note, INT_MIN / INT64_MIN result in undefined behavior as they are not representable ...
static int query_formats(AVFilterContext *ctx)
Describe the class of an AVClass context structure.
int av_frame_copy_props(AVFrame *dst, const AVFrame *src)
Copy only "metadata" fields from src to dst.
void avcodec_free_context(AVCodecContext **avctx)
Free the codec context and everything associated with it and write NULL to the provided pointer.
Rational number (pair of numerator and denominator).
int avcodec_open2(AVCodecContext *avctx, const AVCodec *codec, AVDictionary **options)
Initialize the AVCodecContext to use the given AVCodec.
int me_cmp
motion estimation comparison function
these buffered frames must be flushed immediately if a new input produces new the filter must not call request_frame to get more It must just process the frame or queue it The task of requesting more frames is left to the filter s request_frame method or the application If a filter has several inputs
AVRational time_base
This is the fundamental unit of time (in seconds) in terms of which frame timestamps are represented.
#define AV_CODEC_FLAG_QPEL
Use qpel MC.
#define NULL_IF_CONFIG_SMALL(x)
Return NULL if CONFIG_SMALL is true, otherwise the argument without modification.
int gop_size
the number of pictures in a group of pictures, or 0 for intra_only
AVFILTER_DEFINE_CLASS(mcdeint)
@ PARITY_TFF
top field first
int me_sub_cmp
subpixel motion estimation comparison function
attribute_deprecated int avcodec_encode_video2(AVCodecContext *avctx, AVPacket *avpkt, const AVFrame *frame, int *got_packet_ptr)
Encode a frame of video.
#define GET_SCORE_EDGE(j)
void av_dict_free(AVDictionary **pm)
Free all the memory allocated for an AVDictionary struct and all keys and values.
static int config_props(AVFilterLink *inlink)
#define i(width, name, range_min, range_max)
int w
agreed upon image width
int dia_size
ME diamond size & shape.
#define CONST(name, help, val, unit)
const char * name
Pad name.
enum AVPixelFormat pix_fmt
Pixel format, see AV_PIX_FMT_xxx.
static int filter_frame(AVFilterLink *inlink, AVFrame *inpic)
int strict_std_compliance
strictly follow the standard (MPEG-4, ...).
static const AVFilterPad mcdeint_inputs[]
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
attribute_deprecated AVFrame * coded_frame
the picture in the bitstream
main external API structure.
int h
agreed upon image height
static const AVFilterPad mcdeint_outputs[]
static av_cold void uninit(AVFilterContext *ctx)
int max_b_frames
maximum number of B-frames between non-B-frames Note: The output will be delayed by max_b_frames+1 re...
This structure stores compressed data.
int av_dict_set(AVDictionary **pm, const char *key, const char *value, int flags)
Set the given entry in *pm, overwriting an existing entry.
int width
picture width / height.
int linesize[AV_NUM_DATA_POINTERS]
For video, size in bytes of each picture line.
#define FF_QP2LAMBDA
factor to convert from H.263 QP to lambda
void av_init_packet(AVPacket *pkt)
Initialize optional fields of a packet with default values.