From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from ffbox0-bg.mplayerhq.hu (ffbox0-bg.ffmpeg.org [79.124.17.100]) by master.gitmailbox.com (Postfix) with ESMTP id 7D1B340149 for ; Wed, 1 Feb 2023 23:08:54 +0000 (UTC) Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id 6FBD368BEB2; Thu, 2 Feb 2023 01:08:51 +0200 (EET) Received: from mail-io1-f48.google.com (mail-io1-f48.google.com [209.85.166.48]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id 51E0168BE68 for ; Thu, 2 Feb 2023 01:08:45 +0200 (EET) Received: by mail-io1-f48.google.com with SMTP id r6so103850ioj.5 for ; Wed, 01 Feb 2023 15:08:45 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=content-transfer-encoding:in-reply-to:from:content-language :references:to:subject:user-agent:mime-version:date:message-id:from :to:cc:subject:date:message-id:reply-to; bh=wcRuXIv/l5TxhprGlHDHo1cYqlNZIcc4d+y42R2JyLk=; b=UXvoCSIoVOuQ22P7TZ8HdyqGYTYW4Axo1B8AgwwVqEXY6e9L0zKDqA8VpmHDtt8Qjq qP263Q/9qVEeupU+LPRTtkwl4/+k5+Im6VHvsvJy4/ChChgjMTHyyMdAkcj79oLa2MbW LCfXDckEPRoziD4OWrJKamMMFk1a/oGMnjv/fF5fdbnxETI71W8pBah/WZgWuuJj70Xx qEuV3mxRG2VsPzlNeyGET7kk0r3uZReTitUyHibMv/wBvjP7vW8jMoBk/upHV0CeciXZ 33yX5wP1aQKOk+id0PvzoCwjRchMWFVqgJJPnOTVKYMMTEAUy8dDYN+x6/gYQ25y3N77 E94Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:in-reply-to:from:content-language :references:to:subject:user-agent:mime-version:date:message-id :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=wcRuXIv/l5TxhprGlHDHo1cYqlNZIcc4d+y42R2JyLk=; b=r6fnPnV6lQVPDWWbObOkxLz7/ug644gK0n946/8J9rITG9SXbcNgsziUGAnnqjo7dk QHbVGHvEKSDYGEG0DOa6GD61BjpYT+B5UbGXKZVZlwSpeb7yKaY5bwaW5nRk713tWfJK VvDg3DGDzeQfmxEbWuLhx6teMJr7hwzLOZiY7+LT0fNDht6IR65gQjQrRIfWKOZCZnfO +fpTHqHBpYKwvxycmHClw9aFd6P0xGZMbYtHUb8ge9UVfl45hbSLsYcsVXs2m0T4laxC yMq7aElRQ5u/oRY55SM45+AjoS+Fs5A/OhUnkvxekBilzuue7S3kRNbaCSljpBT5Z+OG eMJQ== X-Gm-Message-State: AO0yUKW3K5Of3x/GhGEAfrV2P+qwMcC6oQ+NVDrK/KqiCXjOviMU3r7+ a6/3pj6gr0OH9y0cz6M5jpQ6lDx/GO+Ygg== X-Google-Smtp-Source: AK7set/BImfnG37lYu1UlRunLGkm40FkhZH7FaMS2iZrrA5P72WRV7y48sHRBvM5+NzvrqYeDOHP0w== X-Received: by 2002:a5d:9054:0:b0:718:2fa2:6648 with SMTP id v20-20020a5d9054000000b007182fa26648mr2139435ioq.2.1675292923541; Wed, 01 Feb 2023 15:08:43 -0800 (PST) Received: from [192.168.1.35] (c-68-41-54-207.hsd1.mi.comcast.net. [68.41.54.207]) by smtp.gmail.com with ESMTPSA id u7-20020a05663825c700b003b8708902c0sm609767jat.21.2023.02.01.15.08.42 for (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Wed, 01 Feb 2023 15:08:42 -0800 (PST) Message-ID: <5746364f-b1ce-928b-cb45-7aef30b98819@gmail.com> Date: Wed, 1 Feb 2023 18:08:41 -0500 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.7.1 To: ffmpeg-devel@ffmpeg.org References: <20230201174412.78042-1-leo.izen@gmail.com> <20230201174412.78042-3-leo.izen@gmail.com> Content-Language: en-US-large From: Leo Izen In-Reply-To: Subject: Re: [FFmpeg-devel] [PATCH v2 2/2] avcodec/pngdec: read colorspace info when decoding with AVDISCARD_ALL 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 Content-Transfer-Encoding: 7bit Content-Type: text/plain; charset="us-ascii"; Format="flowed" Errors-To: ffmpeg-devel-bounces@ffmpeg.org Sender: "ffmpeg-devel" Archived-At: List-Archive: List-Post: On 2/1/23 14:32, Andreas Rheinhardt wrote: > Leo Izen: >> These chunks are lightweight and it's useful information to have when >> running ffmpeg -i or ffprobe, for example. >> >> + } else if (s->gamma) { >> + /* >> + * these values are 100000/2.2, 100000/2.8, and 100000/2.6 >> + * respectively. 45455, 35714, and 38462. There's a 0.001 >> + * gamma tolerance here in case of floating point issues >> + * when the PNG was written. >> + * >> + * None of the other enums have a pure gamma curve so it makes >> + * sense to leave those to sRGB and cICP. >> + */ >> + if (s->gamma > 45355 && s->gamma < 45555) >> + avctx->color_trc = p->color_trc = AVCOL_TRC_GAMMA22; >> + else if (s->gamma > 35614 && s->gamma < 35814) >> + avctx->color_trc = p->color_trc = AVCOL_TRC_GAMMA28; >> + else if (s->gamma > 38362 && s->gamma < 38562) >> + avctx->color_trc = p->color_trc = AVCOL_TRC_SMPTE428; > > It seems that this patch does more than the commit message claims. > Would it be ideal to split this off into a third patch? - Leo Izen (thebombzen) _______________________________________________ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org https://ffmpeg.org/mailman/listinfo/ffmpeg-devel To unsubscribe, visit link above, or email ffmpeg-devel-request@ffmpeg.org with subject "unsubscribe".