From patchwork Tue Nov 21 16:00:02 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Michael Niedermayer X-Patchwork-Id: 6247 Delivered-To: ffmpegpatchwork@gmail.com Received: by 10.2.161.94 with SMTP id m30csp5436723jah; Tue, 21 Nov 2017 08:00:15 -0800 (PST) X-Google-Smtp-Source: AGs4zMZxDJ6KVpDrbdq0yK8ixyKVT+cdlxFYLW8TZA4PAC9djbnJkzkOmO/TwwDAvP4mRKIDRO66 X-Received: by 10.28.148.206 with SMTP id w197mr1633869wmd.91.1511280015502; Tue, 21 Nov 2017 08:00:15 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1511280015; cv=none; d=google.com; s=arc-20160816; b=B10QHQsO3NzRzbe+/z8SpC9WlS5dtg0oOI9/DpSDG0LdD/KMcFRC7gkfqMS9q7ojWe +p7i56wev4Inx4vV0OykkuSPwN8ERq+n7/zXj8+dKYecQoILnfocoQf2aUy7Tti4xktL jSkWR+bUzUe4ryRPvT3Ubs35Pj/2mK+4e6MhawFkDMgAWDXM8GbDzQT9sAr0c5+b6wYC /13EJAxGLWjFgF2As+GBA5hHTtK+7gaEtWkXk+/Vx1ykkarlqG8U1JI9JN6x3cviSUrt 2gnH7ti57Nppli4Ikk+vBuJtax4+zzB3QUD4XCJo+vCCVSs3AV+DGrEU3uEumyEKHMwL VNlQ== 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=SmNXRnGb2qX1ZtDC/IMO075pexk6HQ/LGWpjU+SSKBE=; b=CuYfkOsxy2pV6vK16ymUQ4Qh+dh/NxG7+KfKm/4yuDH8D+xOqeO9EkJvTTXxf+Q/lq pz1kj2Aw71C5GiDeEyvoC0x5WoIPeJytMMg/QhELOhZcAMRBFcX+4K67nZkJyjmrDj5J WnyJq/ayxHZXlPos1yp2cT0dbep6qHsQE3nE4vXA5NYKC57W4Q/TbhpajQ0GyWTiwgrq p3Pqb0aQZI5HA0F5QqkKlFxVfHUZuzakzOtP/GaULD/g7wJ8xD7/wnypjLW9AEgoc2Xo TICYZqaTSpYdCPD0B33PW/K2XcrQ4PNOFGa4dlOosId44Al2dI0lPXt8xpSuAx52slX/ UNjw== 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 d16si9213113wrb.312.2017.11.21.08.00.15; Tue, 21 Nov 2017 08:00:15 -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; 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 1B0F168A060; Tue, 21 Nov 2017 18:00:14 +0200 (EET) X-Original-To: ffmpeg-devel@ffmpeg.org Delivered-To: ffmpeg-devel@ffmpeg.org Received: from relay2-d.mail.gandi.net (relay2-d.mail.gandi.net [217.70.183.194]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id 366F868075B for ; Tue, 21 Nov 2017 18:00:08 +0200 (EET) X-Originating-IP: 213.47.41.20 Received: from localhost (213-47-41-20.cable.dynamic.surfer.at [213.47.41.20]) (Authenticated sender: michael@niedermayer.cc) by relay2-d.mail.gandi.net (Postfix) with ESMTPSA id 2AE10C5A5A for ; Tue, 21 Nov 2017 17:00:05 +0100 (CET) Date: Tue, 21 Nov 2017 17:00:02 +0100 From: Michael Niedermayer To: FFmpeg development discussions and patches Message-ID: <20171121160002.GC4645@nb4> References: <20171119195228.25719-1-philipl@overt.org> <20171119195228.25719-4-philipl@overt.org> <20171120215300.GU4645@nb4> <20171120201036.6f5c0d7e@fido6> MIME-Version: 1.0 In-Reply-To: <20171120201036.6f5c0d7e@fido6> User-Agent: Mutt/1.5.21 (2010-09-15) Subject: Re: [FFmpeg-devel] [PATCH 3/3] avcodec: Implement mpeg4 nvdec hwaccel 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" On Mon, Nov 20, 2017 at 08:10:36PM -0800, Philip Langdale wrote: > -----BEGIN PGP SIGNED MESSAGE----- > Hash: SHA1 > > On Mon, 20 Nov 2017 22:53:00 +0100 > Michael Niedermayer wrote: > > > On Sun, Nov 19, 2017 at 11:52:28AM -0800, Philip Langdale wrote: > > > This was predictably nightmarish, given how ridiculous mpeg4 is. > > > I had to stare at the cuvid parser output for a long time to work > > > out what each field was supposed to be, and even then, I still don't > > > fully understand some of them, particularly: > > > > > > vop_coded: I think this means whether the vop has a picture shape, > > > and therefore a picture type. I have no samples where > > > this is not the case. > > > divx_flags: There's obviously no documentation on what the possible > > > flags are. I simply observed that this is '0' for a > > > normal bitstream and '5' for packed b-frames. > > > > > gmc_enabled: This seems to map to mc_sel being non-zero, but I also > > > have no samples where that is true. > > > > issues/388/Matrix.Reloaded.Trailer-640x346-XviD-1.0beta2-HE_AAC_subtitled.mkv > > seems to use gmc, didnt check how compex or trivial its use is > > > > [...] > > I think it's as complex as you can get, and the nvidia decoder cannot > handle it properly. With vdpau, cuvid and now nvdec, there are a lot of > visual glitches. Interestingly, the resutls with nvdec are better than > cuvid, so not using the nvidia parser somehow makes things less worse. > > I'd love to try a single warp point sample but can't find or generate > one. Heres one with 2 wrap points: ~/tickets/1180/GoneNutty.avi you can find a 1 point gmc with, iam sure we had such samples but it seems i couldnt quickly find one [...] diff --git a/libavcodec/mpeg4videodec.c b/libavcodec/mpeg4videodec.c index 69f455e226..e0c904707e 100644 --- a/libavcodec/mpeg4videodec.c +++ b/libavcodec/mpeg4videodec.c @@ -1883,6 +1883,10 @@ static int decode_vol_header(Mpeg4DecContext *ctx, GetBitContext *gb) check_marker(s->avctx, gb, "after sprite_top"); } ctx->num_sprite_warping_points = get_bits(gb, 6); + if (ctx->num_sprite_warping_points!=3 && ctx->num_sprite_warping_points!=2 && ctx->num_sprite_warping_points){ + av_log(0,0, "XXX %d\n", ctx->num_sprite_warping_points); + abort(); + } if (ctx->num_sprite_warping_points > 3) { av_log(s->avctx, AV_LOG_ERROR, "%d sprite_warping_points\n",