History

avcodec/vvcdec: thread, ensure the parse stage gets the highest priority

The parser stage is not parallelizable. We need to schedule it as soon as possible to create later stages, which are more parallelizable clips | before | after | delta --------------------------------------------|--------|-------|------ RitualDance_1920x1080_60_10_420_37_RA.266 | 342.7 | 365.3 | 6.59% NovosobornayaSquare_1920x1080.bin | 321.7 | 400 | 24.34% Tango2_3840x2160_60_10_420_27_LD.266 | 82.3 | 91.7 | 11.42% RitualDance_1920x1080_60_10_420_32_LD.266 | 323.7 | 319.3 | -1.36% Chimera_8bit_1080P_1000_frames.vvc | 364 | 411.3 | 12.99% BQTerrace_1920x1080_60_10_420_22_RA.vvc | 162.7 | 185.7 | 14.14%

Nuo Mi committed 2 years ago

Commit bdb79fe1 parent 7eb1df41 file · +3 −2Browse files

Unified · Split

libavcodec/vvc/thread.c+3−2
@@ -385,14 +385,15 @@ static int task_priority_higher(const AVTask *_a, const AVTask *_b) · 384 unmodified lines
385385 const VVCTask *a = (const VVCTask*)_a;
386386 const VVCTask *b = (const VVCTask*)_b;
387387
388− CHECK(a->fc->decode_order, b->fc->decode_order); //decode order
389388
390− if (a->stage == VVC_TASK_STAGE_PARSE || b->stage == VVC_TASK_STAGE_PARSE) {
389+ if (a->stage <= VVC_TASK_STAGE_PARSE || b->stage <= VVC_TASK_STAGE_PARSE) {
391390 CHECK(a->stage, b->stage);
391+ CHECK(a->fc->decode_order, b->fc->decode_order); //decode order
392392 CHECK(a->ry, b->ry);
393393 return a->rx < b->rx;
394394 }
395395
396+ CHECK(a->fc->decode_order, b->fc->decode_order); //decode order
396397 CHECK(a->rx + a->ry + a->stage, b->rx + b->ry + b->stage); //zigzag with type
397398 CHECK(a->rx + a->ry, b->rx + b->ry); //zigzag
398399 return a->ry < b->ry;

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t