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 34C1E44A39 for ; Tue, 4 Oct 2022 11:49:13 +0000 (UTC) Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id 8C80668BC16; Tue, 4 Oct 2022 14:49:11 +0300 (EEST) Received: from mail-vk1-f182.google.com (mail-vk1-f182.google.com [209.85.221.182]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id 261B268BAD5 for ; Tue, 4 Oct 2022 14:49:05 +0300 (EEST) Received: by mail-vk1-f182.google.com with SMTP id w139so2728014vkw.7 for ; Tue, 04 Oct 2022 04:49:05 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=content-transfer-encoding:in-reply-to:from:content-language :references:to:subject:user-agent:mime-version:date:message-id:from :to:cc:subject:date; bh=zSozHc826pA3RoV2J33g1peD5HKu7yJLRJOPHkJZfE0=; b=bML96wPpEzBkw3cIix0hX6FWgsvhSbOQxZrGzGhmstdlrTUQ5g+53qCRfD2916F3jx sOLhqQvicxvPkc7ienmEHFeV57F1NQ71JH8Uw6mG202YR3sFfKZHFWArTV8PKzXFHuN/ x1zU/DmMB8EmjgY2q85zOM9Gxy9a6+zCSCy5gXQPRgrh/LoRooas5ugrH+WtFHkgS7c1 yLmAjc1C1i4kWqghGw1KlkrKe+vGHe6Wh0J5Bx6zhfaX2nh36POkU/ejMwYdg49zib/g DQswArrc0K7FBfrVu9LUHc0dq1rSE1YKwDgCJX1/dAeJ066QAOsX93l8/Gb/yfMPYG01 EPZA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:in-reply-to:from:content-language :references:to:subject:user-agent:mime-version:date:message-id :x-gm-message-state:from:to:cc:subject:date; bh=zSozHc826pA3RoV2J33g1peD5HKu7yJLRJOPHkJZfE0=; b=nKVlVg9DNN3EIYj25Mp7Kmzu6r1ja6NvSu6jiNogCdRWYE90s4Dvd6DfjBrZC74jgb xHKxURtevOVh18iHMa+fQB4fy30ax75bBycuDXDaYstfZm4i+WErQzy7Ordw0YAlIVer JeM/evWg2JwDhM+S7SzufQjAhWoeDsNSE8hLGiossm9s2NuDsAPMppXLFyfi1u8WCAcZ /44AczRi2VTgEdaNbqyp/7ZDdAe6Dnf3vbqcITnaU+it7UN+aVYGrVr4+PoH6He0CkvR 6D8u6DmurxP3YcAaqweeCUKtF9z2nycpm2mrucBHh0luuEoDB0Y+a4E0V2pJmIS0zAQx Dy5g== X-Gm-Message-State: ACrzQf0fgiZxCF66bxh/LA9jz15e3OYY1EoM5dq17BB/VhC1OwDZt2Ww /5gcBzCGzTStlfyBSkJ8Xi8jC6hdp2U= X-Google-Smtp-Source: AMsMyM5awzwQ09L20wVMCq9y2it5i8T/v1Q2DNT26ZRCyi/stu1b7sycuF8Nwx/SSETTjvNLp+DIDw== X-Received: by 2002:a05:6122:10e4:b0:3a3:e3:d448 with SMTP id m4-20020a05612210e400b003a300e3d448mr10665634vko.29.1664884143350; Tue, 04 Oct 2022 04:49:03 -0700 (PDT) Received: from [192.168.0.13] ([191.97.187.183]) by smtp.gmail.com with ESMTPSA id c25-20020ab02619000000b003d9a43af5eesm2374550uao.19.2022.10.04.04.49.02 for (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Tue, 04 Oct 2022 04:49:02 -0700 (PDT) Message-ID: <21213fd7-a206-7f80-0b7c-3fcf6a3adad8@gmail.com> Date: Tue, 4 Oct 2022 08:49:02 -0300 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:102.0) Gecko/20100101 Thunderbird/102.3.1 To: ffmpeg-devel@ffmpeg.org References: <20221001061341.662-1-ovchinnikov.dmitrii@gmail.com> Content-Language: en-US From: James Almer In-Reply-To: Subject: Re: [FFmpeg-devel] [crop support for matroska demuxer 1/3] libavcodec: Add crop related fields to structure AVCodecContext and AVCodecParameters. 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/1/2022 4:06 AM, Hendrik Leppkes wrote: > On Sat, Oct 1, 2022 at 8:14 AM OvchinnikovDmitrii > wrote: >> >> --- >> libavcodec/avcodec.h | 8 ++++++++ >> libavcodec/codec_par.h | 8 ++++++++ >> 2 files changed, 16 insertions(+) >> >> diff --git a/libavcodec/avcodec.h b/libavcodec/avcodec.h >> index 7365eb5cc0..66df571afc 100644 >> --- a/libavcodec/avcodec.h >> +++ b/libavcodec/avcodec.h >> @@ -585,6 +585,14 @@ typedef struct AVCodecContext { >> */ >> int coded_width, coded_height; >> >> + /** >> + * The dimensions of the crop, usually from container. >> + */ >> + int crop_top; >> + int crop_left; >> + int crop_bottom; >> + int crop_right; >> + >> /** >> * the number of pictures in a group of pictures, or 0 for intra_only >> * - encoding: Set by user. >> diff --git a/libavcodec/codec_par.h b/libavcodec/codec_par.h >> index 7660791a12..c730a79957 100644 >> --- a/libavcodec/codec_par.h >> +++ b/libavcodec/codec_par.h >> @@ -210,6 +210,14 @@ typedef struct AVCodecParameters { >> * Audio only. The channel layout and number of channels. >> */ >> AVChannelLayout ch_layout; >> + >> + /** >> + * The dimensions of the crop, usually from container. >> + */ >> + int crop_top; >> + int crop_left; >> + int crop_bottom; >> + int crop_right; >> } AVCodecParameters; >> > > All of these should be size_t (and in AVCodecContext as well, > naturally), matching the type in AVFrame. IMO the AVFrame ones should have not been size_t to begin with, not just because the actual dimensions you'll apply them to are int, but because these fields are not arch dependent or meant for the size of some object in memory. > > - Hendrik > _______________________________________________ > 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". _______________________________________________ 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".