From patchwork Wed May 10 15:49:20 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Nicolas George X-Patchwork-Id: 3640 Delivered-To: ffmpegpatchwork@gmail.com Received: by 10.103.3.129 with SMTP id 123csp276752vsd; Wed, 10 May 2017 08:49:32 -0700 (PDT) X-Received: by 10.28.61.194 with SMTP id k185mr1552390wma.121.1494431372240; Wed, 10 May 2017 08:49:32 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1494431372; cv=none; d=google.com; s=arc-20160816; b=EBjVRkL4rk7YGCArI+1t7/V02KzIJXtnNvVOEPmPJLeXem/iQYWxE274FjXrmsdnJM M5NW8WRwW618+YssBcvfN8oNVvuzSo5L86+pYuRfZ7lxWM5j62bW4KxfMcitpQwV03x/ vvfCAhht8A3MQX64fiEZi6549Beh7z7zyzp65oDBeyqFAKWtsYWDOemlscVvLukOJ3sY RneJS+s/AQCE3p/g8Lfktqet5YnyFDwaQ8lTT5h3Tk75ZsSfcA9YmonDjL5UcM4ICXWM B+fRUDwpqmGTkp3nbzweFLf4lm+EpUb5sc9UbRqDAW0JYpv00d9uUXZX2/umUYQ0yDrj lmwg== 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:user-agent :in-reply-to:mime-version:references:message-id:to:from:date :delivered-to:arc-authentication-results; bh=kL1w6QoWmzZRcjoQ5ZKgJnaAuo+6mV/b+zWL2cWz71s=; b=gfTb43cQPbmB5bFsiasYm7U8GYpGZ/PqE0ZPnpySJri4sQEvaaYIHnd/7crKHq5GSD pWxPhbV11Fax52JTwHpG4LzRdEcoi7Qy3PZFy9tEFxuv3ggyayT4b/QQN3+AtUkVwMJn ua/vQvft6oNwkLDwV+CnqwtMB1y2CsO+VTrKNLFQW2Z1wP6Z6xWwY15okJucjjsTwHLU VXBe8wuSZWdUS2RSyNNgNn4xhZ4/5szVXlOqNF8sPz47F85Wup+fKuoGXFtl2Oz7h4J3 bUrUwEXP/jYUQyOWv30izc2OWEuYFLHEw83A81BI2gHbbmfghYDj3ukcpYQYbNJsB3ng EC7g== 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 t128si3822586wmb.21.2017.05.10.08.49.30; Wed, 10 May 2017 08:49:32 -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 DA0BF6883B7; Wed, 10 May 2017 18:49:20 +0300 (EEST) X-Original-To: ffmpeg-devel@ffmpeg.org Delivered-To: ffmpeg-devel@ffmpeg.org Received: from nef2.ens.fr (nef2.ens.fr [129.199.96.40]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id 80A6D688268 for ; Wed, 10 May 2017 18:49:14 +0300 (EEST) Received: from phare.normalesup.org (archicubes.ens.fr [129.199.129.80]) by nef2.ens.fr (8.13.6/1.01.28121999) with ESMTP id v4AFnKO4016524 for ; Wed, 10 May 2017 17:49:21 +0200 (CEST) Received: by phare.normalesup.org (Postfix, from userid 1001) id D9F34E9792; Wed, 10 May 2017 17:49:20 +0200 (CEST) Date: Wed, 10 May 2017 17:49:20 +0200 From: Nicolas George To: FFmpeg development discussions and patches Message-ID: <20170510154920.GA1581372@phare.normalesup.org> References: <20170509131944.27166-1-george@nsup.org> <20170509131944.27166-2-george@nsup.org> <20170510021625.GP4759@nb4> MIME-Version: 1.0 In-Reply-To: <20170510021625.GP4759@nb4> User-Agent: Mutt/1.5.23 (2014-03-12) X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.4.3 (nef2.ens.fr [129.199.96.32]); Wed, 10 May 2017 17:49:21 +0200 (CEST) Subject: Re: [FFmpeg-devel] [PATCH 2/3] lavc: add a framework to fix alignment problems. X-BeenThere: ffmpeg-devel@ffmpeg.org X-Mailman-Version: 2.1.20 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" Le primidi 21 floréal, an CCXXV, Michael Niedermayer a écrit : > breaks (green stuff on edges) > ./ffmpeg -i ~/videos/matrixbench_mpeg2.mpg -an -vframes 5 -vf uspp=4:8 -qscale 1 -y file.avi It is a bug in vf_uspp: gives: Stream #0:1 -> #0:0 (mpeg2video (native) -> mpeg4 (native)) encode 720 x 576 with 736 x 592 zsh: segmentation fault ./ffmpeg_g -nostdin -i ~/tmp/samples/matrixbench_mpeg2.mpg -an -vframes 5 -vf vf_uspp is giving a 720×576 frame to a 736×592 encoder. I do not know how to fix that. Regards, diff --git a/libavfilter/vf_uspp.c b/libavfilter/vf_uspp.c index ef493b860f..6e378253a0 100644 --- a/libavfilter/vf_uspp.c +++ b/libavfilter/vf_uspp.c @@ -250,6 +250,9 @@ static void filter(USPPContext *p, uint8_t *dst[3], uint8_t *src[3], p->frame->data[2] = p->src[2] + x1c + y1c * p->frame->linesize[2]; p->frame->format = p->avctx_enc[i]->pix_fmt; + av_log(0, 16, "encode %d x %d with %d x %d\n", + p->frame->width, p->frame->height, + p->avctx_enc[i]->width, p->avctx_enc[i]->height); ret = avcodec_encode_video2(p->avctx_enc[i], &pkt, p->frame, &got_pkt_ptr); if (ret < 0) { av_log(p->avctx_enc[i], AV_LOG_ERROR, "Encoding failed\n");