Bug 1536783 - Use two tile threads in dav1d decoder for performance improvement. r=TD-Linux

Differential Revision: https://phabricator.services.mozilla.com/D24331

--HG--
extra : moz-landing-system : lando
This commit is contained in:
Alex Chronopoulos 2019-03-21 20:37:46 +00:00
Родитель 30586d8fe5
Коммит cbb81ed136
2 изменённых файлов: 6 добавлений и 1 удалений

Просмотреть файл

@ -31,6 +31,11 @@ RefPtr<MediaDataDecoder::InitPromise> DAV1DDecoder::Init() {
}
settings.n_frame_threads =
static_cast<int>(std::min(decoder_threads, GetNumberOfProcessors()));
// There is not much improvement with more than 2 tile threads at least with
// the content being currently served. The ideal number of tile thread would
// much the tile count of the content. Maybe dav1d can help to do that in the
// future.
settings.n_tile_threads = 2;
int res = dav1d_open(&mContext, &settings);
if (res < 0) {

Просмотреть файл

@ -38,7 +38,7 @@ class DAV1DDecoder : public MediaDataDecoder,
int GetPicture(DecodedData& aData, MediaResult& aResult);
already_AddRefed<VideoData> ConstructImage(const Dav1dPicture& aPicture);
Dav1dContext* mContext;
Dav1dContext* mContext = nullptr;
const VideoInfo& mInfo;
const RefPtr<TaskQueue> mTaskQueue;