From patchwork Wed Sep 8 18:34:24 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: James Almer X-Patchwork-Id: 30076 Delivered-To: ffmpegpatchwork2@gmail.com Received: by 2002:a05:6602:2a4a:0:0:0:0 with SMTP id k10csp687635iov; Wed, 8 Sep 2021 11:35:30 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzjnPaKc9ZlJU9ADqNt5JoOcsNc6G89l670NJKxf0sMIA9GCJAgfY2y/JvUg7KFlngXB3Hp X-Received: by 2002:a05:6402:40cf:: with SMTP id z15mr5216147edb.70.1631126130709; Wed, 08 Sep 2021 11:35:30 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1631126130; cv=none; d=google.com; s=arc-20160816; b=mUla2yZDhrqC3N4DvMbJLzsOtfQtm9x5XR/xjN6iv+der/695yH8Y6MgX4Pu4iah8M jvPCogZ4wk+tL+7bV9NLF5ExfTuDew2DE7poRRyz4e3MZyBcGDzupRdUu1sMustUvEHe 7HY7P6Ns1eFSXzdNwWpxgTfOKWZ0Y64t9wsUS/JKy/EBIHJY4XESZkL7h7CnMiPUPLyU 5kvVZx/+/CHJ5O3XFzisNZ2P8N6cDcEe7Bq3aHsyaEK/JwLdU3tQyih1SKYokDWGTN5F PMdCV1LXB2dBE+pTjrWQu9FDS3noZn4s4hDCZTzUKEA09yCiyFiiN2+YdpSb1N7+vej+ 3SSg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:content-transfer-encoding:reply-to:list-subscribe :list-help:list-post:list-archive:list-unsubscribe:list-id :precedence:subject:mime-version:references:in-reply-to:message-id :date:to:from:dkim-signature:delivered-to; bh=2RgZe27NIM+Hx3JtRNAehsLXqkWIhk6nDh2dgTOyT8Q=; b=fTZGcB9wM8dMU2Nin/HZzWExd+/I1tgnm+j45vnuIZ7VXOo/DcMPk2StkRKylheBhU hA+8zmlncTbxeCRPBeASCYVuVyr6OCk9qq2y2LIAk93L8XlbgA7gQYUYow3+Bj9MBlrZ DOPJT9GGkR7uq+7Ca/PbSzK97l4398IfN/5V7jOadHXyCVvxD8I4emOFqgHrSym+qbFN UhRXNW7Uj3XDmXyt1L63+uotj14B99i9vgFt4FR1+HknXhRXj3uPlzxnmSzB5tCj4+r7 7BLiOvltCStKxvQo3E/ZH2vQogAJjvVDhpQCJpq3ccHl3ACZZTH2SstdbszOjlmYlHyE j14w== ARC-Authentication-Results: i=1; mx.google.com; dkim=neutral (body hash did not verify) header.i=@gmail.com header.s=20210112 header.b=g4UhtYfG; spf=pass (google.com: domain of ffmpeg-devel-bounces@ffmpeg.org designates 79.124.17.100 as permitted sender) smtp.mailfrom=ffmpeg-devel-bounces@ffmpeg.org; dmarc=fail (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from ffbox0-bg.mplayerhq.hu (ffbox0-bg.ffmpeg.org. [79.124.17.100]) by mx.google.com with ESMTP id c24si2004788edn.26.2021.09.08.11.35.06; Wed, 08 Sep 2021 11:35:30 -0700 (PDT) Received-SPF: pass (google.com: domain of ffmpeg-devel-bounces@ffmpeg.org designates 79.124.17.100 as permitted sender) client-ip=79.124.17.100; Authentication-Results: mx.google.com; dkim=neutral (body hash did not verify) header.i=@gmail.com header.s=20210112 header.b=g4UhtYfG; spf=pass (google.com: domain of ffmpeg-devel-bounces@ffmpeg.org designates 79.124.17.100 as permitted sender) smtp.mailfrom=ffmpeg-devel-bounces@ffmpeg.org; dmarc=fail (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id BD0EF68A7A4; Wed, 8 Sep 2021 21:34:51 +0300 (EEST) X-Original-To: ffmpeg-devel@ffmpeg.org Delivered-To: ffmpeg-devel@ffmpeg.org Received: from mail-qk1-f173.google.com (mail-qk1-f173.google.com [209.85.222.173]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id 1322868804C for ; Wed, 8 Sep 2021 21:34:44 +0300 (EEST) Received: by mail-qk1-f173.google.com with SMTP id p4so3635710qki.3 for ; Wed, 08 Sep 2021 11:34:44 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=from:to:subject:date:message-id:in-reply-to:references:mime-version :content-transfer-encoding; bh=ud+nK5aBLY+iTca92PFF+cQ7pS6o7obMNoGtANu4zbs=; b=g4UhtYfGMePsFIXzTdlUhqZQJ4ZEihrqaJgNpkoJi+6bGz1qO5DSIQ13UAUy4KCw1s Lgbb9reQdl1QO+BlUTGOx3CaN1pG1Aps1TTSVtQk9Bo5ahihL9QllL+bS9jeHcTzGsvJ NMQFlW5h+7l//l56x1NMIBWY4z0LHY/mtG31eUoCaJL3JCbfm22Fou7egG4Ll1N01iw8 tCGGttDlZWyeuDneYKL02HAbvbhoZbpeglTU8h97B5kawhfJ+3iTjv6ErFFRM0TuHBaG 8eK6LA1ajuQ2ujBBaxQ8+c2YMj0q/S1hRgJxAWe9HuaAprxDiTDVOKOJC6jWKSMqL0tf PQVA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=ud+nK5aBLY+iTca92PFF+cQ7pS6o7obMNoGtANu4zbs=; b=QasmT8qPyZKFDZmOqqiKia7f6H/weVPx++7/pYyWF/FWOQ6GJrBqNn5BAk0kpTHQd4 qEnDMJM1xdow4oUFYDFOiEwcmbtA3MuPDVg72iEt8OhE3/7Xc4Eca7Kau5Jc1MSnUDV1 /MwnE7DGHrLsm5Z1rhXNiGq9/RxPDxyUxgD+iVAVFEfQoohGTi3k7hlZbtnZsTTaWOWB WmTDdIlgRe02RqZgTpiEuJoUIeedOZGP6eyNuR/UgdmJlW2kAnHc3jnKOj02iYWk5R+M UN/bMvoalnhJ4ufLWaVA+vgNcbbxhc5QO+XjE811I2ClpnyKDiD58afWxSxXpjOb9ZjA waaA== X-Gm-Message-State: AOAM530gxJpDlwcrS5aqswLJ1u0JtNm9AyhuCK/r2qRWOS3+BLNV4+wc VGIdW0PMOn4qh5PA0ac3QJvhnaYdUYA= X-Received: by 2002:a05:620a:1402:: with SMTP id d2mr5063369qkj.141.1631126082697; Wed, 08 Sep 2021 11:34:42 -0700 (PDT) Received: from localhost.localdomain ([181.23.66.70]) by smtp.gmail.com with ESMTPSA id c4sm2516108qkf.122.2021.09.08.11.34.41 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 08 Sep 2021 11:34:42 -0700 (PDT) From: James Almer To: ffmpeg-devel@ffmpeg.org Date: Wed, 8 Sep 2021 15:34:24 -0300 Message-Id: <20210908183426.53347-2-jamrial@gmail.com> X-Mailer: git-send-email 2.33.0 In-Reply-To: <20210908183426.53347-1-jamrial@gmail.com> References: <20210908183426.53347-1-jamrial@gmail.com> MIME-Version: 1.0 Subject: [FFmpeg-devel] [PATCH 2/4] cmdutils: round rotation value to nearest integer 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 Errors-To: ffmpeg-devel-bounces@ffmpeg.org Sender: "ffmpeg-devel" X-TUID: 9GMfYHsWT43A As recommended by the doxy for av_display_rotation_get(). Signed-off-by: James Almer --- fftools/cmdutils.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/fftools/cmdutils.c b/fftools/cmdutils.c index ac172dbd65..7e9c4299fa 100644 --- a/fftools/cmdutils.c +++ b/fftools/cmdutils.c @@ -2207,7 +2207,7 @@ double get_rotation(AVStream *st) AV_PKT_DATA_DISPLAYMATRIX, NULL); double theta = 0; if (displaymatrix) - theta = -av_display_rotation_get((int32_t*) displaymatrix); + theta = -round(av_display_rotation_get((int32_t*) displaymatrix)); theta -= 360*floor(theta/360 + 0.9/360);