Re: Questions / Bug fixes / Patches
Michael Militzer <[email protected]> Thu, 19 Aug 2010 09:37:45 +0200
| Newsgroups | gmane.comp.video.xvid.devel |
|---|---|
| Message-ID | <[email protected]> |
Hi Carl, > F:\movies\outputs>..\tools\mp4box\MP4Box -fps 29.970 -nodrop -packed > -new -add .\sherlock_intro_qvga_Xvid_L6.m4v why are you using "-packed" with MP4Box? Are you sure your input file is a packed bitstream? I suppose the "-packed" option might be the reason why the N_VOPs get stripped and the stream is converted to variable framerate. Could you try without "-packed"? > Information on the assertion error (I was encoding from virtualdub 1.9.9): > mbcoding.c : line 595: > estimated_length == coded_length This assert is nothing to worry about. In fact, it got already removed in the latest dev version of xvid. Best regards, Michael Quoting Carl Eric Codere <[email protected]>: > Greetings, > Here are the patches for inclusion in xvidcore. Regarding > the fix on the frame_drop_ratio equal to zero, you are correct in > stating that the change suggested fixes the problem with mp4box, now > the streams are at constant frame rate and the same number of > frames in the mp4 stream exist. > > Just for your information, with the unpatched behavior I was having > the following issue in > mp4box: > > F:\movies\outputs>..\tools\mp4box\MP4Box -fps 29.970 -nodrop -packed > -new -add .\sherlock_intro_qvga_Xvid_L6.m4v > .\sherlock_intro_qvga_Xvid_L6_256_Xvid.mp4 > MPEG-4 Video import - 320 x 240 @ 29.9700 FPS > Indicated Profile: ISO Reserved Profile > Import results: 1224 VOPs (6 Is - 1218 Ps) > Removed 28 N-VOPs > Converting to ISMA Audio-Video MP4 file... > Saving .\sherlock_intro_qvga_Xvid_L6_256_Xvid.mp4: 0.500 secs Interleaving > > As you see, the 28 N-VOPs were being removed, resulting in a > variable frame rate mp4 stream. I am not familiar enough with the > MPEG-4 stream to know why this happened. At least the patch fixes > the problem. > > On the other hand, the other patches for support of vfw config.c > sp@l4a, sp@l5 and sp@l6 seem to work on the standard dll compiled > using the generic build, I tested them summarily, BUT with the > debug version of xvidcore.dll compiled with Visual Studio 9.0 > Express, when trying to encode at sp@L6, I get no problem, but at > sp@L4a at max bitrate of 4000 kbps, I get an assertion error, is > that normal? > > Information on the assertion error (I was encoding from virtualdub 1.9.9): > mbcoding.c : line 595: > estimated_length == coded_length > > If you need the test video (It is 135 Mbytes in size) let me know. > > Patches: > > Frame drop ratio fix: > > diff U3ib C:/MinGW/home/Carl/xvidcore/src/encoder.original > C:/MinGW/home/Carl/xvidcore/src/encoder.c > --- C:/MinGW/home/Carl/xvidcore/src/encoder.original Thu Feb 08 09:10:24 2007 > +++ C:/MinGW/home/Carl/xvidcore/src/encoder.c Wed Aug 18 21:18:45 2010 > @@ -1884,7 +1884,7 @@ > #if 0 > DPRINTF(XVID_DEBUG_DEBUG, "kmu %i %i %i\n", current->sStat.kblks, > current->sStat.mblks, current->sStat.ublks); > #endif > - if (current->sStat.kblks + current->sStat.mblks <= > + if (current->sStat.kblks + current->sStat.mblks < > (pParam->frame_drop_ratio * mb_width * mb_height) / 100 && > ( (pEnc->bframenum_head >= pEnc->bframenum_tail) || > !(pEnc->mbParam.global_flags & XVID_GLOBAL_CLOSED_GOP)) ) > { > > Additional Simple Profile Levels: > > diff U3ib C:/MinGW/home/Carl/xvidcore/vfw/src/config.c > C:/MinGW/home/Carl/xvidcore/vfw/src/config.original > --- C:/MinGW/home/Carl/xvidcore/vfw/src/config.c Wed Aug 18 21:53:29 2010 > +++ C:/MinGW/home/Carl/xvidcore/vfw/src/config.original Sun Nov 30 > 13:57:14 2008 > @@ -122,11 +122,6 @@ > { "Simple @ L1", 0x01, 176, 144, 15, 4, 198, 99, > 1485, 100, 10*16368, 2048, 64000, 0, -1, > PROFILE_S|PROFILE_ADAPTQUANT }, > { "Simple @ L2", 0x02, 352, 288, 15, 4, 792, 396, > 5940, 100, 40*16368, 4096, 128000, 0, -1, > PROFILE_S|PROFILE_ADAPTQUANT }, > { "Simple @ L3", 0x03, 352, 288, 15, 4, 792, 396, > 11880, 100, 40*16368, 8192, 384000, 0, -1, > PROFILE_S|PROFILE_ADAPTQUANT }, > - /* From ISO/IEC 14496-2:2004/FPDAM 2: New Levels for Simple Profile */ > - { "Simple @ L4a", 0x04, 640, 480, 30, 4, 2400, 1200, > 36000, 100, 80*16368, 16384, 4000000, 0, -1, > PROFILE_S|PROFILE_ADAPTQUANT }, > - { "Simple @ L5", 0x05, 720, 576, 30, 4, 3240, 1620, > 40500, 100, 112*16368, 16384, 8000000, 0, -1, > PROFILE_S|PROFILE_ADAPTQUANT }, > - /* From ISO/IEC 14496-2:2004/FPDAM 4: Simple profile level 6 */ > - { "Simple @ L6", 0x06, 1280, 720, 30, 4, 7200, 3600, > 108000, 100, 248*16368, 16384,12000000, 0, -1, > PROFILE_S|PROFILE_ADAPTQUANT }, > > #if 0 /* since rrv encoding is no longer support, these profiles > have little use */ > { "ARTS @ L1", 0x91, 176, 144, 15, 4, 198, 99, > 1485, 100, 10*16368, 8192, 64000, 0, -1, PROFILE_ARTS }, > > > Sorry if the text is wrapped, my mailer is kind of limited, if it > causes problems, let me know and will upload them somewhere else! > > Best regards, > Carl > _______________________________________________ > Xvid-devel mailing list > [email protected] > http://list.xvid.org/mailman/listinfo/xvid-devel > >