summaryrefslogtreecommitdiff
path: root/libavfilter
Commit message (Collapse)AuthorAge
* avfilter/dnn/dnn_backend_tf: fix cross library usageLimin Wang2021-05-11
| | | | | | | | duplicate ff_hex_to_data() function from avformat and rename it to hex_to_data() as static function. Reviewed-by: Guo, Yejun <yejun.guo@intel.com> Signed-off-by: Limin Wang <lance.lmwang@gmail.com>
* avfilter/vf_dnn_classify: add result check for av_frame_get_side_dataSteven Liu2021-05-11
| | | | | | | | CID: 1482090 there can return null from av_frame_get_side_data, and will use sd->data after av_frame_get_side_data, so should check null return value. Signed-off-by: Steven Liu <liuqi05@kuaishou.com>
* dnn/vf_dnn_detect.c: add tensorflow output parse supportTing Fu2021-05-11
| | | | | | | | | | | | | | | | | | | | | | | | | | | Testing model is tensorflow offical model in github repo, please refer https://github.com/tensorflow/models/blob/master/research/object_detection/g3doc/tf2_detection_zoo.md to download the detect model as you need. For example, local testing was carried on with 'ssd_mobilenet_v2_coco_2018_03_29.tar.gz', and used one image of dog in https://github.com/tensorflow/models/blob/master/research/object_detection/test_images/image1.jpg Testing command is: ./ffmpeg -i image1.jpg -vf dnn_detect=dnn_backend=tensorflow:input=image_tensor:output=\ "num_detections&detection_scores&detection_classes&detection_boxes":model=ssd_mobilenet_v2_coco.pb,\ showinfo -f null - We will see the result similar as below: [Parsed_showinfo_1 @ 0x33e65f0] side data - detection bounding boxes: [Parsed_showinfo_1 @ 0x33e65f0] source: ssd_mobilenet_v2_coco.pb [Parsed_showinfo_1 @ 0x33e65f0] index: 0, region: (382, 60) -> (1005, 593), label: 18, confidence: 9834/10000. [Parsed_showinfo_1 @ 0x33e65f0] index: 1, region: (12, 8) -> (328, 549), label: 18, confidence: 8555/10000. [Parsed_showinfo_1 @ 0x33e65f0] index: 2, region: (293, 7) -> (682, 458), label: 1, confidence: 8033/10000. [Parsed_showinfo_1 @ 0x33e65f0] index: 3, region: (342, 0) -> (690, 325), label: 1, confidence: 5878/10000. There are two boxes of dog with cores 94.05% & 93.45% and two boxes of person with scores 80.33% & 58.78%. Signed-off-by: Ting Fu <ting.fu@intel.com> Signed-off-by: Guo, Yejun <yejun.guo@intel.com>
* lavfi/dnn_backend_tensorflow: support detect modelTing Fu2021-05-11
| | | | Signed-off-by: Ting Fu <ting.fu@intel.com>
* lavfi/dnn_backend_tensorflow: add multiple outputs supportTing Fu2021-05-11
| | | | Signed-off-by: Ting Fu <ting.fu@intel.com>
* dnn: add DCO_RGB color order to enum DNNColorOrderTing Fu2021-05-11
| | | | | | | Adding DCO_RGB color order to DNNColorOrder, since tensorflow model needs this kind of color oder as input. Signed-off-by: Ting Fu <ting.fu@intel.com>
* avfilter/vf_guided: Add missing constAndreas Rheinhardt2021-05-11
| | | | | | Forgotten in f8d910e90f599f338438833dfc92e2f1915ce414. Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
* GSoC: Add guided filterXuewei Meng2021-05-10
| | | | | | | | | Add examples on how to use this filter, and improve the code style. Implement the slice-level parallelism for guided filter. Add the basic version of guided filter. Signed-off-by: Xuewei Meng <xwmeng96@gmail.com> Reviewed-by: Steven Liu <liuqi05@kuaishou.com>
* lavfi/dnn_classify: add filter dnn_classify for classification based on ↵Guo, Yejun2021-05-06
| | | | | | | | | | | | | | | | | | | | | | | | | | | | detection bounding boxes classification is done on every detection bounding box in frame's side data, which are the results of object detection (filter dnn_detect). Please refer to commit log of dnn_detect for the material for detection, and see below for classification. - download material for classifcation: wget https://github.com/guoyejun/ffmpeg_dnn/raw/main/models/openvino/2021.1/emotions-recognition-retail-0003.bin wget https://github.com/guoyejun/ffmpeg_dnn/raw/main/models/openvino/2021.1/emotions-recognition-retail-0003.xml wget https://github.com/guoyejun/ffmpeg_dnn/raw/main/models/openvino/2021.1/emotions-recognition-retail-0003.label - run command as: ./ffmpeg -i cici.jpg -vf dnn_detect=dnn_backend=openvino:model=face-detection-adas-0001.xml:input=data:output=detection_out:confidence=0.6:labels=face-detection-adas-0001.label,dnn_classify=dnn_backend=openvino:model=emotions-recognition-retail-0003.xml:input=data:output=prob_emotion:confidence=0.3:labels=emotions-recognition-retail-0003.label:target=face,showinfo -f null - We'll see the detect&classify result as below: [Parsed_showinfo_2 @ 0x55b7d25e77c0] side data - detection bounding boxes: [Parsed_showinfo_2 @ 0x55b7d25e77c0] source: face-detection-adas-0001.xml, emotions-recognition-retail-0003.xml [Parsed_showinfo_2 @ 0x55b7d25e77c0] index: 0, region: (1005, 813) -> (1086, 905), label: face, confidence: 10000/10000. [Parsed_showinfo_2 @ 0x55b7d25e77c0] classify: label: happy, confidence: 6757/10000. [Parsed_showinfo_2 @ 0x55b7d25e77c0] index: 1, region: (888, 839) -> (967, 926), label: face, confidence: 6917/10000. [Parsed_showinfo_2 @ 0x55b7d25e77c0] classify: label: anger, confidence: 4320/10000. Signed-off-by: Guo, Yejun <yejun.guo@intel.com>
* lavfi/dnn: add classify support with openvino backendGuo, Yejun2021-05-06
| | | | Signed-off-by: Guo, Yejun <yejun.guo@intel.com>
* lavfi/dnn: refine dnn interface to add DNNExecBaseParamsGuo, Yejun2021-05-06
| | | | | | | | | | | | | Different function type of model requires different parameters, for example, object detection detects lots of objects (cat/dog/...) in the frame, and classifcation needs to know which object (cat or dog) it is going to classify. The current interface needs to add a new function with more parameters to support new requirement, with this change, we can just add a new struct (for example DNNExecClassifyParams) based on DNNExecBaseParams, and so we can continue to use the current interface execute_model just with params changed.
* lavfi/dnn_backend_openvino.c: move the logic for batch mode earlierGuo, Yejun2021-05-06
|
* lavfi/dnn_backend_openvino.c: add InferenceItem between TaskItem and RequestItemGuo, Yejun2021-05-06
| | | | | | | There's one task item for one function call from dnn interface, there's one request item for one call to openvino. For classify, one task might need multiple inference for classification on every bounding box, so add InferenceItem.
* lavfi/dnn_backend_openvino.c: unify code for infer request for sync/asyncGuo, Yejun2021-05-06
|
* lavfi/dnn_backend_native_layer_avgpool.c: Correct Spelling of PixelShubhanshu Saxena2021-05-06
| | | | | | Correct spelling of word `pixel` from `pxiels` Signed-off-by: Shubhanshu Saxena <shubhanshu.e01@gmail.com>
* avfilter/vf_identity: fix typoLimin Wang2021-05-01
| | | | Signed-off-by: Limin Wang <lance.lmwang@gmail.com>
* avfilter/vf_identity: remove unnecessary checkLimin Wang2021-05-01
| | | | Signed-off-by: Limin Wang <lance.lmwang@gmail.com>
* avfilter/vf_psnr: remove unnecessary checkLimin Wang2021-05-01
| | | | Signed-off-by: Limin Wang <lance.lmwang@gmail.com>
* avfilter/vf_ssim: remove unnecessary checkLimin Wang2021-05-01
| | | | | | For the pointer have been checked in the previous few lines of code Signed-off-by: Limin Wang <lance.lmwang@gmail.com>
* avfilter/vf_scale: store the offset in a local variable before adding itJames Almer2021-04-30
| | | | Signed-off-by: James Almer <jamrial@gmail.com>
* avfilter/dnn/dnn_backend_tf: simplify the code with ff_hex_to_dataLimin Wang2021-04-29
| | | | | | | | please use tools/python/tf_sess_config.py to get the sess_config after that. note the byte order of session config is in normal order. bump the MICRO version for the config change. Signed-off-by: Limin Wang <lance.lmwang@gmail.com>
* avfilter: Constify all AVFiltersAndreas Rheinhardt2021-04-27
| | | | | | | This is possible now that the next-API is gone. Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com> Signed-off-by: James Almer <jamrial@gmail.com>
* Bump major versions of all libraries.Anton Khirnov2021-04-27
| | | | | Signed-off-by: James Almer <jamrial@gmail.com> Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
* avfilter/buffersrc: postpone removal of sws_paramJames Almer2021-04-27
| | | | | | It was depreacted less than two years ago Signed-off-by: James Almer <jamrial@gmail.com>
* avutil: remove deprecated AVClass.child_class_nextJames Almer2021-04-27
| | | | Signed-off-by: James Almer <jamrial@gmail.com>
* libavresample: Remove deprecated libraryAndreas Rheinhardt2021-04-27
| | | | | | | | Deprecated in c29038f3041a4080342b2e333c1967d136749c0f. The resample filter based upon this library has been removed as well. Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com> Signed-off-by: James Almer <jamrial@gmail.com>
* avutil/buffer: Switch AVBuffer API to size_tAndreas Rheinhardt2021-04-27
| | | | | | | Announced in 14040a1d913794d9a3fd6406a6d8c2f0e37e0062. Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com> Signed-off-by: James Almer <jamrial@gmail.com>
* avutil/pixdesc: Remove deprecated AV_PIX_FMT_FLAG_PSEUDOPALAndreas Rheinhardt2021-04-27
| | | | | | | Deprecated in d6fc031caf64eed921bbdef86d79d56bfc2633b0. Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com> Signed-off-by: James Almer <jamrial@gmail.com>
* avutil/frame: Remove deprecated AVFrame.errorAndreas Rheinhardt2021-04-27
| | | | | | | Deprecated in 1aa24df74c052a73175c43e57d35b4835e537ec8. Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com> Signed-off-by: James Almer <jamrial@gmail.com>
* avutil/frame: Remove AVFrame QP table APIAndreas Rheinhardt2021-04-27
| | | | | | | | Originally deprecated in 1296b1f6c0631ab79464e22d48a6a1548450b943; scheduled again for removal in a9915268327b097bba84a07f68968d8c07f4b549. Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com> Signed-off-by: James Almer <jamrial@gmail.com>
* avfilter/Makefile: Don't compile transform.c unconditionallyAndreas Rheinhardt2021-04-27
| | | | | Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com> Signed-off-by: James Almer <jamrial@gmail.com>
* avfilter/transform: Stop exporting internal functionsAndreas Rheinhardt2021-04-27
| | | | | | | | | | | | avfilter_transform, avfilter_(add|sub|mult)_matrix are not part of the public API (transform.h is not a public header), yet they are currently exported because of their name. This commit changes this: avfilter_transform is renamed to ff_affine_transform; the other functions are just removed as they have never been used at all. Found-by: Anton Khirnov <anton@khirnov.net> Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com> Signed-off-by: James Almer <jamrial@gmail.com>
* avfilter/formats: Remove avfilter_make_format64_list()Andreas Rheinhardt2021-04-27
| | | | | | | | The API it is part of has been made private long ago (see commit b74a1da49db5ebed51aceae6cacc2329288a92c1). Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com> Signed-off-by: James Almer <jamrial@gmail.com>
* avfilter/avfilter: Remove deprecated avfilter_link_set_closed()Andreas Rheinhardt2021-04-27
| | | | | | | Deprecated in 39a09e995d32d16e4f8c87a6ff5273cb9d98146e. Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com> Signed-off-by: James Almer <jamrial@gmail.com>
* avfilter: Remove avfilter_next/avfilter_register APIAndreas Rheinhardt2021-04-27
| | | | | | | Deprecated in 8f1382f80e0d4184c54c14afdda6482f050fbba7. Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com> Signed-off-by: James Almer <jamrial@gmail.com>
* avfilter: Remove deprecated avfilter_link_get_channelsAndreas Rheinhardt2021-04-27
| | | | | | | Deprecated in b2c42fc6dc3502a8b6cae441c54d898972a51cff. Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com> Signed-off-by: James Almer <jamrial@gmail.com>
* avfilter: Remove deprecated resample_lavr_optsAndreas Rheinhardt2021-04-27
| | | | | | | Deprecated in 3796fb2692f87d0000fc0aa4572ac025a6469c2b. Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com> Signed-off-by: James Almer <jamrial@gmail.com>
* avfilter/avfilter: Remove compatibility code for old filter optionsAndreas Rheinhardt2021-04-27
| | | | | | | | Added in ad7d972e08dddb1788ac6a434d1be314febcb09d; the old syntax has been deprecated in b439c992c23f3e0f3832fffd2a34a664b236c525. Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com> Signed-off-by: James Almer <jamrial@gmail.com>
* avformat: Constify the API wrt AV(In|Out)putFormatAndreas Rheinhardt2021-04-27
| | | | | | | Also constify AVProbeData. Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com> Signed-off-by: James Almer <jamrial@gmail.com>
* lavfi/dnn/queue.h: Add Documentation to QueueShubhanshu Saxena2021-04-27
| | | | | | Documentation for Queue Signed-off-by: Shubhanshu Saxena <shubhanshu.e01@gmail.com>
* lavfi/dnn/safe_queue.h: Add Documentation to SafeQueueShubhanshu Saxena2021-04-27
| | | | | | Documentation for SafeQueue Signed-off-by: Shubhanshu Saxena <shubhanshu.e01@gmail.com>
* avfilter/af_adelay: make per channel delay argument an int64_tJames Almer2021-04-25
| | | | | | Should fix ticket #9196 Signed-off-by: James Almer <jamrial@gmail.com>
* lavfi/dnn_backend_openvino.c: Spelling Correction in OpenVino Backendshubhanshu022021-04-25
| | | | | | | Correct Spelling of the word `descibe` to `describe` in init_model_ov Signed-off-by: shubhanshu02 <shubhanshu.e01@gmail.com>
* Include attributes.h directlyAndreas Rheinhardt2021-04-19
| | | | | | | | Some files currently rely on libavutil/cpu.h to include it for them; yet said file won't use include it any more after the currently deprecated functions are removed, so include attributes.h directly. Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
* avfilter/af_mcompand: check allocation resultsMarton Balint2021-04-18
| | | | | | Fixes the only remaining part of ticket #8931. Signed-off-by: Marton Balint <cus@passwd.hu>
* lavfi: add filter dnn_detect for object detectionGuo, Yejun2021-04-17
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Below are the example steps to do object detection: 1. download and install l_openvino_toolkit_p_2021.1.110.tgz from https://software.intel.com/content/www/us/en/develop/tools/openvino-toolkit/download.html or, we can get source code (tag 2021.1), build and install. 2. export LD_LIBRARY_PATH with openvino settings, for example: .../deployment_tools/inference_engine/lib/intel64/:.../deployment_tools/inference_engine/external/tbb/lib/ 3. rebuild ffmpeg from source code with configure option: --enable-libopenvino --extra-cflags='-I.../deployment_tools/inference_engine/include/' --extra-ldflags='-L.../deployment_tools/inference_engine/lib/intel64' 4. download model files and test image wget https://github.com/guoyejun/ffmpeg_dnn/raw/main/models/openvino/2021.1/face-detection-adas-0001.bin wget https://github.com/guoyejun/ffmpeg_dnn/raw/main/models/openvino/2021.1/face-detection-adas-0001.xml wget https://github.com/guoyejun/ffmpeg_dnn/raw/main/models/openvino/2021.1/face-detection-adas-0001.label wget https://github.com/guoyejun/ffmpeg_dnn/raw/main/images/cici.jpg 5. run ffmpeg with: ./ffmpeg -i cici.jpg -vf dnn_detect=dnn_backend=openvino:model=face-detection-adas-0001.xml:input=data:output=detection_out:confidence=0.6:labels=face-detection-adas-0001.label,showinfo -f null - We'll see the detect result as below: [Parsed_showinfo_1 @ 0x560c21ecbe40] side data - detection bounding boxes: [Parsed_showinfo_1 @ 0x560c21ecbe40] source: face-detection-adas-0001.xml [Parsed_showinfo_1 @ 0x560c21ecbe40] index: 0, region: (1005, 813) -> (1086, 905), label: face, confidence: 10000/10000. [Parsed_showinfo_1 @ 0x560c21ecbe40] index: 1, region: (888, 839) -> (967, 926), label: face, confidence: 6917/10000. There are two faces detected with confidence 100% and 69.17%. Signed-off-by: Guo, Yejun <yejun.guo@intel.com>
* lavfi: show side data of detection bounding boxesGuo, Yejun2021-04-17
|
* lavfi/qsvvpp: support async depthFei Wang2021-04-11
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Async depth will allow qsv filter cache few frames, and avoid force switch and end filter task frame by frame. This change will improve performance for some multi-task case, for example 1:N transcode( decode + vpp + encode) with all QSV plugins. Performance data test on my Coffee Lake Desktop(i7-8700K) by using the following 1:8 transcode test case improvement: 1. Fps improved from 55 to 130. 2. Render/Video usage improved from ~61%/~38% to ~100%/~70%.(Data get from intel_gpu_top) test CMD: ffmpeg -v verbose -init_hw_device qsv=hw:/dev/dri/renderD128 -filter_hw_device \ hw -hwaccel qsv -hwaccel_output_format qsv -c:v h264_qsv -i 1920x1080.264 \ -vf 'vpp_qsv=w=1280:h=720:async_depth=4' -c:v h264_qsv -r:v 30 -preset 7 -g 33 -refs 2 -bf 3 -q 24 -f null - \ -vf 'vpp_qsv=w=1280:h=720:async_depth=4' -c:v h264_qsv -r:v 30 -preset 7 -g 33 -refs 2 -bf 3 -q 24 -f null - \ -vf 'vpp_qsv=w=1280:h=720:async_depth=4' -c:v h264_qsv -r:v 30 -preset 7 -g 33 -refs 2 -bf 3 -q 24 -f null - \ -vf 'vpp_qsv=w=1280:h=720:async_depth=4' -c:v h264_qsv -r:v 30 -preset 7 -g 33 -refs 2 -bf 3 -q 24 -f null - \ -vf 'vpp_qsv=w=1280:h=720:async_depth=4' -c:v h264_qsv -r:v 30 -preset 7 -g 33 -refs 2 -bf 3 -q 24 -f null - \ -vf 'vpp_qsv=w=1280:h=720:async_depth=4' -c:v h264_qsv -r:v 30 -preset 7 -g 33 -refs 2 -bf 3 -q 24 -f null - \ -vf 'vpp_qsv=w=1280:h=720:async_depth=4' -c:v h264_qsv -r:v 30 -preset 7 -g 33 -refs 2 -bf 3 -q 24 -f null - Signed-off-by: Fei Wang <fei.w.wang@intel.com> Reviewed-by: Linjie Fu <linjie.justin.fu@gmail.com> Signed-off-by: Zhong Li <zhongli_dev@126.com>
* avfilter/overlay_cuda: check av_buffer_ref resultTimo Rothenpieler2021-04-11
|
* avfilter/vf_v360: unbreak fov_from_dfov() for (d)fisheye when width != heightPaul B Mahol2021-04-11
| | | | Based on patch by Daniel Playfair Cal.