summaryrefslogtreecommitdiff
path: root/libavfilter/vf_scale_npp.c
Commit message (Collapse)AuthorAge
* avfilter/avfilter: Add numbers of (in|out)pads directly to AVFilterAndreas Rheinhardt2021-08-20
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | Up until now, an AVFilter's lists of input and output AVFilterPads were terminated by a sentinel and the only way to get the length of these lists was by using avfilter_pad_count(). This has two drawbacks: first, sizeof(AVFilterPad) is not negligible (i.e. 64B on 64bit systems); second, getting the size involves a function call instead of just reading the data. This commit therefore changes this. The sentinels are removed and new private fields nb_inputs and nb_outputs are added to AVFilter that contain the number of elements of the respective AVFilterPad array. Given that AVFilter.(in|out)puts are the only arrays of zero-terminated AVFilterPads an API user has access to (AVFilterContext.(in|out)put_pads are not zero-terminated and they already have a size field) the argument to avfilter_pad_count() is always one of these lists, so it just has to find the filter the list belongs to and read said number. This is slower than before, but a replacement function that just reads the internal numbers that users are expected to switch to will be added soon; and furthermore, avfilter_pad_count() is probably never called in hot loops anyway. This saves about 49KiB from the binary; notice that these sentinels are not in .bss despite being zeroed: they are in .data.rel.ro due to the non-sentinels. Reviewed-by: Nicolas George <george@nsup.org> Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
* avfilter/formats: Factor common function combinations outAndreas Rheinhardt2021-08-13
| | | | | | | | | | | Several combinations of functions happen quite often in query_format functions; e.g. ff_set_common_formats(ctx, ff_make_format_list(sample_fmts)) is very common. This commit therefore adds functions that are equivalent to commonly used function combinations in order to reduce code duplication. Reviewed-by: Nicolas George <george@nsup.org> Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.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>
* avfilter: rename scale.c,h to scale_evalGyan Doshi2019-12-10
| | | | scale.c is too generic; scale_eval is more representative
* avfilter/scale.c: factorize ff_scale_eval_dimensionsGyan Doshi2019-12-08
| | | | | | | Adjustment of evaluated values shifted to ff_adjust_scale_dimensions Shifted code for force_original_aspect_ratio and force_divisble_by from vf_scale so it is now available for scale_cuda, scale_npp and scale_vaapi as well.
* avutil/hwcontext_cuda: Define and use common CHECK_CU()Philip Langdale2018-11-14
| | | | | | | | | | | | | | | | | | We have a pattern of wrapping CUDA calls to print errors and normalise return values that is used in a couple of places. To avoid duplication and increase consistency, let's put the wrapper implementation in a shared place and use it everywhere. Affects: * avcodec/cuviddec * avcodec/nvdec * avcodec/nvenc * avfilter/vf_scale_cuda * avfilter/vf_scale_npp * avfilter/vf_thumbnail_cuda * avfilter/vf_transpose_npp * avfilter/vf_yadif_cuda
* Merge commit '5c8a5765dc5f4e29afb85b95be393c30f45412a8'James Almer2017-09-27
|\ | | | | | | | | | | | | | | | | * commit '5c8a5765dc5f4e29afb85b95be393c30f45412a8': scale_npp: explicitly set the output frames context for passthrough mode See 62b75537db15816fde8b8a33976ffc4a8277f1fc Merged-by: James Almer <jamrial@gmail.com>
| * scale_npp: explicitly set the output frames context for passthrough modeAnton Khirnov2017-02-11
| | | | | | | | | | This is no longer done automatically for filters marked as hwframe-aware.
* | avfilter/scale_npp: fix logic used in previous patchTimo Rothenpieler2017-08-14
| |
* | avfilter/scale_npp: check for buffer allocation failureTimo Rothenpieler2017-08-14
| | | | | | | | I totally did not forget to amend this to the previous patch...
* | avfilter/scale_npp: fix passthrough modeYogender Gupta2017-08-14
| | | | | | | | Signed-off-by: Timo Rothenpieler <timo@rothenpieler.org>
* | avfilter/vf_scale_npp: fix out-of-bounds readsTimo Rothenpieler2017-06-13
| | | | | | | | Fixes CIDs 1396414 and 1396415
* | Merge commit 'e3fb74f7f9a8f1895381355f40c92cac3c1023d9'Matthieu Bouron2017-03-30
|\| | | | | | | | | | | | | * commit 'e3fb74f7f9a8f1895381355f40c92cac3c1023d9': lavfi: Always propagate hw_frames_ctx through links Merged-by: Matthieu Bouron <matthieu.bouron@gmail.com>
| * lavfi: Always propagate hw_frames_ctx through linksMark Thompson2016-11-02
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Also adds a new flag to mark filters which are aware of hwframes and will perform this task themselves, and marks all appropriate filters with this flag. This is required to allow software-mapped hardware frames to work, because we need to have the frames context available for any later mapping operation in the filter graph. The output from the filter graph should only propagate further to an encoder if the hardware format actually matches the visible format (mapped frames are valid here and have an hw_frames_ctx, but this should not be given to the encoder as its hardware context).
| * scale_npp: fix passthrough modeYogender Gupta2016-10-25
| | | | | | | | Signed-off-by: Anton Khirnov <anton@khirnov.net>
* | avfilter/scale: refactor common code for scaling height/width expressionsAman Gupta2017-02-02
| | | | | | | | | | | | | | Implements support for height/width expressions in vf_scale_vaapi, by refactoring common code into a new libavfilter/scale.c Signed-off-by: Mark Thompson <sw@jkqxz.net>
* | avfilter/vf_scale_npp: check ff_set_common_formats return valueTimo Rothenpieler2016-11-30
| |
* | avfilter/vf_scale_npp: move aspect ratio correction after av_frame_copy_propsMiroslav Slugeň2016-11-30
| | | | | | | | Signed-off-by: Timo Rothenpieler <timo@rothenpieler.org>
* | avfilter/vf_scale_npp: use dynamically loaded CUDATimo Rothenpieler2016-11-22
| |
* | avfilter/scale_npp: fix passthrough modeYogender Gupta2016-10-25
| | | | | | | | | | Reviewed-by: Timo Rothenpieler <timo@rothenpieler.org> Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* | avfilter/vf_scale_npp: select cubic and lanczos as alternative where ↵Sven C. Dack2016-10-19
| | | | | | | | | | | | super-sampling is not supported Signed-off-by: Timo Rothenpieler <timo@rothenpieler.org>
* | avfilter: Add AV_OPT_FLAG_FILTERING_PARAM to where it was missingMichael Niedermayer2016-04-21
| | | | | | | | Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* | Merge commit '8a02a8031ef4f98faf5647f0e01a8922247bf748'Derek Buitenhuis2016-04-18
|/ | | | | | | * commit '8a02a8031ef4f98faf5647f0e01a8922247bf748': lavfi: add an NVIDIA NPP-based scaling filter Merged-by: Derek Buitenhuis <derek.buitenhuis@gmail.com>
* lavfi: add an NVIDIA NPP-based scaling filterAnton Khirnov2016-03-23