[FFmpeg-devel] [PATCH 3/3] avcodec: Implement mpeg4 nvdec hwaccel

Michael Niedermayer michael at niedermayer.cc
Tue Nov 21 18:00:02 EET 2017


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 <michael at niedermayer.cc> 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",

[...]
-- 
Michael     GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB

"I am not trying to be anyone's saviour, I'm trying to think about the
 future and not be sad" - Elon Musk

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 181 bytes
Desc: Digital signature
URL: <http://ffmpeg.org/pipermail/ffmpeg-devel/attachments/20171121/da8a9c38/attachment.sig>


More information about the ffmpeg-devel mailing list