ffmpeg / mt-work / todo.txt @ d375c104
History | View | Annotate | Download (3.07 KB)
1 |
Todo |
---|---|
2 |
|
3 |
-- For other people |
4 |
- Multithread vp8 or vc1. |
5 |
- Multithread an intra codec like mjpeg. |
6 |
- Fix mpeg1 (see below). |
7 |
- Try the first three items under Optimization. |
8 |
- Fix h264 (see below). |
9 |
- Try mpeg4 (see below). |
10 |
|
11 |
-- Bug fixes |
12 |
|
13 |
General critical: |
14 |
- Error resilience has to run before ff_report_frame_progress() |
15 |
is called. Otherwise there will be race conditions. (This might already |
16 |
work.) In general testing error paths should be done more. |
17 |
|
18 |
h264: |
19 |
- Files split at the wrong NAL unit don't (and can't) |
20 |
be decoded with threads (e.g. TS split so PPS is after |
21 |
the frame, PAFF with two fields in a packet). Scan the |
22 |
packet at the start of decode and don't finish setup |
23 |
until all PPS/SPS have been encountered. |
24 |
|
25 |
mpeg4: |
26 |
- Packed B-frames need to be explicitly split up |
27 |
when frame threading is on. It's not very fast |
28 |
without this. |
29 |
- The buffer age optimization is disabled due to |
30 |
the way buffers are allocated across threads. The |
31 |
branch 'fix_buffer_age' has an attempt to fix it |
32 |
which breaks ffplay. |
33 |
- Support interlaced. |
34 |
|
35 |
mpeg1/2: |
36 |
- Seeking always prints "first frame not a keyframe" |
37 |
with threads on. Currently disabled for this reason. |
38 |
|
39 |
-- Prove correct |
40 |
|
41 |
- decode_update_progress() in h264.c |
42 |
h264_race_checking branch has some work on h264, |
43 |
but not that function. It might be worth putting |
44 |
the branch under #ifdef DEBUG in mainline, but |
45 |
the code would have to be cleaner. |
46 |
- MPV_lowest_referenced_row() and co in mpegvideo.c |
47 |
- Same in vp3. |
48 |
|
49 |
-- Optimization |
50 |
|
51 |
- EMU_EDGE is always set for h264 PAFF+MT |
52 |
because draw_edges() writes into the other field's |
53 |
thread's pixels. |
54 |
- Check update_thread_context() functions and make |
55 |
sure they only copy what they need to. |
56 |
- Try some more optimization of the "ref < 48; ref++" |
57 |
loop in h264.c await_references(), try turning the list0/list1 check |
58 |
above into a loop without being slower. |
59 |
- Support frame+slice threading at the same time |
60 |
by assigning slice_count threads for frame threads |
61 |
to use with execute(). This is simpler but unbalanced |
62 |
if only one frame thread uses any. |
63 |
|
64 |
-- Features |
65 |
|
66 |
- Support streams with width/height changing. This |
67 |
requires flushing all current frames (and buffering |
68 |
the input in the meantime), closing the codec and |
69 |
reopening it. Or don't support it. |
70 |
- Support encoding. Might need more threading primitives |
71 |
for good ratecontrol; would be nice for audio and libavfilter too. |
72 |
- Async decoding part 1: instead of trying to |
73 |
start every thread at the beginning, return a picture |
74 |
if the earliest thread is already done, but don't wait |
75 |
for it. Not sure what effect this would have. |
76 |
- Part 2: have an API that doesn't wait for the decoding |
77 |
thread, only returns EAGAIN if it's not ready. What will |
78 |
it do with the next input packet if it returns that? |
79 |
- Have an API that returns finished pictures but doesn't |
80 |
require sending new ones. Maybe allow NULL avpkt when |
81 |
not at the end of the stream. |
82 |
|
83 |
-- Samples |
84 |
|
85 |
http://astrange.ithinksw.net/ffmpeg/mt-samples/ |
86 |
|
87 |
See yuvcmp.c in this directory to compare decoded samples. |
88 |
|
89 |
For debugging, try commenting out ff_thread_finish_setup calls so |
90 |
that only one thread runs at once, and then binary search+ |
91 |
scatter printfs to look for differences in codec contexts. |