Twada wrote: ↑Sat Sep 21, 2024 8:32 am
Ian Robinson wrote: ↑Thu Sep 19, 2024 6:06 pm
PL_MPEG640x480
Optimized middleware for KallistiOS for intro logos you can auto load your main program The recommended resolutions are: 640x480 up to 800kb/sec 112kb/sec audio This is not for movies but for logos and branding for indie games. Thanks to ross for helping me with the math to get 640x480 to work!
WARNING not for long videos for short logo's company names at HQ
loading from /rd/ is fast and smooth loading from /cd/ is very slow might be fine for GDEMU
example HQ branding short videos
https://streamable.com/kd9hcd
reading from a romdisk /rd/
https://github.com/ianmicheal/PL_MPEG640x480
Reading from a cdr /cd/
https://streamable.com/3fb3y9
Ok for movies this is not the version i was asked for HQ version that could show company logo or intros that's what this version is for only..
New kos and gcc13 up port..
The 640x480 video is beautiful!
The sound was set to mono due to processing speed, but if we could play videos at a high resolution like 640x480, we might be able to implement stereo sound.
The recent updates to KOS have been remarkable!
I have found out that DMA transfer lets it run fullspeed all the time but there is a problem on hardware doing this but not on dc emulators
Here is it running with DMA transfer on flycast
https://streamable.com/wu0c4z Total constant 29fps
Now on hardware it is also 29fps but with this glitch it's not all the time.
i wrote a debug function to check yuv conversion when it does this
it flips to YUV Averages: Y=80.01, U=80.58, V=49.81 that's the glitch
Hardware glitch
https://streamable.com/u8g3up see the glitch here
And when it plays normal the SQ YUV YUV Averages: Y=45.88, U=45.86, V=45.87 ..
I'm on gcc13 and new kos now.. On the repo i have
https://github.com/ianmicheal/MPEG1-Dec ... perimental where you can view all the versions..
Also have this version with updates not using DMA transfer
Key Features:
2MB streaming buffer for smooth playback
YUV422 texture format for video rendering
Audio streaming support
FPS counting and display
Buffer management with refill tracking
Main Functions:
a. initialize_stream_buffer(): Sets up the 2MB buffer for streaming
b. cleanup_stream_buffer(): Frees allocated buffer memory
c. display_draw(): Renders the video frame using PVR
d. app_on_video(): Processes each video frame
e. sound_callback(): Handles audio streaming
f. Mpeg1Play(): Main playback function
Key Optimizations:
Direct rendering for improved performance
Minimum buffer fill level before playback starts
Optimized buffer refill process
YUV data verification for debugging
Debug Information:
FPS counter
Buffer refill count
Remaining buffer size
YUV data averages (commented out)
Implemented DEBUG_PRINT macro for correct file and line number formatting
Modified format specifiers in Mpeg1Play for uint32_t variables
https://github.com/ianmicheal/MPEG1-Dec ... al/mpeg1.c