[FFmpeg-devel] [PATCH 16/16] lavfi/drawutils: re-enable P010 and P016 support

rcombs rcombs at rcombs.me
Fri Dec 24 05:09:04 EET 2021


These formats now work as expected.
---
 libavfilter/drawutils.c           | 2 --
 tests/ref/fate/filter-pixfmts-pad | 2 ++
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/libavfilter/drawutils.c b/libavfilter/drawutils.c
index cbb2582fe0..65ed61aa92 100644
--- a/libavfilter/drawutils.c
+++ b/libavfilter/drawutils.c
@@ -91,8 +91,6 @@ int ff_draw_init(FFDrawContext *draw, enum AVPixelFormat format, unsigned flags)
         return AVERROR(ENOSYS);
     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_P016LE)
-        return AVERROR(ENOSYS);
     if (format == AV_PIX_FMT_YUVJ420P || format == AV_PIX_FMT_YUVJ422P || format == AV_PIX_FMT_YUVJ444P ||
         format == AV_PIX_FMT_YUVJ411P || format == AV_PIX_FMT_YUVJ440P)
         full_range = 1;
diff --git a/tests/ref/fate/filter-pixfmts-pad b/tests/ref/fate/filter-pixfmts-pad
index d8c348a0fe..519473032e 100644
--- a/tests/ref/fate/filter-pixfmts-pad
+++ b/tests/ref/fate/filter-pixfmts-pad
@@ -25,6 +25,8 @@ nv12                381574979cb04be10c9168540310afad
 nv21                0fdeb2cdd56cf5a7147dc273456fa217
 nv24                193b9eadcc06ad5081609f76249b3e47
 nv42                1738ad3c31c6c16e17679f5b09ce4677
+p010le              c57224f2dc09601c66aa3365b3cd7254
+p016le              c57224f2dc09601c66aa3365b3cd7254
 p210le              abc02945a9b9585f0914716e4787cefb
 p216le              1b43feb94b8a030c0c699aa0deff017b
 p410le              1f0294141ae1657d6c10c6a0d46a879f
-- 
2.33.1



More information about the ffmpeg-devel mailing list