avutil/pixdesc: Remove deprecated AV_PIX_FMT_FLAG_PSEUDOPAL
Deprecated in d6fc031caf.
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
Signed-off-by: James Almer <jamrial@gmail.com>
This commit is contained in:
committed by
James Almer
parent
1eb3110115
commit
985c0dac67
@@ -91,7 +91,7 @@ int ff_draw_init(FFDrawContext *draw, enum AVPixelFormat format, unsigned flags)
|
||||
|
||||
if (!desc || !desc->name)
|
||||
return AVERROR(EINVAL);
|
||||
if (desc->flags & ~(AV_PIX_FMT_FLAG_PLANAR | AV_PIX_FMT_FLAG_RGB | FF_PSEUDOPAL | AV_PIX_FMT_FLAG_ALPHA))
|
||||
if (desc->flags & ~(AV_PIX_FMT_FLAG_PLANAR | AV_PIX_FMT_FLAG_RGB | AV_PIX_FMT_FLAG_ALPHA))
|
||||
return AVERROR(ENOSYS);
|
||||
if (format == AV_PIX_FMT_P010LE || format == AV_PIX_FMT_P010BE || format == AV_PIX_FMT_P016LE || format == AV_PIX_FMT_P016BE)
|
||||
return AVERROR(ENOSYS);
|
||||
|
||||
@@ -102,8 +102,7 @@ FFFramePool *ff_frame_pool_video_init(AVBufferRef* (*alloc)(buffer_size_t size),
|
||||
goto fail;
|
||||
}
|
||||
|
||||
if (desc->flags & AV_PIX_FMT_FLAG_PAL ||
|
||||
desc->flags & FF_PSEUDOPAL) {
|
||||
if (desc->flags & AV_PIX_FMT_FLAG_PAL) {
|
||||
pool->pools[1] = av_buffer_pool_init(AVPALETTE_SIZE, alloc);
|
||||
if (!pool->pools[1])
|
||||
goto fail;
|
||||
@@ -226,8 +225,7 @@ AVFrame *ff_frame_pool_get(FFFramePool *pool)
|
||||
frame->data[i] = frame->buf[i]->data;
|
||||
}
|
||||
|
||||
if (desc->flags & AV_PIX_FMT_FLAG_PAL ||
|
||||
desc->flags & FF_PSEUDOPAL) {
|
||||
if (desc->flags & AV_PIX_FMT_FLAG_PAL) {
|
||||
enum AVPixelFormat format =
|
||||
pool->format == AV_PIX_FMT_PAL8 ? AV_PIX_FMT_BGR8 : pool->format;
|
||||
|
||||
|
||||
@@ -300,7 +300,7 @@ static int filter_frame(AVFilterLink *link, AVFrame *frame)
|
||||
frame->data[0] += s->y * frame->linesize[0];
|
||||
frame->data[0] += s->x * s->max_step[0];
|
||||
|
||||
if (!(desc->flags & AV_PIX_FMT_FLAG_PAL || desc->flags & FF_PSEUDOPAL)) {
|
||||
if (!(desc->flags & AV_PIX_FMT_FLAG_PAL)) {
|
||||
for (i = 1; i < 3; i ++) {
|
||||
if (frame->data[i]) {
|
||||
frame->data[i] += (s->y >> s->vsub) * frame->linesize[i];
|
||||
|
||||
@@ -80,8 +80,7 @@ static int filter_frame(AVFilterLink *inlink, AVFrame *in)
|
||||
}
|
||||
|
||||
/* copy palette */
|
||||
if (priv->pix_desc->flags & AV_PIX_FMT_FLAG_PAL ||
|
||||
((priv->pix_desc->flags & FF_PSEUDOPAL) && out->data[1] && in->data[1]))
|
||||
if (priv->pix_desc->flags & AV_PIX_FMT_FLAG_PAL)
|
||||
memcpy(out->data[1], in->data[1], AVPALETTE_SIZE);
|
||||
|
||||
for (c = 0; c < priv->pix_desc->nb_components; c++) {
|
||||
|
||||
@@ -510,8 +510,7 @@ static int config_props(AVFilterLink *outlink)
|
||||
|
||||
scale->input_is_pal = desc->flags & AV_PIX_FMT_FLAG_PAL;
|
||||
if (outfmt == AV_PIX_FMT_PAL8) outfmt = AV_PIX_FMT_BGR8;
|
||||
scale->output_is_pal = av_pix_fmt_desc_get(outfmt)->flags & AV_PIX_FMT_FLAG_PAL ||
|
||||
av_pix_fmt_desc_get(outfmt)->flags & FF_PSEUDOPAL;
|
||||
scale->output_is_pal = av_pix_fmt_desc_get(outfmt)->flags & AV_PIX_FMT_FLAG_PAL;
|
||||
|
||||
if (scale->sws)
|
||||
sws_freeContext(scale->sws);
|
||||
|
||||
@@ -136,7 +136,7 @@ static int activate(AVFilterContext *ctx)
|
||||
out->height = outlink->h;
|
||||
out->data[0] += y * out->linesize[0];
|
||||
out->data[0] += x * s->max_step[0];
|
||||
if (!(s->desc->flags & AV_PIX_FMT_FLAG_PAL || s->desc->flags & FF_PSEUDOPAL)) {
|
||||
if (!(s->desc->flags & AV_PIX_FMT_FLAG_PAL)) {
|
||||
for (i = 1; i < 3; i ++) {
|
||||
if (out->data[i]) {
|
||||
out->data[i] += (y >> s->desc->log2_chroma_w) * out->linesize[i];
|
||||
|
||||
Reference in New Issue
Block a user