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 EF3DD489A9 for ; Fri, 22 Mar 2024 20:29:30 +0000 (UTC) Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id 0B87068D5C3; Fri, 22 Mar 2024 22:29:06 +0200 (EET) Received: from mail1.khirnov.net (quelana.khirnov.net [94.230.150.81]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id 458BA68D1FE for ; Fri, 22 Mar 2024 22:28:56 +0200 (EET) Authentication-Results: mail1.khirnov.net; dkim=pass (2048-bit key; unprotected) header.d=khirnov.net header.i=@khirnov.net header.a=rsa-sha256 header.s=mail header.b=IfuWodh3; dkim-atps=neutral Received: from localhost (mail1.khirnov.net [IPv6:::1]) by mail1.khirnov.net (Postfix) with ESMTP id AD06E4D5E for ; Fri, 22 Mar 2024 21:28:55 +0100 (CET) Received: from mail1.khirnov.net ([IPv6:::1]) by localhost (mail1.khirnov.net [IPv6:::1]) (amavis, port 10024) with ESMTP id zF67vpMGSppz for ; Fri, 22 Mar 2024 21:28:55 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=khirnov.net; s=mail; t=1711139334; bh=7sUnHy2MPIevvfSpJRhpPdDRcgA7SH/3cgWpZDsTf40=; h=From:To:Subject:Date:In-Reply-To:References:From; b=IfuWodh3WPS+5IixAy0VQL9jLe2TrtcfNqJ44HXePbiTvS/vnQa9fGBu2LeMDAgxc qJE0u/FPUx6CnrwDrnEA7gKawRiEs+NXr4Qq9JJ3h4uCfItY9/i3FJ5fgrqqcwkBHs UPDJ3rH9kSjOCQVBqft8UaOFcLUIVwd9lB0zq25M0V/c1nuuDbYDlGiDBoGG7u/knm ojMmetKlWzCJBRinLHF2hLbRT01mzAywLmrgr9EdmMmjXIIqNQbFPaU2A0uGK120kS 6mNhGntYSfnwGmKBveLgcR4/qidvalUdbJ5bZCNt+Ztew63hb3+TyoC8pFSdctv27y 7AQomMgucmp5A== Received: from libav.khirnov.net (libav.khirnov.net [IPv6:2a00:c500:561:201::7]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256 client-signature RSA-PSS (2048 bits) client-digest SHA256) (Client CN "libav.khirnov.net", Issuer "smtp.khirnov.net SMTP CA" (verified OK)) by mail1.khirnov.net (Postfix) with ESMTPS id 6532D4D56 for ; Fri, 22 Mar 2024 21:28:54 +0100 (CET) Received: from libav.khirnov.net (libav.khirnov.net [IPv6:::1]) by libav.khirnov.net (Postfix) with ESMTP id 6ECCC3A0C7C for ; Fri, 22 Mar 2024 21:28:45 +0100 (CET) From: Anton Khirnov To: ffmpeg-devel@ffmpeg.org Date: Fri, 22 Mar 2024 21:28:36 +0100 Message-ID: <20240322202841.31730-7-anton@khirnov.net> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20240322202841.31730-1-anton@khirnov.net> References: <20240322202841.31730-1-anton@khirnov.net> MIME-Version: 1.0 Subject: [FFmpeg-devel] [PATCH 07/12] fftools/ffmpeg_filter: remove display matrix if we have applied it 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: --- fftools/ffmpeg_filter.c | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/fftools/ffmpeg_filter.c b/fftools/ffmpeg_filter.c index 3d88482d07..9aa499a89e 100644 --- a/fftools/ffmpeg_filter.c +++ b/fftools/ffmpeg_filter.c @@ -143,6 +143,7 @@ typedef struct InputFilterPriv { AVBufferRef *hw_frames_ctx; int displaymatrix_present; + int displaymatrix_applied; int32_t displaymatrix[9]; // fallback parameters to use when no input is ever sent @@ -1568,6 +1569,7 @@ static int configure_input_video_filter(FilterGraph *fg, AVFilterGraph *graph, av_assert0(desc); // TODO: insert hwaccel enabled filters like transpose_vaapi into the graph + ifp->displaymatrix_applied = 0; if ((ifp->opts.flags & IFILTER_FLAG_AUTOROTATE) && !(desc->flags & AV_PIX_FMT_FLAG_HWACCEL)) { int32_t *displaymatrix = ifp->displaymatrix; @@ -1601,6 +1603,8 @@ static int configure_input_video_filter(FilterGraph *fg, AVFilterGraph *graph, } if (ret < 0) return ret; + + ifp->displaymatrix_applied = 1; } snprintf(name, sizeof(name), "trim_in_%s", ifp->opts.name); @@ -2697,6 +2701,9 @@ static int send_frame(FilterGraph *fg, FilterGraphThread *fgt, frame->duration = av_rescale_q(frame->duration, frame->time_base, ifp->time_base); frame->time_base = ifp->time_base; + if (ifp->displaymatrix_applied) + av_frame_remove_side_data(frame, AV_FRAME_DATA_DISPLAYMATRIX); + fd = frame_data(frame); if (!fd) return AVERROR(ENOMEM); -- 2.43.0 _______________________________________________ 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".