footage: allow overriding YCbCr range

Fixes #1354
This commit is contained in:
itsmattkc
2022-08-08 12:49:50 -07:00
parent a3d6ecc4fd
commit 1ac205413c
23 changed files with 150 additions and 111 deletions
+7 -9
View File
@@ -93,7 +93,7 @@ bool Decoder::Open(const CodecStream &stream)
}
}
TexturePtr Decoder::RetrieveVideo(Renderer *renderer, const rational &timecode, const RetrieveVideoParams &divider, CancelAtom *cancelled)
TexturePtr Decoder::RetrieveVideo(const RetrieveVideoParams &p)
{
QMutexLocker locker(&mutex_);
@@ -109,16 +109,16 @@ TexturePtr Decoder::RetrieveVideo(Renderer *renderer, const rational &timecode,
return nullptr;
}
if (cancelled && cancelled->IsCancelled()) {
if (p.cancelled && p.cancelled->IsCancelled()) {
return nullptr;
}
if (cached_texture_ && cached_time_ == timecode) {
if (cached_texture_ && cached_time_ == p.time) {
return cached_texture_;
}
cached_texture_ = RetrieveVideoInternal(renderer, timecode, divider, cancelled);
cached_time_ = timecode;
cached_texture_ = RetrieveVideoInternal(p);
cached_time_ = p.time;
return cached_texture_;
}
@@ -280,11 +280,9 @@ int64_t Decoder::GetImageSequenceIndex(const QString &filename)
return number_only.toLongLong();
}
TexturePtr Decoder::RetrieveVideoInternal(Renderer *renderer, const rational &timecode, const RetrieveVideoParams &divider, CancelAtom *cancelled)
TexturePtr Decoder::RetrieveVideoInternal(const RetrieveVideoParams &p)
{
Q_UNUSED(timecode)
Q_UNUSED(divider)
Q_UNUSED(cancelled)
Q_UNUSED(p)
return nullptr;
}