From patchwork Fri Jan 12 11:58:03 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Vladimir Petrov X-Patchwork-Id: 45586 Delivered-To: ffmpegpatchwork2@gmail.com Received: by 2002:a05:6a20:bf2f:b0:199:de12:6fa6 with SMTP id gc47csp2290716pzb; Fri, 12 Jan 2024 03:58:28 -0800 (PST) X-Google-Smtp-Source: AGHT+IFEMKyczOKzVpIe6jgy+6ckHdDKkfBaaDrwAlGC6e+N/NotglnLzjfgZ0iEdV7deWfZLHN8 X-Received: by 2002:a05:6512:3f09:b0:50e:9f50:86c with SMTP id y9-20020a0565123f0900b0050e9f50086cmr684295lfa.24.1705060707980; Fri, 12 Jan 2024 03:58:27 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1705060707; cv=none; d=google.com; s=arc-20160816; b=NJfii937uEoh11yM8r36GKdxrkPuPdaUFbYzyChrW1t6MIuUvpkXuUg9BqHl6KXoYC Z8/3Bxm+XF8GwqdULNKM2rPHJzqy30lEDdX9QZmG2MRHNu0a2M+sB645DTYacpAsYkYw wl+TKes+0iby6J0Nc0sfh1EozxRj8nuap0GusHDJZeqP+SREbFrqjXHtrhHANOxZXHrp Mj7VqE4MPgM0xqQB+NHbYnsqi6BinTHzFPiE7HejvhWRejNOZT1cDjITOCfPXo7qPdnZ eZ1xlmiZHmPJ7dbIhW3Ekb+yRGnjNotmXnB0IEeOKNpMPqjFf289R6Sdj9vbgbiewJfp rEVg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:reply-to:list-subscribe:list-help:list-post :list-archive:list-unsubscribe:list-id:precedence:subject:to :message-id:date:from:mime-version:dkim-signature:delivered-to; bh=+1m8c5WufU7/Pjx1FV78Nhit219hRPG3/HEBGeIxIgg=; fh=YOA8vD9MJZuwZ71F/05pj6KdCjf6jQRmzLS+CATXUQk=; b=J8l53Ue+DbLqMvPkvCUnccuDf+fkketztkHgg81w77aVpkMO8ioPCeXBZHcmo5BZgK Kg6pVcW9uRwguqnGfgDCecZcaQH+EFBcGTiH0nF1L000W7eijkti4ifHSQdrd6l6h9vy 3Kgfsu1xrbUKrxBPObiPPp4eVeG1ARhbekRXgVZVqnh/Z3PujxKnaNJaQ6VHY2n24p4K YGhu9S8qMK526TyqVqkvhM7gea6pEGbYz50m2P/2N9qOz6+/gmgQHuaidzed1FYBRAQB 7mG9mMAlvU1sq+kcqDVE8gyK88BNknYcrJXw0v6eaD3UkSF6vJ8uGRV45tc93X65BT03 BUzw== ARC-Authentication-Results: i=1; mx.google.com; dkim=neutral (body hash did not verify) header.i=@gmail.com header.s=20230601 header.b=dB63hBMc; 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 dv24-20020a170906b81800b00a28badcf374si1351994ejb.198.2024.01.12.03.58.27; Fri, 12 Jan 2024 03:58:27 -0800 (PST) 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=20230601 header.b=dB63hBMc; 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 DFDCB6881B1; Fri, 12 Jan 2024 13:58:23 +0200 (EET) X-Original-To: ffmpeg-devel@ffmpeg.org Delivered-To: ffmpeg-devel@ffmpeg.org Received: from mail-pg1-f181.google.com (mail-pg1-f181.google.com [209.85.215.181]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id 1EECF688158 for ; Fri, 12 Jan 2024 13:58:16 +0200 (EET) Received: by mail-pg1-f181.google.com with SMTP id 41be03b00d2f7-5ce07cf1e5dso3590433a12.2 for ; Fri, 12 Jan 2024 03:58:16 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1705060695; x=1705665495; darn=ffmpeg.org; h=to:subject:message-id:date:from:mime-version:from:to:cc:subject :date:message-id:reply-to; bh=GYYWMJwZ7ahsto9i2MXmb73AWZU0M9tRO0Ma/29A6p8=; b=dB63hBMcj1aV91wJ2bMKH1jj/9IcPqSN1FuYd6Xiam3nkTDE3mJXPs7GhFAfwTyVMy 53Cv4FBUb3/aUMsfaz/jpFF15npMSbAlRQkmGu+NCf+jH5GchQC/SVOjYoDxhJfsb682 oFbeTAAPa5+mTD22cpIcZSabkck5BvAycVwe1kK71HvOAfo6lLwcguzMtNIhgvBludi3 7hvBPzwc0daT83IAnyLpbtK3tcksqLY8+fpJMpwBsiTcqlF8waHuHRmiK46knbrQhApw 5PtmPvRefXUk8BEOPIgQ3UOv36ZZcxzzDuc5QkCTx7Or/CUkas8nExeL7ehfox7pHRxM i6uA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1705060695; x=1705665495; h=to:subject:message-id:date:from:mime-version:x-gm-message-state :from:to:cc:subject:date:message-id:reply-to; bh=GYYWMJwZ7ahsto9i2MXmb73AWZU0M9tRO0Ma/29A6p8=; b=VbR8CJM3W7OIJJF+DYR8WFWJqXWtcyHOUGRa2+9PVluzt7Bye7BZUnfOLWAJQy4jqq ycCVReb6hWEfLr9mj6y/toDazNlbRnIS2HAlI35mXoLFm4n+mLxXbz1ZSZumnLb3VjuC kxJxcz4/Rq3dzwkiCgkO3VeLOymF8MiEswbgIT/HIDvgsHyE6AfxdoL4DT2mUhmbkyDv vgX2bEnxFAmFQ7Uq5vCOQjpqG/n2VLmm62+k9eLu//5RGMjsNm24GSIsccBrffTCqD50 30BGxeMQX+nCQxC8vtSBEYZ7YoXhXvfu7nLiEFsCh+/VyPrQGsLUSCZMqsPSqNvCxaVb k5Ag== X-Gm-Message-State: AOJu0YxupurXddsLImGQq9gL3IzzLIqL9lSGnHjpKUMoKpk025+jzptD +bG0EYbSn9RK7pzRdRbxKjJnaA2Z9Ybbh2SS10QXAixWBJA= X-Received: by 2002:a05:6a20:840d:b0:19a:2fe2:e5ec with SMTP id c13-20020a056a20840d00b0019a2fe2e5ecmr694952pzd.77.1705060694843; Fri, 12 Jan 2024 03:58:14 -0800 (PST) MIME-Version: 1.0 From: Vladimir Petrov Date: Fri, 12 Jan 2024 13:58:03 +0200 Message-ID: To: ffmpeg-devel@ffmpeg.org Subject: [FFmpeg-devel] [PATCH] avfilter/vsrc_testsrc: fix colorchart black stripe 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: fu9rsFIQ1QZ2 There is a typo at 'libavfilter/vsrc_testsrc.c' in 'colorchart_fill_picture()' regarding patch height when using colorchart test image source. With current default size 64x64 all is fine, but when move to any non-square patch size, there is unexpected behavior: Test examples: [Blackstripe on bottom if height > width] ffmpeg -f lavfi -i colorchart=duration=30:rate=25:patch_size=120x144 -f mp4 -c:v libx264 colorchart1.m4v [Segmentation fault if height < width] ffmpeg -f lavfi -i colorchart=duration=30:rate=25:patch_size=120x100 -f mp4 -c:v libx264 colorchart2.m4v From c484a4976c54083770c8749f954394c35dfd9c63 Mon Sep 17 00:00:00 2001 From: Vladimir Petrov Date: Tue, 9 Jan 2024 18:42:19 +0200 Subject: [PATCH] avfilter/vsrc_testsrc: fix colorchart black stripe Fixed blackstripe on bottom or segmentation fault in case when patch width and height differ. Signed-off-by: Vladimir Petrov --- libavfilter/vsrc_testsrc.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libavfilter/vsrc_testsrc.c b/libavfilter/vsrc_testsrc.c index da17e950d8..3b5536badc 100644 --- a/libavfilter/vsrc_testsrc.c +++ b/libavfilter/vsrc_testsrc.c @@ -1977,7 +1977,7 @@ static void colorchart_fill_picture(AVFilterContext *ctx, AVFrame *frame) const int w = colorchart_presets[preset].w; const int h = colorchart_presets[preset].h; const int pw = test->pw; - const int ph = test->pw; + const int ph = test->ph; for (int y = 0; y < h; y++) { for (int x = 0; x < w; x++) { -- 2.43.0