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 AA9EF47461 for ; Tue, 10 Oct 2023 11:21:30 +0000 (UTC) Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id 0BA0168CB04; Tue, 10 Oct 2023 14:21:28 +0300 (EEST) Received: from mail-oa1-f54.google.com (mail-oa1-f54.google.com [209.85.160.54]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id 1519368C6DC for ; Tue, 10 Oct 2023 14:21:22 +0300 (EEST) Received: by mail-oa1-f54.google.com with SMTP id 586e51a60fabf-1e562706d29so3226347fac.2 for ; Tue, 10 Oct 2023 04:21:22 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1696936880; x=1697541680; darn=ffmpeg.org; h=content-transfer-encoding:in-reply-to:autocrypt:from:references:to :content-language:subject:user-agent:mime-version:date:message-id :from:to:cc:subject:date:message-id:reply-to; bh=hm3b3wNlDs3JUlwnaOoHkB8HbluSaFYieqvIZiWDdqY=; b=kGFWZTzktrkKTUT0F3A1xYqtmbA4BIMobMi0Y0p2+iNbQt4J+DfMuj1Dp2wOiFS2Bj PHhM/2LO2iXzrWUBEXGWPXS/60oNPcJMWV7O2un3bZca4QUjVb+6mMt8V2RkoqAsBlj3 mHh4JsUr7NxCeq8v40DsJNErND2QF187mUYVYi0kdmdpKsRSjaMlTakU9VsEZfahawDt t4VshW/Oq6bNU044wArDwelY/71PiCriAZ4//Tjk0fIcSRncV+cmzPnEP9wh7cSDL2tU FJUj1A45dq6cSwMWfh9yivNVo4xkwNkx1EIF0Hq9d+dWkM0uQamz3thuk9ypXG+VdlLU Fqdw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1696936880; x=1697541680; h=content-transfer-encoding:in-reply-to:autocrypt: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=hm3b3wNlDs3JUlwnaOoHkB8HbluSaFYieqvIZiWDdqY=; b=FQK4bf82HlxmJR3Gze7Jn1EHw0AY4x194zfDXrSJiUmL/Ypb+b2RKZDmpFa5CUuBh7 rGOeCqsA48hpgH8Mky6XSzc+sd9IvHf6lF0tM99RXoHK6E0SQeDq5J0P5A9iVZZcMd7c +DQe6qwQC4+rr/am9ZrShpjO4JKvUApvdvy51hvLKYDJd5VHxWCv6MHMOJ07yyR+yWDJ MK8Gad7BSiFgprk7/a6hMZ1YRYzEoyQ6J1UR8ihWMXW9zOF0OvQkgNatdOtHITuzqzui vWiKje0tePeEV+kdyBniD+1iQsNgLHiNi67xfuJ497iRHlJASjECHQPlALfYURMtw5/e bZNA== X-Gm-Message-State: AOJu0Yxbb60oW/lQKwJnV+hhdsF5tYaXmWAtuA5NmCZkEssTVAAi/81U RbdIJZ4cIiGXhuZN+ngQAVQHjuDaYe0= X-Google-Smtp-Source: AGHT+IEd6xzzZYr6U5gfmuws9B5COd/ssUAsPG0PPVC4xkT+kDJ5RyX+JI4iBlb9B43NS0Z9r7ID1Q== X-Received: by 2002:a05:6870:4692:b0:1d1:3c89:a7e5 with SMTP id a18-20020a056870469200b001d13c89a7e5mr20663099oap.51.1696936879871; Tue, 10 Oct 2023 04:21:19 -0700 (PDT) Received: from [192.168.0.16] (host197.190-225-105.telecom.net.ar. [190.225.105.197]) by smtp.gmail.com with ESMTPSA id 4-20020aa79104000000b0069305627491sm7914388pfh.159.2023.10.10.04.21.18 for (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Tue, 10 Oct 2023 04:21:19 -0700 (PDT) Message-ID: Date: Tue, 10 Oct 2023 08:21:42 -0300 MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Content-Language: en-US To: ffmpeg-devel@ffmpeg.org References: <20231007162503.1057-1-jamrial@gmail.com> <20231007162503.1057-5-jamrial@gmail.com> <169693619274.6638.10416615280449969394@lain.khirnov.net> <169693658102.6638.10089742736405247188@lain.khirnov.net> From: James Almer Autocrypt: addr=jamrial@gmail.com; keydata= xsBNBFjZtqABCADLW+vdEoZaJZDsIO6geYFTOcn1unsEHefj9zn+3oTHlDFFzO47mzHsSfbK 9JE2xpOJEVnC8FAF5Sayi/pVwV+mtQUV3n5dgVeVBYF9GUQwOGFCpK8X54RRqhkgknbunOEE 0CtgAJgmpFmmmHgq02GvEspx1h/rh4apqwQR6QX4Favb+x9+i9ytVpwVcBX94vo2toyP7h/K BWfadQmb8ltgE1kshfg+SQs/H5bTV5Z1DuEASf02ZL/1qYB/sdTgWPLv9XMUHHsRFmMY8TMx wJSkP+Af3AiYQPJYz1B1D4tt98T/NoiVdin10zATakPjV8hXaobuRmxgakkUASXudydDABEB AAHNH0phbWVzIEFsbWVyIDxqYW1yaWFsQGdtYWlsLmNvbT7CwJIEEwEIADwCGwMGCwkIBwMC BhUIAgkKCwQWAgMBAh4BAheAFiEEd1EujP2UoWlX5pp6FGMBrXN2WeAFAmJoLUUCGQEACgkQ FGMBrXN2WeAFVQf9GtGhniRs1PzNUOgJktCnv6j4BbLieaIPYPEFXKDHOgjqQE2zVMYXnoXl Jam928ii902a8OY06r9ywn/R8ApD1/3NY/v64O71CY9scz5XyH2au8wIZ6HwFy3/f7sqjdGD uctY8Qs7rjT7NkoC5lmgMu2v2k03dGtM9AAf5AK5gU+H0EUw7vmKKiXzUqt5kvBuf4CEwXvH AQT1SMJ52rIlDWB7FQFyZeUbOAK2IgY/KNedfK6nsgd/eQVnlofPd2XoddE7kP6iys7jJefw DD3g3rZyDTq7in5dyk5glaNpWZpbHGBs+9SCYLnfQ8XvWqPFOD+gj0plamKANgOvavKTxM7A TQRY2bagAQgA69YtILj8kYxmqPr/M8+MXT7wVoOWVW9lvSmPquCELaDy/NIS7D06VC5EuE/6 JlJXZMTn37NLlyWhzwOgXuXw5w2tyoQQBuvqGiXJijuXwXH7HKdzrc6rpYtAqt5w05hzNrFS KrS0izG64VpWrfproy3BsL+8TBm9brLhhNPynVRqVukbbGzlATTzNQGZ14TTi2/dL6DkMQnM qn4jX9UEe4GdGQBP50bUJSSmeiIkyNLWA+znuN2PZEz930ZwNrF9GtDVw7mzcmpCZ7spldE2 tutbpy9D1bIqxyqBrYDSezyzL2adR1qgHyOTMCHg2AYNkrIQHrSyJxKTpZ1/hqOp8wARAQAB wsBfBBgBAgAJBQJY2bagAhsMAAoJEBRjAa1zdlnghekH/0Yb0iYJ74oID2f/Fj+AJKS2ekQF P2xOr8lpGzgp/+yWUvPtqbX0A33anBJdYwxaAC0NataX3tfZ+oJkzXqfmqhIHMPYHdZesJA2 Bk9hU/33mDl5s5U66/z0uelWzwKVHoQ2O6or4+qF3HJFSJLCe9uvWJ3zXf9F342Ftj73sfx+ 3xkw/IXsN1RqbYqDlzpoEQ99SIEfY/8Jjwnd3sIPfqkuyeaYfe6GJDqKawdCEP1oRRlbXEAp TJgYz8r3nPhGv9cdHNDCk44ISbsqVuxIEnLqi4fTPZaGupiQhT+srl268TTAp2TQW7+6Ce/b NPQorMquzS/LZoyALpmsYi/miMc= In-Reply-To: <169693658102.6638.10089742736405247188@lain.khirnov.net> Subject: Re: [FFmpeg-devel] [PATCH 4/7] avformat/avformat: add a flag to signal muxers that support storing cropping values 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 10/10/2023 8:16 AM, Anton Khirnov wrote: > Quoting James Almer (2023-10-10 13:13:46) >> On 10/10/2023 8:09 AM, Anton Khirnov wrote: >>> Quoting James Almer (2023-10-07 18:25:00) >>>> Signed-off-by: James Almer >>>> --- >>>> libavformat/avformat.h | 1 + >>>> libavformat/mux.c | 8 ++++++++ >>>> 2 files changed, 9 insertions(+) >>>> >>>> diff --git a/libavformat/avformat.h b/libavformat/avformat.h >>>> index 9e7eca007e..c099ca8a01 100644 >>>> --- a/libavformat/avformat.h >>>> +++ b/libavformat/avformat.h >>>> @@ -500,6 +500,7 @@ typedef struct AVProbeData { >>>> The user or muxer can override this through >>>> AVFormatContext.avoid_negative_ts >>>> */ >>>> +#define AVFMT_CROPPING 0x80000 /**< Format supports storing cropping values */ >>> >>> I have mixed feeelings about this patch, for a bunch of reasons: >>> * It is quite ad-hoc - we don't do this for other side data types, and >>> this approach would not scale if we did. >>> * If we do want to signal this, we probably want to distinguish between >>> support for global and per-packet values. >> >> This patch came to be after some discussion from the first iteration of >> the set, where concerns about the cropping information being silently >> lost if apply_cropping was disabled during a transcoding or codec copy >> scenario where the output format didn't support storing said values. >> >>> * How do you expect this to be useful to the callers? I don't see this >>> flag actually being used in the ffmpeg CLI patch. >> >> It's a format flag. Muxers use it, and the generic mux.c code will print >> a warning if needed. > > Why is it public then? So the library user can know beforehand if the cropping information will be lost or not, and choose accordingly. The warning is there for the cases where it was ignored. I can add a check to the CLI for it, but other than to abort or outright ignore the user request to not apply cropping i don't see what it could do, as mux.c already prints a warning. _______________________________________________ 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".