summaryrefslogtreecommitdiff
path: root/libavcodec
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 /libavcodec
parent1eb311011548867b118dd461442365195fb5fb7d (diff)
downloadffmpeg-985c0dac674846721ec8ff23344c16ac7d1c9a1e.tar.gz
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 'libavcodec')
-rw-r--r--libavcodec/decode.c5
-rw-r--r--libavcodec/ffv1dec.c3
-rw-r--r--libavcodec/rawdec.c17
3 files changed, 7 insertions, 18 deletions
diff --git a/libavcodec/decode.c b/libavcodec/decode.c
index 1a7c37043e..9e5230ae1d 100644
--- a/libavcodec/decode.c
+++ b/libavcodec/decode.c
@@ -1425,8 +1425,7 @@ static int video_get_buffer(AVCodecContext *s, AVFrame *pic)
pic->data[i] = NULL;
pic->linesize[i] = 0;
}
- if (desc->flags & AV_PIX_FMT_FLAG_PAL ||
- ((desc->flags & FF_PSEUDOPAL) && pic->data[1]))
+ if (desc->flags & AV_PIX_FMT_FLAG_PAL)
avpriv_set_systematic_pal2((uint32_t *)pic->data[1], pic->format);
if (s->debug & FF_DEBUG_BUFFERS)
@@ -1589,8 +1588,6 @@ static void validate_avframe_allocation(AVCodecContext *avctx, AVFrame *frame)
int flags = desc ? desc->flags : 0;
if (num_planes == 1 && (flags & AV_PIX_FMT_FLAG_PAL))
num_planes = 2;
- if ((flags & FF_PSEUDOPAL) && frame->data[1])
- num_planes = 2;
for (i = 0; i < num_planes; i++) {
av_assert0(frame->data[i]);
}
diff --git a/libavcodec/ffv1dec.c b/libavcodec/ffv1dec.c
index 8516fef5d7..14879779fa 100644
--- a/libavcodec/ffv1dec.c
+++ b/libavcodec/ffv1dec.c
@@ -952,8 +952,7 @@ static int decode_frame(AVCodecContext *avctx, void *data, int *got_frame, AVPac
(fs->slice_y >> sv) + ((fs->slice_x >> sh) << pixshift);
}
- if (desc->flags & AV_PIX_FMT_FLAG_PAL ||
- desc->flags & FF_PSEUDOPAL) {
+ if (desc->flags & AV_PIX_FMT_FLAG_PAL) {
dst[1] = p->data[1];
src[1] = f->last_picture.f->data[1];
}
diff --git a/libavcodec/rawdec.c b/libavcodec/rawdec.c
index d3756328ba..a13f88b148 100644
--- a/libavcodec/rawdec.c
+++ b/libavcodec/rawdec.c
@@ -93,19 +93,13 @@ static av_cold int raw_init_decoder(AVCodecContext *avctx)
return AVERROR(EINVAL);
}
- if (desc->flags & (AV_PIX_FMT_FLAG_PAL | FF_PSEUDOPAL)) {
+ if (desc->flags & AV_PIX_FMT_FLAG_PAL) {
context->palette = av_buffer_alloc(AVPALETTE_SIZE);
if (!context->palette)
return AVERROR(ENOMEM);
-#if FF_API_PSEUDOPAL
- if (desc->flags & AV_PIX_FMT_FLAG_PSEUDOPAL)
- avpriv_set_systematic_pal2((uint32_t*)context->palette->data, avctx->pix_fmt);
-#endif
- else {
- memset(context->palette->data, 0, AVPALETTE_SIZE);
- if (avctx->bits_per_coded_sample == 1)
- memset(context->palette->data, 0xff, 4);
- }
+ memset(context->palette->data, 0, AVPALETTE_SIZE);
+ if (avctx->bits_per_coded_sample == 1)
+ memset(context->palette->data, 0xff, 4);
}
if ((avctx->extradata_size >= 9 &&
@@ -416,8 +410,7 @@ static int raw_decode(AVCodecContext *avctx, void *data, int *got_frame,
frame->linesize[1] = FFALIGN(frame->linesize[1], linesize_align);
}
- if ((avctx->pix_fmt == AV_PIX_FMT_PAL8 && buf_size < context->frame_size) ||
- (desc->flags & FF_PSEUDOPAL)) {
+ if (avctx->pix_fmt == AV_PIX_FMT_PAL8 && buf_size < context->frame_size) {
frame->buf[1] = av_buffer_ref(context->palette);
if (!frame->buf[1]) {
av_buffer_unref(&frame->buf[0]);