From bcb2d714c0a9c2668739e5fc40419012ba074af3 Mon Sep 17 00:00:00 2001 From: scrawl Date: Tue, 21 Oct 2014 23:46:04 +0200 Subject: [PATCH] Add TODO comments for future videoplayer enhancements --- apps/openmw/mwrender/videoplayer.cpp | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/apps/openmw/mwrender/videoplayer.cpp b/apps/openmw/mwrender/videoplayer.cpp index 01058731d..16de1bd30 100644 --- a/apps/openmw/mwrender/videoplayer.cpp +++ b/apps/openmw/mwrender/videoplayer.cpp @@ -690,6 +690,9 @@ void VideoState::video_refresh() const float threshold = 0.03; if (this->pictq[pictq_rindex].pts > this->get_master_clock() + threshold) return; // not ready yet to show this picture + + // TODO: the conversion to RGBA is done in the decoding thread, so if a picture is skipped here, then it was + // unnecessarily converted. But we may want to replace the conversion by a pixel shader anyway (see comment in queue_picture) int i=0; for (; ipictq_size-1; ++i) { @@ -733,6 +736,8 @@ int VideoState::queue_picture(AVFrame *pFrame, double pts) vp = &this->pictq[this->pictq_windex]; // Convert the image into RGBA format for Ogre + // TODO: we could do this in a pixel shader instead, if the source format + // matches a commonly used format (ie YUV420P) if(this->sws_context == NULL) { int w = (*this->video_st)->codec->width;