ffmpeg/libavutil
wm4 d6fc031caf avutil/pixdesc: deprecate AV_PIX_FMT_FLAG_PSEUDOPAL
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.
2018-04-03 17:53:00 +02:00
..
aarch64 Merge commit '4cf84e254ae75b524e1cacae499a97d7cc9e5906' 2018-02-11 23:08:48 -03:00
arm Merge commit '3a7b4ae62c798edbd82bcd8fef863c74ed2acd4a' 2018-03-30 15:48:17 -03:00
avr32
bfin
mips
ppc Merge commit '4cf84e254ae75b524e1cacae499a97d7cc9e5906' 2018-02-11 23:08:48 -03:00
sh4
tests avutil/integer: move the test to the corresponding subdirectory 2018-03-20 23:27:58 -03:00
tomi
x86 Merge commit '4cf84e254ae75b524e1cacae499a97d7cc9e5906' 2018-02-11 23:08:48 -03:00
.gitignore
Makefile avcodec/avcodec.h: Add encryption info side data. 2018-03-24 03:11:08 +01:00
adler32.c
adler32.h
aes.c
aes.h
aes_ctr.c avutil/aes_ctr: Add method to set 16-byte IV. 2018-01-23 21:48:31 +01:00
aes_ctr.h avutil/aes_ctr: Add method to set 16-byte IV. 2018-01-23 21:48:31 +01:00
aes_internal.h
attributes.h
audio_fifo.c
audio_fifo.h
avassert.h
avstring.c
avstring.h
avutil.h
avutilres.rc
base64.c
base64.h
blowfish.c
blowfish.h
bprint.c
bprint.h
bswap.h
buffer.c
buffer.h
buffer_internal.h
camellia.c
camellia.h
cast5.c
cast5.h
channel_layout.c
channel_layout.h
color_utils.c
color_utils.h
colorspace.h
common.h avutil/common: Fix integer overflow in av_clip_uint8_c() and av_clip_uint16_c() 2018-02-17 15:56:55 +01:00
cpu.c avutil: add AVX-512 flags 2017-12-24 22:02:41 +01:00
cpu.h avutil: add AVX-512 flags 2017-12-24 22:02:41 +01:00
cpu_internal.h Merge commit '4cf84e254ae75b524e1cacae499a97d7cc9e5906' 2018-02-11 23:08:48 -03:00
crc.c crc: add AV_CRC_8_SBC as a 8 bits CRC with polynomial 0x1D 2018-03-07 22:26:53 +01:00
crc.h crc: add AV_CRC_8_SBC as a 8 bits CRC with polynomial 0x1D 2018-03-07 22:26:53 +01:00
des.c
des.h
dict.c
dict.h
display.c
display.h
downmix_info.c
downmix_info.h
dynarray.h
encryption_info.c avcodec/avcodec.h: Add encryption info side data. 2018-03-24 03:11:08 +01:00
encryption_info.h avcodec/avcodec.h: Add encryption info side data. 2018-03-24 03:11:08 +01:00
error.c
error.h
eval.c
eval.h
ffmath.h
fifo.c
fifo.h
file.c
file.h
file_open.c
fixed_dsp.c
fixed_dsp.h
float_dsp.c
float_dsp.h
frame.c avutil/pixdesc: deprecate AV_PIX_FMT_FLAG_PSEUDOPAL 2018-04-03 17:53:00 +02:00
frame.h lavu/frame: add QP side data 2018-03-18 12:36:24 +01:00
hash.c avutil/crypto: change length parameter to size_t on the remaining modules 2018-02-15 11:21:28 -03:00
hash.h avutil/crypto: change length parameter to size_t on the remaining modules 2018-02-15 11:21:28 -03:00
hmac.c
hmac.h
hwcontext.c Merge commit '2eb396b175e55e515aa6a13c5b1789a2a18d3935' 2018-02-11 22:50:57 -03:00
hwcontext.h hwcontext: Fix documentation for av_hwdevice_ctx_alloc() 2018-02-04 13:47:19 +00:00
hwcontext_cuda.c compat/cuda: Pass a logging context to load functions 2017-11-20 15:47:05 +00:00
hwcontext_cuda.h
hwcontext_cuda_internal.h
hwcontext_d3d11va.c hwcontext_d3d11: Fix crash with valid adapter but no device 2018-03-28 00:19:45 +01:00
hwcontext_d3d11va.h hwcontext_d3d11va: add missing stdint.h include 2017-11-17 23:27:43 +01:00
hwcontext_drm.c
hwcontext_drm.h hwcontext_drm: Clarify value for unknown format modifiers 2018-03-22 23:18:53 +00:00
hwcontext_dxva2.c hwcontext_dxva2: initialize D3DDISPLAYMODEEX correctly 2018-01-04 15:52:46 +01:00
hwcontext_dxva2.h
hwcontext_internal.h lavu/hwcontext: add AV_HWDEVICE_TYPE_MEDIACODEC 2017-12-16 00:52:00 +01:00
hwcontext_mediacodec.c lavu/hwcontext: add AV_HWDEVICE_TYPE_MEDIACODEC 2017-12-16 00:52:00 +01:00
hwcontext_mediacodec.h lavu/hwcontext: add AV_HWDEVICE_TYPE_MEDIACODEC 2017-12-16 00:52:00 +01:00
hwcontext_opencl.c hwcontext_opencl: Add support for mapping DRM objects to Beignet 2018-03-22 23:19:00 +00:00
hwcontext_opencl.h lavu/hwcontext_opencl.h: fix build on macOS 2017-11-28 00:23:42 -06:00
hwcontext_qsv.c Merge commit '86499771d1228d8303c8eb6509e20c0caaa02da5' 2018-03-29 21:02:02 -03:00
hwcontext_qsv.h
hwcontext_vaapi.c hwcontext_vaapi: Pass correct read/write flags when exporting surfaces 2018-03-22 23:18:57 +00:00
hwcontext_vaapi.h
hwcontext_vdpau.c hwcontext_vdpau: implement av_hwdevice_get_hwframe_constraints() 2018-01-15 12:37:30 +01:00
hwcontext_vdpau.h
hwcontext_videotoolbox.c
hwcontext_videotoolbox.h
imgutils.c avutil/pixdesc: deprecate AV_PIX_FMT_FLAG_PSEUDOPAL 2018-04-03 17:53:00 +02:00
imgutils.h
imgutils_internal.h
integer.c avutil/integer: move the test to the corresponding subdirectory 2018-03-20 23:27:58 -03:00
integer.h
internal.h avutil/pixdesc: deprecate AV_PIX_FMT_FLAG_PSEUDOPAL 2018-04-03 17:53:00 +02:00
intfloat.h
intmath.c
intmath.h
intreadwrite.h Merge commit '85e10c0a9321bfe0d2afe0f3983ab6a8df6e3fba' 2018-01-25 22:45:45 +00:00
lfg.c
lfg.h
libavutil.v
libm.h
lls.c
lls.h
log.c avutil/log: print level prefix also when no AVClass context is available 2018-03-16 09:08:17 +01:00
log.h
log2_tab.c
lzo.c
lzo.h
macros.h
mastering_display_metadata.c
mastering_display_metadata.h avutil/mastering_display_metadata: fix copyright header wrongly formated as doxy 2018-01-11 11:35:51 -03:00
mathematics.c
mathematics.h
md5.c
md5.h
mem.c lavu/mem: Allow allocations close to max_alloc_size with av_fast_realloc(). 2018-01-04 05:39:18 +01:00
mem.h avutil/mem: Add DECLARE_ASM_ALIGNED macro for DJGPP architecture. 2017-12-02 19:14:09 +01:00
mem_internal.h
motion_vector.h
murmur3.c avutil/crypto: change length parameter to size_t on the remaining modules 2018-02-15 11:21:28 -03:00
murmur3.h avutil/crypto: change length parameter to size_t on the remaining modules 2018-02-15 11:21:28 -03:00
opt.c lavu/opt: add bit stream filter option dump support. 2018-03-16 02:09:59 +01:00
opt.h lavu/opt: add AV_OPT_FLAG_BSF_PARAM 2018-03-16 02:09:59 +01:00
parseutils.c avutil/parseutils: only accept full us duration, do not accept mss duration 2018-03-09 22:01:38 +01:00
parseutils.h
pca.c
pca.h
pixdesc.c avutil/pixdesc: deprecate AV_PIX_FMT_FLAG_PSEUDOPAL 2018-04-03 17:53:00 +02:00
pixdesc.h avutil/pixdesc: deprecate AV_PIX_FMT_FLAG_PSEUDOPAL 2018-04-03 17:53:00 +02:00
pixelutils.c
pixelutils.h
pixfmt.h lavu/pixfmt: Remove gap in the middle of enum AVPixelFormat 2017-11-25 14:42:10 +00:00
qsort.h
random_seed.c
random_seed.h
rational.c
rational.h
rc4.c
rc4.h
replaygain.h
reverse.c
reverse.h
ripemd.c avutil/crypto: change length parameter to size_t on the remaining modules 2018-02-15 11:21:28 -03:00
ripemd.h avutil/crypto: change length parameter to size_t on the remaining modules 2018-02-15 11:21:28 -03:00
samplefmt.c
samplefmt.h
sha.c
sha.h
sha512.c
sha512.h
slicethread.c w32pthreads: always use Vista+ API, drop XP support 2017-12-26 02:49:48 +01:00
slicethread.h
softfloat.h
softfloat_ieee754.h
softfloat_tables.h
spherical.c
spherical.h
stereo3d.c
stereo3d.h Merge commit '99e9697e3a12ab4a6638a36b95edafd6a98f9eaa' 2017-11-29 21:06:49 -03:00
tablegen.h
tea.c
tea.h
thread.h lavc: replace and deprecate the lock manager 2017-12-26 02:50:00 +01:00
threadmessage.c
threadmessage.h
time.c
time.h
time_internal.h
timecode.c avutil/timecode: fix starting frame number for 59.94 fps 2018-02-23 01:53:34 +01:00
timecode.h
timer.h
timestamp.h
tree.c
tree.h
twofish.c
twofish.h
utils.c
version.h avutil/pixdesc: deprecate AV_PIX_FMT_FLAG_PSEUDOPAL 2018-04-03 17:53:00 +02:00
wchar_filename.h
xga_font_data.c
xga_font_data.h
xtea.c
xtea.h