Received: by 2002:a05:6a10:f347:0:0:0:0 with SMTP id d7csp4349544pxu; Mon, 21 Dec 2020 10:09:21 -0800 (PST) X-Google-Smtp-Source: ABdhPJz4R7JMsaiTA9Da4g2N38yFRQD6PD/7+4wwCyZEaWOwWbj8B5lojBY9zVF2FcpqY0z9h1Pq X-Received: by 2002:a05:6402:307c:: with SMTP id bs28mr17192911edb.186.1608574161618; Mon, 21 Dec 2020 10:09:21 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1608574161; cv=none; d=google.com; s=arc-20160816; b=tuHos7rWMmCHnv4GXGHmG5G5JW45QVk6jc/EMnoOCwSD2PCoYQRUJP1GRewGfqfWHu M9x1YrAJt0nEYLgDIqKsYZhmbI7/aJltIp1wGmhQw3FF16XC+esSlqFi2XC62DWbG6K4 cPJONXqr1BCvnycNUd5hj1/RqP3H0s5PLUR4QeGCWuGFBzflsvfoaM4SX5rh+58r6pSm 0RRdEUIaVNootuBH+tpPnwk2BS0NtUnRoufICK407724rUv7is/WSNtphkmwd7FToibq fNG2bIHaNiNoNlDnAivcGWcCxgzqEVqqG4+gVx74dRiFjQTbBdEPdEP4pzMk28MbwDKt 16rQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:content-language :in-reply-to:mime-version:user-agent:date:message-id:from:references :cc:to:subject:dkim-signature; bh=ZQj+lY9Q9qTAn9h/O1jDrfQPMWDKTY6Q2BZuiHff5Iw=; b=BpUTtFdkrCHfLUfFbNL8+CMfw/GD+odXmkNwSfneazAqI8hxrkIMrOnOjRpZWmf899 tGQajmGIJxb48nOgGmTyvBngwAPMujlK3/dr2098b0kNYPPZI0FY7l2B78UBdHjk1dna j2nbE2i7rrBWd5WAq5qxVeZ15wpYytUh+eBXZHbnGdjIMUaUMUBgXSuCXMWFNeONDilX 6mYKobsNHjOa8hw/u0osqxqnJa9WW0ROvA7bi9JIJqAu3FPZdY3DmN/tQQyFTDxf/rGI Abg2JFKp34QPVNnC2nzsVbtK9mIx5oJ+Q5lx0ukB4fqpGHuwPuBXlK9Y0rt/y6SgMAPL tsPA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=M4D2E9qG; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id gw24si8950920ejb.715.2020.12.21.10.08.58; Mon, 21 Dec 2020 10:09:21 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=M4D2E9qG; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726612AbgLUSG7 (ORCPT + 99 others); Mon, 21 Dec 2020 13:06:59 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:49074 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726239AbgLUSG7 (ORCPT ); Mon, 21 Dec 2020 13:06:59 -0500 Received: from mail-lf1-x12a.google.com (mail-lf1-x12a.google.com [IPv6:2a00:1450:4864:20::12a]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 6A568C0613D6 for ; Mon, 21 Dec 2020 10:06:18 -0800 (PST) Received: by mail-lf1-x12a.google.com with SMTP id o13so25840296lfr.3 for ; Mon, 21 Dec 2020 10:06:18 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=subject:to:cc:references:from:message-id:date:user-agent :mime-version:in-reply-to:content-language:content-transfer-encoding; bh=ZQj+lY9Q9qTAn9h/O1jDrfQPMWDKTY6Q2BZuiHff5Iw=; b=M4D2E9qGgwUTj7URXt5FnCh0RdB4oZABXC+0HZNClkcuxBkU9CdQRKlz8YKek9BZHH D77YcPivFf1wXHWK2uURuSSYydhawUwSdWYdi7rbl5BWLT7TxAetQVQH9VgKaoJU7GHi 6b/QSaziho4fNBVzAEAOaAFkWtpvXNibJ22YN+9tqA4ITGeT9dmMamDXuBdOeUjbMgbl Pg/ayiieEx96VwFVWbvYJXOtpXhzUeRZj4fvwX3IoCpyNP6P0axAjOsTOo0PvO3YTSSS mTgSExhzUSKZDdymmYUR5SsKy5/fyX0dWB08dffvd1AFU/gLvW/GvnUlfsn6vZfvwXfY im2Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:subject:to:cc:references:from:message-id:date :user-agent:mime-version:in-reply-to:content-language :content-transfer-encoding; bh=ZQj+lY9Q9qTAn9h/O1jDrfQPMWDKTY6Q2BZuiHff5Iw=; b=lfNgSpxqHJlUcnSyF6H9X8NNoyS3+Ju5arYjmmelxeWkbDgYVU1MbRkTlRikUvCb3U WHhARg/MTvGO+7kQ+6KZn6Gnr0V4P+QXjO9/u3JLvuVq72Jze/E/9DMoeOTSQbqmHtBf tDDcGszoe9WBtl+A03mUbiPc/7gpJT0DdsQsef9dmfot8dKNeeAsjQkgK6mny+HDuAOO QWv3EdHaBRg9h3IvKmcXwM5ZRX1CMaurCBgEmia7HBmgIhCNczQs4yNDK/ZPyNouO9XT g9X1PZi1BJH1WhlHEVnMeMlExFZWo8tmAi5zTXWERsoZwMkTOiFYayvrppRAW0IBmitD y3SA== X-Gm-Message-State: AOAM531g0xI/FSANxflRWgfdQUUf/bSKBUtd/ReD1xLW3NR9q86p0B9M V72Hl+LiY5d4BsjhJeZZcmvJlmFJx+goBpb7 X-Received: by 2002:a5d:6884:: with SMTP id h4mr19393526wru.174.1608566516071; Mon, 21 Dec 2020 08:01:56 -0800 (PST) Received: from [192.168.0.4] ([84.238.208.204]) by smtp.googlemail.com with ESMTPSA id d191sm23176698wmd.24.2020.12.21.08.01.54 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Mon, 21 Dec 2020 08:01:55 -0800 (PST) Subject: Re: [PATCH] venus: venc: set IDR period to FW only for H264 & HEVC To: Dikshita Agarwal , linux-media@vger.kernel.org, stanimir.varbanov@linaro.org Cc: linux-kernel@vger.kernel.org, linux-arm-msm@vger.kernel.org, vgarodia@codeaurora.org References: <1608102410-23390-1-git-send-email-dikshita@codeaurora.org> From: Stanimir Varbanov Message-ID: <80ba09a0-d830-4b08-1a76-44b5d7fb38ee@linaro.org> Date: Mon, 21 Dec 2020 18:01:54 +0200 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.10.0 MIME-Version: 1.0 In-Reply-To: <1608102410-23390-1-git-send-email-dikshita@codeaurora.org> Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 12/16/20 9:06 AM, Dikshita Agarwal wrote: > HFI_PROPERTY_CONFIG_VENC_IDR_PERIOD is supported for only > H264 & HEVC codec. There is no need to set it for VP8 since > all key frames are treated as IDR frames for VP8. > > Signed-off-by: Dikshita Agarwal > --- > drivers/media/platform/qcom/venus/venc.c | 23 +++++++++++++---------- > 1 file changed, 13 insertions(+), 10 deletions(-) Reviewed-by: Stanimir Varbanov > > diff --git a/drivers/media/platform/qcom/venus/venc.c b/drivers/media/platform/qcom/venus/venc.c > index 3a2e449..618cf92 100644 > --- a/drivers/media/platform/qcom/venus/venc.c > +++ b/drivers/media/platform/qcom/venus/venc.c > @@ -588,16 +588,19 @@ static int venc_set_properties(struct venus_inst *inst) > return ret; > } > > - /* IDR periodicity, n: > - * n = 0 - only the first I-frame is IDR frame > - * n = 1 - all I-frames will be IDR frames > - * n > 1 - every n-th I-frame will be IDR frame > - */ > - ptype = HFI_PROPERTY_CONFIG_VENC_IDR_PERIOD; > - idrp.idr_period = 0; > - ret = hfi_session_set_property(inst, ptype, &idrp); > - if (ret) > - return ret; > + if (inst->fmt_cap->pixfmt == V4L2_PIX_FMT_H264 || > + inst->fmt_cap->pixfmt == V4L2_PIX_FMT_HEVC) { > + /* IDR periodicity, n: > + * n = 0 - only the first I-frame is IDR frame > + * n = 1 - all I-frames will be IDR frames > + * n > 1 - every n-th I-frame will be IDR frame > + */ > + ptype = HFI_PROPERTY_CONFIG_VENC_IDR_PERIOD; > + idrp.idr_period = 0; > + ret = hfi_session_set_property(inst, ptype, &idrp); > + if (ret) > + return ret; > + } > > if (ctr->num_b_frames) { > u32 max_num_b_frames = NUM_B_FRAMES_MAX; > -- regards, Stan