From patchwork Sat Jun 5 18:22:59 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Valerii Zapodovnikov X-Patchwork-Id: 28103 Delivered-To: ffmpegpatchwork2@gmail.com Received: by 2002:a6b:b214:0:0:0:0:0 with SMTP id b20csp2147686iof; Sat, 5 Jun 2021 11:23:13 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyQDd6RBXBLepskAf5H7U50Qf3fbOpioOWvDbA/tWjNNP4kIR+NvtLpmbCiXoLFzt4Q4w9F X-Received: by 2002:a17:907:c02:: with SMTP id ga2mr10278687ejc.513.1622917393164; Sat, 05 Jun 2021 11:23:13 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1622917393; cv=none; d=google.com; s=arc-20160816; b=o5OdnUk4sEJKISOuoPhicyrWoFaIrZ44CbJZXXZ8hnIaDVeO2uscLPrQnFcX6Pi2J3 DmEjBHwki8WE3QloUP5HgB2FLflejZTQG4x6vaFEHFjdRy7WzIqZD3kJPN82vViWuF6S yA/Pj70lfwLV3A43FZ3xkL1HFm02wac73OqVh7sbb0/83sNJHGTlBo8mGmU+xH/gt4ms QH7B5xC0MGiqSIKDuUGh6ssBzktJD3GVwPd5BqzdnwKZnIVvItAjgn4jO+IfhorVAl8m 6/BRmVavk/lMMhguvoJfXfg4k2Xa/NkEIBeqobSd8/XDwen9StT2/H0m/1mmkXZOqz04 t0pQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; 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=pjbL4kqUQZJJOfWe8XK8gRn7HhfSvmkaqWAjDlpipBw=; b=BF14goun+lV1j/Tje5j/zjjW2LnIJXI/TuYtXVwOdvTh94B9Us6rpIBXQu6kaB/lVn 6t/QhkvK/4lDZ1+YTyFZyY3omwmZZCH39Lu6NRV67RtclxAjMqrTnSijx3zS3M7eeSmx vFyxYuh9+z2/MqhdcwWEph7mSevTdFPsgzC1l5Z8ZvnRLCBWlDPWdESOtve4XisQW590 cf2sNuiF9t/ycMZy2GdwXbjL/gXJfiB2nJFZDFvBzF/vc2ede98g8fw/ZcplcX99IPiy DU+BWBTjcIFWdFLASoKW2CgpLsMIfkwHdZxXihnzdXPT5CTMVQ74s839rlhojtdhKxhY EwRw== ARC-Authentication-Results: i=1; mx.google.com; dkim=neutral (body hash did not verify) header.i=@gmail.com header.s=20161025 header.b=UquFh5xc; 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 Return-Path: Received: from ffbox0-bg.mplayerhq.hu (ffbox0-bg.ffmpeg.org. [79.124.17.100]) by mx.google.com with ESMTP id w12si8205680eds.6.2021.06.05.11.23.12; Sat, 05 Jun 2021 11:23:13 -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=20161025 header.b=UquFh5xc; 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 Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id 5C88B68A603; Sat, 5 Jun 2021 21:23:09 +0300 (EEST) X-Original-To: ffmpeg-devel@ffmpeg.org Delivered-To: ffmpeg-devel@ffmpeg.org Received: from mail-lj1-f169.google.com (mail-lj1-f169.google.com [209.85.208.169]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id 6434B68A57B for ; Sat, 5 Jun 2021 21:23:02 +0300 (EEST) Received: by mail-lj1-f169.google.com with SMTP id 131so16030708ljj.3 for ; Sat, 05 Jun 2021 11:23:02 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:subject:date:message-id:mime-version :content-transfer-encoding; bh=9zUOpR0vOh+K8Lbe/RlPwPBKZGbPvpKT69Zc9vL53AI=; b=UquFh5xcKjdOjMJO+3ONoIIWcnedA3y7N53a/saoVT2Wimqrci1haJiUkv7OYJJQZs rPn7YLmXPz6VjaX38tfMo68EpTgS3zU2elXpbegZjFFBsZFxgDp/kP8AzUjRGAOdr5x8 OS6tFawI55o+yHw4Vo+20WVDtjNiJkoU5FVep3BCwB9mEwwh0inJBV8coGsdISIZooTb T8hG4M7qOtG8iZR2Znm9q36sg8i15aTcdS5bl/HQ7AMqG0uwKzJFpdEB0jXNDhe31DWl 4ItyJJ8dCqGK8r4pRNTPXpsGyhWdeKSy529czKnfTCPIHaV5A/7L9OUTZdYOYLtwBWf1 Hyug== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:subject:date:message-id:mime-version :content-transfer-encoding; bh=9zUOpR0vOh+K8Lbe/RlPwPBKZGbPvpKT69Zc9vL53AI=; b=UF4H93DLOy6LfcF2tQUNBh6fdkb9gEwnWLheofFEyNw6HYxLDWePNHkzUPM3AQobQ6 iVew/7k7LZOUw4y0BTp+/j9j7pfH3FftBnzHSOgiDy35409SYFlF3BzYwI4MO9czeeLy jyLlr60SIyuE5DOA6Tgz63hHymSlWwAfCob4gO/icrzzD/3+yBJmWXuS0WE92rQkIW7h ngwFENRcuVgucGQW5RfjHo/+mTrSEkj577IuF61kdL9fnltYoNc8GyXmmFvzbfEO/GZa uYmL8NWgiw+R7G9Fa3ESaDwtQRiTa4FaZH+yJ5cllE8RTFHMVc6DU8qdC/fLA8zF2JmK +sMg== X-Gm-Message-State: AOAM532eoMKhGbS9YKLU6qv06xFPF0Wt+x1n61e0HhQ+quhwbFrDho7q WD9sMpnkHQsVp02ixHjWJ1j9yHErm5j9QpIHDdY= X-Received: by 2002:a2e:5052:: with SMTP id v18mr8066371ljd.418.1622917381409; Sat, 05 Jun 2021 11:23:01 -0700 (PDT) Received: from localhost (109-252-91-149.nat.spd-mgts.ru. [109.252.91.149]) by smtp.gmail.com with ESMTPSA id b24sm934521lff.93.2021.06.05.11.23.00 for (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Sat, 05 Jun 2021 11:23:01 -0700 (PDT) From: Valerii Zapodovnikov To: ffmpeg-devel@ffmpeg.org Date: Sat, 5 Jun 2021 21:22:59 +0300 Message-Id: <20210605182259.1888-1-val.zapod.vz@gmail.com> X-Mailer: git-send-email 2.30.2 MIME-Version: 1.0 Subject: [FFmpeg-devel] [PATCH] avformat/mxfdec: fixed jp2k_rsiz and 240M matrix 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: cPNA9Dilo6VI Again. 240M matrix is different from BT.601! And 170M is the same as BT.601. It is primaries that are the same in 240M and 170M, as for jp2k_rsiz see page 10 of S422M-2006. Yes, IT IS THERE. --- libavformat/mxf.c | 2 +- libavformat/mxfdec.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/libavformat/mxf.c b/libavformat/mxf.c index 85a65f8718..7c355d789b 100644 --- a/libavformat/mxf.c +++ b/libavformat/mxf.c @@ -132,7 +132,7 @@ const MXFCodecUL ff_mxf_color_space_uls[] = { { { 0x06,0x0E,0x2B,0x34,0x04,0x01,0x01,0x0D,0x04,0x01,0x01,0x01,0x02,0x05,0x00,0x00 }, 14, AVCOL_SPC_RGB }, /* GBR */ { { 0x06,0x0E,0x2B,0x34,0x04,0x01,0x01,0x0D,0x04,0x01,0x01,0x01,0x02,0x06,0x00,0x00 }, 14, AVCOL_SPC_BT2020_NCL }, /* ITU-R BT.2020 Non-Constant Luminance */ /* alternate mappings for encoding */ - { { 0x06,0x0E,0x2B,0x34,0x04,0x01,0x01,0x06,0x04,0x01,0x01,0x01,0x02,0x03,0x00,0x00 }, 14, AVCOL_SPC_SMPTE170M }, /* = AVCOL_SPC_SMPTE240M */ + { { 0x06,0x0E,0x2B,0x34,0x04,0x01,0x01,0x01,0x04,0x01,0x01,0x01,0x02,0x01,0x00,0x00 }, 14, AVCOL_SPC_SMPTE170M }, /* = AVCOL_SPC_BT470BG */ { { 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 }, 0, AVCOL_SPC_UNSPECIFIED }, }; diff --git a/libavformat/mxfdec.c b/libavformat/mxfdec.c index 3bf480a3a6..9e92ef4175 100644 --- a/libavformat/mxfdec.c +++ b/libavformat/mxfdec.c @@ -330,7 +330,7 @@ static const uint8_t mxf_encrypted_triplet_key[] = { 0x06,0x0e,0x2b,0x static const uint8_t mxf_encrypted_essence_container[] = { 0x06,0x0e,0x2b,0x34,0x04,0x01,0x01,0x07,0x0d,0x01,0x03,0x01,0x02,0x0b,0x01,0x00 }; static const uint8_t mxf_sony_mpeg4_extradata[] = { 0x06,0x0e,0x2b,0x34,0x04,0x01,0x01,0x01,0x0e,0x06,0x06,0x02,0x02,0x01,0x00,0x00 }; static const uint8_t mxf_avid_project_name[] = { 0xa5,0xfb,0x7b,0x25,0xf6,0x15,0x94,0xb9,0x62,0xfc,0x37,0x17,0x49,0x2d,0x42,0xbf }; -static const uint8_t mxf_jp2k_rsiz[] = { 0x06,0x0e,0x2b,0x34,0x02,0x05,0x01,0x01,0x0d,0x01,0x02,0x01,0x01,0x02,0x01,0x00 }; +static const uint8_t mxf_jp2k_rsiz[] = { 0x06,0x0e,0x2b,0x34,0x01,0x01,0x01,0x0a,0x04,0x01,0x06,0x03,0x01,0x00,0x00,0x00 }; static const uint8_t mxf_indirect_value_utf16le[] = { 0x4c,0x00,0x02,0x10,0x01,0x00,0x00,0x00,0x00,0x06,0x0e,0x2b,0x34,0x01,0x04,0x01,0x01 }; static const uint8_t mxf_indirect_value_utf16be[] = { 0x42,0x01,0x10,0x02,0x00,0x00,0x00,0x00,0x00,0x06,0x0e,0x2b,0x34,0x01,0x04,0x01,0x01 }; static const uint8_t mxf_apple_coll_max_cll[] = { 0x06,0x0e,0x2b,0x34,0x01,0x01,0x01,0x0e,0x0e,0x20,0x04,0x01,0x05,0x03,0x01,0x01 };