summaryrefslogtreecommitdiffstats
path: root/libavfilter
Commit message (Collapse)AuthorAgeFilesLines
* lavfi/dnn/dnn_backend_native: fix memory leak in error pathJun Zhao2019-08-201-0/+4
| | | | | | | fix memory leak in error path Reviewed-by: Guo, Yejun <yejun.guo@intel.com> Signed-off-by: Jun Zhao <barryjzhao@tencent.com>
* lavfi/avfiltergraph: add check before free the formatJun Zhao2019-08-201-2/+4
| | | | | | | | ff_merge_samplerates will be deallocate a or b in some case, so add a check before free the format. Reviewed-by: Paul B Mahol <onemda@gmail.com> Signed-off-by: Jun Zhao <barryjzhao@tencent.com>
* lavfi/af_adeclick: fix double free after ff_filter_frame failJun Zhao2019-08-201-1/+1
| | | | | | | | ff_filter_frame fail will free the frame, so we just returen after this function fail. Reviewed-by: Paul B Mahol <onemda@gmail.com> Signed-off-by: Jun Zhao <barryjzhao@tencent.com>
* libavfilter/dnn/dnn_backend_tf: add tf.pad support for tensorflow backend ↵Guo, Yejun2019-08-191-29/+19
| | | | | | | with native model. Signed-off-by: Guo, Yejun <yejun.guo@intel.com> Signed-off-by: Pedro Arthur <bygrandao@gmail.com>
* libavfilter/dnn/dnn_backend_tf: fix typo that variable uninitialized.Guo, Yejun2019-08-191-0/+1
| | | | | | | | | if it is initialized randomly, the tensorflow lib will report error message such as: Attempt to add output -7920 of depth_to_space4 not in range [0, 1) to node with type Identity Signed-off-by: Guo, Yejun <yejun.guo@intel.com> Signed-off-by: Pedro Arthur <bygrandao@gmail.com>
* avfilter/vf_v360: add dual fisheye formatEugene Lyapustin2019-08-191-0/+63
| | | | Signed-off-by: Eugene Lyapustin <unishifft@gmail.com>
* avfilter/vf_v360: add padding option for cubemapEugene Lyapustin2019-08-191-23/+77
| | | | Signed-off-by: Eugene Lyapustin <unishifft@gmail.com>
* avfilter: add v360 filterEugene Lyapustin2019-08-193-0/+1859
| | | | Signed-off-by: Eugene Lyapustin <unishifft@gmail.com>
* avfilter/showinfo: support Content Light Level informationLimin Wang2019-08-171-0/+12
| | | | | | | show real information instead of the unknown side data type message for HDR10 stream Signed-off-by: Limin Wang <lance.lmwang@gmail.com> Signed-off-by: James Almer <jamrial@gmail.com>
* avfilter/f_select: yuv will use Y plane only for scenecut detectLimin Wang2019-08-171-1/+5
| | | | | | | | | | | | | | | | At the moment scene change detection score uses all planes to detect scene changes. In this regard this is similar how the frozen frames detection works. However, in classic encoding scene change detection typically only uses the Y plane. We might get more resonable scores for scene change if we also use only the Y plane for calculating the score if the pixel format is YUV. Although this will require additional work once packed YUV formats are added, because for the moment the generic scene sad score calculation has no way to ignore some components in a packed format. Signed-off-by: Limin Wang <lance.lmwang@gmail.com> Signed-off-by: Marton Balint <cus@passwd.hu>
* avfilter/vf_convolution: Fix build failuresAndreas Rheinhardt2019-08-141-2/+3
| | | | | | | | | | | | | | | 98e419cb added SIMD for the convolution filter for x64 systems. As usual, it used a check of the form if (ARCH_X86_64) ff_convolution_init_x86(s); and thereby relied on the compiler eliminating this pseudo-runtime check at compiletime for non x64 systems (for which ff_convolution_init_x86 isn't defined) to compile. But vf_convolution.c contains more than one filter and if the convolution filter is disabled, but one of the other filters (prewitt, sobel, roberts) is enabled, the build will fail on x64, because ff_convolution_init_x86 isn't defined in this case. Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
* libavfilter/vf_scale: Ensure scaled video is divisible by nLars Kiesow2019-08-131-1/+14
| | | | | | | | | | | | | | | | | | | | This patch adds a new option to the scale filter which ensures that the output resolution is divisible by the given integer when used together with `force_original_aspect_ratio`. This works similar to using `-n` in the `w` and `h` options. This option respects the value set for `force_original_aspect_ratio`, increasing or decreasing the resolution accordingly. The use case for this is to set a fixed target resolution using `w` and `h`, to use the `force_original_aspect_ratio` option to make sure that the video always fits in the defined bounding box regardless of aspect ratio, but to also make sure that the calculated output resolution is divisible by n so in can be encoded with certain encoders/options if that is required. Signed-off-by: Lars Kiesow <lkiesow@uos.de> Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* lavf/showinfo: use error level when get invalid sidedataJun Zhao2019-08-081-3/+3
| | | | | | | | Use error level when get invalid sidedata, and remove a unnecessary newline in error message. Reviewed-by: Michael Niedermayer <michael@niedermayer.cc> Signed-off-by: Jun Zhao <barryjzhao@tencent.com>
* lavf/showinfo: support mastering display sidedataJun Zhao2019-08-081-0/+30
| | | | | | support mastering display sidedata. Signed-off-by: Jun Zhao <barryjzhao@tencent.com>
* lavf/vf_vpp_qsv: add support for QSV transpose filterLinjie Fu2019-08-071-2/+99
| | | | | | | | | | | | | | | | | | | | Add transpose support for qsv_vpp with rotate and hflip: - rotate: [0, 3] support clockwise rotation of 0, 90, 180, 270; - hflip: [0, 1] support horizontal flip; Configure with: {"cclock_hflip","clock","cclock","clock_hflip","reversal","hflip","vflip"} CMD: ffmpeg -hwaccel qsv -c:v h264_qsv -i input.h264 -vf 'format=qsv,vpp_qsv=transpose=clock' -c:v h264_qsv output.h264 ffmpeg -init_hw_device qsv=hw -filter_hw_device hw -c:v h264_qsv -i input.h264 -vf 'hwupload=extra_hw_frames=64,format=qsv,vpp_qsv=transpose=cclock_hflip' -f rawvideo -pix_fmt nv12 ./transpose.yuv Signed-off-by: Linjie Fu <linjie.fu@intel.com> Signed-off-by: Zhong Li <zhong.li@intel.com>
* avfilter/vf_convolution: add x86 SIMD for filter_3x3()Ruiling Song2019-08-075-38/+271
| | | | | | | | | | | Tested using a simple command (apply edge enhance): ./ffmpeg_g -i ~/Downloads/bbb_sunflower_1080p_30fps_normal.mp4 \ -vf convolution="0 0 0 -1 1 0 0 0 0:0 0 0 -1 1 0 0 0 0:0 0 0 -1 1 0 0 0 0:0 0 0 -1 1 0 0 0 0:5:1:1:1:0:128:128:128" \ -an -vframes 1000 -f null /dev/null The fps increase from 151 to 270 on my local machine. Signed-off-by: Ruiling Song <ruiling.song@intel.com>
* lavfi/zmq: Avoid mem copy past the end of input bufferAndriy Gelman2019-08-011-1/+1
|
* lavfi/vf_thumbnail_cuda: fix operator precedence bugRodger Combs2019-07-301-1/+1
| | | | | | Discovered via a warning when building with clang Signed-off-by: Timo Rothenpieler <timo@rothenpieler.org>
* dnn: convert tf.pad to native model in python script, and load/execute it in ↵Guo, Yejun2019-07-292-1/+36
| | | | | | | | | the c code. since tf.pad is enabled, the conv2d(valid) changes back to its original behavior. Signed-off-by: Guo, Yejun <yejun.guo@intel.com> Signed-off-by: Pedro Arthur <bygrandao@gmail.com>
* dnn: add layer pad which is equivalent to tf.padGuo, Yejun2019-07-293-0/+252
| | | | | | | | | the reason to add this layer first is that vf_sr uses it in its tensorflow model, and the next plan is to update the python script to convert tf.pad into native model. Signed-off-by: Guo, Yejun <yejun.guo@intel.com> Signed-off-by: Pedro Arthur <bygrandao@gmail.com>
* avfilter/fade: don't allow nb_frames == 0Gyan Doshi2019-07-291-2/+2
| | | | In filter init, there's a division by nb_frames but value isn't checked.
* lavfi: addroi filterMark Thompson2019-07-283-0/+271
| | | | This can be used to add region of interest side data to video frames.
* libavfilter/dnn: move dnn files from libavfilter to libavfilter/dnnGuo, Yejun2019-07-267-9/+14
| | | | | | | | | | | | | | | | | it is expected that there will be more files to support native mode, so put all the dnn codes under libavfilter/dnn The main change of this patch is to move the file location, see below: modified: libavfilter/Makefile new file: libavfilter/dnn/Makefile renamed: libavfilter/dnn_backend_native.c -> libavfilter/dnn/dnn_backend_native.c renamed: libavfilter/dnn_backend_native.h -> libavfilter/dnn/dnn_backend_native.h renamed: libavfilter/dnn_backend_tf.c -> libavfilter/dnn/dnn_backend_tf.c renamed: libavfilter/dnn_backend_tf.h -> libavfilter/dnn/dnn_backend_tf.h renamed: libavfilter/dnn_interface.c -> libavfilter/dnn/dnn_interface.c Signed-off-by: Guo, Yejun <yejun.guo@intel.com> Signed-off-by: Pedro Arthur <bygrandao@gmail.com>
* avfilter/af_dynaudnorm: add more descriptive aliases for optionsPaul B Mahol2019-07-241-9/+18
|
* avfilter/vf_ciescope: add DCI-P3Paul B Mahol2019-07-221-0/+7
|
* avformat/f_select: add support for more pixel formats for scene change score ↵Limin Wang2019-07-221-1/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | calculations This avoids automatic conversions to rgb if scene change score is used in the expression. Below is the tested results for the new added pixel format without autoscale to rgb24: 1. AV_PIX_FMT_YUVJ420P time ./ffprobe -of compact=p=0 -show_entries frame=pkt_pts:frame_tags -bitexact -f lavfi \ "sws_flags=+accurate_rnd+bitexact;movie=../fate-suite/svq3/Vertical400kbit.sorenson3.mov,select=gt(scene\,.25)" master: pkt_pts=1620|tag:lavfi.scene_score=1.000000 pkt_pts=4140|tag:lavfi.scene_score=0.875036 pkt_pts=5800|tag:lavfi.scene_score=1.000000 pkt_pts=6720|tag:lavfi.scene_score=0.461625 pkt_pts=8160|tag:lavfi.scene_score=1.000000 pkt_pts=9760|tag:lavfi.scene_score=1.000000 pkt_pts=14080|tag:lavfi.scene_score=0.838916 pkt_pts=15700|tag:lavfi.scene_score=1.000000 pkt_pts=18500|tag:lavfi.scene_score=0.474948 pkt_pts=20040|tag:lavfi.scene_score=0.379700 pkt_pts=21760|tag:lavfi.scene_score=1.000000 ./ffprobe -of compact=p=0 -show_entries frame=pkt_pts:frame_tags -bitexact -f 0.71s user 0.01s system 99% cpu 0.721 total patch applied: pkt_pts=1620|tag:lavfi.scene_score=1.000000 pkt_pts=4140|tag:lavfi.scene_score=0.668643 pkt_pts=5800|tag:lavfi.scene_score=0.996721 pkt_pts=6720|tag:lavfi.scene_score=0.357390 pkt_pts=8160|tag:lavfi.scene_score=0.886268 pkt_pts=9760|tag:lavfi.scene_score=0.926219 pkt_pts=14080|tag:lavfi.scene_score=0.650033 pkt_pts=15700|tag:lavfi.scene_score=1.000000 pkt_pts=18500|tag:lavfi.scene_score=0.316402 pkt_pts=20040|tag:lavfi.scene_score=0.269509 pkt_pts=21760|tag:lavfi.scene_score=1.000000 ./ffprobe -of compact=p=0 -show_entries frame=pkt_pts:frame_tags -bitexact -f 0.19s user 0.01s system 81% cpu 0.240 total 2. AV_PIX_FMT_YUV420P time ./ffprobe -of compact=p=0 -show_entries frame=pkt_pts:frame_tags -bitexact -f lavfi \ "sws_flags=+accurate_rnd+bitexact;movie=../Passengers_Breakfast_1080-sdr.mkv,select=gt(scene\,.2)" master: pkt_pts=3587|tag:lavfi.scene_score=0.462364 pkt_pts=4838|tag:lavfi.scene_score=0.419519 pkt_pts=6548|tag:lavfi.scene_score=0.397027 pkt_pts=9968|tag:lavfi.scene_score=0.419245 pkt_pts=12471|tag:lavfi.scene_score=0.413084 pkt_pts=16225|tag:lavfi.scene_score=0.506370 pkt_pts=19645|tag:lavfi.scene_score=0.507538 pkt_pts=22314|tag:lavfi.scene_score=0.504319 pkt_pts=24817|tag:lavfi.scene_score=0.417544 pkt_pts=25651|tag:lavfi.scene_score=0.413916 pkt_pts=26652|tag:lavfi.scene_score=0.487707 18.58s user 0.07s system 99% cpu 18.663 total patch applied: pkt_pts=3587|tag:lavfi.scene_score=0.272173 pkt_pts=4838|tag:lavfi.scene_score=0.247841 pkt_pts=6548|tag:lavfi.scene_score=0.233134 pkt_pts=9968|tag:lavfi.scene_score=0.247253 pkt_pts=12471|tag:lavfi.scene_score=0.244129 pkt_pts=16225|tag:lavfi.scene_score=0.302531 pkt_pts=19645|tag:lavfi.scene_score=0.303560 pkt_pts=22314|tag:lavfi.scene_score=0.301861 pkt_pts=24817|tag:lavfi.scene_score=0.249331 pkt_pts=25651|tag:lavfi.scene_score=0.247096 pkt_pts=26652|tag:lavfi.scene_score=0.287728 10.90s user 0.06s system 99% cpu 10.967 total 3. AV_PIX_FMT_YUV422P time ./ffprobe -of compact=p=0 -show_entries frame=pkt_pts:frame_tags -bitexact -f lavfi \ "sws_flags=+accurate_rnd+bitexact;movie=../Passengers_Breakfast_1080-sdr.mkv,format=yuv422p,select=gt(scene\,.2)" master: patched applied: pkt_pts=3587|tag:lavfi.scene_score=0.224017 pkt_pts=4838|tag:lavfi.scene_score=0.204225 pkt_pts=9968|tag:lavfi.scene_score=0.204636 pkt_pts=12471|tag:lavfi.scene_score=0.202772 pkt_pts=16225|tag:lavfi.scene_score=0.248765 pkt_pts=19645|tag:lavfi.scene_score=0.250144 pkt_pts=22314|tag:lavfi.scene_score=0.248802 pkt_pts=24817|tag:lavfi.scene_score=0.208362 pkt_pts=25651|tag:lavfi.scene_score=0.205777 pkt_pts=26652|tag:lavfi.scene_score=0.230742 4. AV_PIX_FMT_YUV420P10 time ./ffprobe -of compact=p=0 -show_entries frame=pkt_pts:frame_tags -bitexact -f lavfi \ "sws_flags=+accurate_rnd+bitexact;movie=../Passengers_Breakfast_4k.mkv,select=gt(scene\,.2)" master: pkt_pts=3587|tag:lavfi.scene_score=0.269890 pkt_pts=4838|tag:lavfi.scene_score=0.248957 pkt_pts=6548|tag:lavfi.scene_score=0.234619 pkt_pts=9969|tag:lavfi.scene_score=0.224912 pkt_pts=12471|tag:lavfi.scene_score=0.225158 pkt_pts=16225|tag:lavfi.scene_score=0.289809 pkt_pts=19645|tag:lavfi.scene_score=0.285013 pkt_pts=22314|tag:lavfi.scene_score=0.280295 pkt_pts=24817|tag:lavfi.scene_score=0.206486 pkt_pts=25651|tag:lavfi.scene_score=0.208556 pkt_pts=26652|tag:lavfi.scene_score=0.249577 ./ffprobe -of compact=p=0 -show_entries frame=pkt_pts:frame_tags -bitexact -f 76.03s user 0.22s system 99% cpu 1:16.27 total patch applied pkt_pts=3587|tag:lavfi.scene_score=0.269890 pkt_pts=4838|tag:lavfi.scene_score=0.248957 pkt_pts=6548|tag:lavfi.scene_score=0.234619 pkt_pts=9969|tag:lavfi.scene_score=0.224912 pkt_pts=12471|tag:lavfi.scene_score=0.225158 pkt_pts=16225|tag:lavfi.scene_score=0.289809 pkt_pts=19645|tag:lavfi.scene_score=0.285013 pkt_pts=22314|tag:lavfi.scene_score=0.280295 pkt_pts=24817|tag:lavfi.scene_score=0.206486 pkt_pts=25651|tag:lavfi.scene_score=0.208556 pkt_pts=26652|tag:lavfi.scene_score=0.249577 ./ffprobe -of compact=p=0 -show_entries frame=pkt_pts:frame_tags -bitexact -f 50.27s user 0.20s system 99% cpu 50.476 total 5. AV_PIX_FMT_RGBA, AV_PIX_FMT_ABGR, AV_PIX_FMT_BGRA, AV_PIX_FMT_GRAY8 are tested by format= with the fate sample: Vertical400kbit.sorenson3.mov like below: time ./ffprobe -of compact=p=0 -show_entries frame=pkt_pts:frame_tags -bitexact -f lavfi \ "sws_flags=+accurate_rnd+bitexact;movie=../fate-suite/svq3/Vertical400kbit.sorenson3.mov,format=rgba,select=gt(scene\,.25)" patch applied: pkt_pts=1620|tag:lavfi.scene_score=1.000000 pkt_pts=4140|tag:lavfi.scene_score=0.656277 pkt_pts=5800|tag:lavfi.scene_score=1.000000 pkt_pts=6720|tag:lavfi.scene_score=0.346218 pkt_pts=8160|tag:lavfi.scene_score=0.987686 pkt_pts=9760|tag:lavfi.scene_score=1.000000 pkt_pts=14080|tag:lavfi.scene_score=0.629187 pkt_pts=15700|tag:lavfi.scene_score=1.000000 pkt_pts=18500|tag:lavfi.scene_score=0.356211 pkt_pts=20040|tag:lavfi.scene_score=0.284775 pkt_pts=21760|tag:lavfi.scene_score=1.000000 6. AV_PIX_FMT_YUVJ422P time ./ffprobe -of compact=p=0 -show_entries frame=pkt_pts:frame_tags -bitexact -f lavfi \ "sws_flags=+accurate_rnd+bitexact;movie=../fate-suite/svq3/Vertical400kbit.sorenson3.mov,format=yuvj422p,select=gt(scene\,.25)" patch applied: pkt_pts=1620|tag:lavfi.scene_score=0.838281 pkt_pts=4140|tag:lavfi.scene_score=0.541382 pkt_pts=5800|tag:lavfi.scene_score=0.780588 pkt_pts=6720|tag:lavfi.scene_score=0.298274 pkt_pts=8160|tag:lavfi.scene_score=0.699106 pkt_pts=9760|tag:lavfi.scene_score=0.730136 pkt_pts=14080|tag:lavfi.scene_score=0.537742 pkt_pts=15700|tag:lavfi.scene_score=0.811946 pkt_pts=18500|tag:lavfi.scene_score=0.263382 pkt_pts=21760|tag:lavfi.scene_score=0.880773 Reviewed-by: Marton Balint <cus@passwd.hu> Signed-off-by: Limin Wang <lance.lmwang@gmail.com>
* avformat/f_select: support scenecut with more pixel formatsLimin Wang2019-07-221-4/+30
| | | | | | | | This patch does not make other pixel formats usable yet to make sure the test result is the same with rgb32 format. Reviewed-by: Marton Balint <cus@passwd.hu> Signed-off-by: Limin Wang <lance.lmwang@gmail.com>
* Bump minor versions again on master to keep 4.2 versions separate from masterMichael Niedermayer2019-07-211-1/+1
| | | | Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* Bump minor versions to separate 4.2 from masterMichael Niedermayer2019-07-211-2/+2
| | | | Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* lavfi/showinfo: support regions of interest sidedataJun Zhao2019-07-211-0/+25
| | | | | | support regions of interest sidedata Signed-off-by: Jun Zhao <barryjzhao@tencent.com>
* avfilter/vf_hysteresis: use time_base from framesyncPaul B Mahol2019-07-141-2/+4
| | | | Fixes non-monotonous timestamps.
* avfilter/vf_remap: add option to control output formatPaul B Mahol2019-07-141-1/+11
|
* avfilter/vf_remap: use time_base from framesyncPaul B Mahol2019-07-141-3/+5
| | | | Fixes non-monotonous timestamps.
* avfilter/vf_displace: use time_base from framesyncPaul B Mahol2019-07-141-3/+5
| | | | Fixes non-monotonous timestamps.
* avfilter/vf_midequalizer: always use framesync timestampsPaul B Mahol2019-07-141-1/+1
|
* avfilter/vf_maskedmerge: always use framesync timestampsPaul B Mahol2019-07-141-1/+1
|
* avfilter/vf_threshold: use time_base from framesyncPaul B Mahol2019-07-141-2/+4
| | | | Fixes non-monotonous timestamps.
* avfilter/vf_blend: add 9bit supportPaul B Mahol2019-07-141-0/+49
|
* avfilter/af_aiir: calculate group delay tooPaul B Mahol2019-07-131-3/+30
|
* avfilter/af_aiir: do not ignore k option for audio filteringPaul B Mahol2019-07-131-2/+4
| | | | Previously it was used only for displaying frequency response.
* avfilter/avf_showfreqs: make selecting window size simplerPaul B Mahol2019-07-101-14/+3
| | | | The previous solution was very bad.
* avfilter/af_afftfilt: make selecting window size simplerPaul B Mahol2019-07-101-15/+3
| | | | Next step after this one will be adding support for more window sizes.
* avfilter/vf_readeia608: implement lowpass operation prior to processing linesPaul B Mahol2019-07-081-4/+45
|
* avfilter/vf_tinterlace: re-enable lowpass optionPaul B Mahol2019-07-081-1/+1
|
* avfilter/af_aiir: implement mix optionPaul B Mahol2019-07-081-0/+6
|
* avfilter/af_biquads: clip gain picked from command to sane valuesPaul B Mahol2019-07-081-1/+1
|
* avfilter/af_biquads: implement mix option to all filtersPaul B Mahol2019-07-081-9/+47
|
* vf_drawtext: Add pkt_pos, pkt_duration, pkt_size as variablesCalvin Walton2019-07-072-1/+11
| | | | | | | | | | | Changes to vf_drawtext.c written by Calvin Walton <calvin.walton@kepstin.ca> Changes to filters.texi written by greg Luce <electron.rotoscope@gmail.com> with lots of help from Moritz Barsnick and Gyan Fixes #7947.
* avfilter/af_afftfilt: remove invalid scalingPaul B Mahol2019-07-061-7/+2
|
* lavfi/scale: Add sub-options for in_color_matrix/out_color_matrixJun Zhao2019-07-061-2/+10
| | | | | | Add sub-options for in_color_matrix/out_color_matrix Signed-off-by: Jun Zhao <barryjzhao@tencent.com>
OpenPOWER on IntegriCloud