diff mbox series

[FFmpeg-devel,09/10] swscale: add P210/P410/P216/P416 output

Message ID 20211217001215.75135-10-rcombs@rcombs.me
State New
Headers show
Series [FFmpeg-devel,01/10] lavc/videotoolboxenc: use common routine for pixfmt conversion | expand

Checks

Context Check Description
andriy/make_x86 success Make finished
andriy/make_fate_x86 fail Make fate failed
andriy/make_ppc success Make finished
andriy/make_fate_ppc fail Make fate failed

Commit Message

rcombs Dec. 17, 2021, 12:12 a.m. UTC
---
 libswscale/output.c  |  8 ++++++--
 libswscale/utils.c   | 16 ++++++++--------
 libswscale/version.h |  2 +-
 3 files changed, 15 insertions(+), 11 deletions(-)

Comments

Michael Niedermayer Dec. 23, 2021, 11 a.m. UTC | #1
On Thu, Dec 16, 2021 at 06:12:14PM -0600, rcombs wrote:
> ---
>  libswscale/output.c  |  8 ++++++--
>  libswscale/utils.c   | 16 ++++++++--------
>  libswscale/version.h |  2 +-
>  3 files changed, 15 insertions(+), 11 deletions(-)

breaks MIPS

TEST    filter-pixfmts-pad
--- src/tests/ref/fate/filter-pixfmts-pad	2021-12-23 11:58:16.416901175 +0100
+++ tests/data/fate/filter-pixfmts-pad	2021-12-23 11:58:43.897117890 +0100
@@ -25,10 +25,10 @@
 nv21                0fdeb2cdd56cf5a7147dc273456fa217
 nv24                193b9eadcc06ad5081609f76249b3e47
 nv42                1738ad3c31c6c16e17679f5b09ce4677
-p210le              10b53de63b086de93c076d1d40f9da42
-p216le              0bbf778e1b6101a3f650ce0454a357f2
-p410le              fcab6381bde9cd84b813925ff29be4d2
-p416le              6db094f8d7d27d7299bf9496ad66e2e0
+p210le              abc02945a9b9585f0914716e4787cefb
+p216le              1b43feb94b8a030c0c699aa0deff017b
+p410le              1f0294141ae1657d6c10c6a0d46a879f
+p416le              320e558b7ee8d598231ae0763ecca275
 rgb0                78d500c8361ab6423a4826a00268c908
 rgb24               17f9e2e0c609009acaf2175c42d4a2a5
 rgba                b157c90191463d34fb3ce77b36c96386
Test filter-pixfmts-pad failed. Look at tests/data/fate/filter-pixfmts-pad.err for details.
src/tests/Makefile:256: recipe for target 'fate-filter-pixfmts-pad' failed
make: *** [fate-filter-pixfmts-pad] Error 1



[...]
diff mbox series

Patch

diff --git a/libswscale/output.c b/libswscale/output.c
index 58b10f85a5..4b4b186be9 100644
--- a/libswscale/output.c
+++ b/libswscale/output.c
@@ -2563,14 +2563,18 @@  av_cold void ff_sws_init_output_funcs(SwsContext *c,
     enum AVPixelFormat dstFormat = c->dstFormat;
     const AVPixFmtDescriptor *desc = av_pix_fmt_desc_get(dstFormat);
 
-    if (dstFormat == AV_PIX_FMT_P010LE || dstFormat == AV_PIX_FMT_P010BE) {
+    if (dstFormat == AV_PIX_FMT_P010LE || dstFormat == AV_PIX_FMT_P010BE ||
+        dstFormat == AV_PIX_FMT_P210LE || dstFormat == AV_PIX_FMT_P210BE ||
+        dstFormat == AV_PIX_FMT_P410LE || dstFormat == AV_PIX_FMT_P410BE) {
         *yuv2plane1 = isBE(dstFormat) ? yuv2p010l1_BE_c : yuv2p010l1_LE_c;
         *yuv2planeX = isBE(dstFormat) ? yuv2p010lX_BE_c : yuv2p010lX_LE_c;
         *yuv2nv12cX = yuv2p010cX_c;
     } else if (is16BPS(dstFormat)) {
         *yuv2planeX = isBE(dstFormat) ? yuv2planeX_16BE_c  : yuv2planeX_16LE_c;
         *yuv2plane1 = isBE(dstFormat) ? yuv2plane1_16BE_c  : yuv2plane1_16LE_c;
-        if (dstFormat == AV_PIX_FMT_P016LE || dstFormat == AV_PIX_FMT_P016BE) {
+        if (dstFormat == AV_PIX_FMT_P016LE || dstFormat == AV_PIX_FMT_P016BE ||
+            dstFormat == AV_PIX_FMT_P216LE || dstFormat == AV_PIX_FMT_P216BE ||
+            dstFormat == AV_PIX_FMT_P416LE || dstFormat == AV_PIX_FMT_P416BE) {
           *yuv2nv12cX = yuv2p016cX_c;
         }
     } else if (isNBPS(dstFormat)) {
diff --git a/libswscale/utils.c b/libswscale/utils.c
index d4a72d3ce1..c80b4f3e35 100644
--- a/libswscale/utils.c
+++ b/libswscale/utils.c
@@ -268,14 +268,14 @@  static const FormatEntry format_entries[] = {
     [AV_PIX_FMT_Y210LE]      = { 1, 0 },
     [AV_PIX_FMT_X2RGB10LE]   = { 1, 1 },
     [AV_PIX_FMT_X2BGR10LE]   = { 1, 1 },
-    [AV_PIX_FMT_P210BE]      = { 1, 0 },
-    [AV_PIX_FMT_P210LE]      = { 1, 0 },
-    [AV_PIX_FMT_P410BE]      = { 1, 0 },
-    [AV_PIX_FMT_P410LE]      = { 1, 0 },
-    [AV_PIX_FMT_P216BE]      = { 1, 0 },
-    [AV_PIX_FMT_P216LE]      = { 1, 0 },
-    [AV_PIX_FMT_P416BE]      = { 1, 0 },
-    [AV_PIX_FMT_P416LE]      = { 1, 0 },
+    [AV_PIX_FMT_P210BE]      = { 1, 1 },
+    [AV_PIX_FMT_P210LE]      = { 1, 1 },
+    [AV_PIX_FMT_P410BE]      = { 1, 1 },
+    [AV_PIX_FMT_P410LE]      = { 1, 1 },
+    [AV_PIX_FMT_P216BE]      = { 1, 1 },
+    [AV_PIX_FMT_P216LE]      = { 1, 1 },
+    [AV_PIX_FMT_P416BE]      = { 1, 1 },
+    [AV_PIX_FMT_P416LE]      = { 1, 1 },
 };
 
 void ff_shuffle_filter_coefficients(SwsContext *c, int *filterPos, int filterSize, int16_t *filter, int dstW){
diff --git a/libswscale/version.h b/libswscale/version.h
index 15ad54319c..8f7b56df9a 100644
--- a/libswscale/version.h
+++ b/libswscale/version.h
@@ -28,7 +28,7 @@ 
 
 #define LIBSWSCALE_VERSION_MAJOR   6
 #define LIBSWSCALE_VERSION_MINOR   1
-#define LIBSWSCALE_VERSION_MICRO 101
+#define LIBSWSCALE_VERSION_MICRO 102
 
 #define LIBSWSCALE_VERSION_INT  AV_VERSION_INT(LIBSWSCALE_VERSION_MAJOR, \
                                                LIBSWSCALE_VERSION_MINOR, \