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 38564491EB for ; Mon, 5 Feb 2024 18:37:59 +0000 (UTC) Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id 6DC8268CE3D; Mon, 5 Feb 2024 20:37:56 +0200 (EET) Received: from haasn.dev (haasn.dev [78.46.187.166]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id D611B68C94B for ; Mon, 5 Feb 2024 20:37:49 +0200 (EET) DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=haasn.xyz; s=mail; t=1707158269; bh=Bz8QEkkj585BuNUiX2W96dJjRjZsju17TxlslWWo8M4=; h=Date:From:To:Subject:In-Reply-To:References:From; b=f62iLJDVrPnJPV1tL2sQwZvhMHlZNMIs5aLPr/QjW+OEc0F0Ca8R5c+d2KAPqTOFx EYJVb47mN7RYGKO3EA6S9qWUsfAG7Upl3IitlrCPQEC8ocpZDsYbNCoqpg/xo7dfKj 3cC9rtC9AVkACLJQSYSaqIpmwd3kS2+MmEJ18nts= Received: from haasn.dev (unknown [10.30.0.2]) by haasn.dev (Postfix) with ESMTP id 0DB53406AC for ; Mon, 5 Feb 2024 19:37:49 +0100 (CET) Date: Mon, 5 Feb 2024 19:37:48 +0100 Message-ID: <20240205193748.GB37488@haasn.xyz> From: Niklas Haas To: ffmpeg-devel@ffmpeg.org In-Reply-To: References: <20240205174413.92730-1-ffmpeg@haasn.xyz> MIME-Version: 1.0 Content-Disposition: inline Subject: Re: [FFmpeg-devel] [PATCH 1/2] avcodec: add YUV color space metadata to AVCodec 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 Mon, 05 Feb 2024 19:04:30 +0100 Andreas Rheinhardt wrote: > This presumes the relevant states to be a cartesian product. Which need > not be true. A callback would be better; this would also allow to base > the list on other values already set in an AVCodecContext. And if this > were extended, it would also allow to remove init_static_data one day. > It is furthermore quite wasteful to store color_ranges in a list, > although there are only very few states for it. What signature would you propose for such a callback? I disagree with using a list for the range being wasteful. In terms of binary size, they are shared (see ff_color_range_mpeg/jpeg definition). At best you are saving a few bits from using an int bitmask instead of a pointer. The main reason to use a list is API simplicity and consistency. Working with a bitmask is more awkward and would require more specialized code as opposed to the current design which allows simply re-using macros like DEF_CHOOSE_FORMATS in fftools, which is designed to handle lists. Not to mention the equivalent libavfilter API also being list-based. _______________________________________________ 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".