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 5C25345F90 for ; Fri, 21 Apr 2023 21:11:06 +0000 (UTC) Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id 6C25468BE62; Sat, 22 Apr 2023 00:11:03 +0300 (EEST) Received: from mail-ot1-f50.google.com (mail-ot1-f50.google.com [209.85.210.50]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id 8504468B87F for ; Sat, 22 Apr 2023 00:10:56 +0300 (EEST) Received: by mail-ot1-f50.google.com with SMTP id 46e09a7af769-6a5da18f7f5so1881347a34.1 for ; Fri, 21 Apr 2023 14:10:56 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20221208; t=1682111451; x=1684703451; h=content-transfer-encoding:in-reply-to:from:references:to :content-language:subject:user-agent:mime-version:date:message-id :from:to:cc:subject:date:message-id:reply-to; bh=uhqykH7seu/UI3Cj5qzLW5dRCiy3NTMQh0z3He6cLD0=; b=docq3noEKmU7Ntl8loov/O5rJZWfuf66BTrcV6mVePm1M60XI1rHWJulrL6dIl3gPW 2V/n4j3qUbLOjhx+9GRBVxUkI6xEREaMYGTCuxD1UkJqdzEupmTQxBdZK9UrVEnqOqfN vsG/5ugT75tRAsq63sUtOQNQjYtjDTf4FhQ/AP0EAcifBXrzLaiXQuOtQiTPpoPTwrVM 6rLVv09/T+994LfkJCxT42KuqkxQyPUlY1u6ZeZ9Tfui4ZGqG9ENf2xpKiDegr/F3Vw8 6uw5q60120qAnmaKcqo1RqdZWTRMsqvTwRzsYMeuq3qMeh66VNfwN5KSJZBVUW5w2m6N ZLZw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1682111451; x=1684703451; h=content-transfer-encoding:in-reply-to:from:references:to :content-language:subject:user-agent:mime-version:date:message-id :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=uhqykH7seu/UI3Cj5qzLW5dRCiy3NTMQh0z3He6cLD0=; b=egv/Xqapj1bhnQhbmoERZZO8BZRQhy5kO/as42n/DakX9o3ymH0EiT5S9ZMablJlel qAyTiouAny/eU6FV4u5qtou8YiWWGw7yZX0kfMgBJen3rr5fNC0dDkpQHlbU5QhplgwW DBpiyEB8oLcNc+xbuxIv21tTbPaZDR1xMZSQGC9afPptAD+PZVnSsQL6eX1py8WoCLuH e05Tkwuxm3l/DLgnqWtjHOyF8Cwa9oofMhAQk/D2DcwZEpemPySN2tj7mDHLT79edmPe 2XAyTUw+IncIftlMm43t+iNP3ElQKNabF6d/t4Vhne9yJrU/aP08NTuh4RafGKFQuy72 FDKA== X-Gm-Message-State: AAQBX9edDV0URvapi1XbAm9tzepiQFtkWr1DUcrdNPO4/qA5XNFjia/e JVsy4nwdy8eNHHxeBlHKIKOFA2GWrrY= X-Google-Smtp-Source: AKy350ZMRJ0BhthjB8PIyLehmsPIakGZBpos7c9EPO4O7YcC77AOogvh18TjJ9JqlhYs4brLH1jUkA== X-Received: by 2002:a9d:7750:0:b0:697:bcfe:43b1 with SMTP id t16-20020a9d7750000000b00697bcfe43b1mr3569984otl.15.1682111451433; Fri, 21 Apr 2023 14:10:51 -0700 (PDT) Received: from [192.168.0.15] (host197.190-225-105.telecom.net.ar. [190.225.105.197]) by smtp.gmail.com with ESMTPSA id v2-20020a056830140200b006a3e377f0d7sm1562106otp.4.2023.04.21.14.10.50 for (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Fri, 21 Apr 2023 14:10:50 -0700 (PDT) Message-ID: Date: Fri, 21 Apr 2023 18:10:49 -0300 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:102.0) Gecko/20100101 Thunderbird/102.10.0 Content-Language: en-US To: ffmpeg-devel@ffmpeg.org References: <20230412194936.48022-1-jamrial@gmail.com> <168172855674.3843.120092233348005833@lain.khirnov.net> <7dd256a0-7ce5-8609-8ba2-abf79a33d730@gmail.com> <168173231354.3843.5901794414860824545@lain.khirnov.net> From: James Almer In-Reply-To: <168173231354.3843.5901794414860824545@lain.khirnov.net> Subject: Re: [FFmpeg-devel] [PATCH 1/5] avutil/frame: add new interlaced and top_field_first flags 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 4/17/2023 8:51 AM, Anton Khirnov wrote: > Quoting James Almer (2023-04-17 13:32:16) >> On 4/17/2023 7:49 AM, Anton Khirnov wrote: >>> Quoting James Almer (2023-04-12 21:49:32) >>>> Signed-off-by: James Almer >>>> --- >>>> Missing version bump and APIChanges entry. >>>> >>>> libavutil/frame.h | 9 +++++++++ >>>> 1 file changed, 9 insertions(+) >>>> >>> >>> Changing all those into bitfields of size 1 might be better, because no >>> code would need to be changed. >> >> Can you elaborate on this? If i do >> >>> diff --git a/libavutil/frame.h b/libavutil/frame.h >>> index f85d630c5c..3f3deab657 100644 >>> --- a/libavutil/frame.h >>> +++ b/libavutil/frame.h >>> @@ -494,12 +494,12 @@ typedef struct AVFrame { >>> /** >>> * The content of the picture is interlaced. >>> */ >>> - int interlaced_frame; >>> + int interlaced_frame: 1; >>> >>> /** >>> * If the content is interlaced, is top field displayed first. >>> */ >>> - int top_field_first; >>> + int top_field_first: 1; >>> >>> /** >>> * Tell user application that palette has changed from previous frame. >> >> It's not only an ABI break, but i assume the compiler will still >> pad/align the struct for the next field, so you're not saving many bytes. > > Yes it's an ABI break, so the savings will only appear at the next major > bump. But with a deprecation we'd have to wait even longer. > > The idea is to put all these fields next to each other so they'd form a > single unit. We could also reduce flags to 8 or 16 bits until/unless we > need more. Then all of these would fit in the size of a single int. So, on IRC it was decided that bitfields is not the way to go as it's implementation dependent, plus it would break FFI usage of our headers. As such, this set and the key_frame one are still open. _______________________________________________ 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".