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 608DF43050 for ; Sat, 17 Sep 2022 01:45:17 +0000 (UTC) Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id 436FD68BC47; Sat, 17 Sep 2022 04:45:16 +0300 (EEST) Received: from mail.overt.org (mail.overt.org [157.230.92.47]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id EE55268BC02 for ; Sat, 17 Sep 2022 04:45:09 +0300 (EEST) Received: from authenticated-user (mail.overt.org [157.230.92.47]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) (No client certificate requested) by mail.overt.org (Postfix) with ESMTPSA id B1BC63F1DD for ; Fri, 16 Sep 2022 20:45:08 -0500 (CDT) DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=overt.org; s=mail; t=1663379109; bh=6xgxDqHf0fuEGG9r/Rm2IESbN5qsKySkDbTKUaLcM3w=; h=Date:From:To:Subject:In-Reply-To:References:From; b=c4QSugwOX4GZdCYSvswFL4w1i2SV5fmcLM2SOqAMZS8AxZlHuLF5Mc/AEttCB5B3/ AJJyOnoZ3tUKD2M0WrIqvOWNtuC+eMMMdTxxU7YSjNMPL/edztLY8xFOeA2a6w1RGo wt0Pn2ofcY0qsqMhk4bGREe/LJqpy8g+NZi1p8J2u5LvQMLiTsfw/PsuD8OugPWV7g lq0awjPq6+vLIQGrESNyvyaXNm/IRU+ih/KPTazxMVTzSB1ulNHlYQaR8S4Mar2N0U K1NDYGWq/jk7ucMWW0olXEFiC8ceISPIAXN3bFPy+eatNDBJb7wFz+R8fI/4kRGjYi XDamqSceuwTJw== Date: Fri, 16 Sep 2022 18:45:06 -0700 From: Philip Langdale To: ffmpeg-devel@ffmpeg.org Message-ID: <20220916184506.4e805fcb@fido7> In-Reply-To: <20220915212554.GS2088045@pb2> References: <20220914232002.325160-1-philipl@overt.org> <20220915212554.GS2088045@pb2> MIME-Version: 1.0 Subject: Re: [FFmpeg-devel] [PATCH] v3: lavu/pixdesc: favour formats where depth and subsampling exactly match 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-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Errors-To: ffmpeg-devel-bounces@ffmpeg.org Sender: "ffmpeg-devel" Archived-At: List-Archive: List-Post: On Thu, 15 Sep 2022 23:25:54 +0200 Michael Niedermayer wrote: > > + > > + if (dst_desc->log2_chroma_h < src_desc->log2_chroma_h) { > > + loss |= FF_LOSS_EXCESS_RESOLUTION; > > + score -= 32 << (src_desc->log2_chroma_h - > > dst_desc->log2_chroma_h); > > + } > > with 16bit 4:2:0 > to > 14bit 4:2:0 > vs. > 16bit 4:4:4 > > more data is preserved in the later but the 420->444 would have a > loss of 64 i think and 16->14 i think 8. I didnt try this just > reading the code so i may be missing something but i think the code > would favor the lower bitdepth That may be unexpected Yep. Another edge case :-) I've posted a v4 that adjusts the excess resolution penalty to avoid this. Maybe I've got it right this time. Thanks, --phil _______________________________________________ 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".