From mboxrd@z Thu Jan  1 00:00:00 1970
Return-Path: <ffmpeg-devel-bounces@ffmpeg.org>
Received: from ffbox0-bg.mplayerhq.hu (ffbox0-bg.ffmpeg.org [79.124.17.100])
	by master.gitmailbox.com (Postfix) with ESMTPS id 80A574E37E
	for <ffmpegdev@gitmailbox.com>; Mon, 10 Mar 2025 22:11:27 +0000 (UTC)
Received: from [127.0.1.1] (localhost [127.0.0.1])
	by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id B8AD768DDF0;
	Tue, 11 Mar 2025 00:11:19 +0200 (EET)
Received: from mail-wr1-f43.google.com (mail-wr1-f43.google.com
 [209.85.221.43])
 by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id C0FDE68DA35
 for <ffmpeg-devel@ffmpeg.org>; Tue, 11 Mar 2025 00:11:12 +0200 (EET)
Received: by mail-wr1-f43.google.com with SMTP id
 ffacd0b85a97d-39149bccb69so1378782f8f.2
 for <ffmpeg-devel@ffmpeg.org>; Mon, 10 Mar 2025 15:11:12 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
 d=gmail.com; s=20230601; t=1741644672; x=1742249472; darn=ffmpeg.org;
 h=user-agent:in-reply-to:content-disposition:mime-version:references
 :mail-followup-to:message-id:subject:cc:to:from:date:from:to:cc
 :subject:date:message-id:reply-to;
 bh=ChL3LEinAp4qzJ1/rEVS5hFTuENG6Le4YBW7BskB6f0=;
 b=DfAaSGK0/13vjFEAAn9jIss2ve/542ZlhrnhGDWYl27zL7l66Q7jpQtmbIMjXbUTui
 21Y6Ooz0MkzOYgmp+DoD10mfIKa16wpWFSZXH1xfQK8t+cmfYNYrOU4npJMsUDjdZEwn
 l11y3qxDdsthM4mfW7DTpOMDzhfxzU05m55zdrP7v4oNxtFNl7A+nEIXcEcJGOfmotzI
 AMTVwJrJ03yAnKDNl3c3IoDoLGZMrMIvI6+bvTd1PGahpMHU7BWQa3pXX3+X2wBhZwaM
 YaGFP2AL0+a0Rnv88lxcJp4ljQ08JBCNQdSco+ci28sP7GoDU6lCABb5SA8Xec5xKwNJ
 i1mA==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
 d=1e100.net; s=20230601; t=1741644672; x=1742249472;
 h=user-agent:in-reply-to:content-disposition:mime-version:references
 :mail-followup-to:message-id:subject:cc:to:from:date
 :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to;
 bh=ChL3LEinAp4qzJ1/rEVS5hFTuENG6Le4YBW7BskB6f0=;
 b=jbHcK6sUcK2zN6iRmqQkvdqO9olr6XjzWOTWITTPKGko6RqSC2YgBsaof6Fb1DKozC
 6kXQXLWMOQFK4RExak+FEnjhIqJBchNw8GXLJPObvjDP5OiQhbYdmq0K6InifuVlCwrc
 6MGSVrjE9zhck6l3RG774+VmUe7xokIGaPpuclLl2x3W8qF2ey9qQXfRLYMbfDLxOZGf
 Jn4vvLJdSj8jZkRPkWCF+mPHxVq0qx5tf8x+H78XmVMfHkhn/eK+nmYDEXF8VieIE3TT
 fTdV9yvPtsB3mGVLKpPLUA2jZHnQN1odYRE2HO8smyQIbqKq9GZqtfuoe2goOXERgzHK
 Cp3A==
X-Gm-Message-State: AOJu0Yzt4w+42dYNbxF68x4S4vJ5lw6gQ3IzhMHwgB64jkjUTXACcn20
 EfAdc8pPFIP5sAj23tT/Qpux0Usg7ljNnX+hQqpMFVIyUoJ9OYfPtnMFPg==
X-Gm-Gg: ASbGncvnSuNLEFGhiYK5jZ6Kqrpu+KXFkpDsOdKS/ZGzjTsKP1+Or+vkhVQlgCHyNtL
 LOEnQvvpiyjOQtQjs+FlUMtjBhH8cxpmYZ52ZukEcIvKXvMbXoz9m5DU9Kgm1TePy5SA6C0GErB
 jjZMkxmmC2TaRPYhZFJ7g8diFBcB+XxXhlwCvXT5IFWNa6Xdiwld2JOMgjBU+QHs+LaHp1x1Rrp
 VwUxvvP9OK/7hP4FsoHk1gyN1RJj6qcbpLY8tsX6bD7BWmOp66upsDOG4e0ByOOLS2NQ84nPkTj
 uMD3vOBrTC1bbw4AuAiJOXTormxiU2TQgDf7m1HiFzkDAfoxYNgW3nWWjXt4CVltjRNh23uwvvh
 Hezx6sDV1
X-Google-Smtp-Source: AGHT+IGQRDSIkKDI5+k0iZB51BaAViGxOSa8BOfzL1iu5MopQLx+W6ScpKEKNBOY+BdYIVqwJD17fQ==
X-Received: by 2002:a05:6000:2cd:b0:391:2ba9:4c51 with SMTP id
 ffacd0b85a97d-3926beec3c9mr1961127f8f.44.1741644671633; 
 Mon, 10 Mar 2025 15:11:11 -0700 (PDT)
Received: from mariano (dynamic-adsl-84-220-189-10.clienti.tiscali.it.
 [84.220.189.10]) by smtp.gmail.com with ESMTPSA id
 ffacd0b85a97d-3912c0e2eecsm16009113f8f.79.2025.03.10.15.11.10
 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256);
 Mon, 10 Mar 2025 15:11:11 -0700 (PDT)
Received: by mariano (Postfix, from userid 1000)
 id 2D6F7BFCE8; Mon, 10 Mar 2025 23:11:10 +0100 (CET)
Date: Mon, 10 Mar 2025 23:11:10 +0100
From: Stefano Sabatini <stefasab@gmail.com>
To: FFmpeg development discussions and patches <ffmpeg-devel@ffmpeg.org>
Message-ID: <Z89jfrMPoOASAQ4K@mariano>
Mail-Followup-To: FFmpeg development discussions and patches <ffmpeg-devel@ffmpeg.org>,
	softworkz <softworkz-at-hotmail.com@ffmpeg.org>
References: <pull.52.v5.ffstaging.FFmpeg.1741456535.ffmpegagent@gmail.com>
 <pull.52.v6.ffstaging.FFmpeg.1741464994.ffmpegagent@gmail.com>
 <811c5ab35c384894e6504b9a55738c0f9c483048.1741464994.git.ffmpegagent@gmail.com>
MIME-Version: 1.0
Content-Disposition: inline
In-Reply-To: <811c5ab35c384894e6504b9a55738c0f9c483048.1741464994.git.ffmpegagent@gmail.com>
User-Agent: Mutt/2.1.4 (2021-12-11)
Subject: Re: [FFmpeg-devel] [PATCH v6 5/8] avfilter/avfilter: Add
 avfilter_link_get_hw_frames_ctx()
X-BeenThere: ffmpeg-devel@ffmpeg.org
X-Mailman-Version: 2.1.29
Precedence: list
List-Id: FFmpeg development discussions and patches <ffmpeg-devel.ffmpeg.org>
List-Unsubscribe: <https://ffmpeg.org/mailman/options/ffmpeg-devel>,
 <mailto:ffmpeg-devel-request@ffmpeg.org?subject=unsubscribe>
List-Archive: <https://ffmpeg.org/pipermail/ffmpeg-devel>
List-Post: <mailto:ffmpeg-devel@ffmpeg.org>
List-Help: <mailto:ffmpeg-devel-request@ffmpeg.org?subject=help>
List-Subscribe: <https://ffmpeg.org/mailman/listinfo/ffmpeg-devel>,
 <mailto:ffmpeg-devel-request@ffmpeg.org?subject=subscribe>
Reply-To: FFmpeg development discussions and patches <ffmpeg-devel@ffmpeg.org>
Cc: softworkz <softworkz@hotmail.com>
Content-Type: text/plain; charset="us-ascii"
Content-Transfer-Encoding: 7bit
Errors-To: ffmpeg-devel-bounces@ffmpeg.org
Sender: "ffmpeg-devel" <ffmpeg-devel-bounces@ffmpeg.org>
Archived-At: <https://master.gitmailbox.com/ffmpegdev/Z89jfrMPoOASAQ4K@mariano/>
List-Archive: <https://master.gitmailbox.com/ffmpegdev/>
List-Post: <mailto:ffmpegdev@gitmailbox.com>

On date Saturday 2025-03-08 20:16:31 +0000, softworkz wrote:
> From: softworkz <softworkz@hotmail.com>
> 
> ---
>  doc/APIchanges         |  3 +++
>  libavfilter/avfilter.c |  9 +++++++++
>  libavfilter/avfilter.h | 12 ++++++++++++
>  libavfilter/version.h  |  2 +-
>  4 files changed, 25 insertions(+), 1 deletion(-)
> 
> diff --git a/doc/APIchanges b/doc/APIchanges
> index 5a64836e25..354716399d 100644
> --- a/doc/APIchanges
> +++ b/doc/APIchanges
> @@ -2,6 +2,9 @@ The last version increases of all libraries were on 2024-03-07
>  
>  API changes, most recent first:
>  

> +2025-02-xx - xxxxxxxxxx - lavfi 10.10.100 - avfilter.h
> +  Add avfilter_link_get_hw_frames_ctx().
> +
>  2025-03-01 - xxxxxxxxxx - lavu 59.58.100 - pixfmt.h
>    Add AV_PIX_FMT_GRAY32BE and AV_PIX_FMT_GRAY32LE.

Unrelated but we should automate this xxx filling.

> diff --git a/libavfilter/avfilter.c b/libavfilter/avfilter.c
> index e732556ffa..13abd7e8ad 100644
> --- a/libavfilter/avfilter.c
> +++ b/libavfilter/avfilter.c
> @@ -1006,6 +1006,15 @@ enum AVMediaType avfilter_pad_get_type(const AVFilterPad *pads, int pad_idx)
>      return pads[pad_idx].type;
>  }
>  
> +AVBufferRef *avfilter_link_get_hw_frames_ctx(AVFilterLink *link)
> +{

> +    FilterLink* plink = ff_filter_link(link);

nit: FilterLink *plink style is more kosher

> +    if (plink->hw_frames_ctx)
> +        return av_buffer_ref(plink->hw_frames_ctx);
> +
> +    return NULL;
> +}
> +
>  static int default_filter_frame(AVFilterLink *link, AVFrame *frame)
>  {
>      return ff_filter_frame(link->dst->outputs[0], frame);
> diff --git a/libavfilter/avfilter.h b/libavfilter/avfilter.h
> index 4520d5f978..27c50520b3 100644
> --- a/libavfilter/avfilter.h
> +++ b/libavfilter/avfilter.h
> @@ -96,6 +96,18 @@ const char *avfilter_pad_get_name(const AVFilterPad *pads, int pad_idx);
>   */
>  enum AVMediaType avfilter_pad_get_type(const AVFilterPad *pads, int pad_idx);
>  
> +/**
> + * Get the hardware frames context of a filter link.
> + *
> + * @param link an AVFilterLink
> + *

> + * @return a ref-counted copy of the link's hw_frames_ctx if there's a hardware

of the link's hw_frames_ctx *field* ...

> + *         frames context associated with the link or NULL otherwise.
> + *         The returned AVBufferRef needs to be released with av_buffer_unref()
> + *         when it's no longer used.

nit++: "there is... it is..." to aid non-native readers

[...]

Looks good to me otherwise.
_______________________________________________
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".