extra/f0detectionyin.m File Reference

Go to the source code of this file.

Functions

init variable compute d (tau) x1
 
 d2 (1+lag)
 
 if (length(mloc)>0) I
 
 if (length(I)>0) candf0lag
 
candf0lag-1 d2 ()
 
id f0lag ()
 
compute candidate frequency in Hz if (ac > 0.2)%voiced/unvoiced threshold f0=0
 

Variables

function f0
 
function fs
 
function ws
 
function minf0
 
function maxf0
 
maximum lag th = 0.1
 
set threshold d = zeros(maxlag,1)
 
init variable d2 = zeros(maxlag,1)
 
 cumsumx = sum(x1.^2)
 
 cumsumxl = cumsumx
 
 xy = xcorr(x(1:ws*2),x1)
 
for lag
 
end cumsum = 0
 
end limit the search to the target range minf0lag = 1+round(fs./minf0)
 
compute lag corresponding to minf0 maxf0lag = 1+round(fs./maxf0)
 
compute lag corresponding to maxf0 if(maxf0lag >1 &&maxf0lag< maxlag) d2(1 avoid lags shorter than maxf0lag end if(minf0lag >1 &&minf0lag< maxlag) d2(minf0lag avoid lags larger than minf0lag end find the best candidate mloc = 1 + find((d2(2:end-1)<d2(3:end)).*(d2(2:end-1)<d2(1:end-2)))
 
minima candf0lag = 0
 
 else [Y, I2] = min(d2(mloc))
 
 val = d2(candf0lag)
 
 rval = d2(candf0lag+1)
 
end end ac = min(d2)
 
 f0lag = candf0lag-1
 

Function Documentation

init variable compute d ( tau  )
d2 ( 1+  lag)
candf0lag-1 d2 ( )
virtual
id f0lag ( )
virtual
if ( length(mloc ,
 
)
if ( length(I)  ,
 
)
compute candidate frequency in Hz if ( ac  ,
0.  2 
)
pure virtual

Variable Documentation

end candf0lag = 0

Definition at line 36 of file extra/f0detectionyin.m.

end cumsum = 0

Definition at line 18 of file extra/f0detectionyin.m.

cumsumx = sum(x1.^2)

Definition at line 10 of file extra/f0detectionyin.m.

cumsumxl = cumsumx

Definition at line 11 of file extra/f0detectionyin.m.

set threshold d = zeros(maxlag,1)

Definition at line 6 of file extra/f0detectionyin.m.

Referenced by __attribute__(), adx_decode(), adx_encode(), allocStuff(), av_basename(), av_des_mac(), av_dirname(), av_expr_parse_and_eval(), av_find_nearest_q_idx(), av_flt2int(), av_inv_q(), av_parse_ratio(), av_strtod(), av_timecode_adjust_ntsc_framenum2(), av_timegm(), avcodec_get_context_defaults3(), avi_sync(), avio_close_dyn_buf(), avs_probe(), blend_image(), body(), build_color_map(), build_filter(), calculate_visual_weight(), cmp_direct_inline(), cmp_inline(), color_distance(), config(), copy_field(), count_colors(), decode_13(), decode_deep_tvdc32(), decode_mb_i(), decode_rle(), decode_subframe_fixed(), deInterlaceMedian(), delta_decode(), diff_pixels_mvi(), diff_planes(), dirac_decode_frame_internal(), do_a_deblock_C(), doHorizDefFilter_C(), doVertDefFilter(), doVertDefFilter_altivec(), dv_encode_video_segment(), dv_extract_audio(), dv_inject_audio(), dyn_buf_seek(), dyn_buf_write(), encode_frame(), encode_init(), encode_residual_fixed(), encode_thread(), epzs_motion_search2(), epzs_motion_search4(), epzs_motion_search_internal(), eval_expr(), exchange(), ff_asf_get_packet(), ff_big_div(), ff_check_pixfmt_descriptors(), ff_decode_dxt1(), ff_decode_dxt3(), ff_h264_chroma_dc_dequant_idct(), ff_init_mpadsp_tabs(), ff_printGUID(), ff_shrink22(), ff_shrink44(), ff_spatial_idwt2(), ff_urldecode(), ff_vector_fmul_add_altivec(), ff_vector_fmul_reverse_altivec(), filter_frame(), flac_lpc_16_c(), float_to_int16_altivec(), float_to_int16_stride_altivec(), flv_probe(), full_search(), funny_diamond_search(), generate_wave_table(), get_dc(), get_mb_score(), get_shift(), getCoeff(), getnbctxno(), getSSD(), h263_h_loop_filter_c(), h263_v_loop_filter_c(), h264_loop_filter_chroma(), h264_loop_filter_chroma_intra(), h264_loop_filter_luma(), h264_loop_filter_luma_intra(), h_block_filter(), hex_search(), horizX1Filter(), hpel_motion_search(), iff_probe(), init_pass2(), init_stream(), initFilter(), initPv(), interpol(), interpolate(), is_mv_diff_gt_3(), l2s_dia_search(), lavfi_read_packet(), lex_double(), logdb(), lowpass(), lpc_prediction(), lz_unpack(), main(), mix_core(), modify_qscale(), monoblack2Y_c(), monowhite2Y_c(), motion_search(), mp4_read_iods(), mp4_read_od(), mpc_probe(), mpeg4_decode_sprite_trajectory(), palToA_c(), palToY_c(), parse_number_or_die(), parse_primary(), picmemset(), picmemset_8bpp(), png_get_interlaced_row(), png_put_interlaced_row(), pred16x16_vertical(), predictor(), put_vector(), qpel_motion_search(), quant(), render_slice(), resampleCubic(), rgb12to15(), rgb12tobgr12(), rgb15to16(), rgb15to16_c(), rgb15to24(), rgb15to32(), rgb15to32_c(), rgb15tobgr24(), rgb15tobgr24_c(), rgb15tobgr32(), rgb16to15(), rgb16to15_c(), rgb16to24(), rgb16to32(), rgb16to32_c(), rgb16tobgr24(), rgb16tobgr24_c(), rgb16tobgr32(), rgb24to15(), rgb24to15_c(), rgb24to16(), rgb24to16_c(), rgb24tobgr15(), rgb24tobgr15_c(), rgb24tobgr16(), rgb24tobgr16_c(), rgb32to15(), rgb32to15_c(), rgb32to16(), rgb32to16_c(), rgb32tobgr15(), rgb32tobgr15_c(), rgb32tobgr16(), rgb32tobgr16_c(), ring2_test(), rle_uncompress(), rtcp_update_jitter(), sab_diamond_search(), sad_hpel_motion_search(), select_palette(), set_param(), set_params(), set_string_number(), sha1_transform(), sha256_transform(), shuffle_bytes_2103(), shuffle_bytes_2103_c(), small_diamond_search(), srt_write_packet(), ssd_plane(), store_slice2_c(), store_slice_c(), swri_noise_shaping(), synth_filter_float(), tempNoiseReducer(), tempNoiseReducer_altivec(), tm2_apply_deltas(), tm2_read_deltas(), tm2_update_block(), tta_probe(), umh_search(), update_offsets(), url_open_dyn_buf_internal(), v_block_filter(), var_diamond_search(), vc1_filter_line(), vc1_h_overlap_c(), vc1_h_s_overlap_c(), vc1_v_overlap_c(), vc1_v_s_overlap_c(), vertX1Filter(), video_audio_display(), vorbis_packet(), vu9_to_vu12(), vu9_to_vu12_c(), wmv2_mspel8_v_lowpass(), write_float_3d_array(), write_float_4d_array(), writer_print_time(), xa_decode(), xget_zpixmap(), yvu9_to_yuy2(), yvu9_to_yuy2_c(), zmbv_decode_xor_16(), zmbv_decode_xor_32(), and zmbv_decode_xor_8().

else[Y, I2] = min(d2(mloc))

Definition at line 42 of file extra/f0detectionyin.m.

Initial value:
= f0detectionyin(x,fs,ws,minf0,maxf0)
% x: input signal
function maxf0
Discrete Time axis x
function fs
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 the filter must be ready for frames arriving randomly on any input any filter with several inputs will most likely require some kind of queuing mechanism It is perfectly acceptable to have a limited queue and to drop frames when the inputs are too unbalanced request_frame This method is called when a frame is wanted on an output For an input
function ws
function minf0

Definition at line 1 of file extra/f0detectionyin.m.

f0lag = candf0lag-1

Definition at line 55 of file extra/f0detectionyin.m.

Definition at line 1 of file extra/f0detectionyin.m.

function maxf0

Definition at line 1 of file extra/f0detectionyin.m.

compute lag corresponding to minf0 maxf0lag = 1+round(fs./maxf0)

Definition at line 27 of file extra/f0detectionyin.m.

function minf0

Definition at line 1 of file extra/f0detectionyin.m.

end limit the search to the target range minf0lag = 1+round(fs./minf0)

Definition at line 26 of file extra/f0detectionyin.m.

compute lag corresponding to maxf0 if (maxf0lag>1 && maxf0lag<maxlag) d2(1 avoid lags shorter than maxf0lag end if (minf0lag>1 && minf0lag<maxlag) d2(minf0lag avoid lags larger than minf0lag end find the best candidate mloc = 1 + find((d2(2:end-1)<d2(3:end)).*(d2(2:end-1)<d2(1:end-2)))

Definition at line 35 of file extra/f0detectionyin.m.

rval = d2(candf0lag+1)

Definition at line 50 of file extra/f0detectionyin.m.

Referenced by decode_residues(), and ff_get_cpu_flags_x86().

maximum lag th = 0.1

Definition at line 5 of file extra/f0detectionyin.m.

const char const AVS_Value val = d2(candf0lag)

Definition at line 49 of file extra/f0detectionyin.m.

Referenced by add_entry1(), add_metadata_from_side_data(), add_opt(), adpcm_decode_frame(), alac_linear_predictor(), all_same(), arith2_get_number(), arith2_get_prob(), arith_get_bits(), arith_get_number(), arith_get_prob(), ascii_to_wc(), atomic_int_set_gcc(), atomic_int_set_suncc(), atomic_int_set_win32(), aura_decode_frame(), av_opt_get_key_value(), av_opt_set_defaults2(), av_read_image_line(), av_small_strptime(), av_write_image_line(), avio_rb16(), avio_rb24(), avio_rb32(), avio_rb64(), avio_rl16(), avio_rl24(), avio_rl32(), avio_rl64(), avisynth_open_file(), avpriv_atomic_int_set(), avpriv_atomic_ptr_cas(), aw_pulse_set1(), binkb_get_value(), compute_gammaval(), config_props(), create_default_qtables(), date_get_num(), dec_bark_env(), dec_gain(), decode_block(), decode_block_progressive(), decode_block_refinement(), decode_bmv_frame(), decode_clnpass(), decode_coeff(), decode_const_block_data(), decode_dc_progressive(), decode_dct(), decode_exp_lsp(), decode_fixed_sparse(), decode_frame(), decode_i_block(), decode_init_static(), decode_pivot(), decode_pixel(), decode_scale_factors(), decode_tile(), delta_decode(), dnxhd_mb_var_thread(), encode_ac_coeffs(), encode_block(), encode_frame(), estimate_sid_gain(), extend_code(), ff_amr_set_fixed_gain(), ff_ape_parse_tag(), ff_celp_lp_synthesis_filterf(), ff_h263_decode_motion(), ff_h264_decode_mb_cabac(), ff_h264_decode_mb_cavlc(), ff_id3v2_parse(), ff_lsp2polyf(), ff_mjpeg_encode_dc(), ff_mov_read_stsd_entries(), ff_mpeg1_encode_init(), ff_msmpeg4_encode_mb(), ff_mss12_model_update(), ff_poll_frame(), ff_rm_read_mdpr_codecdata(), ff_wmv2_decode_mb(), ff_wmv2_encode_mb(), ffio_read_varlen(), fill_rectangle(), filter_frame(), find_marker(), find_next_start_code(), frac_init(), get_aiff_header(), get_coeff(), get_coeff_bits(), get_dimension(), get_master_clock(), get_mvdata_interlaced(), get_utf8(), grab_read_header(), h261_decode_gob_header(), h261_encode_motion(), h263_decode_gob_header(), h263p_encode_umotion(), heap_sift(), hScale16To15_c(), hScale16To19_c(), hScale8To15_c(), hScale8To19_c(), hScale_altivec_real(), init_mv_penalty_and_fcode(), init_report(), inv_bits(), ivi_decode_blocks(), kmvc_decode_inter_8x8(), kmvc_decode_intra_8x8(), l1_unscale(), l2_unscale_group(), lag_decode_prob(), lag_get_rac(), latm_parse_packet(), loco_decode_plane(), loco_get_rice_param(), loco_update_rice_param(), lpc_prediction(), ls_encode_regular(), ls_encode_runterm(), mace_decode_frame(), main(), memset_float(), mmf_rate(), model256_update(), model_update(), mpeg1_encode_motion(), mpeg_decode_mb(), mpeg_decode_motion(), mpegts_write_pes(), mpegts_write_pmt(), mpegts_write_sdt(), msmpeg4v2_decode_motion(), msmpeg4v2_encode_motion(), msmpeg4v34_decode_mb(), mss4_decode_dct(), myrnd(), nelly_decode_block(), old_codec1(), open_output_file(), parse_ffconfig(), parse_int(), parse_key_value_pair(), parse_section_header(), parse_slave_options(), pp_get_mode_by_name_and_quality(), put16(), put_ebml_uint(), put_payload_header(), qpeg_decode_inter(), rac_get_bits(), rac_get_model256_sym(), rac_get_model_sym(), read_len_table(), read_table(), request_frame(), resample_one(), rl2_rle_decode(), sdt_cb(), set_param(), set_string_number(), smacker_decode_bigtree(), smka_decode_frame(), store_table(), swri_resample(), tag_tree_code(), tag_tree_decode(), tm2_get_token(), tscc2_decode_frame(), tscc2_decode_mb(), url_alloc_for_protocol(), utf8len(), v210_planar_unpack_c(), v410_decode_frame(), v410_encode_frame(), vble_restore_plane(), vble_unpack(), vc1_decode_b_mb(), vc1_decode_b_mb_intfi(), vc1_decode_b_mb_intfr(), vc1_decode_i_blocks(), vc1_decode_i_blocks_adv(), vc1_decode_p_mb(), vc1_decode_p_mb_intfi(), vc1_decode_p_mb_intfr(), vdpau_h264_decode_slice(), vdpau_mpeg_decode_slice(), vdpau_vc1_decode_slice(), vis_set_gsr(), vorbis_floor1_decode(), vp6_get_nb_null(), vp8_luma_dc_wht_dc_c(), wavesynth_synth_sample(), wma_decode_block(), wp_exp2(), write_pts(), X264_init(), xan_decode_chroma(), xan_huffman_decode(), xbm_decode_frame(), xwd_encode_frame(), yuv2NBPS(), yuv2plane1_10_c_template(), yuv2plane1_16_c_template(), yuv2plane1_8_c(), yuv2planeX_10_c_template(), yuv2planeX_16_altivec(), and yuv2planeX_16_c_template().