From patchwork Mon Oct 21 13:26:03 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: James Almer X-Patchwork-Id: 52428 Delivered-To: ffmpegpatchwork2@gmail.com Received: by 2002:a05:612c:143:b0:48e:c0f8:d0de with SMTP id h3csp2644559vqi; Mon, 21 Oct 2024 06:26:27 -0700 (PDT) X-Forwarded-Encrypted: i=2; AJvYcCVbISvTLb3hqVHRO1O47I73NK1+1b0JqQMVunSiF4rQd9W//MhzpIKFo4weKc4zUeLcJvv+v2nHSlxSPfp2d90K@gmail.com X-Google-Smtp-Source: AGHT+IEk6lEzXvXaiDxq/WMTyEpiyxoI8+sasJIVs60XmbCkQOj2z750MDUlLP3nop+EIzXQMUiI X-Received: by 2002:a17:906:c14f:b0:a9a:f53:a5c6 with SMTP id a640c23a62f3a-a9aa8a438f0mr2836266b.65.1729517187497; Mon, 21 Oct 2024 06:26:27 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1729517187; cv=none; d=google.com; s=arc-20240605; b=VKEaL30SPjNon0YHO2ISZCVFF2CH65n7tvXxqIR8fxKJ2X97M977AHOvw5XJTyJfI3 BU178Kpo1TQWSvJQcyi8DtlqDwLZKnhZ8JNr6hsJ0aX65CEiJhfWFssOdHa/sC/ss7/D 85GUpbbGzAb5IYbVHKNA0sHPG6In+fbiuXrokupcb+FDrcmWnk7KRHLQwQ5lGeHwMncX EahxScqt4XV5DHXR6061c7+K9zLpqB+NUl6jzllnZEJcmAq6BrsNVKM3x/ogXWqLO8AF 4aR1DX5dA1k+rc9YW0WbUT/W0ttPsF/eBqqKlW+eDGuy4HL8J2LcOGNTq5bBounsuAOz ql2A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20240605; h=sender:errors-to:content-transfer-encoding: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=JhpHWZr5HNxpZ+fGYJRttfg4rLZNaPVO0lrftiovIF8=; fh=YOA8vD9MJZuwZ71F/05pj6KdCjf6jQRmzLS+CATXUQk=; b=OVGw5DsbzD4bofhmUv16cAgcDyRt6yx41fM8GF85pgS+ZOpKE6BtIpmNaVp0H3Y63j d32I146JH6N1qPvV5X5+EVAv5d62ol1DwFip0Mpc86W9kHKd1Q8ghyc38meAF68bcrvK rd+NcTXPU87ImSgJSqAV4fY53vjHMxjxGUOfEQJ68IJeuBDztwWy2xkbqlFP6+3GTob5 F9QcSvbN04y+6suYjZFI5d2qa2CWaZwfP3q/srVJYMg5ORvs4Vtsvn7gOUj+UavWoDap KfUFfWhWseUAsuazj6LscSTBPq3v1/BCZCCa9gucxxzYIzthLuf5MMiiTI3WuY5DXXWs WyUA==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=neutral (body hash did not verify) header.i=@gmail.com header.s=20230601 header.b="Dz7wx/gW"; 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=QUARANTINE dis=NONE) header.from=gmail.com; dara=fail header.i=@gmail.com Return-Path: Received: from ffbox0-bg.mplayerhq.hu (ffbox0-bg.ffmpeg.org. [79.124.17.100]) by mx.google.com with ESMTP id a640c23a62f3a-a9a915599c4si259192966b.799.2024.10.21.06.26.26; Mon, 21 Oct 2024 06:26:27 -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=@gmail.com header.s=20230601 header.b="Dz7wx/gW"; 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=QUARANTINE dis=NONE) header.from=gmail.com; dara=fail header.i=@gmail.com Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id 9A16568D9D4; Mon, 21 Oct 2024 16:26:16 +0300 (EEST) X-Original-To: ffmpeg-devel@ffmpeg.org Delivered-To: ffmpeg-devel@ffmpeg.org Received: from mail-pl1-f180.google.com (mail-pl1-f180.google.com [209.85.214.180]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id DBBCB68DBFE for ; Mon, 21 Oct 2024 16:26:08 +0300 (EEST) Received: by mail-pl1-f180.google.com with SMTP id d9443c01a7336-20cdda5cfb6so46684425ad.3 for ; Mon, 21 Oct 2024 06:26:08 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1729517166; x=1730121966; darn=ffmpeg.org; h=content-transfer-encoding:mime-version:message-id:date:subject:to :from:from:to:cc:subject:date:message-id:reply-to; bh=QCoZ9K7Uv2fKCAMQXGL/9a3MJjT/9Yv7o9WOZWj6HTs=; b=Dz7wx/gWaQET15l4zDtd6BB7bOh/d9L7aLQf5tLqWPBNkVZ/HYk6Q1JCFoK/KLqhaI IDyj/I/rlnMjGC1MJbxZote2NC0NDy3DtoN+SXNtE3SGUr8YxMi3ucW9S+3Dgkmn77wk 6mscDkT/eqbo68iU2g8M5Ma4EO4ysrnMrFBze0OZ8qke0VHalsRuy+IA1QqhjoGrF02n i7g7E52ZmaBaX8eNaSNZInoCYM74ujKVT+EzSZkQTBZVL3xs/TU5NL/Z4qIcgZyJU3+6 AybB0AMDGIgVUY7NYE7/niCaOQdu4KAIyazxFlThaoVLoD2Vv5fG5LB4NTd1s3EL2M28 wDaA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1729517166; x=1730121966; h=content-transfer-encoding:mime-version:message-id:date:subject:to :from:x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=QCoZ9K7Uv2fKCAMQXGL/9a3MJjT/9Yv7o9WOZWj6HTs=; b=PIu7n3L0/BLykFNXAdMMUt4WxiJeRck96imHaIYTJJ510X4tM+LM9hlYOvyzMDEX7Q /Cxcl0O1XhTbHP30I7O5X7MMKcr1vNXliB9d3Gj6JZmtwFoV1fHKEzLd8yKead8/oiqX DhKx4Av0nCgeGpcJtqYWQpffSrGO7kDJfDskbLiAZIHJsIVnb821G0+BPqTVl6+ZN32F v9F7YMY0XtolGLpKs52u273TUGDLRlN0+7eCIdCAhF8UJ7U/FRZmNIFXJ4PgBXESJCqs 4iVxVvWZduA3XlCz750OC5v7Lo6OFhfKD/v2CaZB7ifpjRXvECHZgd60Q0IDbjUzkI2g vhzw== X-Gm-Message-State: AOJu0YyCsaQ9qCLirdkUc1jbwg28oCY3cwfvBGITsoT3mSYZYu1RGXSI onl5J/R7ajnmMc3Emmb54LMeWgIT13fbovBpWc/YzHBsoN7/9Ol8/DKeyA== X-Received: by 2002:a17:903:41cf:b0:202:28b1:9f34 with SMTP id d9443c01a7336-20e5aaa965bmr152731815ad.56.1729517165818; Mon, 21 Oct 2024 06:26:05 -0700 (PDT) Received: from localhost.localdomain ([181.92.233.116]) by smtp.gmail.com with ESMTPSA id d9443c01a7336-20e7f0bd381sm25556005ad.178.2024.10.21.06.26.04 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 21 Oct 2024 06:26:05 -0700 (PDT) From: James Almer To: ffmpeg-devel@ffmpeg.org Date: Mon, 21 Oct 2024 10:26:03 -0300 Message-ID: <20241021132604.5213-1-jamrial@gmail.com> X-Mailer: git-send-email 2.47.0 MIME-Version: 1.0 Subject: [FFmpeg-devel] [PATCH 1/2] fate/pixfmts: test conversion of high bitdepth formats 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 Errors-To: ffmpeg-devel-bounces@ffmpeg.org Sender: "ffmpeg-devel" X-TUID: lSTx76zwFf4o Signed-off-by: James Almer --- tests/fate-run.sh | 13 +++++++ tests/fate/pixfmt.mak | 60 +++++++++++++++++++++++++++++-- tests/ref/fate/pixfmt-gbrp10be | 2 ++ tests/ref/fate/pixfmt-gbrp10le | 2 ++ tests/ref/fate/pixfmt-gbrp12be | 2 ++ tests/ref/fate/pixfmt-gbrp12le | 2 ++ tests/ref/fate/pixfmt-gray10be | 2 ++ tests/ref/fate/pixfmt-gray10le | 2 ++ tests/ref/fate/pixfmt-gray12be | 2 ++ tests/ref/fate/pixfmt-gray12le | 2 ++ tests/ref/fate/pixfmt-p010be | 2 ++ tests/ref/fate/pixfmt-p010le | 2 ++ tests/ref/fate/pixfmt-p012be | 2 ++ tests/ref/fate/pixfmt-p012le | 2 ++ tests/ref/fate/pixfmt-p210be | 2 ++ tests/ref/fate/pixfmt-p210le | 2 ++ tests/ref/fate/pixfmt-p212be | 2 ++ tests/ref/fate/pixfmt-p212le | 2 ++ tests/ref/fate/pixfmt-p410be | 2 ++ tests/ref/fate/pixfmt-p410le | 2 ++ tests/ref/fate/pixfmt-p412be | 2 ++ tests/ref/fate/pixfmt-p412le | 2 ++ tests/ref/fate/pixfmt-v30xle | 2 ++ tests/ref/fate/pixfmt-x2bgr10le | 2 ++ tests/ref/fate/pixfmt-x2rgb10le | 2 ++ tests/ref/fate/pixfmt-xv30le | 2 ++ tests/ref/fate/pixfmt-xv36be | 2 ++ tests/ref/fate/pixfmt-xv36le | 2 ++ tests/ref/fate/pixfmt-y210le | 2 ++ tests/ref/fate/pixfmt-y212le | 2 ++ tests/ref/fate/pixfmt-yuv420p10be | 2 ++ tests/ref/fate/pixfmt-yuv420p10le | 2 ++ tests/ref/fate/pixfmt-yuv420p12be | 2 ++ tests/ref/fate/pixfmt-yuv420p12le | 2 ++ tests/ref/fate/pixfmt-yuv422p10be | 2 ++ tests/ref/fate/pixfmt-yuv422p10le | 2 ++ tests/ref/fate/pixfmt-yuv422p12be | 2 ++ tests/ref/fate/pixfmt-yuv422p12le | 2 ++ tests/ref/fate/pixfmt-yuv440p10be | 2 ++ tests/ref/fate/pixfmt-yuv440p10le | 2 ++ tests/ref/fate/pixfmt-yuv440p12be | 2 ++ tests/ref/fate/pixfmt-yuv440p12le | 2 ++ tests/ref/fate/pixfmt-yuv444p10be | 2 ++ tests/ref/fate/pixfmt-yuv444p10le | 2 ++ tests/ref/fate/pixfmt-yuv444p12be | 2 ++ tests/ref/fate/pixfmt-yuv444p12le | 2 ++ 46 files changed, 159 insertions(+), 2 deletions(-) create mode 100644 tests/ref/fate/pixfmt-gbrp10be create mode 100644 tests/ref/fate/pixfmt-gbrp10le create mode 100644 tests/ref/fate/pixfmt-gbrp12be create mode 100644 tests/ref/fate/pixfmt-gbrp12le create mode 100644 tests/ref/fate/pixfmt-gray10be create mode 100644 tests/ref/fate/pixfmt-gray10le create mode 100644 tests/ref/fate/pixfmt-gray12be create mode 100644 tests/ref/fate/pixfmt-gray12le create mode 100644 tests/ref/fate/pixfmt-p010be create mode 100644 tests/ref/fate/pixfmt-p010le create mode 100644 tests/ref/fate/pixfmt-p012be create mode 100644 tests/ref/fate/pixfmt-p012le create mode 100644 tests/ref/fate/pixfmt-p210be create mode 100644 tests/ref/fate/pixfmt-p210le create mode 100644 tests/ref/fate/pixfmt-p212be create mode 100644 tests/ref/fate/pixfmt-p212le create mode 100644 tests/ref/fate/pixfmt-p410be create mode 100644 tests/ref/fate/pixfmt-p410le create mode 100644 tests/ref/fate/pixfmt-p412be create mode 100644 tests/ref/fate/pixfmt-p412le create mode 100644 tests/ref/fate/pixfmt-v30xle create mode 100644 tests/ref/fate/pixfmt-x2bgr10le create mode 100644 tests/ref/fate/pixfmt-x2rgb10le create mode 100644 tests/ref/fate/pixfmt-xv30le create mode 100644 tests/ref/fate/pixfmt-xv36be create mode 100644 tests/ref/fate/pixfmt-xv36le create mode 100644 tests/ref/fate/pixfmt-y210le create mode 100644 tests/ref/fate/pixfmt-y212le create mode 100644 tests/ref/fate/pixfmt-yuv420p10be create mode 100644 tests/ref/fate/pixfmt-yuv420p10le create mode 100644 tests/ref/fate/pixfmt-yuv420p12be create mode 100644 tests/ref/fate/pixfmt-yuv420p12le create mode 100644 tests/ref/fate/pixfmt-yuv422p10be create mode 100644 tests/ref/fate/pixfmt-yuv422p10le create mode 100644 tests/ref/fate/pixfmt-yuv422p12be create mode 100644 tests/ref/fate/pixfmt-yuv422p12le create mode 100644 tests/ref/fate/pixfmt-yuv440p10be create mode 100644 tests/ref/fate/pixfmt-yuv440p10le create mode 100644 tests/ref/fate/pixfmt-yuv440p12be create mode 100644 tests/ref/fate/pixfmt-yuv440p12le create mode 100644 tests/ref/fate/pixfmt-yuv444p10be create mode 100644 tests/ref/fate/pixfmt-yuv444p10le create mode 100644 tests/ref/fate/pixfmt-yuv444p12be create mode 100644 tests/ref/fate/pixfmt-yuv444p12le diff --git a/tests/fate-run.sh b/tests/fate-run.sh index f8d67de25a..551e126271 100755 --- a/tests/fate-run.sh +++ b/tests/fate-run.sh @@ -503,6 +503,19 @@ pixfmt_conversion(){ $ENC_OPTS -f rawvideo -s 352x288 -pix_fmt yuv444p -color_range mpeg } +pixfmt_conversion_hbd(){ + depth=$1 + conversion="${test#pixfmt-}" + outdir="tests/data/pixfmt" + raw_dst="$outdir/$conversion.out.yuv" + file=${outdir}/${conversion}.yuv + cleanfiles="$cleanfiles $raw_dst $file" + run_avconv $DEC_OPTS -auto_conversion_filters -lavfi yuvtestsrc=s=352x288,format=yuv420p$depth \ + $ENC_OPTS -f rawvideo -t 1 -s 352x288 -pix_fmt $conversion $target_path/$raw_dst || return + do_avconv $file $DEC_OPTS -f rawvideo -s 352x288 -pix_fmt $conversion -i $target_path/$raw_dst \ + $ENC_OPTS -f rawvideo -s 352x288 -pix_fmt yuv444p${depth}le -color_range mpeg +} + pixdesc(){ pix_fmt=${test#filter-pixdesc-} label=${test#filter-} diff --git a/tests/fate/pixfmt.mak b/tests/fate/pixfmt.mak index 715a4763d4..0c70b9a9bd 100644 --- a/tests/fate/pixfmt.mak +++ b/tests/fate/pixfmt.mak @@ -25,5 +25,61 @@ $(FATE_PIXFMT): CMD = pixfmt_conversion $(FATE_PIXFMT): REF = $(SRC_PATH)/tests/ref/pixfmt/$(@:fate-pixfmt-%=%) $(FATE_PIXFMT): $(VREF) -FATE_AVCONV += $(FATE_PIXFMT) -fate-pixfmt: $(FATE_PIXFMT) +FATE_PIXFMT_10-$(call ALLYES, SCALE_FILTER YUVTESTSRC_FILTER LAVFI_INDEV) = \ + gray10le \ + gray10be \ + yuv420p10le \ + yuv420p10be \ + yuv422p10le \ + yuv422p10be \ + yuv440p10le \ + yuv440p10be \ + yuv444p10le \ + yuv444p10be \ + y210le \ + p010le \ + p010be \ + p210le \ + p210be \ + p410le \ + p410be \ + v30xle \ + xv30le \ + x2rgb10le \ + x2bgr10le \ + gbrp10le \ + gbrp10be \ + +FATE_PIXFMT_10 := $(FATE_PIXFMT_10-yes:%=fate-pixfmt-%) + +$(FATE_PIXFMT_10): CMD = pixfmt_conversion_hbd "10" + +FATE_PIXFMT_12-$(call ALLYES, SCALE_FILTER YUVTESTSRC_FILTER LAVFI_INDEV) = \ + gray12le \ + gray12be \ + yuv420p12le \ + yuv420p12be \ + yuv422p12le \ + yuv422p12be \ + yuv440p12le \ + yuv440p12be \ + yuv444p12le \ + yuv444p12be \ + y212le \ + p012le \ + p012be \ + p212le \ + p212be \ + p412le \ + p412be \ + xv36le \ + xv36be \ + gbrp12le \ + gbrp12be \ + +FATE_PIXFMT_12 := $(FATE_PIXFMT_12-yes:%=fate-pixfmt-%) + +$(FATE_PIXFMT_12): CMD = pixfmt_conversion_hbd "12" + +FATE_AVCONV += $(FATE_PIXFMT) $(FATE_PIXFMT_10) $(FATE_PIXFMT_12) +fate-pixfmt: $(FATE_PIXFMT) $(FATE_PIXFMT_10) $(FATE_PIXFMT_12) diff --git a/tests/ref/fate/pixfmt-gbrp10be b/tests/ref/fate/pixfmt-gbrp10be new file mode 100644 index 0000000000..ea417c01c5 --- /dev/null +++ b/tests/ref/fate/pixfmt-gbrp10be @@ -0,0 +1,2 @@ +0beb3b5b071cfa4f7417e0086fa39a12 *tests/data/pixfmt/gbrp10be.yuv +15206400 tests/data/pixfmt/gbrp10be.yuv diff --git a/tests/ref/fate/pixfmt-gbrp10le b/tests/ref/fate/pixfmt-gbrp10le new file mode 100644 index 0000000000..cc2bfd2590 --- /dev/null +++ b/tests/ref/fate/pixfmt-gbrp10le @@ -0,0 +1,2 @@ +0beb3b5b071cfa4f7417e0086fa39a12 *tests/data/pixfmt/gbrp10le.yuv +15206400 tests/data/pixfmt/gbrp10le.yuv diff --git a/tests/ref/fate/pixfmt-gbrp12be b/tests/ref/fate/pixfmt-gbrp12be new file mode 100644 index 0000000000..ecefb31282 --- /dev/null +++ b/tests/ref/fate/pixfmt-gbrp12be @@ -0,0 +1,2 @@ +ae532c3bfcf82bebc9586f4210b06a86 *tests/data/pixfmt/gbrp12be.yuv +15206400 tests/data/pixfmt/gbrp12be.yuv diff --git a/tests/ref/fate/pixfmt-gbrp12le b/tests/ref/fate/pixfmt-gbrp12le new file mode 100644 index 0000000000..0d04769004 --- /dev/null +++ b/tests/ref/fate/pixfmt-gbrp12le @@ -0,0 +1,2 @@ +ae532c3bfcf82bebc9586f4210b06a86 *tests/data/pixfmt/gbrp12le.yuv +15206400 tests/data/pixfmt/gbrp12le.yuv diff --git a/tests/ref/fate/pixfmt-gray10be b/tests/ref/fate/pixfmt-gray10be new file mode 100644 index 0000000000..6253ddc102 --- /dev/null +++ b/tests/ref/fate/pixfmt-gray10be @@ -0,0 +1,2 @@ +320789f3b09d448bd0dedee906f1ea81 *tests/data/pixfmt/gray10be.yuv +15206400 tests/data/pixfmt/gray10be.yuv diff --git a/tests/ref/fate/pixfmt-gray10le b/tests/ref/fate/pixfmt-gray10le new file mode 100644 index 0000000000..325ceb9547 --- /dev/null +++ b/tests/ref/fate/pixfmt-gray10le @@ -0,0 +1,2 @@ +320789f3b09d448bd0dedee906f1ea81 *tests/data/pixfmt/gray10le.yuv +15206400 tests/data/pixfmt/gray10le.yuv diff --git a/tests/ref/fate/pixfmt-gray12be b/tests/ref/fate/pixfmt-gray12be new file mode 100644 index 0000000000..81f2869fbf --- /dev/null +++ b/tests/ref/fate/pixfmt-gray12be @@ -0,0 +1,2 @@ +dae64e3c2c883913e127097d20c89e26 *tests/data/pixfmt/gray12be.yuv +15206400 tests/data/pixfmt/gray12be.yuv diff --git a/tests/ref/fate/pixfmt-gray12le b/tests/ref/fate/pixfmt-gray12le new file mode 100644 index 0000000000..915e00f4e2 --- /dev/null +++ b/tests/ref/fate/pixfmt-gray12le @@ -0,0 +1,2 @@ +dae64e3c2c883913e127097d20c89e26 *tests/data/pixfmt/gray12le.yuv +15206400 tests/data/pixfmt/gray12le.yuv diff --git a/tests/ref/fate/pixfmt-p010be b/tests/ref/fate/pixfmt-p010be new file mode 100644 index 0000000000..8c807a7377 --- /dev/null +++ b/tests/ref/fate/pixfmt-p010be @@ -0,0 +1,2 @@ +ff12a757f0b154ef6780f09be846dcb9 *tests/data/pixfmt/p010be.yuv +15206400 tests/data/pixfmt/p010be.yuv diff --git a/tests/ref/fate/pixfmt-p010le b/tests/ref/fate/pixfmt-p010le new file mode 100644 index 0000000000..ac93197463 --- /dev/null +++ b/tests/ref/fate/pixfmt-p010le @@ -0,0 +1,2 @@ +ff12a757f0b154ef6780f09be846dcb9 *tests/data/pixfmt/p010le.yuv +15206400 tests/data/pixfmt/p010le.yuv diff --git a/tests/ref/fate/pixfmt-p012be b/tests/ref/fate/pixfmt-p012be new file mode 100644 index 0000000000..4a63d6ffed --- /dev/null +++ b/tests/ref/fate/pixfmt-p012be @@ -0,0 +1,2 @@ +94912e57d5954003b02c626e33bdeecd *tests/data/pixfmt/p012be.yuv +15206400 tests/data/pixfmt/p012be.yuv diff --git a/tests/ref/fate/pixfmt-p012le b/tests/ref/fate/pixfmt-p012le new file mode 100644 index 0000000000..104b1eb360 --- /dev/null +++ b/tests/ref/fate/pixfmt-p012le @@ -0,0 +1,2 @@ +94912e57d5954003b02c626e33bdeecd *tests/data/pixfmt/p012le.yuv +15206400 tests/data/pixfmt/p012le.yuv diff --git a/tests/ref/fate/pixfmt-p210be b/tests/ref/fate/pixfmt-p210be new file mode 100644 index 0000000000..3d0a044732 --- /dev/null +++ b/tests/ref/fate/pixfmt-p210be @@ -0,0 +1,2 @@ +8cb69d608aa013c69474c82c22ab75ba *tests/data/pixfmt/p210be.yuv +15206400 tests/data/pixfmt/p210be.yuv diff --git a/tests/ref/fate/pixfmt-p210le b/tests/ref/fate/pixfmt-p210le new file mode 100644 index 0000000000..5997dc9d6e --- /dev/null +++ b/tests/ref/fate/pixfmt-p210le @@ -0,0 +1,2 @@ +8cb69d608aa013c69474c82c22ab75ba *tests/data/pixfmt/p210le.yuv +15206400 tests/data/pixfmt/p210le.yuv diff --git a/tests/ref/fate/pixfmt-p212be b/tests/ref/fate/pixfmt-p212be new file mode 100644 index 0000000000..a21f74147d --- /dev/null +++ b/tests/ref/fate/pixfmt-p212be @@ -0,0 +1,2 @@ +b32caebb91857ffbe80d792b915f60a3 *tests/data/pixfmt/p212be.yuv +15206400 tests/data/pixfmt/p212be.yuv diff --git a/tests/ref/fate/pixfmt-p212le b/tests/ref/fate/pixfmt-p212le new file mode 100644 index 0000000000..f1fb342ac6 --- /dev/null +++ b/tests/ref/fate/pixfmt-p212le @@ -0,0 +1,2 @@ +b32caebb91857ffbe80d792b915f60a3 *tests/data/pixfmt/p212le.yuv +15206400 tests/data/pixfmt/p212le.yuv diff --git a/tests/ref/fate/pixfmt-p410be b/tests/ref/fate/pixfmt-p410be new file mode 100644 index 0000000000..45844943bc --- /dev/null +++ b/tests/ref/fate/pixfmt-p410be @@ -0,0 +1,2 @@ +ff12a757f0b154ef6780f09be846dcb9 *tests/data/pixfmt/p410be.yuv +15206400 tests/data/pixfmt/p410be.yuv diff --git a/tests/ref/fate/pixfmt-p410le b/tests/ref/fate/pixfmt-p410le new file mode 100644 index 0000000000..2fe6e873ca --- /dev/null +++ b/tests/ref/fate/pixfmt-p410le @@ -0,0 +1,2 @@ +ff12a757f0b154ef6780f09be846dcb9 *tests/data/pixfmt/p410le.yuv +15206400 tests/data/pixfmt/p410le.yuv diff --git a/tests/ref/fate/pixfmt-p412be b/tests/ref/fate/pixfmt-p412be new file mode 100644 index 0000000000..c309a89010 --- /dev/null +++ b/tests/ref/fate/pixfmt-p412be @@ -0,0 +1,2 @@ +94912e57d5954003b02c626e33bdeecd *tests/data/pixfmt/p412be.yuv +15206400 tests/data/pixfmt/p412be.yuv diff --git a/tests/ref/fate/pixfmt-p412le b/tests/ref/fate/pixfmt-p412le new file mode 100644 index 0000000000..c127b28bd3 --- /dev/null +++ b/tests/ref/fate/pixfmt-p412le @@ -0,0 +1,2 @@ +94912e57d5954003b02c626e33bdeecd *tests/data/pixfmt/p412le.yuv +15206400 tests/data/pixfmt/p412le.yuv diff --git a/tests/ref/fate/pixfmt-v30xle b/tests/ref/fate/pixfmt-v30xle new file mode 100644 index 0000000000..b79f3b4524 --- /dev/null +++ b/tests/ref/fate/pixfmt-v30xle @@ -0,0 +1,2 @@ +ff12a757f0b154ef6780f09be846dcb9 *tests/data/pixfmt/v30xle.yuv +15206400 tests/data/pixfmt/v30xle.yuv diff --git a/tests/ref/fate/pixfmt-x2bgr10le b/tests/ref/fate/pixfmt-x2bgr10le new file mode 100644 index 0000000000..d72148c5d3 --- /dev/null +++ b/tests/ref/fate/pixfmt-x2bgr10le @@ -0,0 +1,2 @@ +2a97d61992ee5e56c365371f8bcdb782 *tests/data/pixfmt/x2bgr10le.yuv +15206400 tests/data/pixfmt/x2bgr10le.yuv diff --git a/tests/ref/fate/pixfmt-x2rgb10le b/tests/ref/fate/pixfmt-x2rgb10le new file mode 100644 index 0000000000..76cc669c30 --- /dev/null +++ b/tests/ref/fate/pixfmt-x2rgb10le @@ -0,0 +1,2 @@ +2a97d61992ee5e56c365371f8bcdb782 *tests/data/pixfmt/x2rgb10le.yuv +15206400 tests/data/pixfmt/x2rgb10le.yuv diff --git a/tests/ref/fate/pixfmt-xv30le b/tests/ref/fate/pixfmt-xv30le new file mode 100644 index 0000000000..3a3748ff3a --- /dev/null +++ b/tests/ref/fate/pixfmt-xv30le @@ -0,0 +1,2 @@ +ff12a757f0b154ef6780f09be846dcb9 *tests/data/pixfmt/xv30le.yuv +15206400 tests/data/pixfmt/xv30le.yuv diff --git a/tests/ref/fate/pixfmt-xv36be b/tests/ref/fate/pixfmt-xv36be new file mode 100644 index 0000000000..71b84994cf --- /dev/null +++ b/tests/ref/fate/pixfmt-xv36be @@ -0,0 +1,2 @@ +94912e57d5954003b02c626e33bdeecd *tests/data/pixfmt/xv36be.yuv +15206400 tests/data/pixfmt/xv36be.yuv diff --git a/tests/ref/fate/pixfmt-xv36le b/tests/ref/fate/pixfmt-xv36le new file mode 100644 index 0000000000..e4d8785d1d --- /dev/null +++ b/tests/ref/fate/pixfmt-xv36le @@ -0,0 +1,2 @@ +94912e57d5954003b02c626e33bdeecd *tests/data/pixfmt/xv36le.yuv +15206400 tests/data/pixfmt/xv36le.yuv diff --git a/tests/ref/fate/pixfmt-y210le b/tests/ref/fate/pixfmt-y210le new file mode 100644 index 0000000000..357dfc6970 --- /dev/null +++ b/tests/ref/fate/pixfmt-y210le @@ -0,0 +1,2 @@ +8cb69d608aa013c69474c82c22ab75ba *tests/data/pixfmt/y210le.yuv +15206400 tests/data/pixfmt/y210le.yuv diff --git a/tests/ref/fate/pixfmt-y212le b/tests/ref/fate/pixfmt-y212le new file mode 100644 index 0000000000..bf4dc0fe14 --- /dev/null +++ b/tests/ref/fate/pixfmt-y212le @@ -0,0 +1,2 @@ +b32caebb91857ffbe80d792b915f60a3 *tests/data/pixfmt/y212le.yuv +15206400 tests/data/pixfmt/y212le.yuv diff --git a/tests/ref/fate/pixfmt-yuv420p10be b/tests/ref/fate/pixfmt-yuv420p10be new file mode 100644 index 0000000000..bc3d425826 --- /dev/null +++ b/tests/ref/fate/pixfmt-yuv420p10be @@ -0,0 +1,2 @@ +ff12a757f0b154ef6780f09be846dcb9 *tests/data/pixfmt/yuv420p10be.yuv +15206400 tests/data/pixfmt/yuv420p10be.yuv diff --git a/tests/ref/fate/pixfmt-yuv420p10le b/tests/ref/fate/pixfmt-yuv420p10le new file mode 100644 index 0000000000..81331e9671 --- /dev/null +++ b/tests/ref/fate/pixfmt-yuv420p10le @@ -0,0 +1,2 @@ +ff12a757f0b154ef6780f09be846dcb9 *tests/data/pixfmt/yuv420p10le.yuv +15206400 tests/data/pixfmt/yuv420p10le.yuv diff --git a/tests/ref/fate/pixfmt-yuv420p12be b/tests/ref/fate/pixfmt-yuv420p12be new file mode 100644 index 0000000000..f436512fe9 --- /dev/null +++ b/tests/ref/fate/pixfmt-yuv420p12be @@ -0,0 +1,2 @@ +94912e57d5954003b02c626e33bdeecd *tests/data/pixfmt/yuv420p12be.yuv +15206400 tests/data/pixfmt/yuv420p12be.yuv diff --git a/tests/ref/fate/pixfmt-yuv420p12le b/tests/ref/fate/pixfmt-yuv420p12le new file mode 100644 index 0000000000..c1d4779153 --- /dev/null +++ b/tests/ref/fate/pixfmt-yuv420p12le @@ -0,0 +1,2 @@ +94912e57d5954003b02c626e33bdeecd *tests/data/pixfmt/yuv420p12le.yuv +15206400 tests/data/pixfmt/yuv420p12le.yuv diff --git a/tests/ref/fate/pixfmt-yuv422p10be b/tests/ref/fate/pixfmt-yuv422p10be new file mode 100644 index 0000000000..97c65f4b42 --- /dev/null +++ b/tests/ref/fate/pixfmt-yuv422p10be @@ -0,0 +1,2 @@ +8cb69d608aa013c69474c82c22ab75ba *tests/data/pixfmt/yuv422p10be.yuv +15206400 tests/data/pixfmt/yuv422p10be.yuv diff --git a/tests/ref/fate/pixfmt-yuv422p10le b/tests/ref/fate/pixfmt-yuv422p10le new file mode 100644 index 0000000000..e212aacf4f --- /dev/null +++ b/tests/ref/fate/pixfmt-yuv422p10le @@ -0,0 +1,2 @@ +8cb69d608aa013c69474c82c22ab75ba *tests/data/pixfmt/yuv422p10le.yuv +15206400 tests/data/pixfmt/yuv422p10le.yuv diff --git a/tests/ref/fate/pixfmt-yuv422p12be b/tests/ref/fate/pixfmt-yuv422p12be new file mode 100644 index 0000000000..e7feb2c76e --- /dev/null +++ b/tests/ref/fate/pixfmt-yuv422p12be @@ -0,0 +1,2 @@ +b32caebb91857ffbe80d792b915f60a3 *tests/data/pixfmt/yuv422p12be.yuv +15206400 tests/data/pixfmt/yuv422p12be.yuv diff --git a/tests/ref/fate/pixfmt-yuv422p12le b/tests/ref/fate/pixfmt-yuv422p12le new file mode 100644 index 0000000000..1ec2bd20a6 --- /dev/null +++ b/tests/ref/fate/pixfmt-yuv422p12le @@ -0,0 +1,2 @@ +b32caebb91857ffbe80d792b915f60a3 *tests/data/pixfmt/yuv422p12le.yuv +15206400 tests/data/pixfmt/yuv422p12le.yuv diff --git a/tests/ref/fate/pixfmt-yuv440p10be b/tests/ref/fate/pixfmt-yuv440p10be new file mode 100644 index 0000000000..7dfd9a5e73 --- /dev/null +++ b/tests/ref/fate/pixfmt-yuv440p10be @@ -0,0 +1,2 @@ +544307da6ebb25fb962266dc8d9cdbb3 *tests/data/pixfmt/yuv440p10be.yuv +15206400 tests/data/pixfmt/yuv440p10be.yuv diff --git a/tests/ref/fate/pixfmt-yuv440p10le b/tests/ref/fate/pixfmt-yuv440p10le new file mode 100644 index 0000000000..d114c0b04a --- /dev/null +++ b/tests/ref/fate/pixfmt-yuv440p10le @@ -0,0 +1,2 @@ +544307da6ebb25fb962266dc8d9cdbb3 *tests/data/pixfmt/yuv440p10le.yuv +15206400 tests/data/pixfmt/yuv440p10le.yuv diff --git a/tests/ref/fate/pixfmt-yuv440p12be b/tests/ref/fate/pixfmt-yuv440p12be new file mode 100644 index 0000000000..6ce1a16ee4 --- /dev/null +++ b/tests/ref/fate/pixfmt-yuv440p12be @@ -0,0 +1,2 @@ +5aea7ee1b39ed0057a66d418787c4910 *tests/data/pixfmt/yuv440p12be.yuv +15206400 tests/data/pixfmt/yuv440p12be.yuv diff --git a/tests/ref/fate/pixfmt-yuv440p12le b/tests/ref/fate/pixfmt-yuv440p12le new file mode 100644 index 0000000000..d4be252b90 --- /dev/null +++ b/tests/ref/fate/pixfmt-yuv440p12le @@ -0,0 +1,2 @@ +5aea7ee1b39ed0057a66d418787c4910 *tests/data/pixfmt/yuv440p12le.yuv +15206400 tests/data/pixfmt/yuv440p12le.yuv diff --git a/tests/ref/fate/pixfmt-yuv444p10be b/tests/ref/fate/pixfmt-yuv444p10be new file mode 100644 index 0000000000..a93d2231ff --- /dev/null +++ b/tests/ref/fate/pixfmt-yuv444p10be @@ -0,0 +1,2 @@ +ff12a757f0b154ef6780f09be846dcb9 *tests/data/pixfmt/yuv444p10be.yuv +15206400 tests/data/pixfmt/yuv444p10be.yuv diff --git a/tests/ref/fate/pixfmt-yuv444p10le b/tests/ref/fate/pixfmt-yuv444p10le new file mode 100644 index 0000000000..89ad47bc91 --- /dev/null +++ b/tests/ref/fate/pixfmt-yuv444p10le @@ -0,0 +1,2 @@ +ff12a757f0b154ef6780f09be846dcb9 *tests/data/pixfmt/yuv444p10le.yuv +15206400 tests/data/pixfmt/yuv444p10le.yuv diff --git a/tests/ref/fate/pixfmt-yuv444p12be b/tests/ref/fate/pixfmt-yuv444p12be new file mode 100644 index 0000000000..2cd3af814d --- /dev/null +++ b/tests/ref/fate/pixfmt-yuv444p12be @@ -0,0 +1,2 @@ +94912e57d5954003b02c626e33bdeecd *tests/data/pixfmt/yuv444p12be.yuv +15206400 tests/data/pixfmt/yuv444p12be.yuv diff --git a/tests/ref/fate/pixfmt-yuv444p12le b/tests/ref/fate/pixfmt-yuv444p12le new file mode 100644 index 0000000000..9775a71e92 --- /dev/null +++ b/tests/ref/fate/pixfmt-yuv444p12le @@ -0,0 +1,2 @@ +94912e57d5954003b02c626e33bdeecd *tests/data/pixfmt/yuv444p12le.yuv +15206400 tests/data/pixfmt/yuv444p12le.yuv From patchwork Mon Oct 21 13:26:04 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: James Almer X-Patchwork-Id: 52429 Delivered-To: ffmpegpatchwork2@gmail.com Received: by 2002:a05:612c:143:b0:48e:c0f8:d0de with SMTP id h3csp2657212vqi; Mon, 21 Oct 2024 06:44:04 -0700 (PDT) X-Forwarded-Encrypted: i=2; AJvYcCVw8WWPXVYRY6TUNNH9dCz2950LsGj3Hm4a96DxJFJ3yteTqD2fJi/WnziHekjDEe6D7gr8HyT3EW85Mk7O5V3J@gmail.com X-Google-Smtp-Source: AGHT+IElY0QfbLt80rtynYlLe/73subxTwSm6quJ64uOiL01Vz8xslj0PhsYJHS0UkL091c58Tlx X-Received: by 2002:a05:6512:3c81:b0:53a:a26:5690 with SMTP id 2adb3069b0e04-53a154afecamr5335193e87.34.1729518244546; Mon, 21 Oct 2024 06:44:04 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1729518244; cv=none; d=google.com; s=arc-20240605; b=V8Kh1jykhvKnqLPNBMoJnRtEGHtA9HM5jj6SkaBI1o1ruosv00xmmwJ42KnyBx8T9+ mOe9kaNJ4OiaB0N9tKrNPkdoumQ+dmX1v3UDoU2RefzjyoU7SW2WfIfW+eMzI7Ip4tYU Vx4JNAtwXdUoFeJzpsjU52EzTlKfPgkq5JaDVr5ljO73srOk0E0inejha8xSIhLeQGw2 0uQgiq20fMTthIs47VIrdyfeaAN7GW+uvPP+msMEDJYdpBEQzirWjGuPnqGL8zWQU4LA PgICdKWkJGOem40xpjjHYKIbCTyUh+e5neUHxaP9KP9oKagRVmHezdxBL2rxVhk5r3yR pzyg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20240605; h=sender:errors-to:content-transfer-encoding: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=w463v4GUyfVtHcB8hNmwH+f/CdDR4Z/adHNoE0ZIpmY=; fh=YOA8vD9MJZuwZ71F/05pj6KdCjf6jQRmzLS+CATXUQk=; b=bTu5EX7l0G38Ihu/whgpecA/iR/341lFoIfHSBiRawpARV8OgZt2Kk7wC+Q084TJUT FWCynZVsxcGdbuV18VQb5bACRq987vUiw0oFQy4cyHycnVMf14QFjR0GkcTYYfCGkUw4 ZTu+TzB4EFOKrTi+Hdm733yecfm3tmitKvpILMJZ2d8GzR0H2PQCVfB4C0wecuI4uk9h P2spir31llmpU/tzJSsqjfNN4pwRWfysvAYTpXaFC7OyuDe623+Levn4ZezrwwKwq/cO hQspW0AoQ0rkTytywOIiMgXS1sCs63vXj4N0Djg5BIo/j7WQJUE6Sw9RBgSfwFOApDgK KQRg==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=neutral (body hash did not verify) header.i=@gmail.com header.s=20230601 header.b="OVI/kpqc"; 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=QUARANTINE dis=NONE) header.from=gmail.com; dara=fail header.i=@gmail.com Return-Path: Received: from ffbox0-bg.mplayerhq.hu (ffbox0-bg.ffmpeg.org. [79.124.17.100]) by mx.google.com with ESMTP id 2adb3069b0e04-53a2244b611si1259334e87.563.2024.10.21.06.44.04; Mon, 21 Oct 2024 06:44:04 -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=@gmail.com header.s=20230601 header.b="OVI/kpqc"; 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=QUARANTINE dis=NONE) header.from=gmail.com; dara=fail header.i=@gmail.com Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id D855668DCFC; Mon, 21 Oct 2024 16:26:17 +0300 (EEST) X-Original-To: ffmpeg-devel@ffmpeg.org Delivered-To: ffmpeg-devel@ffmpeg.org Received: from mail-pl1-f180.google.com (mail-pl1-f180.google.com [209.85.214.180]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id 02A9268D9D4 for ; Mon, 21 Oct 2024 16:26:10 +0300 (EEST) Received: by mail-pl1-f180.google.com with SMTP id d9443c01a7336-207115e3056so35923405ad.2 for ; Mon, 21 Oct 2024 06:26:09 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1729517168; x=1730121968; darn=ffmpeg.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:to:from:from:to:cc:subject:date:message-id :reply-to; bh=TWyzbHNP2yABGXXSi9BeegBreSRulLJj0b9WJnNC398=; b=OVI/kpqc35EyHFfwyHScd3MYlObrQT7jv3peejtDF6/D+Khl0NeI8+RHsZJZgP+TId fmvPspSJlgsu1mh51uKvyIN0mxVtTP24stZa9D6j0t2U3jVUaIkK44LQH6t3lmfaNk75 zhF92RQy+O4ffNBWchRh9jwHgmO7513WluvjLtemutWCOsbLnibSXcc73HMGqjRUwhRJ bZZ76Q9LwMfR7j+BnFz4ykCw1GMjQDgyguggGGjIiwa/01z1e0+ynKw0+d7Ustk/WFTg PePgSAFRYnFhdPAZmausDaOyYv+0CKkt06pTuftqcDXIl2Z9vT8rVleYpg9LwV4v+Fca mLPg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1729517168; x=1730121968; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=TWyzbHNP2yABGXXSi9BeegBreSRulLJj0b9WJnNC398=; b=C2DL8adKlNe9o04nshMcW0bB2CQas3k5b3LsShwSTGPtnIgfIc+34Zclo4tm4MX88f gq2oy0t13GX7r8sQJEZCpIUi14ARbJYAMTd6AgLLhCk3+u6ejk/Gnjjpj6ySMKSm9kQg Gubu+Lbv5wuUwWYfaIROQkGZ2VVMM8gQ1WCg4TR3yihhAEtuEx1LXUNGibS0Q7mJllaC 3wtOwmTp3HbIJDrdetaivTwkqskKTL8+liMGkYSDMZseKuUfVKhgkvOnO6TD6hyMIFNs Bpeo2ZdymgK1CT+9ZFbvw0GEtv7YcJdtGJtSJ5evWbrPw06OYeihj7RLYCbo7k5JELqZ 4qxA== X-Gm-Message-State: AOJu0YxUC1SVhqSNeRPHcO+6m6IILOCtXDgBJ6ncaKUXfCyKh4WTHAOw l0OAubZzLMmCmel2B2RhepPudEL8AylcZ+FiOtXnqckGWSbsaQVrd7PbVw== X-Received: by 2002:a17:902:ea10:b0:20b:cae5:dec4 with SMTP id d9443c01a7336-20e5a79598cmr153606975ad.24.1729517167822; Mon, 21 Oct 2024 06:26:07 -0700 (PDT) Received: from localhost.localdomain ([181.92.233.116]) by smtp.gmail.com with ESMTPSA id d9443c01a7336-20e7f0bd381sm25556005ad.178.2024.10.21.06.26.06 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 21 Oct 2024 06:26:06 -0700 (PDT) From: James Almer To: ffmpeg-devel@ffmpeg.org Date: Mon, 21 Oct 2024 10:26:04 -0300 Message-ID: <20241021132604.5213-2-jamrial@gmail.com> X-Mailer: git-send-email 2.47.0 In-Reply-To: <20241021132604.5213-1-jamrial@gmail.com> References: <20241021132604.5213-1-jamrial@gmail.com> MIME-Version: 1.0 Subject: [FFmpeg-devel] [PATCH 2/2] swscale/swscale_unscaled: fix shift values in planarToP01xWrapper 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 Errors-To: ffmpeg-devel-bounces@ffmpeg.org Sender: "ffmpeg-devel" X-TUID: ljvqshaIrY4T The current calculation was a no-op, setting the entire array to 0. Use the shift value from the dest descriptor, as the source one is planar with no shifts whatsoever. Signed-off-by: James Almer --- libswscale/swscale_unscaled.c | 17 +++-------------- 1 file changed, 3 insertions(+), 14 deletions(-) diff --git a/libswscale/swscale_unscaled.c b/libswscale/swscale_unscaled.c index a7fdb438a6..5e963ced15 100644 --- a/libswscale/swscale_unscaled.c +++ b/libswscale/swscale_unscaled.c @@ -268,23 +268,12 @@ static int planarToP01xWrapper(SwsContext *c, const uint8_t *const src8[], int srcSliceH, uint8_t *const dstParam8[], const int dstStride[]) { - const AVPixFmtDescriptor *src_format = av_pix_fmt_desc_get(c->srcFormat); const AVPixFmtDescriptor *dst_format = av_pix_fmt_desc_get(c->dstFormat); const uint16_t **src = (const uint16_t**)src8; uint16_t *dstY = (uint16_t*)(dstParam8[0] + dstStride[0] * srcSliceY); uint16_t *dstUV = (uint16_t*)(dstParam8[1] + dstStride[1] * srcSliceY / 2); int x, y; - /* Calculate net shift required for values. */ - const int shift[3] = { - dst_format->comp[0].depth + dst_format->comp[0].shift - - src_format->comp[0].depth - src_format->comp[0].shift, - dst_format->comp[1].depth + dst_format->comp[1].shift - - src_format->comp[1].depth - src_format->comp[1].shift, - dst_format->comp[2].depth + dst_format->comp[2].shift - - src_format->comp[2].depth - src_format->comp[2].shift, - }; - av_assert0(!(srcStride[0] % 2 || srcStride[1] % 2 || srcStride[2] % 2 || dstStride[0] % 2 || dstStride[1] % 2)); @@ -292,7 +281,7 @@ static int planarToP01xWrapper(SwsContext *c, const uint8_t *const src8[], uint16_t *tdstY = dstY; const uint16_t *tsrc0 = src[0]; for (x = c->srcW; x > 0; x--) { - *tdstY++ = *tsrc0++ << shift[0]; + *tdstY++ = *tsrc0++ << dst_format->comp[0].shift; } src[0] += srcStride[0] / 2; dstY += dstStride[0] / 2; @@ -302,8 +291,8 @@ static int planarToP01xWrapper(SwsContext *c, const uint8_t *const src8[], const uint16_t *tsrc1 = src[1]; const uint16_t *tsrc2 = src[2]; for (x = c->srcW / 2; x > 0; x--) { - *tdstUV++ = *tsrc1++ << shift[1]; - *tdstUV++ = *tsrc2++ << shift[2]; + *tdstUV++ = *tsrc1++ << dst_format->comp[1].shift; + *tdstUV++ = *tsrc2++ << dst_format->comp[2].shift; } src[1] += srcStride[1] / 2; src[2] += srcStride[2] / 2;