This dev version allocate up to 16 raw image buffers, still no mode changes.
Wow! I can play 400x240@24 XviD + AAC at full speed now in fake O3DS XL mode! This is a massive improvement. The average FPS is ~40 in full screen mode. If I look at the graph during playback, the stuttering comes back as expected, since O3DS doesn't have enough CPU power to decode the video and draw the graph at the same time.
Your buffer is 16 frames using O3DS 64MiB of RAM? That's pretty impressive. How much memory is the video player using now? Is this the biggest buffer you can make without using extended memory mode?
It seems hw decoder does process B-frames, but packet order that returned by ffmpeg is not correct for Nintendo's hw decoder???
I've been thinking about this. We do know that MVD_Services supports B-frames, because the video is decoded correctly. If B-frames were not supported, the picture should be completely corrupted or black until the next I-frame, because you can't skip B-frames and still be able to decode P-frames. Maybe B-frames are making MVD_Services detect the wrong FPS?
AFAIK H.264 frames are not stored in display order; they're stored out of order in a way that makes compression more efficient. If ffmpeg is putting the frames in playback order, maybe you need to send the frames in the original order to MVD_Services, and it will put them in the correct order for you? I don't know...
This build has some serious bugs, though. First, I found a new crashing problem in fake O3DS mode. Here are the steps to reproduce it:
- Press Y to open the debug menu and select the tab with the FPS graph.
- Press X to open the file menu and play a video. The player enters full screen mode automatically.
- Play 10+ seconds of video, then press A to pause.
- Press Select to exit full screen.
- Press B to close the video.
- Press X to open the file menu and pick a different video.
- The new video will not play when you select it.
- Press B to "stop" the phantom video that is not playing.
- Tap the down arrow twice to reach the "Press A to close the program, press B to go back" menu.
- Press A to close the program, but it won't close. Wait 5-10 seconds, and the 3DS will crash.
I tried both H.264 + AAC in MKV and XviD +AAC in MKV, and the crash is exactly the same. I can't run many O3DS tests with this version, because I can only play 1 video before I have to reboot the 3DS.
MVD_Services is also completely broken when I switch back to N3DS mode. I tried playing the same 848x480@24 H.264 video I played in the last development version, and... yikes! A person will be on the left side of the screen, and suddenly she will warp to the right side of the screen for 2 frames, and then she will warp back to the left! The screen also "throbs" in and out: it looks like the video is zooming in (everything gets bigger) and then the video zooms out again all by itself over and over!
HOWEVER! Even though the video playback is totally broken.. it looks like the B-frame stutter is gone! XD Whatever the problem is with this release, it looks like it's related to MVD_Services and B-frame support.
*edit*
I think the zooming effect is caused by frames being displayed out of order. The video has a camera zooming in, so when the frames are shown out of order, it looks like the camera is zooming in and out repeatedly.
Another scene cuts from the sky to a grassy field, so with the current MVD_Services bug, I see sky sky sky grass grass sky grass grass sky sky sky grass grass as the video player displays the frames out of order.