Don't allow copyback rendering on RPi by default
This commit is contained in:
parent
67c801c4e7
commit
72065412a3
1 changed files with 14 additions and 0 deletions
|
|
@ -538,6 +538,20 @@ bool SdlRenderer::testRenderFrame(AVFrame* frame)
|
||||||
// back to render it. Test that this can be done
|
// back to render it. Test that this can be done
|
||||||
// for the given frame successfully.
|
// for the given frame successfully.
|
||||||
if (frame->hw_frames_ctx != nullptr) {
|
if (frame->hw_frames_ctx != nullptr) {
|
||||||
|
#ifdef HAVE_MMAL
|
||||||
|
// FFmpeg for Raspberry Pi has NEON-optimized routines that allow
|
||||||
|
// us to use av_hwframe_transfer_data() to convert from SAND frames
|
||||||
|
// to standard fully-planar YUV. Unfortunately, the combination of
|
||||||
|
// doing this conversion on the CPU and the slow GL texture upload
|
||||||
|
// performance on the Pi make the performance of this approach
|
||||||
|
// unacceptable. Don't use this copyback path on the Pi by default
|
||||||
|
// to ensure we fall back to H.264 (with the MMAL renderer) in X11
|
||||||
|
// rather than using HEVC+copyback and getting terrible performance.
|
||||||
|
if (qgetenv("RPI_ALLOW_COPYBACK_RENDER") != "1") {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
if (!initializeReadBackFormat(frame->hw_frames_ctx, frame)) {
|
if (!initializeReadBackFormat(frame->hw_frames_ctx, frame)) {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue