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 DC17247DF5 for ; Mon, 27 Nov 2023 13:14:34 +0000 (UTC) Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id 9EF3468CB9D; Mon, 27 Nov 2023 15:14:31 +0200 (EET) Received: from mail-wm1-f41.google.com (mail-wm1-f41.google.com [209.85.128.41]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id 4D4FD68A9C0 for ; Mon, 27 Nov 2023 15:14:25 +0200 (EET) Received: by mail-wm1-f41.google.com with SMTP id 5b1f17b1804b1-4083cd3917eso30598905e9.3 for ; Mon, 27 Nov 2023 05:14:25 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=jkqxz-net.20230601.gappssmtp.com; s=20230601; t=1701090864; x=1701695664; 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=kT7GiBIRMQPQ/DAu8LfHRc5/AxUn86H08HPmK+VimEk=; b=zvuy2QpqXi6pyikp/W7SFj6xwchGQIWPtRx/9+vPabQczKExmcUucnDJF9x0ZvqTNR bdWwRUrWg9S1NfZR18Tn1DRGU9t/ceNNIDRJAvMXbEfJ8jKmTJVKRxGZG/t1sjlkLsjG 7QP5VHcMnqfoRpHVhCCLIm31tzqwnHair6vfSvKfbLJ4Bi241ln/jqMKpxBSiGCf8NOA c/5RUiz6h1zcZ1s+GUO2pvEIrd5a6CPy3Pv62wkoRYw7rxb1Z4/Q03gCunxqrRTZ08ld cdbBopm1ZLAoArra1aE+Ym3w+a+Pse8faKFitxw0six4WgWhXSRvuRJFVcjF1oQ+Tr4w SUhg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1701090864; x=1701695664; 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=kT7GiBIRMQPQ/DAu8LfHRc5/AxUn86H08HPmK+VimEk=; b=eRRc7JV3GZ6itz3ZmE79nUeuUvACurofKKWiNL7D4KQc/bq9I2I6ei2zY0CCB4XaxV ahLhdGJoBtQR6jVyZ9ADGhW8yu39htvi30Ykh4bVcOfwAe/7Y2B6VrfCfgyDIccDocu2 LsH93sW0gejlf63vnj4tgMpmk4iGm8N2BxitEIsnFWaZ4/s8KkbBVRZqNQ/dXvKg9ldD OExYWW/4BhsHqJmTr2wGrkbfPp1+7LGEPzqDYdIRToODlUWKrsUX4WI5itVoB5AxgTrC yMOvSmubu+Oz76+pNi6ZLAyLlKD9DQ+niSqSFtiNiO54coVfhS6VgWf8K0AfAwOiwwb0 lEdA== X-Gm-Message-State: AOJu0YzPE/AknGLmBJSM30hkHjpGHxWJ2J8hg/k1vNkt10ejZe+XLJ8n ZVHOE0M9DcztN+KNqrc7dbkBROI5kTzHmL+I+Tg= X-Google-Smtp-Source: AGHT+IGP9AKfN6hX4HMbs8CzB9/rQrYh+mA8xKz3rQSFzNA/J3SqHr6n6ItVEH05L8E1p7AEQ+OgJg== X-Received: by 2002:a05:600c:4e90:b0:40b:47c5:4f67 with SMTP id f16-20020a05600c4e9000b0040b47c54f67mr1236773wmq.8.1701090864443; Mon, 27 Nov 2023 05:14:24 -0800 (PST) Received: from [192.168.0.15] (cpc92320-cmbg19-2-0-cust383.5-4.cable.virginm.net. [82.13.65.128]) by smtp.gmail.com with ESMTPSA id f12-20020a05600c154c00b00406443c8b4fsm14536451wmg.19.2023.11.27.05.14.24 for (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Mon, 27 Nov 2023 05:14:24 -0800 (PST) Message-ID: Date: Mon, 27 Nov 2023 13:14:43 +0000 MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Content-Language: en-US To: ffmpeg-devel@ffmpeg.org References: <20231123094246.14268-2-lucenticus@gmail.com> <170099475357.8914.510238847473742047@lain.khirnov.net> From: Mark Thompson In-Reply-To: Subject: Re: [FFmpeg-devel] [PATCH v2] avcodec/amfenc: add smart access video option 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 26/11/2023 14:40, Dmitrii Ovchinnikov wrote: >>> The code looks significantly duplicated. > > This is not moved to amfenc.c since the property has different names > for different encoders, and many other properties (also common to > different encoders, but with different names) are separated in this way. Seems like we could template this to avoid the duplication, something like: #define PER_CODEC_OPTION(name) \ (ctx->codec == AV1 ? AMF_VIDEO_ENCODER_AV1_ ## name : \ ctx->codec == HEVC ? AMF_VIDEO_ENCODER_HEVC_ ## name : \ AMF_VIDEO_ENCODER_ ## name) ? 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".