summaryrefslogtreecommitdiff
path: root/libavfilter/vf_psnr.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/internal: Factor out executing a filter's execute_funcAndreas Rheinhardt2021-08-15
| | | | | | | The current way of doing it involves writing the ctx parameter twice. 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/vf_psnr: remove unnecessary checkLimin Wang2021-05-01
| | | | 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>
* avfilter/vf_psnr: add support for slice threadingPaul B Mahol2021-02-19
|
* avfilter/vf_psnr: remove precision limits for metadata valuesPaul B Mahol2021-02-12
|
* avfilter/vf_psnr: add timeline supportPaul B Mahol2021-02-12
|
* avfilter/vf_psnr: fix logic failure when comparing time basesPaul B Mahol2020-02-01
|
* avfilter/vf_psnr,vf_ssim: add warning if different timebases are encounteredPaul B Mahol2019-10-25
|
* avfilter: add support for gray14 formatPaul B Mahol2018-09-09
|
* avfilter/vf_psnr: add more gbrap formatsPaul B Mahol2017-12-20
| | | | Signed-off-by: Paul B Mahol <onemda@gmail.com>
* lavfi: Rename local variables "main" as "master".Carl Eugen Hoyos2017-10-07
| | | | | Silences several warnings: main is usually a function
* lavfi: rename framesync2 to framesync.Nicolas George2017-09-12
|
* lavfi/vf_psnr: convert to framesync2.Nicolas George2017-08-29
|
* avfilter: add support for GRAY9 and GBRAP10Paul B Mahol2017-08-07
|
* avfilter: do not use AVFrame accessorMuhammad Faiz2017-04-23
| | | | | Reviewed-by: wm4 <nfxjfg@googlemail.com> Signed-off-by: Muhammad Faiz <mfcc64@gmail.com>
* lavfi/psnr: rename pow2 to pow_2Clément Bœsch2017-03-29
| | | | | | | | | | | This conflict with the DJGPP libc which includes a pow2 function¹ We cannot make DJGPP POSIX only (using -D_POSIX_SOURCE) to avoid this kind of symbols conflicts due to the lack of both posix_memalign and memalign (DJGPP non standard function) in that POSIX mode. We currently rely on memalign for aligned heap allocation. [1]: http://www.delorie.com/djgpp/doc/libc-2.02/libc_536.html
* avfilter/vf_psnr: add gray10 and gray12 supportPaul B Mahol2016-12-21
| | | | Signed-off-by: Paul B Mahol <onemda@gmail.com>
* avfilter/vf_psnr: Add max value output option to psnr stats log.Lucas Cooper2016-09-01
| | | | | | | This allows retroactive calculation/aggregation of PSNR from the stats log. Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* avfilter: Add new format for PSNR stats logLucas Cooper2016-07-29
| | | | | | | | | | | | Add an AVOption stats_version with a new header for V2 stats, which specifies the stats log version and lists the fields that will be present in the log (to ease parsing). The primary motivation is to facilitate the addition of optional fields to the log without breaking backwards compatibility, while making the logs easier to parse. Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* avfilter/vf_psnr: Fix rounding error in average_maxMichael Niedermayer2016-07-21
| | | | | | | The intermediate was rounded to an integer Reviewed-by: Paul B Mahol <onemda@gmail.com> Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* avutil: Rename FF_CEIL_COMPAT to AV_CEIL_COMPATDerek Buitenhuis2016-01-27
| | | | | | | | | | Libav, for some reason, merged this as a public API function. This will aid in future merges. A define is left for backwards compat, just in case some person used it, since it is in a public header. Signed-off-by: Derek Buitenhuis <derek.buitenhuis@gmail.com>
* avfilter/vf_psnr: use log10 instead of log()/log(10)Ganesh Ajjanagadde2015-10-29
| | | | | | | This is likely more precise and conveys the intent better. Reviewed-by: Michael Niedermayer <michael@niedermayer.cc> Signed-off-by: Ganesh Ajjanagadde <gajjanagadde@gmail.com>
* vf_psnr/ssim: don't crash if stats_file is NULL.Ronald S. Bultje2015-10-23
|
* vf_psnr: remove %0.2f format specifiers for stream summary line.Ronald S. Bultje2015-10-22
| | | | This makes output equally precise as vf_ssim.
* avfilter/vf_psnr: Add support for writing stats to stdoutTobias Rapp2015-10-21
| | | | | Reviewed-by: Paul B Mahol <onemda@gmail.com> Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* Replace all remaining occurances of step/depth_minus1 and offset_plus1Hendrik Leppkes2015-09-08
|
* vf_psnr: add psnr_avg to stats file.Ronald S. Bultje2015-08-05
|
* avfilter/vf_pnsr: fix author nameJames Almer2015-07-29
| | | | Signed-off-by: James Almer <jamrial@gmail.com>
* vf_psnr: sse2 optimizations for sum-squared-error.Ronald S. Bultje2015-07-14
| | | | | | | | | | | | The internal line accumulator for 16bit can overflow, so I changed that from int to uint64_t in the C code. The matching assembly looks a little weird but output looks correct. (avx2 should be trivial to add later.) Reviewed-by: Paul B Mahol <onemda@gmail.com> Reviewed-by: James Almer <jamrial@gmail.com> Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* vf_psnr: fix rgb channel order mixup in final log message.Ronald S. Bultje2015-07-11
| | | | | Reviewed-by: Paul B Mahol <onemda@gmail.com> Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* vf_psnr: always calculate MSE over full pixel range.Ronald S. Bultje2015-07-11
| | | | | | | | This makes the output compatible with that of pretty much any other tool that calculates PSNR. Reviewed-by: Paul B Mahol <onemda@gmail.com> Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* vF_psnr: move set_meta() calls out of loop.Ronald S. Bultje2015-07-11
| | | | | Reviewed-by: Paul B Mahol <onemda@gmail.com> Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* vf_psnr: add channel weighting based on chroma subsampling.Ronald S. Bultje2015-07-11
| | | | | | Also add per-channel psnr stream averages to final log message. Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* avfilter: handle error in query_formats() in bunch of filtersPaul B Mahol2015-04-08
| | | | Signed-off-by: Paul B Mahol <onemda@gmail.com>
* Replace PixelFormats which sneaked in over time or where forgotten by ↵Michael Niedermayer2015-03-18
| | | | | | AVPixelFormats Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* Fix a few heigth/height typo.Clément Bœsch2014-02-07
|
* Merge remote-tracking branch 'qatar/master'Michael Niedermayer2013-10-29
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * qatar/master: lavfi: do not export the filters from shared objects Conflicts: libavfilter/af_amix.c libavfilter/af_anull.c libavfilter/asrc_anullsrc.c libavfilter/f_select.c libavfilter/f_settb.c libavfilter/split.c libavfilter/src_movie.c libavfilter/vf_aspect.c libavfilter/vf_blackframe.c libavfilter/vf_colorbalance.c libavfilter/vf_copy.c libavfilter/vf_crop.c libavfilter/vf_cropdetect.c libavfilter/vf_drawbox.c libavfilter/vf_format.c libavfilter/vf_framestep.c libavfilter/vf_frei0r.c libavfilter/vf_hflip.c libavfilter/vf_libopencv.c libavfilter/vf_lut.c libavfilter/vf_null.c libavfilter/vf_overlay.c libavfilter/vf_scale.c libavfilter/vf_transpose.c libavfilter/vf_unsharp.c libavfilter/vf_vflip.c Merged-by: Michael Niedermayer <michaelni@gmx.at>
* avfilter/dualinput: simplifyPaul B Mahol2013-09-30
| | | | Signed-off-by: Paul B Mahol <onemda@gmail.com>
* lavfi/dualinput: reimplement on top of framesync.Nicolas George2013-09-23
|
* avfilter/vf_psnr: avoid 64bit arithmetic in the inner loopMichael Niedermayer2013-09-21
| | | | Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* avfilter/vf_psnr: Prevent integer overflow.Neil Birkbeck2013-09-21
| | | | | | | | The 32-bit integer accumulator in MSE computation can overflow for 8-bit frame data. (e.g., for 1080p white frame compared to a black frame can give sum of 255*255*1080*1920 > 2^32). Signed-off-by: Neil Birkbeck <neil.birkbeck@gmail.com> Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* avfilter: various cosmeticsPaul B Mahol2013-09-12
| | | | Signed-off-by: Paul B Mahol <onemda@gmail.com>
* avfilter/vf_psnr: >8 bit planar supportPaul B Mahol2013-09-10
| | | | Signed-off-by: Paul B Mahol <onemda@gmail.com>
* avfilter/vf_psnr: refactor subsampled format supportPaul B Mahol2013-09-08
| | | | Signed-off-by: Paul B Mahol <onemda@gmail.com>
* lavfi/psnr: rename 's' parameter to match documentationPaul B Mahol2013-07-09
| | | | | | Also removes some irrelevant lines in documentation. Signed-off-by: Paul B Mahol <onemda@gmail.com>
* lavfi: fix broken logic in metadata handlingPaul B Mahol2013-07-08
| | | | Signed-off-by: Paul B Mahol <onemda@gmail.com>
* lavfi: add psnr filterPaul B Mahol2013-07-08
Signed-off-by: Paul B Mahol <onemda@gmail.com>