player: NV12 zero-copy SDL upload path for Rockchip MPP hardware decode
- _Frame: add pixel_format ('BGRA'|'NV12'), uv_pixels, uv_pitch fields
- _create_appsink: accept NV12 caps when R36S_HW_DECODE=1 (NV12;BGRA fallback)
- render(): choose SDL_PIXELFORMAT_NV12 texture + SDL_UpdateNVTexture for NV12
frames, avoiding any software colourspace conversion on the CPU
- _on_new_sample: detect format via VideoInfo.finfo.name, extract Y+UV planes
separately from NV12 GStreamer buffers
- _destroy_texture: reset _texture_format to 'BGRA'
- deploy/arkos/MatHacks.sh: set R36S_HW_DECODE=1 to activate the path
- tests/test_player.py: add finfo mock, pixel_format to SimpleNamespace frame
This commit is contained in:
@@ -16,6 +16,12 @@ export LD_LIBRARY_PATH="$ENV_ROOT/lib${LD_LIBRARY_PATH:+:$LD_LIBRARY_PATH}"
|
||||
export GST_PLUGIN_PATH="/usr/lib/aarch64-linux-gnu/gstreamer-1.0"
|
||||
export LD_PRELOAD="/usr/lib/aarch64-linux-gnu/libgomp.so.1"
|
||||
|
||||
# Enable Rockchip MPP hardware video decode (mppvideodec).
|
||||
# NV12 frames are uploaded directly via SDL_UpdateNVTexture — no software
|
||||
# colourspace conversion. Requires librockchip_mpp.so + libgstrockchipmpp.so
|
||||
# installed by deploy/arkos/setup_hw_decode.sh.
|
||||
export R36S_HW_DECODE="1"
|
||||
|
||||
if [ -f "/storage/.config/SDL-GameControllerDB/gamecontrollerdb.txt" ]; then
|
||||
export SDL_GAMECONTROLLERCONFIG_FILE="/storage/.config/SDL-GameControllerDB/gamecontrollerdb.txt"
|
||||
elif [ -f "/opt/inttools/gamecontrollerdb.txt" ]; then
|
||||
|
||||
Reference in New Issue
Block a user