vf_mcdeint.c File Reference
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <inttypes.h>
#include <math.h>
#include "mp_msg.h"
#include "cpudetect.h"
#include "libavutil/common.h"
#include "libavutil/internal.h"
#include "libavutil/intreadwrite.h"
#include "libavcodec/avcodec.h"
#include "libavcodec/dsputil.h"
#include "img_format.h"
#include "mp_image.h"
#include "vf.h"
#include "av_helpers.h"
Include dependency graph for vf_mcdeint.c:

Go to the source code of this file.

Data Structures

struct  vf_priv_s
 

Macros

#define MIN(a, b)   ((a) > (b) ? (b) : (a))
 
#define MAX(a, b)   ((a) < (b) ? (b) : (a))
 
#define ABS(a)   ((a) > 0 ? (a) : (-(a)))
 
#define CHECK(j)
 

Functions

static void filter (struct vf_priv_s *p, uint8_t *dst[3], uint8_t *src[3], int dst_stride[3], int src_stride[3], int width, int height)
 
 if (diff0+diff1 > 0) temp-
 
 for (y=0;y< h;y++)
 
static int config (struct vf_instance *vf, int width, int height, int d_width, int d_height, unsigned int flags, unsigned int outfmt)
 
static void get_image (struct vf_instance *vf, mp_image_t *mpi)
 
static int put_image (struct vf_instance *vf, mp_image_t *mpi, double pts)
 
static void uninit (struct vf_instance *vf)
 
static int query_format (struct vf_instance *vf, unsigned int fmt)
 
static int vf_open (vf_instance_t *vf, char *args)
 

Variables

else temp = (diff0 + diff1 + ABS( ABS(diff0) - ABS(diff1) )/2)/2
 
 filp [0]
 
else dst [i][x+y *dst_stride[i]] = p->frame_dec->data[i][x + y*fils]
 
parity = 1
 
const vf_info_t ff_vf_info_mcdeint
 

Macro Definition Documentation

#define ABS (   a)    ((a) > 0 ? (a) : (-(a)))

Definition at line 74 of file vf_mcdeint.c.

Referenced by filter().

#define CHECK (   j)
Value:
{ int score= ABS(srcp[-srcs-1+(j)] - srcp[+srcs-1-(j)])\
+ ABS(srcp[-srcs +(j)] - srcp[+srcs -(j)])\
+ ABS(srcp[-srcs+1+(j)] - srcp[+srcs+1-(j)]);\
if(score < spatial_score){\
spatial_score= score;\
diff0= filp[-fils+(j)] - srcp[-srcs+(j)];\
diff1= filp[+fils-(j)] - srcp[+srcs-(j)];
if(diff0+diff1 > 0) temp-
BYTE int const BYTE * srcp
Definition: avisynth_c.h:713
filp[0]
Definition: vf_mcdeint.c:153
#define ABS(a)
Definition: vf_mcdeint.c:74

Referenced by filter().

#define MAX (   a,
  b 
)    ((a) < (b) ? (b) : (a))

Definition at line 73 of file vf_mcdeint.c.

#define MIN (   a,
  b 
)    ((a) > (b) ? (b) : (a))

Definition at line 72 of file vf_mcdeint.c.

Function Documentation

static int config ( struct vf_instance vf,
int  width,
int  height,
int  d_width,
int  d_height,
unsigned int  flags,
unsigned int  outfmt 
)
static

Definition at line 182 of file vf_mcdeint.c.

Referenced by vf_open().

static void filter ( struct vf_priv_s p,
uint8_t dst[3],
uint8_t src[3],
int  dst_stride[3],
int  src_stride[3],
int  width,
int  height 
)
static

Definition at line 94 of file vf_mcdeint.c.

Referenced by put_image().

for ( )

Definition at line 164 of file vf_mcdeint.c.

static void get_image ( struct vf_instance vf,
mp_image_t mpi 
)
static

Definition at line 241 of file vf_mcdeint.c.

Referenced by vf_open().

if ( diff0+  diff1,
 
)
static int put_image ( struct vf_instance vf,
mp_image_t mpi,
double  pts 
)
static

Definition at line 259 of file vf_mcdeint.c.

Referenced by vf_open().

static int query_format ( struct vf_instance vf,
unsigned int  fmt 
)
static

Definition at line 300 of file vf_mcdeint.c.

Referenced by vf_open().

static void uninit ( struct vf_instance vf)
static

Definition at line 278 of file vf_mcdeint.c.

Referenced by vf_open().

static int vf_open ( vf_instance_t vf,
char *  args 
)
static

Definition at line 312 of file vf_mcdeint.c.

Variable Documentation

else dst[i][x+y *dst_stride[i]] = p->frame_dec->data[i][x + y*fils]

Definition at line 160 of file vf_mcdeint.c.

Referenced by __attribute__(), abgrToA_c(), add_frame_default(), add_metadata(), adpcm_encode_frame(), adx_encode_frame(), av_base64_decode(), av_base64_encode(), av_blowfish_crypt(), av_bprintf(), av_get_string(), av_opt_get(), av_opt_get_image_size(), av_opt_set(), av_opt_set_bin(), av_picture_pad(), av_size_mult(), av_xtea_crypt(), avfilter_link(), avg_no_rnd_vc1_chroma_mc8_c(), avpriv_color_frame(), avui_encode_frame(), bethsoftvid_decode_frame(), bgr24ToY_c(), bink_decode_plane(), binkb_decode_plane(), binkb_read_bundle(), blend_frame(), blockCopy(), bmp_decode_frame(), bmp_encode_frame(), bswap16Y_c(), cin_decode_huffman(), cin_decode_lzss(), cmp_direct_inline(), cmv_decode_inter(), cmv_decode_intra(), copy(), copy_backptr(), copy_block(), copy_block16(), copy_block2(), copy_block4(), copy_block8(), copy_cell(), copy_frame(), copy_frame_default(), copy_output(), create_lut(), create_weave_frame(), DECLARE_ALIGNED(), decode(), decode8x8(), decode_0(), decode_5(), decode_555(), decode_argb_frame(), decode_bmv_frame(), decode_cell_data(), decode_channel(), decode_const_block_data(), decode_frame(), decode_hextile(), decode_hybrid(), decode_i2_frame(), decode_mvc1(), decode_mvc2(), decode_p_frame(), decode_region_intra(), decode_rgb24_frame(), decode_tile(), decode_update_thread_context(), deInterlaceMedian(), denoise_spatial(), describe_frame_to_str(), dfa_decode_frame(), doTest(), encode_frame(), extract_even(), ff_convert_dither(), ff_filter_frame_framed(), ff_h263_round_chroma(), ff_h264_add_pixels4(), ff_h264_add_pixels8(), ff_h264_decode_nal(), ff_h264_idct8_add(), ff_h264_idct8_add4(), ff_h264_idct8_dc_add(), ff_h264_idct_add(), ff_h264_idct_add16(), ff_h264_idct_add16intra(), ff_h264_idct_dc_add(), ff_ivi_inverse_haar_8x8(), ff_ivi_inverse_slant_4x4(), ff_ivi_inverse_slant_8x8(), ff_metadata_conv(), ff_mjpeg_decode_frame(), ff_mjpeg_find_marker(), ff_mpeg_update_thread_context(), ff_shrink22(), ff_shrink44(), ff_snow_inner_add_yblock(), ff_thread_release_buffer(), ff_vc1_decode_blocks(), ff_vf_mpi_clear(), fill_buffer(), fill_samples(), filter(), filter_edges(), filter_edges_16bit(), filter_frame(), filter_line_c(), filter_line_c_16bit(), for(), geq_filter_frame(), get_4block_rd(), get_block_rd(), get_dc(), get_format(), get_number(), h264_handle_packet(), hl_decode_mb(), hl_decode_mb_idct_luma(), hl_decode_mb_predict_luma(), hScale16To19_c(), hScale8To19_c(), id3v2_3_metadata_split_date(), idct_put(), ilpack(), insert_mb_into_sb(), intra_predict(), iterative_me(), ivi_process_empty_tile(), lag_decode_frame(), load_input_picture(), lumRangeFromJpeg16_c(), lumRangeToJpeg16_c(), main(), mem2agpcpy_pic(), memcpy_pic2(), memzero_align8(), mimic_decode_update_thread_context(), mix_2_to_1_s16p_flt_c(), mix_2_to_1_s16p_q8_c(), MIX_FUNC_GENERIC(), mjpeg_copy_block(), monoblack2Y_c(), monowhite2Y_c(), motion_compensation(), mov_read_mac_string(), mss2_decode_frame(), mss3_decode_frame(), mss4_decode_frame(), mss4_decode_image_block(), mv_pred_sym(), old_codec1(), old_codec37(), old_codec47(), opcode_0xf7(), opcode_0xf8(), pack_li_1_C(), paf_vid_decode(), palToA_c(), palToRgbWrapper(), palToY_c(), parse_h264_sdp_line(), pcm_encode_frame(), pcx_rle_encode(), planar_rgb16_to_y(), planar_rgb_to_y(), planarToNv12Wrapper(), planarToUyvyWrapper(), planarToYuy2Wrapper(), png_choose_filter(), png_get_interlaced_row(), png_put_interlaced_row(), postProcess(), propagate_block_data(), put_image(), qpeg_decode_inter(), raw_decode(), read_argb_line(), read_dcs(), read_packet(), read_rgb24_component_line(), read_ttag(), reorder_block(), reorder_pixels(), request_frame(), resample_one(), rgb15to16(), rgb15to16_c(), rgb15to24(), rgb15to32(), rgb15to32_c(), rgb15tobgr24(), rgb15tobgr24_c(), rgb15tobgr32(), rgb16to15(), rgb16to15_c(), rgb16to24(), rgb16to32(), rgb16to32_c(), rgb16tobgr24(), rgb16tobgr32(), rgb24to15(), rgb24to16(), rgb24tobgr15(), rgb24tobgr16(), rgb24tobgr24(), rgb24tobgr32(), rgb24tobgr32_c(), rgb24ToY_c(), rgb32to15(), rgb32to16(), rgb32tobgr15(), rgb32tobgr16(), rgb32tobgr24(), rgb32tobgr24_c(), rgba64ToA_c(), rgbaToA_c(), rv34_decode_inter_macroblock(), rv34_output_i16x16(), rv34_output_intra(), rv34_pred_4x4_block(), rv40_decode_intra_types(), sami_paragraph_to_ass(), sdp_parse_fmtp_config_h264(), seqvideo_decode(), set_number(), shuffle_bytes_2103(), snow_horizontal_compose_liftS_lead_out(), softthresh_c(), store_slice_c(), sub2video_update(), svq1_decode_block_intra(), svq1_decode_block_non_intra(), svq1_motion_inter_4v_block(), svq1_motion_inter_block(), svq1_skip_block(), swri_noise_shaping(), swri_resample(), targa_decode_rle(), tempNoiseReducer(), tm2_decode_blocks(), tmv_decode_frame(), toright(), uninit_options(), unpack(), upcase_string(), utvideo_encode_frame(), v308_encode_frame(), v408_encode_frame(), v410_encode_frame(), vble_restore_plane(), vc1_apply_p_h_loop_filter(), vc1_apply_p_v_loop_filter(), vc1_decode_i_blocks(), vc1_inv_trans_4x4_c(), vc1_inv_trans_4x8_c(), vc1_inv_trans_8x4_c(), vc1_inv_trans_8x8_c(), VMUL2(), VMUL2S(), VMUL4(), VMUL4S(), vp3_update_thread_context(), vp56_mc(), vp6_filter(), vp6_filter_diag2(), vp8_decode_mb_row_no_filter(), vp8_filter_mb_row(), vp8_mc_luma(), wavpack_decode_block(), wmv2_mspel8_h_lowpass(), wmv2_mspel8_v_lowpass(), write16x4(), write_option(), wv_unpack_mono(), wv_unpack_stereo(), xbm_decode_frame(), xwd_decode_frame(), y41p_encode_frame(), yae_flush(), yae_load_frag(), yae_overlap_add(), yuv2yuyv422_1(), yuv420_bgr32(), yuv420_rgb32(), yuv422ptouyvy(), yuv422pToUyvyWrapper(), yuv422ptoyuy2(), yuv422pToYuy2Wrapper(), yuv4_encode_frame(), yuvPlanartouyvy(), yuvPlanartoyuy2(), yuy2toyv12(), yv12touyvy(), yv12touyvy_unscaled_altivec(), yv12toyuy2(), yv12toyuy2_unscaled_altivec(), yvu9_to_yuy2(), and zerocodec_decode_frame().

const vf_info_t ff_vf_info_mcdeint
Initial value:
= {
"motion compensating deinterlacer",
"mcdeint",
"Michael Niedermayer",
"",
}
NULL
Definition: eval.c:55
static int vf_open(vf_instance_t *vf, char *args)
Definition: vf_mcdeint.c:312

Definition at line 333 of file vf_mcdeint.c.

filp[0]
Initial value:
=
dst[i][x + y*dst_stride[i]]= temp > 255U ? ~(temp>>31) : temp
else temp
Definition: vf_mcdeint.c:148
Discrete Time axis x
#define U(x)
synthesis window for stochastic i
function y
Definition: D.m:1
else dst[i][x+y *dst_stride[i]]
Definition: vf_mcdeint.c:160

Definition at line 153 of file vf_mcdeint.c.

Referenced by filter().

p parity = 1
else temp = (diff0 + diff1 + ABS( ABS(diff0) - ABS(diff1) )/2)/2

Definition at line 148 of file vf_mcdeint.c.

Referenced by a64_compress_colram(), at1_subband_synthesis(), av_aes_init(), av_opencl_buffer_read_image(), av_opencl_buffer_write_image(), backward_filter(), bink_idct_c(), bink_idct_put_c(), bit8x8_c(), biweight_h264_W_altivec(), comp_interp_index(), compile_kernel_file(), dct_max8x8_c(), dct_sad8x8_c(), decode_8_pulses_31bits(), decode_plane(), decode_rgb_frame(), ff_atrac_iqmf(), ff_block_permute(), ff_ea_idct_put_c(), ff_faandct(), ff_faandct248(), ff_faanidct(), ff_faanidct_add(), ff_faanidct_put(), ff_h264_chroma422_dc_dequant_idct(), ff_h264_luma_dc_dequant_idct(), ff_mp_image_alloc_planes(), ff_simple_idct_vis(), ff_svq3_luma_dc_dequant_idct_c(), ff_vorbis_inverse_coupling(), ffurl_register_protocol(), find_new_headers(), flac_parse(), flac_parse_close(), formant_postfilter(), gain_scale(), gen_fcb_excitation(), get_tilt_comp(), h261_loop_filter(), h264_deblock_q1(), hadamard8_diff8x8_c(), hadamard8_intra8x8_c(), handle_file(), http_write(), hybrid6_cx(), idct(), idct_put(), idctRowCondDC(), imdct_and_windowing(), inverse_quant(), ls_encode_runterm(), ls_get_code_runterm(), main(), matroska_parse_laces(), postfilter(), pp_get_mode_by_name_and_quality(), quant_psnr8x8_c(), rd8x8_c(), read32(), read_time(), render_slice(), rtmp_server_handshake(), rv34_idct_add_c(), rv34_inv_transform_noround_c(), sbr_gain_calc(), sbr_make_f_derived(), sbr_make_f_master(), sub_left_prediction(), svq1_encode_frame(), svq1_encode_plane(), unpack_bitstream(), vc1_inv_trans_8x8_c(), vorbis_residue_decode_internal(), and weight_h264_W_altivec().