From patchwork Mon Sep 23 09:16:42 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: martin schitter X-Patchwork-Id: 51741 Delivered-To: ffmpegpatchwork2@gmail.com Received: by 2002:a59:d154:0:b0:48e:c0f8:d0de with SMTP id bt20csp2328410vqb; Mon, 23 Sep 2024 02:29:19 -0700 (PDT) X-Forwarded-Encrypted: i=2; AJvYcCUxR3z7fcqFeKaFbGYc3Km0eGabeo0WPFeOyvf7WylipcM/mRnrgXaX86fynDd0T0Jbj+UF2UBedaX442CMEo+K@gmail.com X-Google-Smtp-Source: AGHT+IGh6wzTt+Y8w4wZZ2DR6sL9tnR5SEeoEEKmeiaPUTRaz9QTbaNF/xpt8IyUF4F8wFmH0l6Y X-Received: by 2002:a17:906:d261:b0:a86:80b7:4743 with SMTP id a640c23a62f3a-a90d4ffddf4mr1048533766b.24.1727083759060; Mon, 23 Sep 2024 02:29:19 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1727083759; cv=none; d=google.com; s=arc-20240605; b=bQstU6u/sVD63FE1B8kVxOwRPIHMONvrhKKNqXR/8f7fsUP6wjiGoxQlcGbMOMX4Jv 2vo5IeTMkYO37MttdrJlzcHoTzLDTnORQTdYlMJ2rt7vtaaST0/ySVBHbrMSbNS3Cqp0 4eyHvWKkQgee7sOsSGKn3lk3TbuIsWkbpWvptiXb4I0W8SUiFv6FYo9sANwaQaBy9wF5 VYlt4ARla8b3ArjN+dZlK5RUQSZbLvGoYI6UmJODmcALvri7/+NaW5oG7CweW/ErKBrQ fcnJZ9nlOuM3IxXq652mvsenV8ZqZeoCYzDtssD9vdxlh19QjlgZrt0WHQgKsKu6yGk4 z7Sw== 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=NhPk/LmKO5fONpZxFzbui1DFcwNlcFH2hafos9T+n+o=; fh=igg3JDwkSkAbPTwY6V0OsEq0RUkG4DKWC8fVJg4GhMY=; b=jEYrhkoxvznvM7TKPw5Ztrhdv3IkCyR8fiBcpF8Q5kzOKyzkgLtNQQK66shZQzeOse ltTnTvIcssHyeuppghBBpaaZVLKTXKshyT2tDd8KO7yCtZvCIUVJXmt2XTALJ33cJEdj RMCJDaLgTs44tX69cr9wpn797SSOI5ugTxCD85d5wTYmL6zwmIFev+md1IDtFr+iX5Mr eLcQ1WrhFZGTov2/y7HLcbFkeGIAuyJ5L8L70pLGw/eRjIip4VIJIV3YtaT/sAuOhM4X DSNEkFnN5BF7B1/RWUspRHeEUXVy9eUfalBKq1u7WrUzHHGh1l+yJSG+Rh79C7yA12Ud dSjQ==; 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="GJCYMn/l"; 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 a640c23a62f3a-a9061099eddsi1379982666b.164.2024.09.23.02.29.18; Mon, 23 Sep 2024 02:29:19 -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="GJCYMn/l"; 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 81A1F68DC25; Mon, 23 Sep 2024 12:22:37 +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 CF13968DB18 for ; Mon, 23 Sep 2024 12:22:29 +0300 (EEST) Received: from localhost.localdomain (lan1.raspi.ma39.ffgraz.net [10.12.1.243]) by efeu.mur.at (Postfix) with ESMTPSA id 6A3F3460FA; Mon, 23 Sep 2024 11:22:29 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=mur.at; s=dkim2; t=1727083349; bh=mPh8c1rHUuo+ymgAHOs09glWsMqxGR+tH/UyqKBeytE=; h=From:To:Cc:Subject:Date:From; b=GJCYMn/lcLdGk3n0aYF6FC+bNNhq6QlU9Sjl+7ezCl3npTpWO2NCOJAAtP/Y4CFi8 aRaLlcQCFA1YZ4ejnEesGKSotGzF1FRzRq22LaS78ITFq/k5cw6DS4fwby6gzWf8QU mNexi25usqoK/1OyTY59aWzAx7o6AIxiSskhX3w8uayBzplDssx2a0M5RevQ6Kaj1b SwUF3AzK6ARXEF808e3leUcK7qveq0F6caI0kWh39NB5z3kV3/wb5+SA3kRDZ7S1Z2 ixAoVGTEGq8vbwthxKJmQT9b/SqRO+nrA74i4SdwlcQwe65IKaBapy1X8gyDKZK5Cv 3grBOMXtcLtSCZjrMtYMnxKqwjS0NmvrJi6kHLkRasAgsmEQHVO6Q4TswwT7ceKx+o VNgdPYzN2b4pat530bgOXe8Cy3BIrt5wsdJ38Bnv47nDzB9UXHn4vN3OBXpveg0ITQ z8EqKOJ7/NnxGSjW0JeUNYfAOIvfL5/Lg4SBm3ULz9+uDmUOKgi From: Martin Schitter To: ffmpeg-devel@ffmpeg.org Date: Mon, 23 Sep 2024 11:16:42 +0200 Message-ID: <20240923091645.2309922-3-ms+git@mur.at> X-Mailer: git-send-email 2.45.2 MIME-Version: 1.0 Subject: [FFmpeg-devel] [PATCH v9 1/6] libavcodec/: Add ID and desc for DNxUncompressed 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: 0vIycB2+KqOX Patchset for DNxUncomprressed decoder. v9 includes changes to fix issues mentioned in Marton Balints review. --- libavcodec/codec_desc.c | 7 +++++++ libavcodec/codec_id.h | 1 + libavcodec/version.c | 2 +- 3 files changed, 9 insertions(+), 1 deletion(-) diff --git a/libavcodec/codec_desc.c b/libavcodec/codec_desc.c index 03dea57..2452a7b 100644 --- a/libavcodec/codec_desc.c +++ b/libavcodec/codec_desc.c @@ -1959,6 +1959,13 @@ static const AVCodecDescriptor codec_descriptors[] = { .long_name = NULL_IF_CONFIG_SMALL("LEAD MCMP"), .props = AV_CODEC_PROP_INTRA_ONLY | AV_CODEC_PROP_LOSSY, }, + { + .id = AV_CODEC_ID_DNXUC, + .type = AVMEDIA_TYPE_VIDEO, + .name = "dnxuc", + .long_name = NULL_IF_CONFIG_SMALL("DNxUncompressed / SMPTE RDD 50"), + .props = AV_CODEC_PROP_INTRA_ONLY | AV_CODEC_PROP_LOSSLESS, + }, /* various PCM "codecs" */ { diff --git a/libavcodec/codec_id.h b/libavcodec/codec_id.h index 0a8d3be..0abd036 100644 --- a/libavcodec/codec_id.h +++ b/libavcodec/codec_id.h @@ -322,6 +322,7 @@ enum AVCodecID { AV_CODEC_ID_RTV1, AV_CODEC_ID_VMIX, AV_CODEC_ID_LEAD, + AV_CODEC_ID_DNXUC, /* various PCM "codecs" */ AV_CODEC_ID_FIRST_AUDIO = 0x10000, ///< A dummy id pointing at the start of audio codecs diff --git a/libavcodec/version.c b/libavcodec/version.c index 27f9432..03dd95e 100644 --- a/libavcodec/version.c +++ b/libavcodec/version.c @@ -31,7 +31,7 @@ const char av_codec_ffversion[] = "FFmpeg version " FFMPEG_VERSION; unsigned avcodec_version(void) { - static_assert(AV_CODEC_ID_LEAD == 269 && + static_assert(AV_CODEC_ID_DNXUC == 270 && AV_CODEC_ID_PCM_SGA == 65572 && AV_CODEC_ID_ADPCM_XMD == 69683 && AV_CODEC_ID_CBD2_DPCM == 81928 && From patchwork Mon Sep 23 09:16:43 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: martin schitter X-Patchwork-Id: 51738 Delivered-To: ffmpegpatchwork2@gmail.com Received: by 2002:a59:d154:0:b0:48e:c0f8:d0de with SMTP id bt20csp2328392vqb; Mon, 23 Sep 2024 02:29:16 -0700 (PDT) X-Forwarded-Encrypted: i=2; AJvYcCX5a8LHR92nWoqrVRCGMVLj7e6+85hSbus2MmMCn4064pln3txMfKNmB4g4vzXajTeW5ifRe18NGaMrjeZKeNtD@gmail.com X-Google-Smtp-Source: AGHT+IHsWajyTMKhxDKQqdOlttasexR844iunv96I143dN/TfqLKpa9NZ+sXmkFBL2XpOfPuFARJ X-Received: by 2002:a05:6512:3b20:b0:52e:be84:225c with SMTP id 2adb3069b0e04-536ac2f5128mr5273811e87.33.1727083756721; Mon, 23 Sep 2024 02:29:16 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1727083756; cv=none; d=google.com; s=arc-20240605; b=TxF3VmmZ812dg1pD3CpvnkgZ4SMj0inEn0aGhpGaLhzLvug0PlQXgKEeDXLfbNaQIc vd1WsZkH2L9GE695kvUlhQ+Ec9nUzTB2odhyTafganS3SheUKeZ87YRjqlZEwA90MAMK ej0qXBlk1mD46Bb/5rOgKeVzT6apGL+6ttVRL9OJVizjB3deOouerlae0c1QOU7m/R3a 1RYKX0p3/9VR9eKTuXfoo4biM5TKWgX3qq2Pxc3okoNh6raIaxe61YJ2O6ITvfH1LmmE Yq9pVL7Y4rN3o2XYnbbK+FGcSk88fqJgWEcmE6hpy+AmXzXJrn32WMiXz3xh61TIt1sd Jw7w== 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:references:in-reply-to :message-id:date:to:from:dkim-signature:delivered-to; bh=YZOdnPLPkfkSXMeVqVW84bBw3IuRxTT6p2F/e9cfKvY=; fh=igg3JDwkSkAbPTwY6V0OsEq0RUkG4DKWC8fVJg4GhMY=; b=OqZoxCV4KH5IICviq3lI/zOAnZPotO7pmv1pyvPi66FvRMFwpR344Vf8suCaKLtEXS HsStCCoP70ptSV+FWczHEbg3wv2HDBvltZsfrYXCQhldq7FJjQARwedxJTD8krFer2/K EwzPmMoHSwZiX3jgyN5DlmHZdXSPqnZfzl4In9W4IijuOqHkj2AvC1ky1v+IumBjXKa+ 5jS5KUdlNWphE10E1+p1/tWNLCONqho8Yl7lGACqdzb9A3H8q1QM5+9pBVH2Hq4igM6i +yKG6wyD5pyTinSGUOazjEbhNhGvKJXTG9d7gHyJKn9FocQq/G1JWjc2UIleBe3c2N3l Ev8Q==; 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=siYKijZP; 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 2adb3069b0e04-5369a0102casi5398053e87.0.2024.09.23.02.29.16; Mon, 23 Sep 2024 02:29:16 -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=siYKijZP; 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 9B22968DB8A; Mon, 23 Sep 2024 12:22:36 +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 DA0EC68DB65 for ; Mon, 23 Sep 2024 12:22:29 +0300 (EEST) Received: from localhost.localdomain (lan1.raspi.ma39.ffgraz.net [10.12.1.243]) by efeu.mur.at (Postfix) with ESMTPSA id 84D1F4610E; Mon, 23 Sep 2024 11:22:29 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=mur.at; s=dkim2; t=1727083349; bh=y+VYjjloyo7j9r1abvSUPvGbTUbRD2jtBke/UbGwgFE=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=siYKijZPFPvq2SlDKeS9KcwxM+cRxQWtSqSbufQY7v/XgGmtM7XVQSvOdvunHm/G4 ZW+bflj6x1e9XWGo3Ct18TVoWZNydJc4n+2+ZbR2y2oDxn9aGtzbx89BhuKTgVetcJ OtpIW4XnJNiH2d6xFRMWrM3H09f3tXz7/Rvq7Xy/0jY2Nf1SP/yV3JAXizLo321fiP oOL+Al6ZwVhYqZgyfS2c+W52l1CaevvRiIN3aEor9UcqpnixYc2/zbWOzIx5U2H15G HqWL5szmCfwRqkzUFjFCorpE7/f66hHx9AQ7S0+xX9m8rWT1X7ojrOmw/uFfIj3Xy9 W5Y2KepcdEk6Je7cYh1sbSA3dFS+AVN3JFAybSe7acnF1BHPG0tSdb/X0S9D1hMSa/ pFLEQEzDP73ECfBZDcCM9By91YrWxJiAc+mNiAX/i1lChOyyvlm9ds6UL728irggzt rV0CjHq08CbR7Kt1sTrdQfIzFe6E/YgTtnNyZGyxp9Cl0hssSCI From: Martin Schitter To: ffmpeg-devel@ffmpeg.org Date: Mon, 23 Sep 2024 11:16:43 +0200 Message-ID: <20240923091645.2309922-4-ms+git@mur.at> X-Mailer: git-send-email 2.45.2 In-Reply-To: <20240923091645.2309922-3-ms+git@mur.at> References: <20240923091645.2309922-3-ms+git@mur.at> MIME-Version: 1.0 Subject: [FFmpeg-devel] [PATCH v9 2/6] libavformat/mxf: Add ULs for DNxUncompressed 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: S1eqoqItS3xx --- libavformat/mxf.c | 1 + libavformat/mxfdec.c | 1 + 2 files changed, 2 insertions(+) diff --git a/libavformat/mxf.c b/libavformat/mxf.c index a73e40e..b6c1f17 100644 --- a/libavformat/mxf.c +++ b/libavformat/mxf.c @@ -61,6 +61,7 @@ const MXFCodecUL ff_mxf_codec_uls[] = { { { 0x06,0x0E,0x2B,0x34,0x04,0x01,0x01,0x01,0x04,0x01,0x02,0x02,0x71,0x00,0x00,0x00 }, 13, AV_CODEC_ID_DNXHD }, /* SMPTE VC-3/DNxHD */ { { 0x06,0x0E,0x2B,0x34,0x04,0x01,0x01,0x01,0x04,0x01,0x02,0x02,0x03,0x02,0x00,0x00 }, 14, AV_CODEC_ID_DNXHD }, /* SMPTE VC-3/DNxHD */ { { 0x06,0x0E,0x2B,0x34,0x04,0x01,0x01,0x01,0x0E,0x04,0x02,0x01,0x02,0x04,0x01,0x00 }, 16, AV_CODEC_ID_DNXHD }, /* SMPTE VC-3/DNxHD Legacy Avid Media Composer MXF */ + { { 0x06,0x0E,0x2B,0x34,0x04,0x01,0x01,0x0D,0x04,0x01,0x02,0x02,0x03,0x07,0x01,0x00 }, 14, AV_CODEC_ID_DNXUC }, /* DNxUncompressed/SMPTE RDD 50 */ { { 0x06,0x0E,0x2B,0x34,0x04,0x01,0x01,0x0A,0x04,0x01,0x02,0x02,0x01,0x32,0x00,0x00 }, 14, AV_CODEC_ID_H264 }, /* H.264/MPEG-4 AVC Intra */ { { 0x06,0x0E,0x2B,0x34,0x04,0x01,0x01,0x0A,0x04,0x01,0x02,0x02,0x01,0x31,0x11,0x01 }, 14, AV_CODEC_ID_H264 }, /* H.264/MPEG-4 AVC SPS/PPS in-band */ { { 0x06,0x0E,0x2B,0x34,0x04,0x01,0x01,0x0A,0x04,0x01,0x02,0x01,0x01,0x02,0x02,0x01 }, 16, AV_CODEC_ID_V210 }, /* V210 */ diff --git a/libavformat/mxfdec.c b/libavformat/mxfdec.c index 24f4ed1..7460799 100644 --- a/libavformat/mxfdec.c +++ b/libavformat/mxfdec.c @@ -1594,6 +1594,7 @@ static const MXFCodecUL mxf_picture_essence_container_uls[] = { { { 0x06,0x0e,0x2b,0x34,0x04,0x01,0x01,0x07,0x0d,0x01,0x03,0x01,0x02,0x0c,0x01,0x00 }, 14, AV_CODEC_ID_JPEG2000, NULL, 14, J2KWrap }, { { 0x06,0x0e,0x2b,0x34,0x04,0x01,0x01,0x02,0x0d,0x01,0x03,0x01,0x02,0x10,0x60,0x01 }, 14, AV_CODEC_ID_H264, NULL, 15 }, /* H.264 */ { { 0x06,0x0e,0x2b,0x34,0x04,0x01,0x01,0x02,0x0d,0x01,0x03,0x01,0x02,0x11,0x01,0x00 }, 14, AV_CODEC_ID_DNXHD, NULL, 14 }, /* VC-3 */ + { { 0x06,0x0e,0x2b,0x34,0x04,0x01,0x01,0x0d,0x0d,0x01,0x03,0x01,0x02,0x1e,0x01,0x00 }, 14, AV_CODEC_ID_DNXUC, NULL, 14 }, /* DNxUncompressed / SMPTE RDD 50 */ { { 0x06,0x0e,0x2b,0x34,0x04,0x01,0x01,0x02,0x0d,0x01,0x03,0x01,0x02,0x12,0x01,0x00 }, 14, AV_CODEC_ID_VC1, NULL, 14 }, /* VC-1 */ { { 0x06,0x0e,0x2b,0x34,0x04,0x01,0x01,0x02,0x0d,0x01,0x03,0x01,0x02,0x14,0x01,0x00 }, 14, AV_CODEC_ID_TIFF, NULL, 14 }, /* TIFF */ { { 0x06,0x0e,0x2b,0x34,0x04,0x01,0x01,0x02,0x0d,0x01,0x03,0x01,0x02,0x15,0x01,0x00 }, 14, AV_CODEC_ID_DIRAC, NULL, 14 }, /* VC-2 */ From patchwork Mon Sep 23 09:16:44 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: martin schitter X-Patchwork-Id: 51737 Delivered-To: ffmpegpatchwork2@gmail.com Received: by 2002:a59:d154:0:b0:48e:c0f8:d0de with SMTP id bt20csp2326132vqb; Mon, 23 Sep 2024 02:23:10 -0700 (PDT) X-Forwarded-Encrypted: i=2; AJvYcCU+Mn490Uvjc1xBINkGqRYoTLqQ0wTn2VLC7YMCJGbuwu9UKn85BniyOUIvWkiK4vHHBFpswojucMY/K+X9ROl1@gmail.com X-Google-Smtp-Source: AGHT+IGvavVVNJmQ8H+H7aGPbQDV93IRwRheC9ZUdNx6hhZMUmG4ihtm/vXYnrT1VNdrzUatu43E X-Received: by 2002:a05:6512:1192:b0:533:d28:b9d9 with SMTP id 2adb3069b0e04-536ac3426c0mr4409370e87.58.1727083390302; Mon, 23 Sep 2024 02:23:10 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1727083389; cv=none; d=google.com; s=arc-20240605; b=R8r8MUEGfMasciWegfo+uxxl8G2awTUCp90ZW/Pe4tqQ7uvitmXWvSDvYN0bL0G23t FT0Kbp0vfWxdqEAER8PD161vYNdNwFz4GCoV9jtHw/55AHaesVBzFyuIb8paEHB7zVbN Cfm4WI31RTUZHYMq29rbN/FvKZwDllrjzAdMG7N2PfLB+/1ptE969G9oFe1mVOWEA1No YaXVCSVPqZvIzLLA4wM6ZqsuGYS9cTXrXFae2vZI9/B2mHabqyLOCQKnkvN/NsHSuzCe h3RnGYJr4G2XSShGaIM2Bg3NXxxWk5R8qUlq4fs3QzhdSHxrKAxiCOZCzC7NQVlhPFBS Wh+A== 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:references:in-reply-to :message-id:date:to:from:dkim-signature:delivered-to; bh=mH0K/llgclGcKqZg+rC+pOxhOtr/wG2hJ5VjNfNWKAI=; fh=igg3JDwkSkAbPTwY6V0OsEq0RUkG4DKWC8fVJg4GhMY=; b=FGri2Y8yJITCR7tAbJM3pnBuz5kg3wCN0JHBJRz120+iIP6rAjHO1rZM6QuLz9M+oE WCozpBtDF2a/bJyuExRQfdTPC1pmaxK3Q6wo21ewzHZJcw76FSAd+Pv1zk/7G/rnuzKA 6VYQRjLzuqgO3om06rmZmboQ96wYnX83MpyDN65J9Qr+tsClxf4tkAiunBcRnTuUOZtj J2pD08DgjnLy0csxLTeAWfBqZf1yTsEbAqAxkyXtSVXHQSQK52V03eQYAwF0r0H5VmSN Vl1hVnd63SQr9Ul0VbnmZuIar+vIEw6mr0Hzu2mN6QyFZJIozXJEQ3I4yKgEEGAchgLX rAOQ==; 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=rVcKTDUz; 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 2adb3069b0e04-5368704305csi6912372e87.120.2024.09.23.02.23.08; Mon, 23 Sep 2024 02:23:09 -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=rVcKTDUz; 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 F371468DC49; Mon, 23 Sep 2024 12:22:39 +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 00FB068DB8A for ; Mon, 23 Sep 2024 12:22:29 +0300 (EEST) Received: from localhost.localdomain (lan1.raspi.ma39.ffgraz.net [10.12.1.243]) by efeu.mur.at (Postfix) with ESMTPSA id A010E46113; Mon, 23 Sep 2024 11:22:29 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=mur.at; s=dkim2; t=1727083349; bh=DFe79CV/sHQFKszwL/mb0m7JPtoeOwKEJA7grf/IbnA=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=rVcKTDUz0K6rfBj2Aytacf93AaIv7TEkZUnCBpptpPZteP8zL7LincYZntI5uWu6F 9WKYgIgMlZHSKghbw2smyff9nz6mrJQP8YOGrYVnPbjuL73iyI9TOcand12u19/mia v/IhELiGfOyR0djl94td+KnKb/xWH7tDG1verJA9JdUPJvf3tpr9EzxdEZtURE6prH NM4YX3Iam8BaLKmVOkI2SU5SYQTekJRP8Mv+4TiU1Sq4L0BW8JdLDfBpMmDlBLk+zP ESs+ko9x7ddbTBpvayxQRNBhFDhYpaGYemc5RGUOssCubo39GS4aX5ln/yYar8n/VD J62vjE7zkuuxFRMEQ9dagshcBcCBcJQjE1yz0IaPd/Zk7ojqArPJUx/1XIHIVVYdTr cUpstyCFlP4uE1Ps9n2exPnKA+Et9uuuTwNTat6meL/4qRpVpZS4p9wdm/rwJMY3HJ rolNs7HZRJBSWQ5YA1aUf1egbMb1fQPytGV6sYxmNZI84Vm06Hl From: Martin Schitter To: ffmpeg-devel@ffmpeg.org Date: Mon, 23 Sep 2024 11:16:44 +0200 Message-ID: <20240923091645.2309922-5-ms+git@mur.at> X-Mailer: git-send-email 2.45.2 In-Reply-To: <20240923091645.2309922-3-ms+git@mur.at> References: <20240923091645.2309922-3-ms+git@mur.at> MIME-Version: 1.0 Subject: [FFmpeg-devel] [PATCH v9 3/6] libavcodec/dnxuc_parser: DNxUncompressed essence parser 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: PkNWiH8b8bcu --- libavcodec/Makefile | 1 + libavcodec/dnxuc_parser.c | 124 ++++++++++++++++++++++++++++++++++++++ libavcodec/parsers.c | 1 + 3 files changed, 126 insertions(+) create mode 100644 libavcodec/dnxuc_parser.c diff --git a/libavcodec/Makefile b/libavcodec/Makefile index 936fc34..76366b3 100644 --- a/libavcodec/Makefile +++ b/libavcodec/Makefile @@ -1191,6 +1191,7 @@ OBJS-$(CONFIG_DCA_PARSER) += dca_parser.o dca_exss.o dca.o \ dca_sample_rate_tab.o OBJS-$(CONFIG_DIRAC_PARSER) += dirac_parser.o OBJS-$(CONFIG_DNXHD_PARSER) += dnxhd_parser.o dnxhddata.o +OBJS-$(CONFIG_DNXUC_PARSER) += dnxuc_parser.o OBJS-$(CONFIG_DOLBY_E_PARSER) += dolby_e_parser.o dolby_e_parse.o OBJS-$(CONFIG_DPX_PARSER) += dpx_parser.o OBJS-$(CONFIG_DVAUDIO_PARSER) += dvaudio_parser.o diff --git a/libavcodec/dnxuc_parser.c b/libavcodec/dnxuc_parser.c new file mode 100644 index 0000000..55d5763 --- /dev/null +++ b/libavcodec/dnxuc_parser.c @@ -0,0 +1,124 @@ +/* + * Avid DNxUncomressed / SMPTE RDD 50 parser + * Copyright (c) 2024 Martin Schitter + * + * This file is part of FFmpeg. + * + * FFmpeg is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * FFmpeg is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with FFmpeg; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + */ + +/* + This parser for DNxUncompressed video data is mostly based on + reverse engineering of output generated by DaVinci Resolve 19 + but was later also checked against the SMPTE RDD 50 specification. + + Limitations: Multiple image planes are not supported. +*/ + +#include "avcodec.h" +#include "libavutil/intreadwrite.h" + +typedef struct DNxUcParseContext { + uint32_t fourcc_tag; + uint32_t width; + uint32_t height; + uint32_t nr_bytes; +} DNxUcParseContext; + +/* +DNxUncompressed frame data comes wrapped in nested boxes of metadata +(box structure: len + fourcc marker + data): + +[0-4] len of outer essence unit box (typically 37 bytes of header + frame data) +[4-7] fourcc 'pack' + +[8-11] len of "signal info box" (always 21) +[12-15] fourcc 'sinf' +[16-19] frame width / line packing size +[20-23] frame hight / nr of lines +[24-27] fourcc pixel format indicator +[28] frame_layout (0: progressive, 1: interlaced) + +[29-32] len of "signal data box" (nr of frame data bytes + 8) +[33-36] fourcc 'sdat' +[37-..] frame data + +A sequence of 'signal info'+'signal data' box pairs wrapped in +'icmp'(=image component) boxes can be utilized to compose more +complex multi plane images. +This feature is only partially supported in the present implementation. +We never pick more than the first pair of info and image data enclosed +in this way. +*/ + +static int dnxuc_parse(AVCodecParserContext *s, + AVCodecContext *avctx, + const uint8_t **poutbuf, int *poutbuf_size, + const uint8_t *buf, int buf_size) +{ + char fourcc_buf[5]; + const int HEADER_SIZE = 37; + int icmp_offset = 0; + + DNxUcParseContext *pc; + pc = (DNxUcParseContext *) s->priv_data; + + if (!buf_size) { + return 0; + } + if (buf_size > 16 && MKTAG('i','c','m','p') == AV_RL32(buf+12)){ + icmp_offset += 8; + } + if ( buf_size < 37 + icmp_offset /* check metadata structure expectations */ + || MKTAG('p','a','c','k') != AV_RL32(buf+4+icmp_offset) + || MKTAG('s','i','n','f') != AV_RL32(buf+12+icmp_offset) + || MKTAG('s','d','a','t') != AV_RL32(buf+33+icmp_offset)){ + av_log(avctx, AV_LOG_ERROR, "can't read DNxUncompressed metadata.\n"); + *poutbuf_size = 0; + return buf_size; + } + + pc->fourcc_tag = AV_RL32(buf+24+icmp_offset); + pc->width = AV_RL32(buf+16+icmp_offset); + pc->height = AV_RL32(buf+20+icmp_offset); + pc->nr_bytes = AV_RL32(buf+29+icmp_offset) - 8; + + if (!avctx->codec_tag) { + av_fourcc_make_string(fourcc_buf, pc->fourcc_tag); + av_log(avctx, AV_LOG_INFO, "dnxuc_parser: '%s' %dx%d %dbpp %d\n", + fourcc_buf, + pc->width, pc->height, + (pc->nr_bytes*8)/(pc->width*pc->height), + pc->nr_bytes); + avctx->codec_tag = pc->fourcc_tag; + } + + if (pc->nr_bytes > buf_size - HEADER_SIZE + icmp_offset){ + av_log(avctx, AV_LOG_ERROR, "Insufficient size of image essence data.\n"); + *poutbuf_size = 0; + return buf_size; + } + + *poutbuf = buf + HEADER_SIZE + icmp_offset; + *poutbuf_size = pc->nr_bytes; + + return buf_size; +} + +const AVCodecParser ff_dnxuc_parser = { + .codec_ids = { AV_CODEC_ID_DNXUC }, + .priv_data_size = sizeof(DNxUcParseContext), + .parser_parse = dnxuc_parse, +}; diff --git a/libavcodec/parsers.c b/libavcodec/parsers.c index 5128009..8bfd2db 100644 --- a/libavcodec/parsers.c +++ b/libavcodec/parsers.c @@ -35,6 +35,7 @@ extern const AVCodecParser ff_cri_parser; extern const AVCodecParser ff_dca_parser; extern const AVCodecParser ff_dirac_parser; extern const AVCodecParser ff_dnxhd_parser; +extern const AVCodecParser ff_dnxuc_parser; extern const AVCodecParser ff_dolby_e_parser; extern const AVCodecParser ff_dpx_parser; extern const AVCodecParser ff_dvaudio_parser; From patchwork Mon Sep 23 09:16:45 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: martin schitter X-Patchwork-Id: 51736 Delivered-To: ffmpegpatchwork2@gmail.com Received: by 2002:a59:d154:0:b0:48e:c0f8:d0de with SMTP id bt20csp2326073vqb; Mon, 23 Sep 2024 02:23:01 -0700 (PDT) X-Forwarded-Encrypted: i=2; AJvYcCVe7oXg+H0+U5O/XnVy28zMHSMhRLk8He3sL1mMAQfW9YOCOYlZDdRPymP2dWpJ8lvxEavX6ELywGs1PHtkwxfG@gmail.com X-Google-Smtp-Source: AGHT+IEX/lmjnpjv86x3uOQSiK9FyqSFdFMdGjUeoknMM5UnOYUWIdabW5AvBU6s70lojNnzaZxS X-Received: by 2002:a2e:beac:0:b0:2f7:6d92:1a30 with SMTP id 38308e7fff4ca-2f7cb2eea52mr58904261fa.14.1727083380939; Mon, 23 Sep 2024 02:23:00 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1727083380; cv=none; d=google.com; s=arc-20240605; b=XHfF9USK7LD89SkCnPdpR4wczHnahBmwtnJxgYEdW+ZWYiXYRiZnATRVtgtoJsKDq2 3LerF4wBBd5Y8d2CF3qjEonXfvVK9KUzx9lAzdmQAUGQV7DA42TpXMcf4DsPcdWzjsOn sakq8pelpQXUSt6WY1lSfnR+Yi9XvAOlPqU83WDQ73DqPBbk4EjnDjebp0dAt56BBfIw IGNlBvgcXgQf/ZfnDPlL0WgUG8xJGtDPOdc0V12kqbB2ubHUdLRPamAbznpXJPtAKZpM x0Gtl7PMcbp51ognPNPimgTA0Ei+Z6kEoBdTwceOaeCBXoH0aQ+enK1n22KWlCjStikI oUpg== 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:references:in-reply-to :message-id:date:to:from:dkim-signature:delivered-to; bh=WEdR0HVx6acxI40VO0UHg0Q89YJ7oNXdSYWyFm4+XvE=; fh=igg3JDwkSkAbPTwY6V0OsEq0RUkG4DKWC8fVJg4GhMY=; b=QFeNsX1mZk1cDWtbWNdVRBAXvQJ9RVdXIuM9gu1SlM7riIiADp1v9bedt/LGJpBOvr 3h/mfwKsi4nrj5VBVH7/U5R+sdu9eCrTP/1KlRlD9HFjFq62k1bsTVXCIBK75tD9tPyc 8gkhJjPsUu2EICQAe38ghHsz8nn/dIBBNAGJ17O1XmqTB2GkeTN3zk1O10hH3ZSN2RGB jPfROWKvP4f4r/QWJDwwN6+tZixRn3FkNzRMWTxIh4GtSiBAFgn7EycViqoIR8ks0GX1 2O5fibxlwnX9BGOfvOvH1ls8ZACjMU9oY5ByAU+CAJcWpgTg/PIsXwIPEHC2D4DeHopw ndeQ==; 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=ioOvRJN1; 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 38308e7fff4ca-2f79d2c8315si61022831fa.21.2024.09.23.02.22.59; Mon, 23 Sep 2024 02:23:00 -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=ioOvRJN1; 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 A33E468DC2F; Mon, 23 Sep 2024 12:22:38 +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 1D19668DB99 for ; Mon, 23 Sep 2024 12:22:30 +0300 (EEST) Received: from localhost.localdomain (lan1.raspi.ma39.ffgraz.net [10.12.1.243]) by efeu.mur.at (Postfix) with ESMTPSA id BC3E246117; Mon, 23 Sep 2024 11:22:29 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=mur.at; s=dkim2; t=1727083349; bh=o+xPSqRhI+5gCU8xMS9ho3FbqkQX3ovJoDZnLC08ynQ=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=ioOvRJN11rfiYE/w4QGUCglLJnaCj/Yp+XmuvzfH0zNvehSRHjLiM/BqeAubFRWcl HwBP8JWFGqLz/vMjT/Z1oyy5QPNkmXJXry7OKcg5gY79nTQRAhtzhXwNl69M1k0UoC 8HVvwa5J+Gw47Pg1X6n2AuwN2ZDNI3sBwfPfqoBPo/QA+ozxG0eeWnaz9/WT0ab6oX gqdRglQXxxYJeyNn2xZSqpDTBSxPaErz116dG9NcB5afNzfvXBiiUEo98JbyjPqnzZ MBFvU07cw6W0CnkL7+Mme1vfNTH1il2rXPpvUXCWfgULdWAxVWhsQprXE7F5oOzKkp ISjL+0z7+9l/F9QTXbPCaPWJ61U1tHhFzOcSKsPtZjEYA5ST8+UxdXcVxLWibSZSdK oulazmjfvkJuqXqwQesL4jP6ZB/VEmZo/laxacxOFfzQq5+WXFNxzmulo2DnC0C8cZ i0cLs4PrK1PHsN10WI21XrAaOzLRYHVK+F87wqXiV17tL8LxFvu From: Martin Schitter To: ffmpeg-devel@ffmpeg.org Date: Mon, 23 Sep 2024 11:16:45 +0200 Message-ID: <20240923091645.2309922-6-ms+git@mur.at> X-Mailer: git-send-email 2.45.2 In-Reply-To: <20240923091645.2309922-3-ms+git@mur.at> References: <20240923091645.2309922-3-ms+git@mur.at> MIME-Version: 1.0 Subject: [FFmpeg-devel] [PATCH v9 4/6] libavcodec/dnxucdec: 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: 7EyptANnoV71 --- libavcodec/Makefile | 1 + libavcodec/allcodecs.c | 1 + libavcodec/dnxucdec.c | 391 +++++++++++++++++++++++++++++++++++++++++ 3 files changed, 393 insertions(+) create mode 100644 libavcodec/dnxucdec.c diff --git a/libavcodec/Makefile b/libavcodec/Makefile index 76366b3..87a9cc1 100644 --- a/libavcodec/Makefile +++ b/libavcodec/Makefile @@ -325,6 +325,7 @@ OBJS-$(CONFIG_DFPWM_DECODER) += dfpwmdec.o OBJS-$(CONFIG_DFPWM_ENCODER) += dfpwmenc.o OBJS-$(CONFIG_DNXHD_DECODER) += dnxhddec.o dnxhddata.o OBJS-$(CONFIG_DNXHD_ENCODER) += dnxhdenc.o dnxhddata.o +OBJS-$(CONFIG_DNXUC_DECODER) += dnxucdec.o OBJS-$(CONFIG_DOLBY_E_DECODER) += dolby_e.o dolby_e_parse.o kbdwin.o OBJS-$(CONFIG_DPX_DECODER) += dpx.o OBJS-$(CONFIG_DPX_ENCODER) += dpxenc.o diff --git a/libavcodec/allcodecs.c b/libavcodec/allcodecs.c index aa0fc47..d6ab5f0 100644 --- a/libavcodec/allcodecs.c +++ b/libavcodec/allcodecs.c @@ -93,6 +93,7 @@ extern const FFCodec ff_dfa_decoder; extern const FFCodec ff_dirac_decoder; extern const FFCodec ff_dnxhd_encoder; extern const FFCodec ff_dnxhd_decoder; +extern const FFCodec ff_dnxuc_decoder; extern const FFCodec ff_dpx_encoder; extern const FFCodec ff_dpx_decoder; extern const FFCodec ff_dsicinvideo_decoder; diff --git a/libavcodec/dnxucdec.c b/libavcodec/dnxucdec.c new file mode 100644 index 0000000..b5bc795 --- /dev/null +++ b/libavcodec/dnxucdec.c @@ -0,0 +1,391 @@ +/* + * Avid DNxUncomressed / SMPTE RDD 50 decoder + * Copyright (c) 2024 Martin Schitter + * + * This file is part of FFmpeg. + * + * FFmpeg is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * FFmpeg is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with FFmpeg; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + */ + +/* + This decoder for DNxUncompressed video data is mostly based on + reverse engineering of output generated by DaVinci Resolve 19 + but was later also checked against the SMPTE RDD 50 specification. + + Not all DNxUncompressed pixel format variants are supported, + but at least an elementary base set is already usable: + + - YUV 4:2:2 8/10/12bit + - RGB 8/10/12bit/half/float + +*/ + +#include "avcodec.h" +#include "codec_internal.h" +#include "decode.h" +#include "libavutil/imgutils.h" +#include "thread.h" + +static av_cold int dnxuc_decode_init(AVCodecContext *avctx) +{ + return 0; +} + + +static int pass_though(AVCodecContext *avctx, AVFrame *frame, const AVPacket *avpkt) +{ + /* there is no need to copy as the data already match + * a known pixel format */ + + frame->buf[0] = av_buffer_ref(avpkt->buf); + + if (!frame->buf[0]) { + return AVERROR(ENOMEM); + } + + return av_image_fill_arrays(frame->data, frame->linesize, avpkt->data, + avctx->pix_fmt, avctx->width, avctx->height, 1); +} + +static int float2planes(AVCodecContext *avctx, AVFrame *frame, const AVPacket *pkt) +{ + int lw; + const size_t sof = 4; + + lw = frame->width; + + for(int y = 0; y < frame->height; y++){ + for(int x = 0; x < frame->width; x++){ + memcpy(&frame->data[2][sof*(lw*y + x)], &pkt->data[sof* 3*(lw*y + x)], sof); + memcpy(&frame->data[0][sof*(lw*y + x)], &pkt->data[sof*(3*(lw*y + x) + 1)], sof); + memcpy(&frame->data[1][sof*(lw*y + x)], &pkt->data[sof*(3*(lw*y + x) + 2)], sof); + } + } + return pkt->size; +} + +static int half_add_alpha(AVCodecContext *avctx, AVFrame *frame, const AVPacket *pkt) +{ + /* ffmpeg doesn't provide RGB half bit depth without alpha channel right now + * we simply add an opaque alpha layer as workaround */ + + int lw; + const size_t soh = 2; + const uint16_t opaque = 0x3c00; + + lw = frame->width; + + for(int y = 0; y < frame->height; y++){ + for(int x = 0; x < frame->width; x++){ + memcpy(&frame->data[0][soh*4*(lw*y + x)], &pkt->data[soh*3*(lw*y + x)], soh*3); + memcpy(&frame->data[0][soh*(4*(lw*y + x) + 3)], &opaque, soh); + } + } + return pkt->size; +} + +/* DNxUncompressed utilizes a very dense bitpack representation of 10bit and 12bit pixel data. + +Lines of Image data, which look like in their ordinary 8bit counterpart, contain the most +significant upper bits of the pixel data. These sections alternate with shorter segments in +which the complementary least significant bits of information get packed in a gapless sequence. + ++----------------------+ +----------------------+ +------------------------+ +----------~ +| 8 m.s.bits of R[1] | | 8 m.s.bits of G[1] | | 8 m.s.bits of B[1] | | msb R[2] ... one line ++----------------------+ +----------------------+ +------------------------+ +----------~ + ++---------------------------------------------------------------+ +-----------~ +| +------------+ +------------+ +------------+ +--------------+ | | +--------~ +| | 2 lsb R[2] | | 2 lsb B[1] | | 2 lsb G[1] | | 2 lsb R[1] | | | | G[3]lsb ... LSB bits for line +| +------------+ +------------+ +------------+ +--------------+ | | +--------~ ++---------------------------- one byte ------------------------ + +-----------~ + +next line of MSB bytes... */ + +static int unpack_rg10(AVCodecContext *avctx, AVFrame *frame, const AVPacket *pkt) +{ + int lw, msp, pack, lsp, p_off; + uint16_t r,g,b; + + lw = frame->width; + + for(int y = 0; y < frame->height; y++){ + for(int x = 0; x < frame->width; x++){ + msp = pkt->data[y*3*(lw + lw/4) + 3*x]; + p_off = y*(3*(lw + lw/4)) + 3*lw + 3*x/4; + pack = pkt->data[p_off]; + lsp = (pack >> (3*x%4)*2) & 0x3; + r = (msp << 2) + lsp; + // av_log(0, AV_LOG_DEBUG, "r: %04x, %02x, %02x, %02x, %d\n", + // r, msp, lsp, pack, p_off); + + msp = pkt->data[y*3*(lw + lw/4) + 3*x + 1]; + p_off = y*(3*(lw + lw/4)) + 3*lw + (3*x+1)/4; + pack = pkt->data[p_off]; + lsp = (pack >> ((3*x+1)%4)*2) & 0x3; + g = (msp << 2) + lsp; + // av_log(0, AV_LOG_DEBUG, "g: %04x, %02x, %02x, %02x, %d\n", + // g, msp, lsp, pack, p_off); + + msp = pkt->data[y*3*(lw + lw/4) + 3*x + 2]; + p_off = y*(3*(lw + lw/4)) + 3*lw + (3*x+2)/4; + pack = pkt->data[p_off]; + lsp = (pack >> ((3*x+2)%4)*2) & 0x3; + b = (msp << 2) + lsp; + // av_log(0, AV_LOG_DEBUG, "b: %04x, %02x, %02x, %02x, %d\n\n", + // b, msp, lsp, pack, p_off); + + memcpy(&frame->data[2][2*(y*lw + x)], &r, 2); + memcpy(&frame->data[0][2*(y*lw + x)], &g, 2); + memcpy(&frame->data[1][2*(y*lw + x)], &b, 2); + } + } + return pkt->size; +} + +static int unpack_rg12(AVCodecContext *avctx, AVFrame *frame, const AVPacket *pkt) +{ + int lw, msp, pack, lsp, p_off; + uint16_t r,g,b; + + lw = frame->width; + + for(int y = 0; y < frame->height; y++){ + for(int x = 0; x < frame->width; x++){ + msp = pkt->data[y*3*(lw + lw/2) + 3*x]; + p_off = y*(3*(lw + lw/2)) + 3*lw + 3*x/2; + pack = pkt->data[p_off]; + lsp = (pack >> (3*x%2)*4) & 0xf; + r = (msp << 4) + lsp; + // av_log(0, AV_LOG_DEBUG, "r: %04x, %02x, %02x, %02x, %d\n", + // r, msp, lsp, pack, p_off); + + msp = pkt->data[y*3*(lw + lw/2) + 3*x + 1]; + p_off =y*(3*(lw + lw/2)) + 3*lw + (3*x+1)/2; + pack = pkt->data[p_off]; + lsp = (pack >> ((3*x+1)%2)*4) & 0xf; + g = (msp << 4) + lsp; + // av_log(0, AV_LOG_DEBUG, "g: %04x, %02x, %02x, %02x, %d\n", + // g, msp, lsp, pack, p_off); + + msp = pkt->data[y*3*(lw + lw/2) + 3*x + 2]; + p_off = y*(3*(lw + lw/2)) + 3*lw + (3*x+2)/2; + pack = pkt->data[p_off]; + lsp = (pack >> ((3*x+2)%2)*4) & 0xf; + b = (msp << 4) + lsp; + // av_log(0, AV_LOG_DEBUG, "b: %04x, %02x, %02x, %02x, %d\n\n", + // b, msp, lsp, pack, p_off); + + memcpy(&frame->data[2][2*(y*lw + x)], &r, 2); + memcpy(&frame->data[0][2*(y*lw + x)], &g, 2); + memcpy(&frame->data[1][2*(y*lw + x)], &b, 2); + } + } + return pkt->size; +} + + +static int unpack_y210(AVCodecContext *avctx, AVFrame *frame, const AVPacket *pkt) +{ + int lw, msp, pack, lsp, p_off; + uint16_t y1, y2, u, v; + + lw = frame->width; + + for(int y = 0; y < frame->height; y++){ + for(int x = 0; x < frame->width; x += 2){ + + p_off = y*(2*(lw + lw/4)) + 2*lw + x/2; + pack = pkt->data[p_off]; + + msp = pkt->data[y*2*(lw + lw/4) + 2*x]; + lsp = pack & 0x3; + u = (msp << 2) + lsp; + // av_log(0, AV_LOG_DEBUG, " u: %04x, %02x, %02x, %02x, %d\n", + // u, msp, lsp, pack, p_off); + + msp = pkt->data[y*2*(lw + lw/4) + 2*x + 1]; + lsp = (pack >> 2) & 0x3; + y1 = (msp << 2) + lsp; + // av_log(0, AV_LOG_DEBUG, "y1: %04x, %02x, %02x, %02x, %d\n", + // y1, msp, lsp, pack, p_off); + + msp = pkt->data[y*2*(lw + lw/4) + 2*x + 2]; + lsp = (pack >> 4) & 0x3; + v = (msp << 2) + lsp; + // av_log(0, AV_LOG_DEBUG, " v: %04x, %02x, %02x, %02x, %d\n", + // v, msp, lsp, pack, p_off); + + msp = pkt->data[y*2*(lw + lw/4) + 2*x + 3]; + lsp = (pack >> 6) & 0x3; + y2 = (msp << 2) + lsp; + // av_log(0, AV_LOG_DEBUG, "y2: %04x, %02x, %02x, %02x, %d\n\n", + // y2, msp, lsp, pack, p_off); + + memcpy(&frame->data[0][2*(y*lw + x)], &y1, 2); + memcpy(&frame->data[0][2*(y*lw + x+1)], &y2, 2); + memcpy(&frame->data[1][2*(y*lw/2 + x/2)], &u, 2); + memcpy(&frame->data[2][2*(y*lw/2 + x/2)], &v, 2); + } + } + return pkt->size; +} + + +static int unpack_y212(AVCodecContext *avctx, AVFrame *frame, const AVPacket *pkt) +{ + int lw, msp, pack, lsp, p_off; + uint16_t y1, y2, u, v; + + lw = frame->width; + + for(int y = 0; y < frame->height; y++){ + for(int x = 0; x < frame->width; x += 2){ + + p_off = y*(2*(lw + lw/2)) + 2*lw + x; + pack = pkt->data[p_off]; + + msp = pkt->data[y*2*(lw + lw/2) + 2*x]; + lsp = pack & 0xf; + u = (msp << 4) + lsp; + // av_log(0, AV_LOG_DEBUG, " u: %04x, %02x, %02x, %02x, %d\n", + // u, msp, lsp, pack, p_off); + + msp = pkt->data[y*2*(lw + lw/2) + 2*x + 1]; + lsp = (pack >> 4) & 0xf; + y1 = (msp << 4) + lsp; + // av_log(0, AV_LOG_DEBUG, "y1: %04x, %02x, %02x, %02x, %d\n", + // y1, msp, lsp, pack, p_off); + + p_off = y*(2*(lw + lw/2)) + 2*lw + x+1; + pack = pkt->data[p_off]; + + msp = pkt->data[y*2*(lw + lw/2) + 2*x + 2]; + lsp = pack & 0xf; + v = (msp << 4) + lsp; + // av_log(0, AV_LOG_DEBUG, " v: %04x, %02x, %02x, %02x, %d\n", + // v, msp, lsp, pack, p_off); + + msp = pkt->data[y*2*(lw + lw/2) + 2*x + 3]; + lsp = (pack >> 4) & 0xf; + y2 = (msp << 4) + lsp; + // av_log(0, AV_LOG_DEBUG, "y2: %04x, %02x, %02x, %02x, %d\n\n", + // y2, msp, lsp, pack, p_off); + + memcpy(&frame->data[0][2*(y*lw + x)], &y1, 2); + memcpy(&frame->data[0][2*(y*lw + x+1)], &y2, 2); + memcpy(&frame->data[1][2*(y*lw/2 + x/2)], &u, 2); + memcpy(&frame->data[2][2*(y*lw/2 + x/2)], &v, 2); + } + } + return pkt->size; +} + +static int check_pkt_size(AVCodecContext *avctx, AVPacket *avpkt, int bpp) +{ + int needed = ((avctx->width * bpp + 7) / 8) * avctx->height; + if (avpkt->size < needed){ + av_log(avctx, AV_LOG_ERROR, + "Insufficient size of AVPacket data (pkg size: %d needed: %d)\n", avpkt->size, needed); + return AVERROR_INVALIDDATA; + } + return 0; +} + +static int fmt_frame(AVCodecContext *avctx, AVFrame *frame, AVPacket *avpkt, + enum AVPixelFormat pix_fmt, int src_bpp, + int (*frame_handler)(AVCodecContext *avctx, AVFrame *frame, const AVPacket *avpkt)) +{ + int ret; + avctx->pix_fmt = pix_fmt; + + ret = check_pkt_size(avctx, avpkt, src_bpp); + if (ret) + return ret; + + ret = ff_thread_get_buffer(avctx, frame, 0); + if (ret < 0) + return ret; + + return frame_handler(avctx, frame, avpkt); +} + +static int dnxuc_decode_frame(AVCodecContext *avctx, AVFrame *frame, + int *got_frame, AVPacket *avpkt) +{ + char fourcc_buf[5]; + int ret; + + av_fourcc_make_string(fourcc_buf, avctx->codec_tag); + if ((avctx->width % 2) && ((fourcc_buf[0] == 'y' && fourcc_buf[1] == '2') + ||(fourcc_buf[1] == 'y' && fourcc_buf[2] == '2'))){ + av_log(avctx, AV_LOG_ERROR, + "Image width must be a multiple of 2 for YUV 4:2:2 DNxUncompressed!\n"); + return AVERROR_INVALIDDATA; + } + + switch (avctx->codec_tag) { + case MKTAG('r','g','0','8'): + ret = fmt_frame(avctx, frame, avpkt, AV_PIX_FMT_RGB24, 24, pass_though); + break; + case MKTAG('r','g','1','0'): + ret = fmt_frame(avctx, frame, avpkt, AV_PIX_FMT_GBRP10LE, 30, unpack_rg10); + break; + case MKTAG('r','g','1','2'): + ret = fmt_frame(avctx, frame, avpkt, AV_PIX_FMT_GBRP12LE, 36, unpack_rg12); + break; + case MKTAG(' ','r','g','h'): + ret = fmt_frame(avctx, frame, avpkt, AV_PIX_FMT_RGBAF16LE, 48, half_add_alpha); + break; + case MKTAG(' ','r','g','f'): + ret = fmt_frame(avctx, frame, avpkt, AV_PIX_FMT_GBRPF32LE, 96, float2planes); + break; + + case MKTAG('y','2','0','8'): + ret = fmt_frame(avctx, frame, avpkt, AV_PIX_FMT_UYVY422, 16, pass_though); + break; + case MKTAG('y','2','1','0'): + ret = fmt_frame(avctx, frame, avpkt, AV_PIX_FMT_YUV422P10LE, 20, unpack_y210); + break; + case MKTAG('y','2','1','2'): + ret = fmt_frame(avctx, frame, avpkt, AV_PIX_FMT_YUV422P12LE, 24, unpack_y212); + break; + + default: + av_log(avctx, AV_LOG_ERROR, + "Unsupported DNxUncompressed pixel format variant: '%s'\n", + fourcc_buf); + return AVERROR_PATCHWELCOME; + } + + if (ret < 0) { + av_buffer_unref(&frame->buf[0]); + return ret; + } + + *got_frame = 1; + + return avpkt->size; +} + +const FFCodec ff_dnxuc_decoder = { + .p.name = "dnxuc", + CODEC_LONG_NAME("DNxUncompressed (SMPTE RDD 50)"), + .p.type = AVMEDIA_TYPE_VIDEO, + .p.id = AV_CODEC_ID_DNXUC, + .init = dnxuc_decode_init, + FF_CODEC_DECODE_CB(dnxuc_decode_frame), + .p.capabilities = AV_CODEC_CAP_FRAME_THREADS, +}; From patchwork Mon Sep 23 09:16:46 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: martin schitter X-Patchwork-Id: 51740 Delivered-To: ffmpegpatchwork2@gmail.com Received: by 2002:a59:d154:0:b0:48e:c0f8:d0de with SMTP id bt20csp2328399vqb; Mon, 23 Sep 2024 02:29:17 -0700 (PDT) X-Forwarded-Encrypted: i=2; AJvYcCX8FybhrYdnxVTppIKgxweZf0qPjaFzYRi0k5CUdzgWpz/ff7xrG2NPy3H6J3IMCRTJF5qKlXQvua0LE28r5q+y@gmail.com X-Google-Smtp-Source: AGHT+IFoLFiqo70YkrebwZAqHbNHtoLv0x0ntlc7xx57Tqxtzsuypixp9TUfT10/6PyfSrmTtvo6 X-Received: by 2002:a05:6402:35cf:b0:5c2:6bb8:1859 with SMTP id 4fb4d7f45d1cf-5c464a42aa6mr15160243a12.19.1727083757532; Mon, 23 Sep 2024 02:29:17 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1727083757; cv=none; d=google.com; s=arc-20240605; b=JxN821Swyb+K2NCc3TWgwvdubbazi3W3aZGQJhAAMsYNcJJNFC5s7JDvHKtO9JH+ea 6x520ryjebNxXnuIjUPZrr+9B2II1O+zIT4BxMv73N4f/cNCuq9ZHp3Jh3exCpinSxGz IrQHWARsSCdcP6y9ubpEfKwCtgZyxT5ac4Qz4/dZkG98YvqWWQ8S+TP4CveQ/ydCI6Lo qtfOmlGlrZZdU5W4471QCXfr8Z1D+O2Lf4LBLq5I+rtaazM3AUe/8ryTPiVJYa55X9tC 91Afei5hbldpulj5DVt7m0O+OqY7ZpVej2kgfn7i2MFeDkdSew0qpFuibxJG1CLMlU2B UEIw== 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:references:in-reply-to :message-id:date:to:from:dkim-signature:delivered-to; bh=DFu6FSG0QCs1gpouprMa4rofKFa+hohNf3YqTDcXUmU=; fh=igg3JDwkSkAbPTwY6V0OsEq0RUkG4DKWC8fVJg4GhMY=; b=OyoUjb6Y/DfxbPNpwbBaymhie26ZYa70eC+snBLq8OEBFqZAO1x8Jf8/u3v8gu18Oj p3W39OZejOPxoe4acG1+Sl6Z997atzMcgW/5oX/f6Gdc6uhsuNtJh7fRrE4wzjWG2Jk6 wwqK8FR8+3wciZBSt47KBBNlfgJbS7BGysak1PYTYDfR58g62Sww45ag08V3vWGg7aqu zdzzzxO8r1AJqKjDdDXu/EMYnEOQHekiYT0MVG0GtVw378/OUmLTxJ0rq+ViM10Yyyin A0KSKNAAP8mFX34fhcIWOHeJrIqABLNktTplUBHQkTU4ugvtuguZuFt5y1dhxR5WN3Eq 1WxA==; 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=LJC496Oh; 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-5c42bcad272si13529986a12.497.2024.09.23.02.29.17; Mon, 23 Sep 2024 02:29:17 -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=LJC496Oh; 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 3964968DC61; Mon, 23 Sep 2024 12:22:41 +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 3903268DB18 for ; Mon, 23 Sep 2024 12:22:30 +0300 (EEST) Received: from localhost.localdomain (lan1.raspi.ma39.ffgraz.net [10.12.1.243]) by efeu.mur.at (Postfix) with ESMTPSA id D964646118; Mon, 23 Sep 2024 11:22:29 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=mur.at; s=dkim2; t=1727083349; bh=X5WnczqZh65lPC4TsTtcMjzcq4VDPYUt7X+GQZnhZI0=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=LJC496OhkYghnzgrqnfWp96rvwZmP5uQR0wzy/feKX0HgLqXPWQ7E7vZ2B82gBN2J JIspp0609xz5ImEVXiboWZGlWmIMTY8NvKEsUuOR4i0QbfpOrBg95aYEnc01naW6/+ lw6Uottdj/qU2n1kmMVKhovGMgsInpDFRrFNdW1uc8bXyeZnqKfMf9ij4CQw3ttp86 Gk/WaKGxzwByM9P3ho1CXDSO5L4RFwp6uscc7i5y2AcU9YuZShzfdNWDDCVnTy+rFY S3OUNYRgf6DpJfaGPsvY0/LM9+G9sM1r9XznEj11vOjtSDSBQm7dogeXkvu1MThJWd oQgp5zf4nVPQEnL3AHWgrOfgeZfmlfl55I1gBw5s+t9xMrOUqt41hr5P7XPL3yk23h RhvWC9guAagijrr4p40aZMxZMDh5wwqNjOKgGqS2yNeC0kvEzKL+1SKo30tuZx4+oL fYJqR84+MnkdaZWaNUc/Q5jPMxlpZFtGZPaX/ooz2TAAEAhRqiM From: Martin Schitter To: ffmpeg-devel@ffmpeg.org Date: Mon, 23 Sep 2024 11:16:46 +0200 Message-ID: <20240923091645.2309922-7-ms+git@mur.at> X-Mailer: git-send-email 2.45.2 In-Reply-To: <20240923091645.2309922-3-ms+git@mur.at> References: <20240923091645.2309922-3-ms+git@mur.at> MIME-Version: 1.0 Subject: [FFmpeg-devel] [PATCH v9 5/6] doc: DNxUncompressed Changelog and doc entries 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: 8eWI3WuImDO1 --- Changelog | 1 + doc/general_contents.texi | 1 + 2 files changed, 2 insertions(+) diff --git a/Changelog b/Changelog index 49a16da..13e2ac0 100644 --- a/Changelog +++ b/Changelog @@ -19,6 +19,7 @@ version : - Cropping metadata parsing and writing in Matroska and MP4/MOV de/muxers - Intel QSV-accelerated VVC decoding - MediaCodec AAC/AMR-NB/AMR-WB/MP3 decoding +- DNxUncompressed (SMPTE RDD 50) decoder - YUV colorspace negotiation for codecs and filters, obsoleting the YUVJ pixel format - Vulkan H.264 encoder diff --git a/doc/general_contents.texi b/doc/general_contents.texi index 5f22ccd..1e0744b 100644 --- a/doc/general_contents.texi +++ b/doc/general_contents.texi @@ -632,6 +632,7 @@ library: @item raw DFPWM @tab X @tab X @item raw Dirac @tab X @tab X @item raw DNxHD @tab X @tab X +@item raw DNxUncompressed @tab @tab X @item raw DTS @tab X @tab X @item raw DTS-HD @tab @tab X @item raw E-AC-3 @tab X @tab X From patchwork Mon Sep 23 09:16:47 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: martin schitter X-Patchwork-Id: 51739 Delivered-To: ffmpegpatchwork2@gmail.com Received: by 2002:a59:d154:0:b0:48e:c0f8:d0de with SMTP id bt20csp2328394vqb; Mon, 23 Sep 2024 02:29:17 -0700 (PDT) X-Forwarded-Encrypted: i=2; AJvYcCUhZdKNZVM4//97UxvfWw5hvmiqNng9qIa9vlcfBsG5GA54fAB90VKFy5wFSnuSkqgt5suar0qztvlIPhZ1WwPY@gmail.com X-Google-Smtp-Source: AGHT+IFoVUXUW1sV4Mpj6LPkCdKtW1dDwv7NF6PN70GY5Kq7sCEws+NIpaAFpAhsdzTYj53vjwOf X-Received: by 2002:a17:907:3f9f:b0:a86:9e3f:fdc8 with SMTP id a640c23a62f3a-a90d4fe376cmr529640666b.4.1727083756902; Mon, 23 Sep 2024 02:29:16 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1727083756; cv=none; d=google.com; s=arc-20240605; b=UfAMFlcvSt5+rHcILWmrwnRqqzb5QGY2ktvMl0NnNgi0B2jPAdk6mrC+qoD5y76zyt qVprtT0jL2px47VHPDiPsMPeSw8Z7nenXnGYNX2wbsBZ9IZA1PfOnAKNBeyeoAsuj0Sk 1qm18/BiAcfoU016Xnun/toNMv5fEbPq0Ye1DxJDgy3Fql3R0JA36qPWKnV+CTfpmEq0 BEgvxfQgVoLckG45Li6RiO4Y9yXTltFIWtWa0OOwETn6r3ww3KjmVkny0s9MOwM3zBTw XOfvBFLbLXozyZple9ob0ih9FkanEdMeZQW8dfuU13wbifwWg7igduR/F+Dp3QI1oIMA +4CA== 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:references:in-reply-to :message-id:date:to:from:dkim-signature:delivered-to; bh=pey2AwJ+DsxmADe7OqPy4+dVP0EbUo6BC8VSyMfbzMk=; fh=igg3JDwkSkAbPTwY6V0OsEq0RUkG4DKWC8fVJg4GhMY=; b=dzKgysFdAWCqRPxKgNFEhUJJ/FXwLcLY2SqvLXwUJ8Zot+w8avo/CZO6oJLwwpK/0t dFeadozFZARECxszUlrrN+fMxrL/y6ie0x6LA+mFpsWLfMKTttj0G0wOvp7Bi23tWW++ gDGGoAFkGdNIZvHbufg8rJXNlzThfk6znGmqt6YXcN6CcE7GWqF49T8uuQoOFObl+TZ9 EIJ599RZkLFWr1UPNknDQnUINVB+ii2K/KFQg9kHV5jTtvpLViuwEkczQvG7bly4Errs bJ+LHY94+/4mk5zwpcclciZwPx3GpA/9kjOXyl40cOpUr7lzZeArtpldH72q0k7C4GmK 3N5w==; 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=KXNFRegW; 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 a640c23a62f3a-a90612e7839si1306570866b.507.2024.09.23.02.29.16; Mon, 23 Sep 2024 02:29:16 -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=KXNFRegW; 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 31EC668DC67; Mon, 23 Sep 2024 12:22:42 +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 5CE9A68DB8A for ; Mon, 23 Sep 2024 12:22:35 +0300 (EEST) Received: from localhost.localdomain (lan1.raspi.ma39.ffgraz.net [10.12.1.243]) by efeu.mur.at (Postfix) with ESMTPSA id 016BF46121; Mon, 23 Sep 2024 11:22:29 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=mur.at; s=dkim2; t=1727083350; bh=Rn86jL2r2TdU2N7aIViIEKKnXO5wma1k7Fpc7CAQuMU=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=KXNFRegWe7fo7NYjxHgtmdubR8+fBq7nFKFAh9Jg45ue/lgy7z860ahPwOKVrrJjB zSJu8qtAaR1dmbruLHNJQYpeevzKk2v05IUlSFoc7CUMccEwGe9+jvQY3NSHoCYmIM Lhh6qzq08xFON99o0+0UZpyY1tAfRlcInJm9iZY1zRrhOYoIVad+pPL0lNCyClodlp 2B6k7jhl6SZ/gAlp+2U61d52NzxWe5Ik6vWZo/6vj+RPTgW600h4s8eoq+8CTprvH7 oIQkFrfawILndm899SSKThk98OMfcnM89QHaDksUT/Mj9TfLfJBbOwlOEF3Jcyjo9o l3wncmTE6pZmZAs5isQf/DyQx/YJwywYLFxfKncaKk0jR4QLeGSV+jXuplydFHq5yF exMtdvmV4glljmgzFxsv6sfyfjJgDEFNmLfUJpoPFB5rOvOtsIo2YrQx1wuqwRMDd8 ZAYS44UN2FOZ7lGeixqDGBEv+ntUouJFOVu8+WGOD/slw5IabF1 From: Martin Schitter To: ffmpeg-devel@ffmpeg.org Date: Mon, 23 Sep 2024 11:16:47 +0200 Message-ID: <20240923091645.2309922-8-ms+git@mur.at> X-Mailer: git-send-email 2.45.2 In-Reply-To: <20240923091645.2309922-3-ms+git@mur.at> References: <20240923091645.2309922-3-ms+git@mur.at> MIME-Version: 1.0 Subject: [FFmpeg-devel] [PATCH v9 6/6] tests: Fate sample tests for DNxUncompressed 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: 9ov8ELcnkgao --- 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 ++++++ 18 files changed, 169 insertions(+) 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 diff --git a/tests/Makefile b/tests/Makefile index 9b70145..e073915 100644 --- a/tests/Makefile +++ b/tests/Makefile @@ -172,6 +172,7 @@ include $(SRC_PATH)/tests/fate/dca.mak include $(SRC_PATH)/tests/fate/demux.mak include $(SRC_PATH)/tests/fate/dfa.mak include $(SRC_PATH)/tests/fate/dnxhd.mak +include $(SRC_PATH)/tests/fate/dnxuc.mak include $(SRC_PATH)/tests/fate/dpcm.mak include $(SRC_PATH)/tests/fate/dvvideo.mak include $(SRC_PATH)/tests/fate/ea.mak diff --git a/tests/fate/dnxuc.mak b/tests/fate/dnxuc.mak new file mode 100644 index 0000000..80ff0e9 --- /dev/null +++ b/tests/fate/dnxuc.mak @@ -0,0 +1,40 @@ +FATE_DNXUC_CB = fate-dnxuc-cb-rgb-8 \ + fate-dnxuc-cb-rgb-10 \ + fate-dnxuc-cb-rgb-12 \ + fate-dnxuc-cb-rgb-half \ + fate-dnxuc-cb-rgb-float \ + fate-dnxuc-cb-yuv422-8 \ + fate-dnxuc-cb-yuv422-10 \ + fate-dnxuc-cb-yuv422-12 + +FATE_DNXUC_RAMP = fate-dnxuc-ramp-rgb-8 \ + fate-dnxuc-ramp-rgb-10 \ + fate-dnxuc-ramp-rgb-12 \ + fate-dnxuc-ramp-rgb-half \ + fate-dnxuc-ramp-rgb-float \ + fate-dnxuc-ramp-yuv422-8 \ + fate-dnxuc-ramp-yuv422-10 \ + fate-dnxuc-ramp-yuv422-12 + +FATE_DNXUC-$(call FRAMECRC, MXF, DNXUC) += $(FATE_DNXUC_CB) $(FATE_DNXUC_RAMP) + +FATE_SAMPLES_FFMPEG += $(FATE_DNXUC-yes) +fate-dnxuc: $(FATE_DNXUC-yes) + +fate-dnxuc-cb-rgb-8: CMD = framecrc -flags +bitexact -i $(TARGET_SAMPLES)/dnxuc/cb_rgb_8.mxf +fate-dnxuc-cb-rgb-10: CMD = framecrc -flags +bitexact -i $(TARGET_SAMPLES)/dnxuc/cb_rgb_10.mxf +fate-dnxuc-cb-rgb-12: CMD = framecrc -flags +bitexact -i $(TARGET_SAMPLES)/dnxuc/cb_rgb_12.mxf +fate-dnxuc-cb-rgb-half: CMD = framecrc -flags +bitexact -i $(TARGET_SAMPLES)/dnxuc/cb_rgb_half.mxf +fate-dnxuc-cb-rgb-float: CMD = framecrc -flags +bitexact -i $(TARGET_SAMPLES)/dnxuc/cb_rgb_float.mxf +fate-dnxuc-cb-yuv422-8: CMD = framecrc -flags +bitexact -i $(TARGET_SAMPLES)/dnxuc/cb_yuv422_8.mxf +fate-dnxuc-cb-yuv422-10: CMD = framecrc -flags +bitexact -i $(TARGET_SAMPLES)/dnxuc/cb_yuv422_10.mxf +fate-dnxuc-cb-yuv422-12: CMD = framecrc -flags +bitexact -i $(TARGET_SAMPLES)/dnxuc/cb_yuv422_12.mxf + +fate-dnxuc-ramp-rgb-8: CMD = framecrc -flags +bitexact -i $(TARGET_SAMPLES)/dnxuc/ramp_rgb_8.mxf +fate-dnxuc-ramp-rgb-10: CMD = framecrc -flags +bitexact -i $(TARGET_SAMPLES)/dnxuc/ramp_rgb_10.mxf +fate-dnxuc-ramp-rgb-12: CMD = framecrc -flags +bitexact -i $(TARGET_SAMPLES)/dnxuc/ramp_rgb_12.mxf +fate-dnxuc-ramp-rgb-half: CMD = framecrc -flags +bitexact -i $(TARGET_SAMPLES)/dnxuc/ramp_rgb_half.mxf +fate-dnxuc-ramp-rgb-float: CMD = framecrc -flags +bitexact -i $(TARGET_SAMPLES)/dnxuc/ramp_rgb_float.mxf +fate-dnxuc-ramp-yuv422-8: CMD = framecrc -flags +bitexact -i $(TARGET_SAMPLES)/dnxuc/ramp_yuv422_8.mxf +fate-dnxuc-ramp-yuv422-10: CMD = framecrc -flags +bitexact -i $(TARGET_SAMPLES)/dnxuc/ramp_yuv422_10.mxf +fate-dnxuc-ramp-yuv422-12: CMD = framecrc -flags +bitexact -i $(TARGET_SAMPLES)/dnxuc/ramp_yuv422_12.mxf diff --git a/tests/ref/fate/dnxuc-cb-rgb-10 b/tests/ref/fate/dnxuc-cb-rgb-10 new file mode 100644 index 0000000..398e0da --- /dev/null +++ b/tests/ref/fate/dnxuc-cb-rgb-10 @@ -0,0 +1,8 @@ +#tb 0: 1/24 +#media_type 0: video +#codec_id 0: rawvideo +#dimensions 0: 512x256 +#sar 0: 1/1 +0, 0, 0, 1, 786432, 0x2e402ec2 +0, 1, 1, 1, 786432, 0x2e402ec2 +0, 2, 2, 1, 786432, 0x2e402ec2 diff --git a/tests/ref/fate/dnxuc-cb-rgb-12 b/tests/ref/fate/dnxuc-cb-rgb-12 new file mode 100644 index 0000000..4e3235f --- /dev/null +++ b/tests/ref/fate/dnxuc-cb-rgb-12 @@ -0,0 +1,8 @@ +#tb 0: 1/24 +#media_type 0: video +#codec_id 0: rawvideo +#dimensions 0: 512x256 +#sar 0: 1/1 +0, 0, 0, 1, 786432, 0x6fb11356 +0, 1, 1, 1, 786432, 0x6fb11356 +0, 2, 2, 1, 786432, 0x6fb11356 diff --git a/tests/ref/fate/dnxuc-cb-rgb-8 b/tests/ref/fate/dnxuc-cb-rgb-8 new file mode 100644 index 0000000..189babc --- /dev/null +++ b/tests/ref/fate/dnxuc-cb-rgb-8 @@ -0,0 +1,8 @@ +#tb 0: 1/24 +#media_type 0: video +#codec_id 0: rawvideo +#dimensions 0: 512x256 +#sar 0: 1/1 +0, 0, 0, 1, 393216, 0xc1f6a4cc +0, 1, 1, 1, 393216, 0xc1f6a4cc +0, 2, 2, 1, 393216, 0xc1f6a4cc diff --git a/tests/ref/fate/dnxuc-cb-rgb-float b/tests/ref/fate/dnxuc-cb-rgb-float new file mode 100644 index 0000000..95ab4e5 --- /dev/null +++ b/tests/ref/fate/dnxuc-cb-rgb-float @@ -0,0 +1,8 @@ +#tb 0: 1/24 +#media_type 0: video +#codec_id 0: rawvideo +#dimensions 0: 512x256 +#sar 0: 1/1 +0, 0, 0, 1, 1572864, 0x88241923 +0, 1, 1, 1, 1572864, 0x88241923 +0, 2, 2, 1, 1572864, 0x88241923 diff --git a/tests/ref/fate/dnxuc-cb-rgb-half b/tests/ref/fate/dnxuc-cb-rgb-half new file mode 100644 index 0000000..b7e9406 --- /dev/null +++ b/tests/ref/fate/dnxuc-cb-rgb-half @@ -0,0 +1,8 @@ +#tb 0: 1/24 +#media_type 0: video +#codec_id 0: rawvideo +#dimensions 0: 512x256 +#sar 0: 1/1 +0, 0, 0, 1, 1048576, 0xfc459149 +0, 1, 1, 1, 1048576, 0xfc459149 +0, 2, 2, 1, 1048576, 0xfc459149 diff --git a/tests/ref/fate/dnxuc-cb-yuv422-10 b/tests/ref/fate/dnxuc-cb-yuv422-10 new file mode 100644 index 0000000..6e7c537 --- /dev/null +++ b/tests/ref/fate/dnxuc-cb-yuv422-10 @@ -0,0 +1,8 @@ +#tb 0: 1/24 +#media_type 0: video +#codec_id 0: rawvideo +#dimensions 0: 512x256 +#sar 0: 1/1 +0, 0, 0, 1, 524288, 0xad829843 +0, 1, 1, 1, 524288, 0xad829843 +0, 2, 2, 1, 524288, 0xad829843 diff --git a/tests/ref/fate/dnxuc-cb-yuv422-12 b/tests/ref/fate/dnxuc-cb-yuv422-12 new file mode 100644 index 0000000..01e5976 --- /dev/null +++ b/tests/ref/fate/dnxuc-cb-yuv422-12 @@ -0,0 +1,8 @@ +#tb 0: 1/24 +#media_type 0: video +#codec_id 0: rawvideo +#dimensions 0: 512x256 +#sar 0: 1/1 +0, 0, 0, 1, 524288, 0x70277284 +0, 1, 1, 1, 524288, 0x70277284 +0, 2, 2, 1, 524288, 0x70277284 diff --git a/tests/ref/fate/dnxuc-cb-yuv422-8 b/tests/ref/fate/dnxuc-cb-yuv422-8 new file mode 100644 index 0000000..1e4bb3e --- /dev/null +++ b/tests/ref/fate/dnxuc-cb-yuv422-8 @@ -0,0 +1,8 @@ +#tb 0: 1/24 +#media_type 0: video +#codec_id 0: rawvideo +#dimensions 0: 512x256 +#sar 0: 1/1 +0, 0, 0, 1, 262144, 0x12299f3f +0, 1, 1, 1, 262144, 0x12299f3f +0, 2, 2, 1, 262144, 0x12299f3f diff --git a/tests/ref/fate/dnxuc-ramp-rgb-10 b/tests/ref/fate/dnxuc-ramp-rgb-10 new file mode 100644 index 0000000..99a2eb9 --- /dev/null +++ b/tests/ref/fate/dnxuc-ramp-rgb-10 @@ -0,0 +1,8 @@ +#tb 0: 1/24 +#media_type 0: video +#codec_id 0: rawvideo +#dimensions 0: 512x256 +#sar 0: 1/1 +0, 0, 0, 1, 786432, 0xe4d06700 +0, 1, 1, 1, 786432, 0xe4d06700 +0, 2, 2, 1, 786432, 0xe4d06700 diff --git a/tests/ref/fate/dnxuc-ramp-rgb-12 b/tests/ref/fate/dnxuc-ramp-rgb-12 new file mode 100644 index 0000000..19eb687 --- /dev/null +++ b/tests/ref/fate/dnxuc-ramp-rgb-12 @@ -0,0 +1,8 @@ +#tb 0: 1/24 +#media_type 0: video +#codec_id 0: rawvideo +#dimensions 0: 512x256 +#sar 0: 1/1 +0, 0, 0, 1, 786432, 0xb8c802a4 +0, 1, 1, 1, 786432, 0xb8c802a4 +0, 2, 2, 1, 786432, 0xb8c802a4 diff --git a/tests/ref/fate/dnxuc-ramp-rgb-8 b/tests/ref/fate/dnxuc-ramp-rgb-8 new file mode 100644 index 0000000..2c1caae --- /dev/null +++ b/tests/ref/fate/dnxuc-ramp-rgb-8 @@ -0,0 +1,8 @@ +#tb 0: 1/24 +#media_type 0: video +#codec_id 0: rawvideo +#dimensions 0: 512x256 +#sar 0: 1/1 +0, 0, 0, 1, 393216, 0xd1f001f2 +0, 1, 1, 1, 393216, 0xd1f001f2 +0, 2, 2, 1, 393216, 0xd1f001f2 diff --git a/tests/ref/fate/dnxuc-ramp-rgb-float b/tests/ref/fate/dnxuc-ramp-rgb-float new file mode 100644 index 0000000..c35172c --- /dev/null +++ b/tests/ref/fate/dnxuc-ramp-rgb-float @@ -0,0 +1,8 @@ +#tb 0: 1/24 +#media_type 0: video +#codec_id 0: rawvideo +#dimensions 0: 512x256 +#sar 0: 1/1 +0, 0, 0, 1, 1572864, 0xda4a5914 +0, 1, 1, 1, 1572864, 0xda4a5914 +0, 2, 2, 1, 1572864, 0xda4a5914 diff --git a/tests/ref/fate/dnxuc-ramp-rgb-half b/tests/ref/fate/dnxuc-ramp-rgb-half new file mode 100644 index 0000000..eee882a --- /dev/null +++ b/tests/ref/fate/dnxuc-ramp-rgb-half @@ -0,0 +1,8 @@ +#tb 0: 1/24 +#media_type 0: video +#codec_id 0: rawvideo +#dimensions 0: 512x256 +#sar 0: 1/1 +0, 0, 0, 1, 1048576, 0x0dda0807 +0, 1, 1, 1, 1048576, 0x0dda0807 +0, 2, 2, 1, 1048576, 0x0dda0807 diff --git a/tests/ref/fate/dnxuc-ramp-yuv422-10 b/tests/ref/fate/dnxuc-ramp-yuv422-10 new file mode 100644 index 0000000..ef158a5 --- /dev/null +++ b/tests/ref/fate/dnxuc-ramp-yuv422-10 @@ -0,0 +1,8 @@ +#tb 0: 1/24 +#media_type 0: video +#codec_id 0: rawvideo +#dimensions 0: 512x256 +#sar 0: 1/1 +0, 0, 0, 1, 524288, 0xb86e482d +0, 1, 1, 1, 524288, 0xb86e482d +0, 2, 2, 1, 524288, 0xb86e482d diff --git a/tests/ref/fate/dnxuc-ramp-yuv422-12 b/tests/ref/fate/dnxuc-ramp-yuv422-12 new file mode 100644 index 0000000..4596dc8 --- /dev/null +++ b/tests/ref/fate/dnxuc-ramp-yuv422-12 @@ -0,0 +1,8 @@ +#tb 0: 1/24 +#media_type 0: video +#codec_id 0: rawvideo +#dimensions 0: 512x256 +#sar 0: 1/1 +0, 0, 0, 1, 524288, 0x9bbd5677 +0, 1, 1, 1, 524288, 0x9bbd5677 +0, 2, 2, 1, 524288, 0x9bbd5677 diff --git a/tests/ref/fate/dnxuc-ramp-yuv422-8 b/tests/ref/fate/dnxuc-ramp-yuv422-8 new file mode 100644 index 0000000..bb6fd38 --- /dev/null +++ b/tests/ref/fate/dnxuc-ramp-yuv422-8 @@ -0,0 +1,8 @@ +#tb 0: 1/24 +#media_type 0: video +#codec_id 0: rawvideo +#dimensions 0: 512x256 +#sar 0: 1/1 +0, 0, 0, 1, 262144, 0x386e0fa6 +0, 1, 1, 1, 262144, 0x386e0fa6 +0, 2, 2, 1, 262144, 0x386e0fa6