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 C961E4ABCF for ; Tue, 14 May 2024 19:55:18 +0000 (UTC) Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id 50C2968D737; Tue, 14 May 2024 22:55:15 +0300 (EEST) Received: from mail-wr1-f41.google.com (mail-wr1-f41.google.com [209.85.221.41]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id EED9368D3D0 for ; Tue, 14 May 2024 22:55:08 +0300 (EEST) Received: by mail-wr1-f41.google.com with SMTP id ffacd0b85a97d-34db9a38755so5759029f8f.1 for ; Tue, 14 May 2024 12:55:08 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=jkqxz-net.20230601.gappssmtp.com; s=20230601; t=1715716508; x=1716321308; darn=ffmpeg.org; 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=zgdA5c9OZU1YS8l7blj3/gGIY72lnk5ARWX8M80TYnc=; b=u0M/KFxCAqsNAtkHGkt7u1XM/+vwGQ3d4ppnmakYj43dUXauM5m3EptxeuoEcgMYVX NuIKW97nL3JCzvnr2JXVlgbxh7ovfEY2Vm2zM/GRwqskD0YO7hr/+lrxeQ59e/6hvOtZ VpNM/+ioae9VyfhPZq1XbjL2KECpQ8BqyopqpXR4KOk3GmJfFCuOyuaA/r9fCiDs2I5V qOgnKND6NIG3DOGKz5R3fktFyNE1Wh/3ORMerHc9cLVhabcCCEaZepkjHZcrvXQaw1mB 7BKoLxgrTafzC9GQlYBJr0SaYucz+PxEi/34uaPGEKtYmS6/eHgBltc5DxkH5uNnI9Vq JisQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1715716508; x=1716321308; 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=zgdA5c9OZU1YS8l7blj3/gGIY72lnk5ARWX8M80TYnc=; b=Jx9Xs6b/QFOzhtrRWoudcRuAyzvjSSpd3BArHtXT67aIE46rwJxdXy2cf85KtLu97w R+O3kTDIQM5bBb/HEHHohFw88FxaaKZjS+/1IfWmF10JnAZw/fDO1Eu4houVegFae126 yAGbi7L6fYjD2pmCT6I2XTx4QcZSvPdNnfz8I6XSPOH3xkIXmpDUR1TSCefX7uJ6l5+O N3YwS3te60uzLhkfR4O6AajYQmrZQ5oo0K/qAjcu+c6yIeaP/qVC1lyN3ZIyCadF5h7L BnPObSBAKRgWsT6JhtCTybWCkYWj/J0DD9+Bb6mvf8jVX6QNGBXEKp6V2dBiaMKoIPDQ agrQ== X-Gm-Message-State: AOJu0Yz/bF3h8EzE4hYvd3uPr8w+dOR7ci4a56bRWYHfmixbsC/gEoz8 Ip7WTfatGHNjqcs5vIuvCUfgxCbF+bVwiV0cjz/z5izq8zVCgQ0HWkheaTHTofgrXdeDdZbH7KQ L X-Google-Smtp-Source: AGHT+IGhRDBIPVWdCqwX7F77ccrK+ceWCNYHZ+gjxJOkThBPTNMFJCnNvjOtsZCmuYM5OaxUsIWLWw== X-Received: by 2002:a5d:5448:0:b0:34f:c7c8:5a12 with SMTP id ffacd0b85a97d-3504a73e7eemr11693868f8f.40.1715716508054; Tue, 14 May 2024 12:55:08 -0700 (PDT) Received: from [192.168.0.15] (cpc92302-cmbg19-2-0-cust1183.5-4.cable.virginm.net. [82.1.212.160]) by smtp.gmail.com with ESMTPSA id ffacd0b85a97d-3502b8a781asm14351692f8f.60.2024.05.14.12.55.07 for (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Tue, 14 May 2024 12:55:07 -0700 (PDT) Message-ID: <4fe8403f-b8da-4a1f-905a-a9f0eef4654c@jkqxz.net> Date: Tue, 14 May 2024 20:55:36 +0100 MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Content-Language: en-US To: ffmpeg-devel@ffmpeg.org References: <20240418085910.547-1-tong1.wu@intel.com> From: Mark Thompson In-Reply-To: <20240418085910.547-1-tong1.wu@intel.com> Subject: Re: [FFmpeg-devel] [PATCH v8 01/15] avcodec/vaapi_encode: introduce a base layer for vaapi encode 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 18/04/2024 09:58, tong1.wu-at-intel.com@ffmpeg.org wrote: > From: Tong Wu > > Since VAAPI and future D3D12VA implementation may share some common parameters, > a base layer encode context is introduced as vaapi context's base. > > Signed-off-by: Tong Wu > --- > libavcodec/hw_base_encode.h | 52 +++++++++++++++++++++++++++++++++++++ > libavcodec/vaapi_encode.h | 36 ++++--------------------- > 2 files changed, 57 insertions(+), 31 deletions(-) > create mode 100644 libavcodec/hw_base_encode.h > > diff --git a/libavcodec/hw_base_encode.h b/libavcodec/hw_base_encode.h > new file mode 100644 > index 0000000000..3d1974bba3 > --- /dev/null > +++ b/libavcodec/hw_base_encode.h > @@ -0,0 +1,52 @@ > +/* > + * This file is part of FFmpeg. > + * > + * FFmpeg is free software; you can redistribute it and/or > + * modify it under the terms of the GNU Lesser General Public > + * License as published by the Free Software Foundation; either > + * version 2.1 of the License, or (at your option) any later version. > + * > + * FFmpeg is distributed in the hope that it will be useful, > + * but WITHOUT ANY WARRANTY; without even the implied warranty of > + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU > + * Lesser General Public License for more details. > + * > + * You should have received a copy of the GNU Lesser General Public > + * License along with FFmpeg; if not, write to the Free Software > + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA > + */ > + > +#ifndef AVCODEC_HW_BASE_ENCODE_H > +#define AVCODEC_HW_BASE_ENCODE_H > + > +#define MAX_DPB_SIZE 16 > +#define MAX_PICTURE_REFERENCES 2 > +#define MAX_REORDER_DELAY 16 > +#define MAX_ASYNC_DEPTH 64 > +#define MAX_REFERENCE_LIST_NUM 2 Is there a reason to change these from enum to defines? I'm not seeing anywhere they should be visible to the preprocessor, and this means they are normally invisible to a debugger. > + > +enum { > + PICTURE_TYPE_IDR = 0, > + PICTURE_TYPE_I = 1, > + PICTURE_TYPE_P = 2, > + PICTURE_TYPE_B = 3, > +}; > + > +enum { > + // Codec supports controlling the subdivision of pictures into slices. > + FLAG_SLICE_CONTROL = 1 << 0, > + // Codec only supports constant quality (no rate control). > + FLAG_CONSTANT_QUALITY_ONLY = 1 << 1, > + // Codec is intra-only. > + FLAG_INTRA_ONLY = 1 << 2, > + // Codec supports B-pictures. > + FLAG_B_PICTURES = 1 << 3, > + // Codec supports referencing B-pictures. > + FLAG_B_PICTURE_REFERENCES = 1 << 4, > + // Codec supports non-IDR key pictures (that is, key pictures do > + // not necessarily empty the DPB). > + FLAG_NON_IDR_KEY_PICTURES = 1 << 5, > +}; > + > +#endif /* AVCODEC_HW_BASE_ENCODE_H */ > ... Would it make more sense to put the HWBaseEncodeContext in this patch as well? (With just the AVClass member.) Thanks, - Mark _______________________________________________ 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".