Support parallel decoding in DecryptingVideoDecoder |
|||
Issue description
Currently DecryptingVideoDecoder only supports one outstanding decode call, so the throughput of video decoding is heavily bounded by the IPC overhead:
Serial decoding:
|out|decoding|in||out|decoding|in||out|decoding|in|
Parallel decoding:
|out|decoding|in|
|out|decoding|in|
|out|decoding|in|
We should try to enable parallel decoding on DecryptingVideoDecoder. This should help decrease preroll/seek performance, and help improve the ability to combat intermittent long IPC delays.
,
May 18 2017
I just measured the IPC overhead of decrypt-and-decode-video calls. On my Macbook Pro, the IPC latency is about 10% of overall decoding time. So if we implement parallel decoding, we can get about 10% improvement in start-to-play time. When the main thread is busier, the IPC overhead will increase and parallel decoding becomes more important, but if we switch to mojo CDM and remove the main thread contention, this won't be a problem. So overall, this is still something to do, but we should really switch to mojo CDM first. Also, with our no-key-then-retry logic, supporting parallel decoding becomes tricky. For example, after the CDM returns kNoKey, and received another decode-and-decrypt call, it doesn't know whether this is a retry, or the next decode-and-decrypt call. If the latter, the CDM adapter should not call the CDM, otherwise, if the CDM actually has the key for that buffer, we'll skip a buffer (where we trigger no-key), and could cause decoder error. To fix this, we should probably move the no-key-then-retry logic to CdmAdapter, instead of handling it in DecryptingVideoDecoder. This will also be easier after we switch to mojo CDM, where we only have one CdmAdapter to work with.
,
Oct 10 2017
This is lower priority and probably not worth the effort. Close this now. We can reopen if it proves to be higher priority.
,
Oct 18
FWIW, for decrypt-only, since decryption is typically faster, the IPC delay would be more of a problem in the overall throughput, so it might make sense to do parallel decryption for that case. |
|||
►
Sign in to add a comment |
|||
Comment 1 by bugdroid1@chromium.org
, May 17 2017