ffmpeg/libavfilter
Guo, Yejun 71e28c5422 dnn/native: add native support for minimum
it can be tested with model file generated with below python script:
import tensorflow as tf
import numpy as np
import imageio

in_img = imageio.imread('input.jpg')
in_img = in_img.astype(np.float32)/255.0
in_data = in_img[np.newaxis, :]

x = tf.placeholder(tf.float32, shape=[1, None, None, 3], name='dnn_in')
x1 = tf.minimum(0.7, x)
x2 = tf.maximum(x1, 0.4)
y = tf.identity(x2, name='dnn_out')

sess=tf.Session()
sess.run(tf.global_variables_initializer())

graph_def = tf.graph_util.convert_variables_to_constants(sess, sess.graph_def, ['dnn_out'])
tf.train.write_graph(graph_def, '.', 'image_process.pb', as_text=False)

print("image_process.pb generated, please use \
path_to_ffmpeg/tools/python/convert.py to generate image_process.model\n")

output = sess.run(y, feed_dict={x: in_data})
imageio.imsave("out.jpg", np.squeeze(output))

Signed-off-by: Guo, Yejun <yejun.guo@intel.com>
2020-05-08 15:22:27 +08:00
..
aarch64
dnn dnn/native: add native support for minimum 2020-05-08 15:22:27 +08:00
opencl avfilter: add pad opencl filter 2020-02-14 09:59:27 +01:00
tests
x86 avfilter/x86/vf_v360_init: add missing cases 2020-04-02 12:25:37 +02:00
.gitignore
Makefile avfilter: add asubboost filter 2020-04-30 12:18:36 +02:00
aeval.c remove CHAR_MIN/CHAR_MAX usage 2020-03-17 22:46:36 +01:00
af_acontrast.c
af_acopy.c
af_acrossover.c avfilter/af_acrossover: Check sscanf() return value 2020-04-17 16:56:13 +02:00
af_acrusher.c
af_adeclick.c
af_adelay.c avfilter/af_adelay: Check sscanf() return value 2020-05-01 06:36:36 +08:00
af_aderivative.c
af_aecho.c
af_aemphasis.c
af_afade.c
af_afftdn.c
af_afftfilt.c avfilter/af_afftfilt: fix memory leaks on error 2020-02-09 15:49:09 +01:00
af_afir.c
af_afir.h
af_aformat.c
af_agate.c
af_aiir.c
af_alimiter.c
af_amerge.c
af_amix.c avfilter/af_amix: make weights option runtime configured 2020-04-29 19:18:25 +02:00
af_amultiply.c
af_anequalizer.c avfilter/af_anequalizer: fix off by one in reallocation 2020-03-14 19:39:04 +01:00
af_anlmdn.c
af_anlmdndsp.h
af_anlms.c
af_anull.c
af_apad.c
af_aphaser.c
af_apulsator.c
af_aresample.c
af_arnndn.c
af_asetnsamples.c
af_asetrate.c
af_ashowinfo.c
af_asoftclip.c avfilter/af_asoftclip: add support for commands 2020-02-09 10:59:20 +01:00
af_asr.c
af_astats.c avfilter/af_astats: add noise floor count stat 2020-04-17 13:28:01 +02:00
af_asubboost.c avfilter: add asubboost filter 2020-04-30 12:18:36 +02:00
af_atempo.c
af_axcorrelate.c
af_biquads.c
af_bs2b.c
af_channelmap.c
af_channelsplit.c
af_chorus.c
af_compand.c
af_compensationdelay.c
af_crossfeed.c avfilter/af_crossfeed: make options runtime configurable 2020-04-30 12:18:36 +02:00
af_crystalizer.c avfilter/af_crystalizer: add slice threading support 2020-02-07 19:26:39 +01:00
af_dcshift.c
af_deesser.c
af_drmeter.c
af_dynaudnorm.c
af_earwax.c
af_extrastereo.c
af_firequalizer.c
af_flanger.c
af_haas.c
af_hdcd.c
af_headphone.c
af_join.c
af_ladspa.c
af_loudnorm.c s->target_i and global are in dB but s->target_tp and true_peak are 2020-05-01 21:36:07 -07:00
af_lv2.c
af_mcompand.c
af_pan.c remove CHAR_MIN/CHAR_MAX usage 2020-03-17 22:46:36 +01:00
af_replaygain.c
af_resample.c
af_rubberband.c
af_sidechaincompress.c
af_silencedetect.c
af_silenceremove.c
af_sofalizer.c
af_stereotools.c
af_stereowiden.c
af_superequalizer.c
af_surround.c
af_tremolo.c
af_vibrato.c
af_volume.c
af_volume.h
af_volumedetect.c
all_channel_layouts.inc
allfilters.c avfilter: add asubboost filter 2020-04-30 12:18:36 +02:00
asink_anullsink.c
asrc_afirsrc.c avfilter: add afirsrc filter 2020-02-07 17:07:30 +01:00
asrc_anoisesrc.c
asrc_anullsrc.c
asrc_flite.c remove CHAR_MIN/CHAR_MAX usage 2020-03-17 22:46:36 +01:00
asrc_hilbert.c
asrc_sinc.c
asrc_sine.c
atadenoise.h
audio.c
audio.h
avf_abitscope.c
avf_ahistogram.c
avf_aphasemeter.c
avf_avectorscope.c
avf_concat.c
avf_showcqt.c remove CHAR_MIN/CHAR_MAX usage 2020-03-17 22:46:36 +01:00
avf_showcqt.h
avf_showfreqs.c
avf_showspatial.c
avf_showspectrum.c
avf_showvolume.c remove CHAR_MIN/CHAR_MAX usage 2020-03-17 22:46:36 +01:00
avf_showwaves.c
avfilter.c
avfilter.h
avfiltergraph.c
avfilterres.rc
bbox.c
bbox.h
blend.h
boxblur.c
boxblur.h
bufferqueue.h
buffersink.c
buffersink.h
buffersrc.c
buffersrc.h
bwdif.h
colorspace.c
colorspace.h
colorspacedsp.c
colorspacedsp.h
colorspacedsp_template.c
colorspacedsp_yuv2yuv_template.c
convolution.h
deshake.h
dnn_interface.h
drawutils.c
drawutils.h
ebur128.c avfilter/ebur128: prefer to use variable instead of type for sizeof 2020-04-09 15:03:36 +02:00
ebur128.h
f_bench.c
f_cue.c
f_drawgraph.c remove CHAR_MIN/CHAR_MAX usage 2020-03-17 22:46:36 +01:00
f_ebur128.c
f_graphmonitor.c
f_interleave.c avfilter/f_interleave: no need to check for inlink eof if non-empty queue 2020-04-25 13:35:22 +02:00
f_loop.c
f_metadata.c
f_perms.c
f_realtime.c
f_reverse.c
f_select.c
f_sendcmd.c avfilter/f_sendcmd: add more useful variables 2020-03-13 17:19:33 +01:00
f_sidedata.c
f_streamselect.c
f_zmq.c
fifo.c
filters.h
formats.c
formats.h
framepool.c
framepool.h
framequeue.c
framequeue.h
framerate.h
framesync.c
framesync.h
gblur.h
generate_wave_table.c
generate_wave_table.h
glslang.cpp lavfi: add Vulkan filtering framework 2020-02-04 23:19:48 +00:00
glslang.h lavfi: add Vulkan filtering framework 2020-02-04 23:19:48 +00:00
gradfun.h
graphdump.c
graphparser.c
hermite.h
hflip.h
internal.h
lavfutils.c
lavfutils.h
libavfilter.v
limiter.h
log2_tab.c
lswsutils.c
lswsutils.h
maskedclamp.h
maskedmerge.h
median.h avfilter/vf_median: implement percentile option 2020-02-12 11:27:28 +01:00
median_template.c
motion_estimation.c
motion_estimation.h
opencl.c avfilter/opencl: use av_fopen_utf8() 2020-02-14 21:49:47 +01:00
opencl.h
opencl_source.h avfilter: add pad opencl filter 2020-02-14 09:59:27 +01:00
phase_template.c avfilter/vf_phase: add >8 bit support 2020-02-15 12:18:51 +01:00
psnr.h
pthread.c
qsvvpp.c
qsvvpp.h
removegrain.h
scale_eval.c
scale_eval.h
scene_sad.c
scene_sad.h
setpts.c
settb.c
signature.h
signature_lookup.c
split.c
src_movie.c remove CHAR_MIN/CHAR_MAX usage 2020-03-17 22:46:36 +01:00
ssim.h avfilter/vf_ssim: improve precision 2020-02-04 18:28:04 +01:00
stereo3d.h
thread.h
threshold.h
tinterlace.h
transform.c
transform.h
transpose.h
trim.c
unsharp.h
v360.h avfilter/vf_v360: add lagrange9 interpolation 2020-04-02 12:25:37 +02:00
vaapi_vpp.c
vaapi_vpp.h
vaf_spectrumsynth.c
version.h avfilter: add asubboost filter 2020-04-30 12:18:36 +02:00
vf_addroi.c
vf_alphamerge.c avfilter/vf_alphamerge: add AVClass to private context 2020-02-08 21:54:45 +01:00
vf_amplify.c
vf_aspect.c avfilter/vf_aspect: Fix integer overflow in compute_dar() 2020-02-16 15:13:10 +01:00
vf_atadenoise.c
vf_avgblur.c
vf_avgblur_opencl.c
vf_avgblur_vulkan.c lavfi: add an avgblur_vulkan filter 2020-02-04 23:19:48 +00:00
vf_bbox.c
vf_bilateral.c
vf_bitplanenoise.c
vf_blackdetect.c doc/filters: clarify metadata and logging for blackdetect 2020-04-13 11:23:24 +05:30
vf_blackframe.c
vf_blend.c remove CHAR_MIN/CHAR_MAX usage 2020-03-17 22:46:36 +01:00
vf_bm3d.c
vf_boxblur.c
vf_bwdif.c
vf_cas.c avfilter/vf_cas: Remove superfluous ; 2020-02-29 22:31:01 +01:00
vf_chromaber_vulkan.c lavfi: add an chromaber_vulkan filter 2020-02-04 23:19:48 +00:00
vf_chromakey.c remove CHAR_MIN/CHAR_MAX usage 2020-03-17 22:46:36 +01:00
vf_chromashift.c
vf_ciescope.c
vf_codecview.c
vf_colorbalance.c
vf_colorchannelmixer.c
vf_colorconstancy.c
vf_colorkey.c remove CHAR_MIN/CHAR_MAX usage 2020-03-17 22:46:36 +01:00
vf_colorkey_opencl.c remove CHAR_MIN/CHAR_MAX usage 2020-03-17 22:46:36 +01:00
vf_colorlevels.c avfilter/vf_colorlevels: add support for commands 2020-02-11 14:19:56 +01:00
vf_colormatrix.c
vf_colorspace.c
vf_convolution.c
vf_convolution_opencl.c
vf_convolve.c avfilter/vf_convolve: reset fft/ifft pointers after free 2020-02-25 17:35:09 +01:00
vf_copy.c
vf_coreimage.m
vf_cover_rect.c
vf_crop.c remove CHAR_MIN/CHAR_MAX usage 2020-03-17 22:46:36 +01:00
vf_cropdetect.c
vf_curves.c
vf_datascope.c avfilter/vf_pixscope: also show standard deviation of zoomed area 2020-04-26 12:27:36 +02:00
vf_dctdnoiz.c
vf_deband.c
vf_deblock.c
vf_decimate.c
vf_dedot.c avfilter/vf_dedot: Fix leak of AVFrame if making it writable fails 2020-02-11 00:03:44 +01:00
vf_deflicker.c
vf_deinterlace_qsv.c
vf_deinterlace_vaapi.c lavfi/vf_*_vaapi: Fix error case 2020-02-09 20:36:45 +00:00
vf_dejudder.c
vf_delogo.c avfilter/delogo: correct indentation for option show. 2020-04-11 11:46:48 +05:30
vf_derain.c avfilter/vf_derain.c: put all the calculation in model file. 2020-04-07 11:04:47 +08:00
vf_deshake.c lavf, lavfi: Remove uses of sizeof(char). 2020-04-04 23:21:14 +02:00
vf_deshake_opencl.c lavfi/deshake_opencl: Do not use bool, powerpc does not like it. 2020-04-01 15:48:19 +02:00
vf_despill.c
vf_detelecine.c
vf_displace.c
vf_dnn_processing.c avfilter/vf_dnn_processing.c: fix typo for the linesize of dnn data 2020-04-07 11:03:25 +08:00
vf_drawbox.c remove CHAR_MIN/CHAR_MAX usage 2020-03-17 22:46:36 +01:00
vf_drawtext.c avfilter/vf_drawtext: only test available exceptions 2020-04-09 00:59:21 +02:00
vf_edgedetect.c
vf_elbg.c
vf_entropy.c
vf_eq.c remove CHAR_MIN/CHAR_MAX usage 2020-03-17 22:46:36 +01:00
vf_eq.h
vf_extractplanes.c
vf_fade.c remove CHAR_MIN/CHAR_MAX usage 2020-03-17 22:46:36 +01:00
vf_fftdnoiz.c
vf_fftfilt.c remove CHAR_MIN/CHAR_MAX usage 2020-03-17 22:46:36 +01:00
vf_field.c
vf_fieldhint.c avfilter/vf_fieldhint: use av_fopen_utf8() 2020-02-14 21:47:55 +01:00
vf_fieldmatch.c
vf_fieldorder.c
vf_fillborders.c
vf_find_rect.c
vf_floodfill.c
vf_format.c
vf_fps.c
vf_framepack.c
vf_framerate.c
vf_framestep.c
vf_freezedetect.c
vf_freezeframes.c
vf_frei0r.c
vf_fspp.c
vf_fspp.h
vf_gblur.c
vf_geq.c remove CHAR_MIN/CHAR_MAX usage 2020-03-17 22:46:36 +01:00
vf_gradfun.c
vf_hflip.c
vf_histeq.c
vf_histogram.c
vf_hqdn3d.c
vf_hqdn3d.h
vf_hqx.c
vf_hue.c avfilter/hue: fix range in comment 2020-03-24 15:04:52 +05:30
vf_hwdownload.c
vf_hwmap.c
vf_hwupload.c lavfi/vf_hwupload: Add support for HW -> HW transfers 2020-02-04 23:19:48 +00:00
vf_hwupload_cuda.c lavfi/vf_hwupload: Add support for HW -> HW transfers 2020-02-04 23:19:48 +00:00
vf_hysteresis.c
vf_idet.c
vf_idet.h
vf_il.c
vf_kerndeint.c
vf_lagfun.c
vf_lenscorrection.c
vf_lensfun.c
vf_libopencv.c
vf_libvmaf.c
vf_limiter.c
vf_lumakey.c
vf_lut.c
vf_lut2.c
vf_lut3d.c avfilter/vf_lut3d: use av_fopen_utf8() 2020-02-14 21:44:38 +01:00
vf_maskedclamp.c avfilter/vf_maskedclamp: make C version consistent with ASM one 2020-02-08 10:46:37 +01:00
vf_maskedmerge.c
vf_maskedminmax.c
vf_maskedthreshold.c avfilter: add maskedthreshold filter 2020-04-18 12:34:49 +02:00
vf_maskfun.c
vf_mcdeint.c
vf_median.c avfilter/vf_median: implement percentile option 2020-02-12 11:27:28 +01:00
vf_mergeplanes.c
vf_mestimate.c
vf_midequalizer.c
vf_minterpolate.c
vf_misc_vaapi.c lavfi/vf_*_vaapi: Fix error case 2020-02-09 20:36:45 +00:00
vf_mix.c avfilter/vf_mix: Check sscanf() return value 2020-05-01 06:36:36 +08:00
vf_mpdecimate.c
vf_neighbor.c
vf_neighbor_opencl.c
vf_nlmeans.c
vf_nlmeans.h
vf_nlmeans_opencl.c
vf_nnedi.c
vf_noise.c
vf_noise.h
vf_normalize.c remove CHAR_MIN/CHAR_MAX usage 2020-03-17 22:46:36 +01:00
vf_null.c
vf_ocr.c
vf_overlay.c remove CHAR_MIN/CHAR_MAX usage 2020-03-17 22:46:36 +01:00
vf_overlay.h
vf_overlay_cuda.c avfilter: add vf_overlay_cuda 2020-03-28 18:39:40 +01:00
vf_overlay_cuda.cu avfilter: add vf_overlay_cuda 2020-03-28 18:39:40 +01:00
vf_overlay_opencl.c
vf_overlay_qsv.c
vf_overlay_vulkan.c overlay_vulkan: add support for overlaying images with an alpha channel 2020-04-23 18:23:45 +01:00
vf_owdenoise.c
vf_pad.c remove CHAR_MIN/CHAR_MAX usage 2020-03-17 22:46:36 +01:00
vf_pad_opencl.c avfilter: add pad opencl filter 2020-02-14 09:59:27 +01:00
vf_palettegen.c remove CHAR_MIN/CHAR_MAX usage 2020-03-17 22:46:36 +01:00
vf_paletteuse.c avfilter/vf_paletteuse: Forward error codes 2020-03-24 20:14:08 +01:00
vf_perspective.c
vf_phase.c avfilter/vf_phase: add >8 bit support 2020-02-15 12:18:51 +01:00
vf_photosensitivity.c
vf_pixdesctest.c
vf_pp.c
vf_pp7.c
vf_pp7.h
vf_premultiply.c
vf_procamp_vaapi.c lavfi/vf_*_vaapi: Fix error case 2020-02-09 20:36:45 +00:00
vf_program_opencl.c
vf_pseudocolor.c
vf_psnr.c
vf_pullup.c
vf_pullup.h
vf_qp.c
vf_random.c
vf_readeia608.c
vf_readvitc.c
vf_remap.c avfilter/vf_remap: add fill color option 2020-02-14 13:19:05 +01:00
vf_removegrain.c
vf_removelogo.c
vf_repeatfields.c
vf_rotate.c remove CHAR_MIN/CHAR_MAX usage 2020-03-17 22:46:36 +01:00
vf_sab.c
vf_scale.c
vf_scale_cuda.c
vf_scale_cuda.cu
vf_scale_npp.c
vf_scale_qsv.c lavfi/scale_qsv: Fix a format specifier for a variable of type int. 2020-04-04 23:18:18 +02:00
vf_scale_vaapi.c lavfi/vf_*_vaapi: Fix error case 2020-02-09 20:36:45 +00:00
vf_scale_vulkan.c scale_vulkan: take frame cropping parameters in account when scaling 2020-04-23 18:23:45 +01:00
vf_scroll.c
vf_selectivecolor.c remove CHAR_MIN/CHAR_MAX usage 2020-03-17 22:46:36 +01:00
vf_separatefields.c
vf_setparams.c
vf_showinfo.c avfilter/vf_showinfo: limit the max number of timecode 2020-03-28 19:21:11 +01:00
vf_showpalette.c
vf_shuffleframes.c
vf_shuffleplanes.c
vf_signalstats.c
vf_signature.c
vf_smartblur.c
vf_spp.c
vf_spp.h
vf_sr.c avfilter/vf_sr.c: refine code to use AVPixFmtDescriptor.log2_chroma_h/w 2020-03-03 15:28:59 +08:00
vf_ssim.c avfilter/vf_ssim: improve precision 2020-02-04 18:28:04 +01:00
vf_stack.c
vf_stereo3d.c
vf_subtitles.c remove CHAR_MIN/CHAR_MAX usage 2020-03-17 22:46:36 +01:00
vf_super2xsai.c
vf_swaprect.c
vf_swapuv.c
vf_telecine.c avfilter/vf_telecine: avoid possible null-pointer dereference 2020-04-14 12:12:42 +02:00
vf_threshold.c
vf_thumbnail.c avfilter/vf_thumbnail: fix possible crash on error 2020-02-10 15:46:42 +01:00
vf_thumbnail_cuda.c
vf_thumbnail_cuda.cu
vf_tile.c
vf_tinterlace.c
vf_tonemap.c
vf_tonemap_opencl.c
vf_tonemap_vaapi.c
vf_tpad.c
vf_transpose.c
vf_transpose_npp.c
vf_transpose_opencl.c
vf_transpose_vaapi.c lavfi/vf_*_vaapi: Fix error case 2020-02-09 20:36:45 +00:00
vf_unsharp.c
vf_unsharp_opencl.c
vf_uspp.c
vf_v360.c avfilter/vf_v360: make FOV adjusted for dual fisheye too 2020-04-29 19:18:25 +02:00
vf_vaguedenoiser.c
vf_vectorscope.c
vf_vflip.c
vf_vfrdet.c
vf_vibrance.c
vf_vidstabdetect.c
vf_vidstabtransform.c
vf_vignette.c
vf_vmafmotion.c
vf_vpp_qsv.c remove CHAR_MIN/CHAR_MAX usage 2020-03-17 22:46:36 +01:00
vf_w3fdif.c
vf_waveform.c
vf_weave.c
vf_xbr.c
vf_xfade.c avfilter/vf_xfade: add slice transitions 2020-04-07 13:51:25 +02:00
vf_xfade_opencl.c avfilter/vf_xfade_opencl: move passthrough code before eof check 2020-02-03 09:40:46 +01:00
vf_xmedian.c avfilter: add tmedian filter 2020-04-18 12:34:49 +02:00
vf_yadif.c
vf_yadif_cuda.c
vf_yadif_cuda.cu
vf_yaepblur.c
vf_zoompan.c
vf_zscale.c avfilter/vf_zscale: fix crash on unaligned input 2020-02-25 19:52:26 +01:00
video.c
video.h
vidstabutils.c
vidstabutils.h
vmaf_motion.h
vsink_nullsink.c
vsrc_cellauto.c
vsrc_life.c remove CHAR_MIN/CHAR_MAX usage 2020-03-17 22:46:36 +01:00
vsrc_mandelbrot.c remove CHAR_MIN/CHAR_MAX usage 2020-03-17 22:46:36 +01:00
vsrc_mptestsrc.c
vsrc_sierpinski.c
vsrc_testsrc.c remove CHAR_MIN/CHAR_MAX usage 2020-03-17 22:46:36 +01:00
vulkan.c hwcontext_vulkan: only use one semaphore per image 2020-04-07 12:52:56 +01:00
vulkan.h scale_vulkan: add support for RGB->YUV conversions 2020-03-17 22:52:00 +00:00
w3fdif.h
window_func.h
yadif.h
yadif_common.c