From patchwork Fri Jul 19 13:54:09 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andrew Sayers X-Patchwork-Id: 50642 Delivered-To: ffmpegpatchwork2@gmail.com Received: by 2002:a59:a742:0:b0:482:c625:d099 with SMTP id f2csp602432vqm; Fri, 19 Jul 2024 06:54:54 -0700 (PDT) X-Forwarded-Encrypted: i=2; AJvYcCWrMMBNvpZ49sObh7sGisJ1gTojxKYhsaBqLU6x72SvM/krxm4xmoY7HWUGBTeP/nKl7agdughxi4G80EFEt0iuZ6NeF1ywp8DrQQ== X-Google-Smtp-Source: AGHT+IEEIO65ZVUowgqGA4dm8fKCdf2kpFxZZINJ6WsqT2GrR/vK3qZXbONlFERIkeD+UOdJ4j48 X-Received: by 2002:a05:6402:34cd:b0:579:73b7:b4cc with SMTP id 4fb4d7f45d1cf-5a05b22b109mr7852640a12.2.1721397294018; Fri, 19 Jul 2024 06:54:54 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1721397294; cv=none; d=google.com; s=arc-20160816; b=sdFULFtKECQa1BR919z+9bZsB7VaXYYfxRyTsIofWkCo5PU8mk3nb16nXBXUzdyvy5 Mtd8/kvOZuZ/LRHonTMSeAP6Zhlo1npBM9i3bsCfJVdq7h3Q/0t/jOdZFOjbMtkh1+9U N+tN74ayOPsAqkpq5/EuGxB7DA5oJ6Y9bEc4AorDWt7brLJGHJkuPBbk5kV+tgJc4Pqx q+KPyB9iX219gX5EHCo3xsrEmd65mwYEh5yEWdVa6HBGwxmFzoOig+hOhrR7I0losX2f uohUU/kwhBaMa2Mcoz1O0/mlOntjAC6R9Pxzjq8NX/+B+OEiZuXgsJfzhuMQxpyCC5nm heOA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:content-transfer-encoding:cc: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:delivered-to; bh=T1M/hX0rKExfVrhV0c0kN2IvyBM3Er0+kjGzwUX0Sfg=; fh=73ExZnkQ8FYbu/qeQNmI0dtHCfShNh8/NmZJs1umltM=; b=dehNtWjyuNRjJ0xNTZT9XkA/YBg6mKhCQf+RcKMWnyvaF/NTTBgo6/8DVCvQ/1uN4M ZQjSQd3LOBiJr5odbSu81FLxAReBR49pMyl6iiGw8CzKJSdasP85is5RPOZjEb+0F/Mu 2vkVv08rWByYCUmvUPWbCm9Va0WvXL0t5ppMqVRtIxxv2PvuUH3jyQjLgqKUVl7yNLVc VRdnAGKHpDy/QsqNcw63phPIplHsKojIHUUnr4P6bCMTbvJg33dMvivRT+PgnCe3zU+8 8CSxqQBROpktzuDk1jW44pofFti/xiEjVwhA+UfwGaaMgu0u6D9los28pN7P4mS1wI2m 9w+Q==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; 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 Return-Path: Received: from ffbox0-bg.mplayerhq.hu (ffbox0-bg.ffmpeg.org. [79.124.17.100]) by mx.google.com with ESMTP id 4fb4d7f45d1cf-5a30c2f87c6si841744a12.409.2024.07.19.06.54.53; Fri, 19 Jul 2024 06:54:53 -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; 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 Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id B585A68D98F; Fri, 19 Jul 2024 16:54:50 +0300 (EEST) X-Original-To: ffmpeg-devel@ffmpeg.org Delivered-To: ffmpeg-devel@ffmpeg.org Received: from alt2.a-painless.mh.aa.net.uk (alt2.a-painless.mh.aa.net.uk [81.187.30.51]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id 4D58E68D6E1 for ; Fri, 19 Jul 2024 16:54:44 +0300 (EEST) Received: from 0.b.4.b.7.4.0.8.c.4.a.5.d.8.b.2.0.5.8.0.9.1.8.0.0.b.8.0.1.0.0.2.ip6.arpa ([2001:8b0:819:850:2b8d:5a4c:8047:b4b0] helo=andrews-2024-laptop.lan) by painless-a.thn.aa.net.uk with esmtp (Exim 4.96) (envelope-from ) id 1sUo4J-002PXt-2Z; Fri, 19 Jul 2024 14:54:43 +0100 From: Andrew Sayers To: ffmpeg-devel@ffmpeg.org Date: Fri, 19 Jul 2024 14:54:09 +0100 Message-ID: <20240719135409.2921601-1-ffmpeg-devel@pileofstuff.org> X-Mailer: git-send-email 2.45.2 In-Reply-To: References: MIME-Version: 1.0 Subject: [FFmpeg-devel] [PATCH v2] avfilter: fix data type for {Tile, Untile}Context's image size 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 Cc: Andrew Sayers Errors-To: ffmpeg-devel-bounces@ffmpeg.org Sender: "ffmpeg-devel" X-TUID: 58hl4aRmlXDW These are accessed as AV_OPT_TYPE_IMAGE_SIZE AVOptions, so must be implemented as (signed) int's --- doc/APIchanges | 6 ++++++ libavfilter/version_major.h | 1 + libavfilter/vf_tile.c | 4 ++++ libavfilter/vf_untile.c | 4 ++++ 4 files changed, 15 insertions(+) diff --git a/doc/APIchanges b/doc/APIchanges index 5751216b24..e839d1b674 100644 --- a/doc/APIchanges +++ b/doc/APIchanges @@ -2,6 +2,12 @@ The last version increases of all libraries were on 2024-03-07 API changes, most recent first: +2024-07-19 - xxxxxxxxxx - lavfi 10 - vf_tile.c + Convert TileContext::w and TileContext::h from unsigned to int + +2024-07-19 - xxxxxxxxxx - lavfi 10 - vf_untile.c + Convert UntileContext::w and UntileContext::h from unsigned to int + 2024-07-xx - xxxxxxxxxx - lavf 61 - avformat.h Deprecate avformat_transfer_internal_stream_timing_info() and av_stream_get_codec_timebase() without replacement. diff --git a/libavfilter/version_major.h b/libavfilter/version_major.h index c5e660eeda..a8dc790c0a 100644 --- a/libavfilter/version_major.h +++ b/libavfilter/version_major.h @@ -36,5 +36,6 @@ */ #define FF_API_LINK_PUBLIC (LIBAVFILTER_VERSION_MAJOR < 11) +#define FF_API_TILE_SIZE_TYPE (LIBAVFILTER_VERSION_MAJOR < 11) #endif /* AVFILTER_VERSION_MAJOR_H */ diff --git a/libavfilter/vf_tile.c b/libavfilter/vf_tile.c index b45e739bb6..0076657c92 100644 --- a/libavfilter/vf_tile.c +++ b/libavfilter/vf_tile.c @@ -34,7 +34,11 @@ typedef struct TileContext { const AVClass *class; +#if FF_API_TILE_SIZE_TYPE unsigned w, h; +#else + int w, h; +#endif unsigned margin; unsigned padding; unsigned overlap; diff --git a/libavfilter/vf_untile.c b/libavfilter/vf_untile.c index f32f3e186b..5164e2efb0 100644 --- a/libavfilter/vf_untile.c +++ b/libavfilter/vf_untile.c @@ -28,7 +28,11 @@ typedef struct UntileContext { const AVClass *class; +#if FF_API_TILE_SIZE_TYPE unsigned w, h; +#else + int w, h; +#endif unsigned current; unsigned nb_frames; AVFrame *frame;