summaryrefslogtreecommitdiff
path: root/libavfilter
Commit message (Collapse)AuthorAge
* avfilter/af_sofalizer: allow up to 64 channelsPaul B Mahol2020-10-12
|
* avfilter/af_sofalizer: allow to specify virtual speakers indetifier as numberPaul B Mahol2020-10-12
|
* avfilter/avfilter.h: add missing FF_API_NEXT wrapperJames Almer2020-10-10
| | | | Signed-off-by: James Almer <jamrial@gmail.com>
* avfilter/vf_minterpolate: Remove redundant code for freeingAndreas Rheinhardt2020-10-09
| | | | | | | | ad73b32d2922f4237405043d19763229aee0e59e added some code for freeing in the input's config_props function, yet this is unnecessary as uninit is called anyway if config_props fails. Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
* avfilter/vf_minterpolate: Fix left shift of negative valueAndreas Rheinhardt2020-10-09
| | | | | | | | | | | | This has happened when initializing the motion estimation context if width or height of the video was smaller than the block size used for motion estimation and if the motion interpolation mode indicates not to use motion estimation. The solution is of course to only initialize the motion estimation context if the interpolation mode uses motion estimation. Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
* avfilter/vf_minterpolate: Reject too small dimensionsAndreas Rheinhardt2020-10-09
| | | | | | | | | | The latter code relies upon the dimensions to be not too small; otherwise one will call av_clip() with min > max lateron which aborts in case ASSERT_LEVEL is >= 2 or one will get a nonsense result that may lead to a heap-buffer-overflow/underflow. The latter has happened in ticket #8248 which this commit fixes. Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
* avfilter/vf_v360: use quaternions for rotationPaul B Mahol2020-10-07
| | | | Fixes gimbal lock issues, and round-off errors.
* avfilter/vf_v360: fix possible out of range valuesPaul B Mahol2020-10-04
|
* avfilter/vf_v360: add mitchell interpolationPaul B Mahol2020-10-04
|
* avfilter/vf_v360: stop using floats variables in xyz_to_octahedronPaul B Mahol2020-09-30
| | | | Use proper integer variables.
* Revert "avfilter/setparams: add FF_FILTER_FLAG_HWFRAME_AWARE"Mark Thompson2020-09-29
| | | | | | | This reverts commit 5bbf58ab876279ca1a5a2f30563f271c99b93e62. The setparams filters are not hwframe aware, so the default context passthrough behaviour is needed to allow using them with hardware frames.
* avfilter/vf_v360: simplify input flippingPaul B Mahol2020-09-29
|
* avfilter/vf_v360: split maps into slicesPaul B Mahol2020-09-29
|
* dnn/native: add native support for denseMingyu Yin2020-09-29
| | | | Signed-off-by: Mingyu Yin <mingyu.yin@intel.com>
* avfilter/setparams: add FF_FILTER_FLAG_HWFRAME_AWAREPavel Koshevoy2020-09-27
| | | | | Allow setparams to be used with hw backed frames and avoid an assertion failure in avfilter_config_links.
* avfilter/vf_v360: add octahedron formatPaul B Mahol2020-09-27
|
* vf_colorspace: Added linear trc.Andrew Klaassen2020-09-27
| | | | | | | | This patch adds the coefficients for the linear gamma function (1,0,1,0) to the colorspace filter. Signed-off-by: Andrew Klaassen <clawsoon@yahoo.com> Signed-off-by: Ronald S. Bultje <rsbultje@gmail.com>
* avfilter/vf_histogram: add slide modes for thistogramPaul B Mahol2020-09-26
|
* dnn: add a new interface DNNModel.get_outputGuo, Yejun2020-09-21
| | | | | | | | | | for some cases (for example, super resolution), the DNN model changes the frame size which impacts the filter behavior, so the filter needs to know the out frame size at very beginning. Currently, the filter reuses DNNModule.execute_model to query the out frame size, it is not clear from interface perspective, so add a new explict interface DNNModel.get_output for such query.
* dnn: put DNNModel.set_input and DNNModule.execute_model togetherGuo, Yejun2020-09-21
| | | | | | | | | | | | | | suppose we have a detect and classify filter in the future, the detect filter generates some bounding boxes (BBox) as AVFrame sidedata, and the classify filter executes DNN model for each BBox. For each BBox, we need to crop the AVFrame, copy data to DNN model input and do the model execution. So we have to save the in_frame at DNNModel.set_input and use it at DNNModule.execute_model, such saving is not feasible when we support async execute_model. This patch sets the in_frame as execution_model parameter, and so all the information are put together within the same function for each inference. It also makes easy to support BBox async inference.
* dnn: change dnn interface to replace DNNData* with AVFrame*Guo, Yejun2020-09-21
| | | | | | | | | | | | Currently, every filter needs to provide code to transfer data from AVFrame* to model input (DNNData*), and also from model output (DNNData*) to AVFrame*. Actually, such transfer can be implemented within DNN module, and so filter can focus on its own business logic. DNN module also exports the function pointer pre_proc and post_proc in struct DNNModel, just in case that a filter has its special logic to transfer data between AVFrame* and DNNData*. The default implementation within DNN module is used if the filter does not set pre/post_proc.
* dnn: add userdata for load model parameterGuo, Yejun2020-09-21
| | | | the userdata will be used for the interaction between AVFrame and DNNData
* dnn_backend_native_layer_conv2d.c: fix bug of loop boundary in single thread ↵Xu Jun2020-09-20
| | | | | | | | | | | mode. Before patch, fate test for dnn may fail in some Windows environment while succeed in my Linux. The bug was caused by a wrong loop boundary. After patch, fate test succeed in my windows mingw 64-bit. Signed-off-by: Xu Jun <xujunzz@sjtu.edu.cn> Signed-off-by: Guo, Yejun <yejun.guo@intel.com>
* avfilter/vf_datascope: fix oscilloscope with gray>8 depthPaul B Mahol2020-09-19
|
* avfilter/vf_showinfo: add const to the AVFrameSideData instanceLimin Wang2020-09-17
| | | | Signed-off-by: Limin Wang <lance.lmwang@gmail.com>
* dnn_backend_native_layer_conv2d.c: refine code.Xu Jun2020-09-17
| | | | | | | Move thread area allocate out of thread function into main thread. Signed-off-by: Xu Jun <xujunzz@sjtu.edu.cn>
* dnn_backend_native_layer_conv2d.c: fix memory allocation bug in multithread ↵Xu Jun2020-09-17
| | | | | | | | | | | | | function. Before patch, memory was allocated in each thread functions, which may cause more than one time of memory allocation and cause crash. After patch, memory is allocated in the main thread once, an index was parsed into thread functions. Bug fixed. Signed-off-by: Xu Jun <xujunzz@sjtu.edu.cn>
* avfilter/f_interleave: fix some issues with interleavingPaul B Mahol2020-09-15
|
* avfilter/x86/vf_convolution_init: there is asm only for 8bit depthPaul B Mahol2020-09-15
|
* avfilter/avf_concat: check for possible integer overflowPaul B Mahol2020-09-14
| | | | | | | Also check that segment delta pts is always bigger than input pts. There is nothing much currently that can be done to recover from this situation so just return AVERROR_INVALIDDATA error code.
* avfilter/af_amix: do not leave unset PTS for frames after first stream is overPaul B Mahol2020-09-14
| | | | First stream is used only to get number of samples to put into each output frame.
* avfilter/vf_premultiply: add missing AV_PIX_FMT_YUVA444P12Mark Reid2020-09-14
| | | | query_formats says its supported, but is missing from switch statement leading to segfault
* avfilter/vf_showinfo: use av_timecode_make_smpte_tc_string2Marton Balint2020-09-13
| | | | Signed-off-by: Marton Balint <cus@passwd.hu>
* avfilter/asrc_anullsrc: actually return correct EOF ptsPaul B Mahol2020-09-13
|
* avfilter/asrc_anullsrc: give better limits to number of samples per framePaul B Mahol2020-09-13
|
* avfilter/asrc_anullsrc: make number of output samples match durationPaul B Mahol2020-09-13
|
* dnn/openvino: add input/output name infoTing Fu2020-09-12
| | | | | | | show all input/output names when the input or output name not correct Signed-off-by: Ting Fu <ting.fu@intel.com> Signed-off-by: Guo, Yejun <yejun.guo@intel.com>
* dnn/openvino: support run inference via GPUTing Fu2020-09-12
| | | | | | | | | | | | | for enabling OpenVINO GPU please: 1. install required OpenCL drivers, see: https://github.com/intel/compute-runtime/releases/tag/19.41.14441 2. build OpenVINO c lib with GPU enabled: use cmake config with: -DENABLE_CLDNN=ON 3. then make, and include the OpenVINO c lib in environment variables detailed steps please refer: https://github.com/openvinotoolkit/openvino/blob/master/build-instruction.md inference model with GPU please add: optioins=device=GPU Signed-off-by: Ting Fu <ting.fu@intel.com> Signed-off-by: Guo, Yejun <yejun.guo@intel.com>
* avfilter/formats: Remove pointless checksAndreas Rheinhardt2020-09-11
| | | | | | | | | | | | | | | ff_formats_ref() takes a pointer to an AVFilterFormats and a pointer to a pointer to an AVFilterFormats as arguments and adds the latter as an owner to the list pointed to by the former; the latter is hereby always the address of a list contained in an AVFilterFormatsConfig and can therefore not be NULL. So remove the check for whether it is NULL; also do the same for ff_channel_layouts_ref(). Also do the same for the unref functions where argument is never NULL because it is always the address of an existing lvalue. Reviewed-by: Nicolas George <george@nsup.org> Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
* avfilter/formats: Don't typedef structure a second timeAndreas Rheinhardt2020-09-11
| | | | | | | | | | | | | | | | | | | Before commit 2f76476549a01ae2c4ec2a440e4b14c5aba64869, avfilter.h contained no typedef for AVFilterChannelLayouts; all references to it were done using its struct tag. formats.h meanwhile contained the definition of the struct and a typedef for it. Said commit now added a typedef in avfilter.h, too, bringing it in line with AVFilterFormats; yet this means that there are two typedefs for AVFilterChannelLayouts (in contrast to AVFilterFormats which is only typedef'ed in avfilter.h). The problem is that older versions of GCC don't like this and error out: http://fate.ffmpeg.org/history.cgi?slot=x86_64-openbsd5.6-gcc4.2-conf2 is one of the FATE boxes that now fail to compile. So just remove the typedef in formats.h. Reviewed-by: Paul B Mahol <onemda@gmail.com> Reviewed-by: Nicolas George <george@nsup.org> Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
* fftools, libavcodec, libavfilter: Add const to some AVCodec *Andreas Rheinhardt2020-09-11
| | | | | | | | The user has no business modifying the underlying AVCodec. Reviewed-by: Paul B Mahol <onemda@gmail.com> Reviewed-by: Nicolas George <george@nsup.org> Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
* avfilter/vf_subtitles: Remove obsolete LIBAVCODEC_VERSION_INT checksAndreas Rheinhardt2020-09-11
| | | | | | | | libavcodec major version is already 58. Reviewed-by: Nicolas George <george@nsup.org> Reviewed-by: Paul B Mahol <onemda@gmail.com> Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
* avfilter/vf_subtitles: Remove unnecessary initialization of AVPacketAndreas Rheinhardt2020-09-11
| | | | | | | | av_read_frame() can handle uninitialized packets. Reviewed-by: Paul B Mahol <onemda@gmail.com> Reviewed-by: Nicolas George <george@nsup.org> Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
* avfilter/vf_subtitles: Fix leaks on failureAndreas Rheinhardt2020-09-11
| | | | | | | | | | | | | init_subtitles() sometimes returned directly upon error without cleaning up after itself. The easiest way to trigger this is by using picture-based subtitles; it is also possible to run into this in case of missing decoders or allocation failures. Furthermore, return the proper error code in case of missing decoder. Reviewed-by: Nicolas George <george@nsup.org> Reviewed-by: Paul B Mahol <onemda@gmail.com> Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
* avfilter/vf_uspp: Fix potential leak of dict on errorAndreas Rheinhardt2020-09-11
| | | | | Reviewed-by: Nicolas George <george@nsup.org> Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
* avfilter/lavfutils: Avoid initializing packetAndreas Rheinhardt2020-09-11
| | | | | | | av_read_frame() can handle uninitialized packets. Reviewed-by: Nicolas George <george@nsup.org> Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
* avfilter/lavfutils: Fix memleak when avformat_find_stream_info() failsAndreas Rheinhardt2020-09-11
| | | | | | Reviewed-by: Paul B Mahol <onemda@gmail.com> Reviewed-by: Nicolas George <george@nsup.org> Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
* avfilter/lavfutils: Don't use uninitialized pointers for freeingAndreas Rheinhardt2020-09-11
| | | | | | | | Happened on several error conditions, e.g. if there is just no decoder for the format (like with svg images). Reviewed-by: Paul B Mahol <onemda@gmail.com> Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
* avfilter/src_movie: Fix leak of packet upon errorAndreas Rheinhardt2020-09-10
| | | | | | | | | If allocating the AVFrame to contain a decoded frame fails, the AVPacket containing the data intended to be decoded leaks. This commit fixes this. Reviewed-by: Nicolas George <george@nsup.org> Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
* avfilter/src_movie: Remove unnecessary secondary AVPacketAndreas Rheinhardt2020-09-10
| | | | | | | | | | | | | | | | | | | | | | | | | | | | The movie and amovie filters currently use two packets. One of the two, pkt0, is the owner of the returned packet; it is also the destination packet for av_read_frame(). The other one pkt is initially (i.e. after av_read_frame()) a copy of pkt0; copy means that the contents of both are absolutely the same: They both point to the same AVBufferRef and the same side data. This violation of the refcounted packet API is only possible because pkt is not considered to own its data. Only pkt0 is ever unreferenced. The reason for pkt's existence seems to be historic: The API used for decoding audio (namely avcodec_decode_audio4()) could consume frames partially, i.e. it could return multiple frames for one packet and therefore it returned how much of the input buffer had been consumed. The caller was then supposed to update the packet's data and size pointer to reflect this and call avcodec_decode_audio4() again with the updated packet to get the next frame. But before the introduction of refcounted AVPackets where knowledge and responsibility about what to free lies with the underlying AVBuffer such a procedure required a spare packet (or one would need to record the original data and size fields separately to restore them before freeing the packet; notice that this code has been written when AVPackets still had a destruct field). But these times are long gone, so just remove the secondary AVPacket. Reviewed-by: Nicolas George <george@nsup.org> Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>