Lines 36-48
RefPtr<MediaDataDecoder::InitPromise> DAV1DDecoder::Init() {
Link Here
|
36 |
} else if (mInfo.mDisplay.width >= 1024) { |
36 |
} else if (mInfo.mDisplay.width >= 1024) { |
37 |
decoder_threads = 4; |
37 |
decoder_threads = 4; |
38 |
} |
38 |
} |
39 |
settings.n_frame_threads = |
39 |
settings.n_threads = |
40 |
static_cast<int>(std::min(decoder_threads, GetNumberOfProcessors())); |
40 |
static_cast<int>(std::min(decoder_threads, GetNumberOfProcessors())); |
41 |
// There is not much improvement with more than 2 tile threads at least with |
|
|
42 |
// the content being currently served. The ideal number of tile thread would |
43 |
// much the tile count of the content. Maybe dav1d can help to do that in the |
44 |
// future. |
45 |
settings.n_tile_threads = 2; |
46 |
|
41 |
|
47 |
int res = dav1d_open(&mContext, &settings); |
42 |
int res = dav1d_open(&mContext, &settings); |
48 |
if (res < 0) { |
43 |
if (res < 0) { |