From patchwork Mon Oct 21 19:57:13 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: martin schitter X-Patchwork-Id: 35201 Delivered-To: ffmpegpatchwork2@gmail.com Received: by 2002:a05:612c:143:b0:48e:c0f8:d0de with SMTP id h3csp2920960vqi; Mon, 21 Oct 2024 13:18:25 -0700 (PDT) X-Forwarded-Encrypted: i=2; AJvYcCVz6avIGm9FNmn2ofnKhjwXwbghhYCF+Ahzpu+DVDgwMpWYZ5DAXx+03ljtUWhph2eo2iCzphcEU8RmvGb9N1KJ@gmail.com X-Google-Smtp-Source: AGHT+IEID6TWr/KbjghMZQ84jTc3d/SwPjv3lYno0kjEQg/jgT7d6J4SL/3SDfiTrKVhr4n63rpW X-Received: by 2002:a05:6402:2347:b0:5cb:739d:5416 with SMTP id 4fb4d7f45d1cf-5cb739d55a0mr2951987a12.31.1729541905360; Mon, 21 Oct 2024 13:18:25 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1729541905; cv=none; d=google.com; s=arc-20240605; b=ZZV9oHzSy5CXSfyDzt1tPgU8UI2dkcLpu+KQ0YEFiSyYBIQooOfiKsU2Bvi1lfO1Zt Cj3XRoJRAyulGoTfzRLWuyUwWV7kWzYA/+n++hgd2Kgyz5eQECjhpeiyz1HYj1BP7ycD 6HDBA18u+8b10M7cLhi9Or2X9z2sWvP0vS4ecFlyOYqyFo5LfTtq4NDxiBFZoiFprr9h 5iyHxM7JsbfO+Ka8JXfGBrapBceXSuTVYxwPPVyyP4wHjTBION7AAt0Qp9gusmpOAcaV /vEz7Sg1gO+IMnI1HFXXFb49Wkqyvm3Vm0/DDwy0bR41VKmGHB+cCDrHTBxmGzsY4EPm A31w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20240605; h=sender:errors-to:content-transfer-encoding:cc:reply-to :list-subscribe:list-help:list-post:list-archive:list-unsubscribe :list-id:precedence:subject:mime-version:message-id:date:to:from :dkim-signature:delivered-to; bh=hSgXIljSjyGT6XqCSZnJpm5+UMex/btGHp5iJ37cbEM=; fh=igg3JDwkSkAbPTwY6V0OsEq0RUkG4DKWC8fVJg4GhMY=; b=SdbO2T9Bo3xWETAHpqN8GU9h54W6+fBbZlxvOAkw0PnygWTVUYqCxH6V2o4e8S/gar J6R8lZmeXF4iJuuKX7Z4wMdsuYkPHVdCFaaXMVex5lcZvDlxq+bDrZoISHxn9ZmOO7yC SHMp7qcFNySuwxkJdz9dN/RK4FTsJ4G/RVU1loFlnJ+LKdIJNdm4cjDucrFlO4p4LN7t vK+Tbkqm6lhFjqFDv0a2da5F8YhZFKDM6sqoHAcpK2JTuKFKRZK03HPVFo3NK9lkOHjO 9ch7Vd16ZOljBu6Lni4vMnUFEa9iF6WDZaZ21Rj/0ut3kToaQ9kR8wgpIHwbXIDzHjpK WAHQ==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=neutral (body hash did not verify) header.i=@mur.at header.s=dkim2 header.b="U92ZB/IX"; spf=pass (google.com: domain of ffmpeg-devel-bounces@ffmpeg.org designates 79.124.17.100 as permitted sender) smtp.mailfrom=ffmpeg-devel-bounces@ffmpeg.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=mur.at Return-Path: Received: from ffbox0-bg.mplayerhq.hu (ffbox0-bg.ffmpeg.org. [79.124.17.100]) by mx.google.com with ESMTP id 4fb4d7f45d1cf-5cb66c7e07asi3116982a12.364.2024.10.21.13.18.25; Mon, 21 Oct 2024 13:18:25 -0700 (PDT) Received-SPF: pass (google.com: domain of ffmpeg-devel-bounces@ffmpeg.org designates 79.124.17.100 as permitted sender) client-ip=79.124.17.100; Authentication-Results: mx.google.com; dkim=neutral (body hash did not verify) header.i=@mur.at header.s=dkim2 header.b="U92ZB/IX"; spf=pass (google.com: domain of ffmpeg-devel-bounces@ffmpeg.org designates 79.124.17.100 as permitted sender) smtp.mailfrom=ffmpeg-devel-bounces@ffmpeg.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=mur.at Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id 56A6368DDF2; Mon, 21 Oct 2024 23:18:09 +0300 (EEST) X-Original-To: ffmpeg-devel@ffmpeg.org Delivered-To: ffmpeg-devel@ffmpeg.org Received: from efeu.mur.at (efeu.mur.at [89.106.208.42]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id DA0DC68DA3F for ; Mon, 21 Oct 2024 23:18:00 +0300 (EEST) Received: from localhost.localdomain (lan1.raspi.ma39.ffgraz.net [10.12.1.243]) by efeu.mur.at (Postfix) with ESMTPSA id 3FD98462DC; Mon, 21 Oct 2024 22:18:00 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=mur.at; s=dkim2; t=1729541880; bh=cTWtJHYEHbftIe/QwYrwh+FaP36ta+MwqU3/kDrug1w=; h=From:To:Cc:Subject:Date:From; b=U92ZB/IXlyod1xdSons7d/ufyFY7rGP1eUJwCTFl/maIrWTpdMnoifHmx8lD7m3We f5tSVRyeq09cPuXqkJY7B2W0U64BF1kkAVQC51xcz9CHf1y6gf+Ka9kwBj8kNIKpti u8KNdxB+YCFMEb2BOs/fK+6tu2syVzFmf0qYnAo+wKrRB+jsnODIR88jKUeWAEx3P7 wCndkSVDr1jBH8nVjB953LYzmzgDyQRP+ISptVhBAxOykmlclOodQxOD+l0K78ekeu fQghNsmlmvmfAqPr/Kg1vjiOHc7A6EEshx9v6m0s8/BnyExHIHek3CZ4c5hMh0RQcB CB3zMxjJ3Mkpp0bG+NoQ2bOUhGYTeyOQQ7f7vxKoOM9FhkVZPVY36V3ZONz5L+CfKU 8xEN4cSvlZPyzfusr+Abznp5iaEQmQTB3NkmRQqJtD3xMg4jbcEeXhMKyPnseBO5Rc NEakT5EmfcVPmJ0b9I/H0dECINrtW1B6KW58u4F0TCN4pQM4NuZ From: Martin Schitter To: ffmpeg-devel@ffmpeg.org Date: Mon, 21 Oct 2024 21:57:13 +0200 Message-ID: <20241021195721.892544-2-ms+git@mur.at> X-Mailer: git-send-email 2.45.2 MIME-Version: 1.0 Subject: [FFmpeg-devel] [PATCH v12 0/9] DNxUncompressed decoder X-BeenThere: ffmpeg-devel@ffmpeg.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: FFmpeg development discussions and patches List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Reply-To: FFmpeg development discussions and patches Cc: Martin Schitter Errors-To: ffmpeg-devel-bounces@ffmpeg.org Sender: "ffmpeg-devel" X-TUID: /LmDDO+7CQoa This is a reworked 11th version of my DNxUncompressed decoder contribution. I added many new pixel formats and swscale input support variants for all those payload types that do not need any format specific unpacking. Most pixel format variants found in the specification are now supported. Unfortunately I don't have samples to test all of them. At least all export options supported by DaVinci Resolve should work. Combined Components and mixed RGB + Alpha content is still not supported. Please check the code and merge it. Martin Martin Schitter (9): avutil/swscale: add PIX_FMT_YUV444 and input support avutil/swscale: add YUV444_16 and UYVY_16 pixel format and input support avutil/swscale: add YUV444F16 and UYVYF16 pixel format and input support avutil/swscale: add YUV444F32 and UYVYF32 pixel format and input support libavcodec/dnxucdec: DNxUncompressed decoder doc: DNxUncompressed Changelog and doc entries tests: Fate sample tests for DNxUncompressed avformat/mxfdec: Workaround for RGB pc/video level detection. swscale/input: color subsampling input support for RGBF32 Changelog | 2 + doc/general_contents.texi | 1 + libavcodec/Makefile | 1 + libavcodec/allcodecs.c | 1 + libavcodec/dnxucdec.c | 338 +++++++++++++++++++++++++++ libavformat/mxfdec.c | 51 +++- libavutil/pixdesc.c | 153 ++++++++++++ libavutil/pixfmt.h | 22 ++ libswscale/input.c | 348 ++++++++++++++++++++++++++++ libswscale/utils.c | 15 +- tests/Makefile | 1 + tests/fate/dnxuc.mak | 40 ++++ tests/ref/fate/dnxuc-cb-rgb-10 | 8 + tests/ref/fate/dnxuc-cb-rgb-12 | 8 + tests/ref/fate/dnxuc-cb-rgb-8 | 8 + tests/ref/fate/dnxuc-cb-rgb-float | 8 + tests/ref/fate/dnxuc-cb-rgb-half | 8 + tests/ref/fate/dnxuc-cb-yuv422-10 | 8 + tests/ref/fate/dnxuc-cb-yuv422-12 | 8 + tests/ref/fate/dnxuc-cb-yuv422-8 | 8 + tests/ref/fate/dnxuc-ramp-rgb-10 | 8 + tests/ref/fate/dnxuc-ramp-rgb-12 | 8 + tests/ref/fate/dnxuc-ramp-rgb-8 | 8 + tests/ref/fate/dnxuc-ramp-rgb-float | 8 + tests/ref/fate/dnxuc-ramp-rgb-half | 8 + tests/ref/fate/dnxuc-ramp-yuv422-10 | 8 + tests/ref/fate/dnxuc-ramp-yuv422-12 | 8 + tests/ref/fate/dnxuc-ramp-yuv422-8 | 8 + tests/ref/fate/imgutils | 26 +++ tests/ref/fate/mxf-probe-j2k | 2 +- tests/ref/fate/sws-pixdesc-query | 40 ++++ 31 files changed, 1157 insertions(+), 12 deletions(-) create mode 100644 libavcodec/dnxucdec.c create mode 100644 tests/fate/dnxuc.mak create mode 100644 tests/ref/fate/dnxuc-cb-rgb-10 create mode 100644 tests/ref/fate/dnxuc-cb-rgb-12 create mode 100644 tests/ref/fate/dnxuc-cb-rgb-8 create mode 100644 tests/ref/fate/dnxuc-cb-rgb-float create mode 100644 tests/ref/fate/dnxuc-cb-rgb-half create mode 100644 tests/ref/fate/dnxuc-cb-yuv422-10 create mode 100644 tests/ref/fate/dnxuc-cb-yuv422-12 create mode 100644 tests/ref/fate/dnxuc-cb-yuv422-8 create mode 100644 tests/ref/fate/dnxuc-ramp-rgb-10 create mode 100644 tests/ref/fate/dnxuc-ramp-rgb-12 create mode 100644 tests/ref/fate/dnxuc-ramp-rgb-8 create mode 100644 tests/ref/fate/dnxuc-ramp-rgb-float create mode 100644 tests/ref/fate/dnxuc-ramp-rgb-half create mode 100644 tests/ref/fate/dnxuc-ramp-yuv422-10 create mode 100644 tests/ref/fate/dnxuc-ramp-yuv422-12 create mode 100644 tests/ref/fate/dnxuc-ramp-yuv422-8