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 ESMTPS id 59C994BDBD for ; Mon, 3 Feb 2025 16:02:39 +0000 (UTC) Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id 9E0D768ADF7; Mon, 3 Feb 2025 18:02:35 +0200 (EET) Received: from mail-ed1-f48.google.com (mail-ed1-f48.google.com [209.85.208.48]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id C555268A778 for ; Mon, 3 Feb 2025 18:02:28 +0200 (EET) Received: by mail-ed1-f48.google.com with SMTP id 4fb4d7f45d1cf-5d3f57582a2so11122336a12.1 for ; Mon, 03 Feb 2025 08:02:28 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1738598547; x=1739203347; h=to:subject:message-id:date:from:in-reply-to:references:mime-version :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=TZDSAUIM+HhnWCWn1RFkdVTfPq7Z2PVMVUzDJPH3Y6g=; b=NJq85SftFsqmJsmJqjcm0blCjjY8SIgjmuJFzaV0rsys1Wdge+9J8bASS02tOGuCdJ vGucf0FPk7Im/oj18vW1pmMsFQZJ93kNHfQ4b6BqWrd6WgygZH1yO9DvkfNht3fX8MC2 3D21yltmHwIKnKGj8OPyWlyv1u8lq7R6UFtjQUV2VJzoWR8eSa97g9yV0fc7hY6i/Hz1 Sexkn99YgH3gpFS390co7e2bAhIJs3ThOsl3xVlO4jYdgvIpzEvSN0JodSS62ymi7AIa El1+sIBqA2UDu+pUf1JewnvGZmg6WlgVFCBOqrg7isoH7lBTt9GCrdKlgO4i9V7CNAeP 3R9A== X-Gm-Message-State: AOJu0YzmRMmBHm+FYLh/PgK1Dw/JqP9hoE27/dYpl4pQLB2ElS4wIfL2 9vVRIDZF182ZgdtNvETQSW4ygbNHtq8uAybdsftvEajTBvC6xhCI1WyZ57HWh1QAv/xaAiRXlNx NjL1ApmFQKtajF3btXzZ3aMTz1oh8RJg0FAP0mTNx4Ukl6nWXYgJBMA== X-Gm-Gg: ASbGncv4L+vZkTIl+6R0Fqn4KEZTIHle6XAL0mqiTzFwru7bw1a3yGyxXZkbBUOeCV5 fC5R+Zqs/gty4ysgsd8nzVhBzRqwJi4viwOAKshRDMDgYrBpIWZWrlBZI/T6GdO2sWVi1Kts0l1 lP1RC2ifYxgsHAQ3iYsYpoAq9l1NsyI34= X-Google-Smtp-Source: AGHT+IEyoZ05XTLj8958hKN9ospTuGP+zNkRhVEexPCY3s1fhrJuYLzexnVXc1EnTPIn1CoECS0YxbxnA2e8QIDCvDI= X-Received: by 2002:a05:6402:42d6:b0:5db:7353:2b5c with SMTP id 4fb4d7f45d1cf-5dc6f5f2f67mr20845713a12.11.1738598547254; Mon, 03 Feb 2025 08:02:27 -0800 (PST) MIME-Version: 1.0 References: <20250201005221.GI4991@pb2> In-Reply-To: Date: Mon, 3 Feb 2025 16:02:15 +0000 X-Gm-Features: AWEUYZmvIVKCaT9YXwR7E3wbjx9nUwcqcyIOSVzuqlw33xI_-2zF3QQYkaH0H78 Message-ID: To: FFmpeg development discussions and patches Content-Type: multipart/mixed; boundary="000000000000d1a0c1062d3f04ff" X-Content-Filtered-By: Mailman/MimeDel 2.1.29 Subject: Re: [FFmpeg-devel] [PATCH] fix pad artifacting 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: , From: Ben Lu via ffmpeg-devel Reply-To: FFmpeg development discussions and patches Cc: Ben Lu Errors-To: ffmpeg-devel-bounces@ffmpeg.org Sender: "ffmpeg-devel" Archived-At: List-Archive: List-Post: --000000000000d1a0c1062d3f04ff Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Sure, looks like gmail is complying with a plaintext email RFC. Let me try attaching to eml with: `git format-patch -s -o "outputfolder" --add-header "X-Unsent: 1" --suffix .eml --to ffmpeg-devel@ffmpeg.org -1 0f497eb391b` On Mon, Feb 3, 2025 at 3:22=E2=80=AFPM James Almer wrot= e: > On 2/3/2025 10:58 AM, Ben Lu via ffmpeg-devel wrote: > > Sorry about that, it looks correct in gmail and sending to myself also > > looks fine, not sure where the line width corruption is happening. Our > org > > doesn't allow programmatic email. > > Looks like lines with a single blank space are being replaced by empty > lines. > > > > > Is it possible to use this gist? > > Try to attach the output of git format-patch to an email instead. That > gist is only a diff of changes and missing all the git commit info. > > _______________________________________________ > 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". > --000000000000d1a0c1062d3f04ff Content-Type: message/rfc822; name="0001-fix-pad-artifacts.eml" Content-Disposition: attachment; filename="0001-fix-pad-artifacts.eml" Content-ID: X-Attachment-Id: f_m6p8h6bk0 From: Ben Lu Date: Fri, 31 Jan 2025 23:13:25 +0000 Subject: [PATCH] fix pad artifacts X-Unsent: 1 To: ffmpeg-devel@ffmpeg.org Signed-off-by: Ben Lu --- libavfilter/vf_pad.c | 29 +++++++++++++++++++++-------- 1 file changed, 21 insertions(+), 8 deletions(-) diff --git a/libavfilter/vf_pad.c b/libavfilter/vf_pad.c index 49fb272b24..846dd0a9f4 100644 --- a/libavfilter/vf_pad.c +++ b/libavfilter/vf_pad.c @@ -237,15 +237,24 @@ static AVFrame *get_video_buffer(AVFilterLink *inlink, int w, int h) if (s->inlink_w <= 0) return NULL; - frame = ff_get_video_buffer(inlink->dst->outputs[0], - w + (s->w - s->in_w), - h + (s->h - s->in_h) + (s->x > 0)); + if (s->eval_mode == EVAL_MODE_FRAME) { + frame = ff_get_video_buffer(inlink->dst->outputs[0], s->w, s->h); + } else { + frame = ff_get_video_buffer(inlink->dst->outputs[0], + w + (s->w - s->in_w), + h + (s->h - s->in_h) + (s->x > 0)); + } if (!frame) return NULL; - frame->width = w; - frame->height = h; + if (s->eval_mode == EVAL_MODE_FRAME) { + frame->width = s->w; + frame->height = s->h; + } else { + frame->width = w; + frame->height = h; + } for (plane = 0; plane < 4 && frame->data[plane] && frame->linesize[plane]; plane++) { int hsub = s->draw.hsub[plane]; @@ -358,9 +367,13 @@ static int filter_frame(AVFilterLink *inlink, AVFrame *in) if (needs_copy) { av_log(inlink->dst, AV_LOG_DEBUG, "Direct padding impossible allocating new frame\n"); - out = ff_get_video_buffer(outlink, - FFMAX(inlink->w, s->w), - FFMAX(inlink->h, s->h)); + if (s->eval_mode == EVAL_MODE_FRAME) { + out = ff_get_video_buffer(outlink, s->w, s->h); + } else { + out = ff_get_video_buffer(outlink, + FFMAX(inlink->w, s->w), + FFMAX(inlink->h, s->h)); + } if (!out) { av_frame_free(&in); return AVERROR(ENOMEM); -- 2.35.1.70.gdb80f58b59-twtrsrc --000000000000d1a0c1062d3f04ff Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline _______________________________________________ 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". --000000000000d1a0c1062d3f04ff--