summaryrefslogtreecommitdiff
path: root/libavutil/imgutils.c
diff options
context:
space:
mode:
authorAndreas Rheinhardt <andreas.rheinhardt@outlook.com>2021-04-14 01:46:26 +0200
committerJames Almer <jamrial@gmail.com>2021-04-27 10:43:13 -0300
commit985c0dac674846721ec8ff23344c16ac7d1c9a1e (patch)
tree1979990f3e66231dca31b81ce0426b227eeaf71e /libavutil/imgutils.c
parent1eb311011548867b118dd461442365195fb5fb7d (diff)
avutil/pixdesc: Remove deprecated AV_PIX_FMT_FLAG_PSEUDOPAL
Deprecated in d6fc031caf64eed921bbdef86d79d56bfc2633b0. Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com> Signed-off-by: James Almer <jamrial@gmail.com>
Diffstat (limited to 'libavutil/imgutils.c')
-rw-r--r--libavutil/imgutils.c15
1 files changed, 4 insertions, 11 deletions
diff --git a/libavutil/imgutils.c b/libavutil/imgutils.c
index bd1333170a..53faad889a 100644
--- a/libavutil/imgutils.c
+++ b/libavutil/imgutils.c
@@ -123,8 +123,7 @@ int av_image_fill_plane_sizes(size_t sizes[4], enum AVPixelFormat pix_fmt,
return AVERROR(EINVAL);
sizes[0] = linesizes[0] * (size_t)height;
- if (desc->flags & AV_PIX_FMT_FLAG_PAL ||
- desc->flags & FF_PSEUDOPAL) {
+ if (desc->flags & AV_PIX_FMT_FLAG_PAL) {
sizes[1] = 256 * 4; /* palette is stored here as 256 32 bits words */
return 0;
}
@@ -250,7 +249,7 @@ int av_image_alloc(uint8_t *pointers[4], int linesizes[4],
av_free(buf);
return ret;
}
- if (desc->flags & AV_PIX_FMT_FLAG_PAL || (desc->flags & FF_PSEUDOPAL && pointers[1])) {
+ if (desc->flags & AV_PIX_FMT_FLAG_PAL) {
avpriv_set_systematic_pal2((uint32_t*)pointers[1], pix_fmt);
if (align < 4) {
av_log(NULL, AV_LOG_ERROR, "Formats with a palette require a minimum alignment of 4\n");
@@ -259,8 +258,7 @@ int av_image_alloc(uint8_t *pointers[4], int linesizes[4],
}
}
- if ((desc->flags & AV_PIX_FMT_FLAG_PAL ||
- desc->flags & FF_PSEUDOPAL) && pointers[1] &&
+ if (desc->flags & AV_PIX_FMT_FLAG_PAL && pointers[1] &&
pointers[1] - pointers[0] > linesizes[0] * h) {
/* zero-initialize the padding before the palette */
memset(pointers[0] + linesizes[0] * h, 0,
@@ -388,8 +386,7 @@ static void image_copy(uint8_t *dst_data[4], const ptrdiff_t dst_linesizes[4],
if (!desc || desc->flags & AV_PIX_FMT_FLAG_HWACCEL)
return;
- if (desc->flags & AV_PIX_FMT_FLAG_PAL ||
- desc->flags & FF_PSEUDOPAL) {
+ if (desc->flags & AV_PIX_FMT_FLAG_PAL) {
copy_plane(dst_data[0], dst_linesizes[0],
src_data[0], src_linesizes[0],
width, height);
@@ -478,10 +475,6 @@ int av_image_get_buffer_size(enum AVPixelFormat pix_fmt,
if (ret < 0)
return ret;
- // do not include palette for these pseudo-paletted formats
- if (desc->flags & FF_PSEUDOPAL)
- return FFALIGN(width, align) * height;
-
ret = av_image_fill_linesizes(linesize, pix_fmt, width);
if (ret < 0)
return ret;