[FFmpeg-devel] [PATCH 1/3] avcodec/brenderpix: remove support for type 18 pixelmaps

Zane van Iperen zane at zanevaniperen.com
Sun Apr 9 15:25:41 EEST 2023


In BRender version 1.1.2, type 18 was a vendor extension, and is not
YA8. In 1.3.2, type 18 is BR_PMT_RGBA_4444, for which there's no
AV_PIXFMT_* equivalent.

Remove it for now, rather than continuing to decode incorrectly.
---
 libavcodec/brenderpix.c | 4 ----
 tests/fate/image.mak    | 3 ---
 2 files changed, 7 deletions(-)

diff --git a/libavcodec/brenderpix.c b/libavcodec/brenderpix.c
index e95ab3d4af..67b89689e7 100644
--- a/libavcodec/brenderpix.c
+++ b/libavcodec/brenderpix.c
@@ -195,10 +195,6 @@ static int pix_decode_frame(AVCodecContext *avctx, AVFrame *frame,
         avctx->pix_fmt = AV_PIX_FMT_ARGB;
         bytes_pp = 4;
         break;
-    case 18:
-        avctx->pix_fmt = AV_PIX_FMT_YA8;
-        bytes_pp = 2;
-        break;
     default:
         avpriv_request_sample(avctx, "Format %d", hdr.format);
         return AVERROR_PATCHWELCOME;
diff --git a/tests/fate/image.mak b/tests/fate/image.mak
index 42dd90feaa..564a326076 100644
--- a/tests/fate/image.mak
+++ b/tests/fate/image.mak
@@ -22,9 +22,6 @@ fate-brenderpix-defpal: CMD = framecrc -c:v brender_pix -i $(TARGET_SAMPLES)/bre
 FATE_BRENDERPIX-$(call DEMDEC, IMAGE2, BRENDER_PIX, SCALE_FILTER) += fate-brenderpix-intpal
 fate-brenderpix-intpal: CMD = framecrc -c:v brender_pix -i $(TARGET_SAMPLES)/brenderpix/testtex.pix -pix_fmt rgb24 -vf scale
 
-FATE_BRENDERPIX += fate-brenderpix-y400a
-fate-brenderpix-y400a: CMD = framecrc -c:v brender_pix -i $(TARGET_SAMPLES)/brenderpix/gears.pix
-
 FATE_BRENDERPIX-$(call DEMDEC, IMAGE2, BRENDER_PIX) += $(FATE_BRENDERPIX)
 FATE_IMAGE_FRAMECRC += $(FATE_BRENDERPIX-yes)
 fate-brenderpix: $(FATE_BRENDERPIX-yes)
-- 
Consider this part optional, it's not required for the rest of the patchset.



More information about the ffmpeg-devel mailing list