summaryrefslogtreecommitdiff
path: root/libswscale/input.c
Commit message (Collapse)AuthorAge
* swscale: add NV16 input/outputMatthieu Bouron2022-07-19
| | | | Signed-off-by: Anton Khirnov <anton@khirnov.net>
* Remove unnecessary libavutil/(avutil|common|internal).h inclusionsAndreas Rheinhardt2022-02-24
| | | | | | | | | | Some of these were made possible by moving several common macros to libavutil/macros.h. While just at it, also improve the other headers a bit. Reviewed-by: Martin Storsjö <martin@martin.st> Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
* swscale: add P210/P410/P216/P416 inputrcombs2021-11-28
|
* swscale/input: clip rgbf32 values before lrintfMark Reid2021-11-15
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | if the float pixel * 65535.0f > 2147483647.0f lrintf may overfow and return negative values, depending on implementation. nan and +/-inf values may also be implementation defined clip the value first so lrintf always works. values < 0.0f, -inf, nan = 0.0f values > 65535.0f, +inf = 65535.0f old timings 195960 decicycles in planar_rgbf32le_to_uv, 1 runs, 0 skips 186120 decicycles in planar_rgbf32le_to_uv, 2 runs, 0 skips 188645 decicycles in planar_rgbf32le_to_uv, 4 runs, 0 skips 183625 decicycles in planar_rgbf32le_to_uv, 8 runs, 0 skips 181157 decicycles in planar_rgbf32le_to_uv, 16 runs, 0 skips 177533 decicycles in planar_rgbf32le_to_uv, 32 runs, 0 skips 175689 decicycles in planar_rgbf32le_to_uv, 64 runs, 0 skips 232960 decicycles in planar_rgbf32be_to_uv, 1 runs, 0 skips 221380 decicycles in planar_rgbf32be_to_uv, 2 runs, 0 skips 216640 decicycles in planar_rgbf32be_to_uv, 4 runs, 0 skips 213505 decicycles in planar_rgbf32be_to_uv, 8 runs, 0 skips 211558 decicycles in planar_rgbf32be_to_uv, 16 runs, 0 skips 210596 decicycles in planar_rgbf32be_to_uv, 32 runs, 0 skips 210202 decicycles in planar_rgbf32be_to_uv, 64 runs, 0 skips 161680 decicycles in planar_rgbf32le_to_y, 1 runs, 0 skips 153540 decicycles in planar_rgbf32le_to_y, 2 runs, 0 skips 148255 decicycles in planar_rgbf32le_to_y, 4 runs, 0 skips 140600 decicycles in planar_rgbf32le_to_y, 8 runs, 0 skips 132935 decicycles in planar_rgbf32le_to_y, 16 runs, 0 skips 128531 decicycles in planar_rgbf32le_to_y, 32 runs, 0 skips 140933 decicycles in planar_rgbf32le_to_y, 64 runs, 0 skips 190980 decicycles in planar_rgbf32be_to_y, 1 runs, 0 skips 176080 decicycles in planar_rgbf32be_to_y, 2 runs, 0 skips 167980 decicycles in planar_rgbf32be_to_y, 4 runs, 0 skips 164685 decicycles in planar_rgbf32be_to_y, 8 runs, 0 skips 162751 decicycles in planar_rgbf32be_to_y, 16 runs, 0 skips 162404 decicycles in planar_rgbf32be_to_y, 32 runs, 0 skips 167849 decicycles in planar_rgbf32be_to_y, 64 runs, 0 skips new timings 183320 decicycles in planar_rgbf32le_to_uv, 1 runs, 0 skips 175700 decicycles in planar_rgbf32le_to_uv, 2 runs, 0 skips 179570 decicycles in planar_rgbf32le_to_uv, 4 runs, 0 skips 172932 decicycles in planar_rgbf32le_to_uv, 8 runs, 0 skips 168707 decicycles in planar_rgbf32le_to_uv, 16 runs, 0 skips 165224 decicycles in planar_rgbf32le_to_uv, 32 runs, 0 skips 163423 decicycles in planar_rgbf32le_to_uv, 64 runs, 0 skips 184940 decicycles in planar_rgbf32be_to_uv, 1 runs, 0 skips 185150 decicycles in planar_rgbf32be_to_uv, 2 runs, 0 skips 185790 decicycles in planar_rgbf32be_to_uv, 4 runs, 0 skips 185472 decicycles in planar_rgbf32be_to_uv, 8 runs, 0 skips 185277 decicycles in planar_rgbf32be_to_uv, 16 runs, 0 skips 185813 decicycles in planar_rgbf32be_to_uv, 32 runs, 0 skips 185332 decicycles in planar_rgbf32be_to_uv, 64 runs, 0 skips 145400 decicycles in planar_rgbf32le_to_y, 1 runs, 0 skips 145100 decicycles in planar_rgbf32le_to_y, 2 runs, 0 skips 143490 decicycles in planar_rgbf32le_to_y, 4 runs, 0 skips 136687 decicycles in planar_rgbf32le_to_y, 8 runs, 0 skips 131271 decicycles in planar_rgbf32le_to_y, 16 runs, 0 skips 128698 decicycles in planar_rgbf32le_to_y, 32 runs, 0 skips 127170 decicycles in planar_rgbf32le_to_y, 64 runs, 0 skips 156020 decicycles in planar_rgbf32be_to_y, 1 runs, 0 skips 146990 decicycles in planar_rgbf32be_to_y, 2 runs, 0 skips 142020 decicycles in planar_rgbf32be_to_y, 4 runs, 0 skips 141052 decicycles in planar_rgbf32be_to_y, 8 runs, 0 skips 138973 decicycles in planar_rgbf32be_to_y, 16 runs, 0 skips 138027 decicycles in planar_rgbf32be_to_y, 32 runs, 0 skips 143939 decicycles in planar_rgbf32be_to_y, 64 runs, 0 skips Reviewed-by: Michael Niedermayer <michael@niedermayer.cc> Signed-off-by: James Almer <jamrial@gmail.com>
* swscale/input: unify grayf32 funcs with rgbf32 funcsMark Reid2021-11-14
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This is ment to be a cosmetic change old timings: 42780 UNITS in grayf32le, 1 runs, 0 skips 56720 UNITS in grayf32le, 2 runs, 0 skips 67265 UNITS in grayf32le, 4 runs, 0 skips 58082 UNITS in grayf32le, 8 runs, 0 skips 63512 UNITS in grayf32le, 16 runs, 0 skips 52720 UNITS in grayf32le, 32 runs, 0 skips 46491 UNITS in grayf32le, 64 runs, 0 skips 68500 UNITS in grayf32be, 1 runs, 0 skips 66930 UNITS in grayf32be, 2 runs, 0 skips 62305 UNITS in grayf32be, 4 runs, 0 skips 55510 UNITS in grayf32be, 8 runs, 0 skips 50216 UNITS in grayf32be, 16 runs, 0 skips 44480 UNITS in grayf32be, 32 runs, 0 skips 42394 UNITS in grayf32be, 64 runs, 0 skips new timings: 46660 UNITS in grayf32le, 1 runs, 0 skips 51830 UNITS in grayf32le, 2 runs, 0 skips 53390 UNITS in grayf32le, 4 runs, 0 skips 50910 UNITS in grayf32le, 8 runs, 0 skips 44968 UNITS in grayf32le, 16 runs, 0 skips 40349 UNITS in grayf32le, 32 runs, 0 skips 38330 UNITS in grayf32le, 64 runs, 0 skips 39980 UNITS in grayf32be, 1 runs, 0 skips 49630 UNITS in grayf32be, 2 runs, 0 skips 53540 UNITS in grayf32be, 4 runs, 0 skips 59767 UNITS in grayf32be, 8 runs, 0 skips 51206 UNITS in grayf32be, 16 runs, 0 skips 44743 UNITS in grayf32be, 32 runs, 0 skips 41468 UNITS in grayf32be, 64 runs, 0 skips Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* swscale/input: fix planar_rgb16_to_a for gbrap10be and gbrap12be formatsMark Reid2021-11-04
| | | | Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* swscale: add input/output support for X2BGR10LEManuel Stoeckl2021-09-26
| | | | | Signed-off-by: Manuel Stoeckl <code@mstoeckl.com> Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* avutil/internal, swresample/audioconvert: Remove cpu.h inclusionsAndreas Rheinhardt2021-07-22
| | | | | | | | | | These inclusions are not necessary, as cpu.h is already included wherever it is needed (via direct inclusion or via the arch-specific headers). Also remove other unnecessary cpu.h inclusions from ordinary non-headers. Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
* libswcale/input: use more accurate planer rgb16 yuv conversionsMark Reid2020-10-06
| | | | | | | These conversion appears to be exhibiting the same rounding error as the rgbf32 formats where. I seperated the rounding value from the 16 and 128 offsets, I think it makes it a little more clear. Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* libswcale/input: use more accurate rgbf32 yuv conversionsMark Reid2020-10-02
| | | | Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* swscale/yuv2rgb: consider x2rgb10le on big endian hardwareFei Wang2020-07-20
| | | | | | | This fixed FATE fail report by filter-pixfmts* for x2rgb10le on big endian hardware. Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* swscale: Add swscale input/output support for X2RGB10LEFei Wang2020-06-12
| | | | Signed-off-by: Fei Wang <fei.w.wang@intel.com>
* libswscale: add input support AV_PIX_FMT_GBRAPF32Mark Reid2020-05-05
| | | | Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* lsws/input: Do not change transparency range.Carl Eugen Hoyos2020-03-11
| | | | Fixes ticket #8509.
* swscale: Add swscale input support for Y210LELinjie Fu2020-02-24
| | | | | | | | Add swscale input support for Y210LE, output support and fate test could be added later if there is requirement for software CSC to this packed format. Signed-off-by: Linjie Fu <linjie.fu@intel.com>
* swscale/input: Fix several invalid shifts related to rgb2yuv constantsMichael Niedermayer2020-01-22
| | | | | | | | Fixes: Invalid shifts Fixes: #8140 Fixes: #8146 Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* swscale: Add support for NV24 and NV42Philip Langdale2019-05-12
| | | | | | | | | | | The implementation is pretty straight-forward. Most of the existing NV12 codepaths work regardless of subsampling and are re-used as is. Where necessary I wrote the slightly different NV24 versions. Finally, the one thing that confused me for a long time was the asm specific x86 path that did an explicit exclusion check for NV12. I replaced that with a semi-planar check and also updated the equivalent PPC code, which Lauri kindly checked.
* swscale : add support for YUVA444P12 and YUVA422P12Martin Vignali2018-11-24
|
* libswscale: Adds conversions from/to float gray format.Sergey Lavrushkin2018-08-14
| | | | Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* swscale: add gray14 supportPaul B Mahol2018-05-05
| | | | Signed-off-by: Paul B Mahol <onemda@gmail.com>
* libswscale: add gray9 supportPaul B Mahol2017-08-07
|
* Merge commit 'de8e096c7eda2bce76efd0a1c1c89d37348c2414'Clément Bœsch2017-03-21
|\ | | | | | | | | | | | | * commit 'de8e096c7eda2bce76efd0a1c1c89d37348c2414': swscale: Consistently order input YUV pixel formats Merged-by: Clément Bœsch <u@pkh.me>
| * swscale: Consistently order input YUV pixel formatsVittorio Giovara2016-09-27
| | | | | | | | | | | | | | Follow a 420, 422, 444 order instead of a random one. This simplifies double-checking additions of new formats. Signed-off-by: Diego Biurrun <diego@biurrun.de>
| * swscale: add P010 input supportHendrik Leppkes2016-07-02
| | | | | | | | Signed-off-by: Anton Khirnov <anton@khirnov.net>
| * swscale: fix gbrap to gbrap alpha scalingVittorio Giovara2015-01-16
| |
| * swscale: fix warning about incompatible function pointer typeVittorio Giovara2015-01-16
| |
| * libswscale: GBRAP input & output and GBRAP16 input supportPaul B Mahol2015-01-14
| | | | | | | | Signed-off-by: Vittorio Giovara <vittorio.giovara@gmail.com>
* | lsws/input: Do not define unused functions.Carl Eugen Hoyos2017-03-08
| | | | | | | | | | Fixes warnings like the following: libswscale/input.c:951:13: warning: ‘planar_rgb14be_to_a’ defined but not used
* | swscale: add P016 input supportPhilip Langdale2017-02-01
| |
* | lsws: Add GRAY10 conversion.Carl Eugen Hoyos2016-11-14
| | | | | | | | Based on 19be5fb7 by Luca Barbato.
* | swscale: Add GRAY12Luca Barbato2016-11-10
| | | | | | | | Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* | swscale/input: Fix alpha bswap for set readAlpPlanarMichael Niedermayer2016-11-10
| | | | | | | | Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* | swscale: add input support for gbrap10 pixel formatPaul B Mahol2016-06-10
| | | | | | | | Signed-off-by: Paul B Mahol <onemda@gmail.com>
* | swscale: cleanup unused codePedro Arthur2016-03-31
| | | | | | | | | | Removed previous swscale code under '#ifndef NEW_FILTER' and removed unused fields of SwsContext
* | Add GBRAP12 pixel formatKieran Kunhya2016-02-24
| | | | | | | | Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* | swscale/input: Fix GBRAP16 inputMichael Niedermayer2016-02-24
| | | | | | | | | | | | Fixes part of Ticket5264 Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* | swscale: add P010 input supportHendrik Leppkes2016-01-26
| |
* | swscale: ayuv64le input supportPaul B Mahol2015-07-24
| | | | | | | | Signed-off-by: Paul B Mahol <onemda@gmail.com>
* | swscale: add yuv440p10/12 pixfmts.Ronald S. Bultje2015-05-06
| |
* | swscale/input: fix rgba64 alpha non nativeMichael Niedermayer2015-01-21
| | | | | | | | Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* | swscale/input: Fix alpha of YA16 inputMichael Niedermayer2015-01-21
| | | | | | | | | | | | Fixes Ticket4278 Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* | Merge commit 'f84a1b597c29dc035b8d5529ef88c2d7ff057820'Michael Niedermayer2014-08-04
|\| | | | | | | | | | | | | | | | | | | * commit 'f84a1b597c29dc035b8d5529ef88c2d7ff057820': swscale: support AV_PIX_FMT_YA16 as input Conflicts: libswscale/swscale_unscaled.c Merged-by: Michael Niedermayer <michaelni@gmx.at>
| * swscale: support AV_PIX_FMT_YA16 as inputVittorio Giovara2014-08-04
| | | | | | | | Based on a long debug session with Kostya.
* | Merge commit 'e96c3b81cadd0ba84d43b1f3a54980df3785d9a5'Michael Niedermayer2014-08-04
|\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * commit 'e96c3b81cadd0ba84d43b1f3a54980df3785d9a5': avutil: rename AV_PIX_FMT_Y400A to AV_PIX_FMT_YA8 Conflicts: libavcodec/libopenjpegdec.c libavcodec/libopenjpegenc.c libavcodec/raw.c libavutil/pixdesc.c libavutil/pixfmt.h libavutil/version.h libswscale/swscale_internal.h libswscale/swscale_unscaled.c Merged-by: Michael Niedermayer <michaelni@gmx.at>
| * avutil: rename AV_PIX_FMT_Y400A to AV_PIX_FMT_YA8Vittorio Giovara2014-08-04
| | | | | | | | | | | | | | The rationale is that you have a packed format in form <greyscale sample> <alpha sample> <greyscale sample> <alpha sample> and shortening greyscale to 'G' might make one thing about Greenscale instead. An alias pixel format and color space name are provided for compatibility.
* | swscale/input: fix harmless integer overflowMichael Niedermayer2014-06-16
| | | | | | | | Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* | swscale/input: replace assert() by av_assert1()Michael Niedermayer2014-04-09
| | | | | | | | Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* | Merge commit '92b099daf4b8ef93513e38b43899cb8458a2fde3'Michael Niedermayer2014-04-09
|\| | | | | | | | | | | | | | | | | | | * commit '92b099daf4b8ef93513e38b43899cb8458a2fde3': swscale: support converting YVYU422 pixel format Conflicts: libswscale/input.c Merged-by: Michael Niedermayer <michaelni@gmx.at>
| * swscale: support converting YVYU422 pixel formatVittorio Giovara2014-04-07
| |
* | swscale: add full bgra64 supportMichael Niedermayer2014-04-02
| | | | | | | | Signed-off-by: Michael Niedermayer <michaelni@gmx.at>