summaryrefslogtreecommitdiffstats
path: root/libavutil/pixdesc.c
Commit message (Collapse)AuthorAgeFilesLines
* avutil/pixfmt: Add EBU Tech. 3213-E AVColorPrimaries valueRaphaël Zumer2019-09-011-1/+1
| | | | | | | | | | This is an alias for JEDEC P22. The name associated with the value is also changed from jedec-p22 to ebu3213 to match ITU-T H.273. Signed-off-by: Raphaël Zumer <rzumer@tebako.net> Signed-off-by: James Almer <jamrial@gmail.com>
* avutil: Add NV24 and NV42 pixel formatsPhilip Langdale2019-05-121-0/+24
| | | | | | | | | | | | | These are the 4:4:4 variants of the semi-planar NV12/NV21 formats. These formats are not used much, so we've never had a reason to add them until now. VDPAU recently added support HEVC 4:4:4 content and when you use the OpenGL interop, the returned surfaces are in NV24 format, so we need the pixel format for media players, even if there's no direct use within ffmpeg. Separately, there are apparently webcams that use NV24, but I've never seen one.
* avutil : add YUVA444P12 and YUVA422P12Martin Vignali2018-11-241-0/+52
|
* avutil/pixdesc: Add av_write_image_line2(), av_read_image_line2()Michael Niedermayer2018-10-271-16/+56
| | | | | | | | | This is needed because of 32bit float formats (which are difficult to store in 16bits) This also fixes undefined behavior found by fate Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* libavutil: Adds gray floating-point pixel formats.Sergey Lavrushkin2018-08-111-0/+22
| | | | Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* pixdesc: Only check against valid entries when iterating over lists of enumsDerek Buitenhuis2018-06-121-4/+24
| | | | | | | | | | | Some of these enums have gaps in between their values, since they correspond to the values in various specs, instead of being an incrementing list. Fixes segfaults when, for example, using the valid API call: av_color_primaries_from_name("jecdec-p22"); Signed-off-by: Derek Buitenhuis <derek.buitenhuis@gmail.com>
* avutil: add gray14 pixel formatPaul B Mahol2018-05-051-0/+21
| | | | Signed-off-by: Paul B Mahol <onemda@gmail.com>
* Use AV_PIX_FMT_FLAG_ALPHA for detecting transparency where nb_components was ↵Marton Balint2018-04-301-1/+1
| | | | | | | | | | used Temporarily keep the old method for ffmpeg_filters.c choose_pix_fmt and avfiltergraph.c pick_format() until a paletted pixel format without alpha is introduced. Signed-off-by: Marton Balint <cus@passwd.hu>
* avutil/pixdesc: add AV_PIX_FMT_FLAG_ALPHA to AV_PIX_FMT_PAL8Marton Balint2018-04-301-2/+1
| | | | Signed-off-by: Marton Balint <cus@passwd.hu>
* avutil/pixdesc: deprecate AV_PIX_FMT_FLAG_PSEUDOPALwm42018-04-031-5/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | PSEUDOPAL pixel formats are not paletted, but carried a palette with the intention of allowing code to treat unpaletted formats as paletted. The palette simply mapped the byte values to the resulting RGB values, making it some sort of LUT for RGB conversion. It was used for 1 byte formats only: RGB4_BYTE, BGR4_BYTE, RGB8, BGR8, GRAY8. The first 4 are awfully obscure, used only by some ancient bitmap formats. The last one, GRAY8, is more common, but its treatment is grossly incorrect. It considers full range GRAY8 only, so GRAY8 coming from typical Y video planes was not mapped to the correct RGB values. This cannot be fixed, because AVFrame.color_range can be freely changed at runtime, and there is nothing to ensure the pseudo palette is updated. Also, nothing actually used the PSEUDOPAL palette data, except xwdenc (trivially changed in the previous commit). All other code had to treat it as a special case, just to ignore or to propagate palette data. In conclusion, this was just a very strange old mechnaism that has no real justification to exist anymore (although it may have been nice and useful in the past). Now it's an artifact that makes the API harder to use: API users who allocate their own pixel data have to be aware that they need to allocate the palette, or FFmpeg will crash on them in _some_ situations. On top of this, there was no API to allocate the pseuo palette outside of av_frame_get_buffer(). This patch not only deprecates AV_PIX_FMT_FLAG_PSEUDOPAL, but also makes the pseudo palette optional. Nothing accesses it anymore, though if it's set, it's propagated. It's still allocated and initialized for compatibility with API users that rely on this feature. But new API users do not need to allocate it. This was an explicit goal of this patch. Most changes replace AV_PIX_FMT_FLAG_PSEUDOPAL with FF_PSEUDOPAL. I first tried #ifdefing all code, but it was a mess. The FF_PSEUDOPAL macro reduces the mess, and still allows defining FF_API_PSEUDOPAL to 0. Passes FATE with FF_API_PSEUDOPAL enabled and disabled. In addition, FATE passes with FF_API_PSEUDOPAL set to 1, but with allocation functions manually changed to not allocating a palette.
* lavu: Add OpenCL hardware pixfmtMark Thompson2017-11-221-0/+4
|
* Merge commit 'dd343fd986459f467a2d1d70c26101dff1d47d68'James Almer2017-10-231-38/+0
|\ | | | | | | | | | | | | * commit 'dd343fd986459f467a2d1d70c26101dff1d47d68': lavu: Drop deprecated VDPAU pixel formats Merged-by: James Almer <jamrial@gmail.com>
| * lavu: Drop deprecated VDPAU pixel formatsVittorio Giovara2017-03-231-38/+0
| | | | | | | | Deprecated in 07/2013.
* | Merge commit 'dcc39ee10e82833ce24aa57926c00ffeb1948198'James Almer2017-10-231-12/+0
|\ \ | |/ | | | | | | | | | | * commit 'dcc39ee10e82833ce24aa57926c00ffeb1948198': lavc: Remove deprecated XvMC support hacks Merged-by: James Almer <jamrial@gmail.com>
| * lavc: Remove deprecated XvMC support hacksDiego Biurrun2017-03-231-10/+0
| | | | | | | | Deprecated in 11/2013.
* | lavc: drop VDAClément Bœsch2017-10-231-10/+0
| | | | | | | | | | Deprecated (aka removed) in OSX 10.11, and we have a replacement for it (VideoToolbox).
* | Merge commit 'fd9212f2edfe9b107c3c08ba2df5fd2cba5ab9e3'James Almer2017-09-261-5/+5
|\ \ | |/ | | | | | | | | | | * commit 'fd9212f2edfe9b107c3c08ba2df5fd2cba5ab9e3': Mark some arrays that never change as const. Merged-by: James Almer <jamrial@gmail.com>
| * Mark some arrays that never change as const.Anton Khirnov2017-02-011-5/+5
| |
* | pixdesc: Add API to map color property names to enum valuesVittorio Giovara2017-09-211-0/+65
| | | | | | | | Signed-off-by: Vittorio Giovara <vittorio.giovara@gmail.com>
* | lavu: Add DRM hwcontextMark Thompson2017-09-131-0/+4
| |
* | Add single precision planar RGB pixel formatsVittorio Giovara2017-08-151-0/+54
| | | | | | | | | | | | Add a pixel format flag to identify this family. Signed-off-by: Vittorio Giovara <vittorio.giovara@gmail.com>
* | pixfmt: Support chroma-derived and ictcp color matricesVittorio Giovara2017-08-101-0/+3
| | | | | | | | Signed-off-by: Vittorio Giovara <vittorio.giovara@gmail.com>
* | libavutil: add GRAY9 pixel formatPaul B Mahol2017-08-071-0/+21
| |
* | pixdesc: Reindent after previous commitMark Thompson2017-07-221-12/+12
| |
* | pixdesc: Explicitly handle invalid arguments to av_find_best_pix_fmt_of_2()Mark Thompson2017-07-221-0/+6
| |
* | pixdesc: Improve scoring for opaque/unknown pixel formatsMark Thompson2017-07-181-4/+12
| | | | | | | | | | | | | | | | | | | | | | | | | | Hardware pixel formats do not tell you anything about their actual contents, but should still score higher than formats with completely unknown properties, which in turn should score higher than invalid formats. Do not return an AVERROR code as a score. Fixes a hang in libavfilter where format negotiation gets stuck in a loop because AV_PIX_FMT_NONE scores more highly than all other possibilities.
* | lavu: add new D3D11 pixfmt and hwcontextwm42017-06-271-0/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | To be used with the new d3d11 hwaccel decode API. With the new hwaccel API, we don't want surfaces to depend on the decoder (other than the required dimension and format). The old D3D11VA pixfmt uses ID3D11VideoDecoderOutputView pointers, which include the decoder configuration, and thus is incompatible with the new hwaccel API. This patch introduces AV_PIX_FMT_D3D11, which uses ID3D11Texture2D and an index. It's simpler and compatible with the new hwaccel API. The introduced hwcontext supports only the new pixfmt. Frame upload code untested. Significantly based on work by Steve Lhomme <robux4@gmail.com>, but with heavy changes/rewrites. Merges Libav commit fff90422d181744cd75dbf011687ee7095f02875. Signed-off-by: Diego Biurrun <diego@biurrun.de>
* | Merge commit '17dac56b8fdd80c594c39b76de3f27a7949afbde'Clément Bœsch2017-03-311-1/+1
|\ \ | |/ | | | | | | | | | | * commit '17dac56b8fdd80c594c39b76de3f27a7949afbde': lavu: Rename ycgco color space appropriately Merged-by: Clément Bœsch <cboesch@gopro.com>
| * lavu: Rename ycgco color space appropriatelyVittorio Giovara2016-11-081-1/+1
| | | | | | | | | | | | Planes are ordered as the name suggests now. Signed-off-by: Vittorio Giovara <vittorio.giovara@gmail.com>
| * pixfmt: Add GRAY12Luca Barbato2016-11-071-0/+22
| |
* | Merge commit '0d9b9bd37f43ee29ad9f709d85c8f3be9db71104'Clément Bœsch2017-03-241-0/+1
|\ \ | |/ | | | | | | | | | | * commit '0d9b9bd37f43ee29ad9f709d85c8f3be9db71104': lavu: Add JEDEC P22 color primaries Merged-by: Clément Bœsch <u@pkh.me>
| * lavu: Add JEDEC P22 color primariesVittorio Giovara2016-10-211-0/+1
| |
| * Add GBRAP12 pixel format supportKieran Kunhya2016-10-121-0/+28
| | | | | | | | Signed-off-by: Diego Biurrun <diego@biurrun.de>
| * Add GBRP12 pixel format supportMichael Niedermayer2016-10-121-0/+25
| | | | | | | | Signed-off-by: Vittorio Giovara <vittorio.giovara@gmail.com>
| * pixfmt: Add yuv444p12 pixel formatLuca Barbato2016-09-271-0/+25
| |
| * pixfmt: Add yuv422p12 pixel formatLuca Barbato2016-09-271-0/+25
| |
| * pixfmt: Add yuv420p12 pixel formatLuca Barbato2016-09-271-0/+25
| |
| * pixfmt: add P010 pixel formatHendrik Leppkes2016-07-021-0/+24
| | | | | | | | | | | | | | P010 is the 10-bit variant of NV12 (planar luma, packed chroma), using two bytes per component to store 10-bit data plus 6-bit zeroes in the LSBs. Signed-off-by: Anton Khirnov <anton@khirnov.net>
* | lavu: add AV_PIX_FMT_FLAG_BAYERClément Bœsch2017-03-201-13/+13
| |
* | avutil: add P016 pixel formatPhilip Langdale2016-11-221-0/+24
| | | | | | | | | | | | | | | | | | P016 is the 16-bit variant of NV12 (planar luma, packed chroma), using two bytes per component. It may, and in fact is most likely to, be used in situations where there are less than 16 bits of data. It is the responsibility of the writer to zero out any unused LSBs.
* | lavu/pixfmt: Add GRAY10Carl Eugen Hoyos2016-11-141-0/+21
| | | | | | | | Based on 7471352f by Luca Barbato.
* | Merge commit '444a36269f853844369af0a9836507e5a2780323'Hendrik Leppkes2016-11-131-1/+1
|\ \ | |/ | | | | | | | | | | * commit '444a36269f853844369af0a9836507e5a2780323': pixdesc: Fix AVCOL_TRC_BT2020_12 name Merged-by: Hendrik Leppkes <h.leppkes@gmail.com>
| * pixdesc: Fix AVCOL_TRC_BT2020_12 nameVittorio Giovara2016-06-271-1/+1
| |
* | Merge commit 'f172e22d6aed0bff36e975bafb0183b6779f9444'Hendrik Leppkes2016-11-131-3/+3
|\ \ | |/ | | | | | | | | | | * commit 'f172e22d6aed0bff36e975bafb0183b6779f9444': pixdesc: Add aliases to SMPTE color properties Merged-by: Hendrik Leppkes <h.leppkes@gmail.com>
| * pixdesc: Add aliases to SMPTE color propertiesVittorio Giovara2016-06-271-3/+3
| | | | | | | | | | Drop ST from names and symbols, it does not add anything distinctive or descriptive.
* | pixfmt: Add GRAY12Luca Barbato2016-11-101-0/+21
| | | | | | | | Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* | Merge commit 'a8164323374e86ce5f93759230868c98356833a2'James Almer2016-09-281-0/+3
|\ \ | |/ | | | | | | | | | | | | | | | | | | | | | | | | * commit 'a8164323374e86ce5f93759230868c98356833a2': pixdesc: Add new SMPTE 431, 432, and 2085 color properties Conflicts: libavcodec/options_table.h libavcodec/version.h libavutil/pixdesc.c libavutil/pixfmt.h libavutil/version.h Merged-by: James Almer <jamrial@gmail.com>
| * pixdesc: Add new SMPTE 431, 432, and 2085 color propertiesVittorio Giovara2016-06-211-0/+3
| | | | | | | | | | | | Appeared in H.264 2016/02. Signed-off-by: Vittorio Giovara <vittorio.giovara@gmail.com>
| * pixfmt: Add ARIB STD-B76 color transfer characteristicNeil Birkbeck2016-06-211-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Adding hybrid log-gamma (https://en.wikipedia.org/wiki/Hybrid_Log-Gamma) based on the standardization in ARIB STD-B67: http://www.arib.or.jp/english/html/overview/doc/2-STD-B67v1_0.pdf The choice of enum value of 18 is consistent with HEVC: http://phenix.it-sudparis.eu/jct/doc_end_user/current_document.php?id=10481 And also with latest proposal for color format in mkv: https://mailarchive.ietf.org/arch/search/?email_list=cellar&gbt=1&q=Colour+Format+proposal Signed-off-by: Vittorio Giovara <vittorio.giovara@gmail.com>
* | Merge commit 'bcc07e2576cb723007bea1238afd019ae2d1b005'Clément Bœsch2016-07-091-18/+55
|\ \ | |/ | | | | | | | | | | * commit 'bcc07e2576cb723007bea1238afd019ae2d1b005': pixdesc: Use C99 array to list color properties names Merged-by: Clément Bœsch <u@pkh.me>
OpenPOWER on IntegriCloud