commit | 0b35c5fd4f5950f7fba61d1eb5a6999392c17554 | [log] [tgz] |
---|---|---|
author | Ted Meyer <tmathmeyer@chromium.org> | Tue Nov 27 22:29:29 2018 |
committer | Commit Bot <commit-bot@chromium.org> | Tue Nov 27 22:29:29 2018 |
tree | 271510ba69e329e191b3fa472094aeaaaba3bd9a | |
parent | 2e4facbd313f901aac4ad0f2d6d2718e78009672 [diff] |
Encode InitializationVectors into VP9 video frames Using a vector of subsamples and a starting initialization vector, start incrementing the IV based on how large each video frame is. These values are used by accelerators to support encrypted playback. Since subsamples and frames can overlap, we have to cover multiple scenarios: frames & subsamples line up: ┌───────────────────┬────────────────────┐ │ frame 1 │ frame 2 │ ┝━━━━━━━━━━━━━━━━━━━┿━━━━━━━━━━━━━━━━━━━━┥ │ clear1 | cipher 1 │ clear 2 | cipher 2 │ └───────────────────┴────────────────────┘ subsample clear covers all first frame and partial second frame: ┌───────────────────┬────────────────────┐ │ frame 1 │ frame 2 │ ┝━━━━━━━━━━━━━━━━━━━┷━━━━━━━━━━━━━━━━━━━━┥ │ clear1 | cipher 1 │ └────────────────────────────────────────┘ one frame has more than one subsample, and subsamples might not align: ┌─────────────────────────┬────────────────────┐ │ frame 1 │ frame 2 │ ┝━━━━━━━━━━━━━━━━━━━┯━━━━━┷━━━━━━━━━━━━━━━━━━━━┥ │ clear1 | cipher 1 │ clear 2 | cipher 2 │ └───────────────────┴──────────────────────────┘ or: ┌────────────────────────────────────────┬────────────────────┐ │ frame 1 │ frame 2 │ ┝━━━━━━━━━━━━━━━━━━━┯━━━━━━━━━━━━━━━━━━━━┿━━━━━━━━━━━━━━━━━━━━┥ │ clear1 | cipher 1 │ clear 2 | cipher 2 │ clear 3 | cipher 3 │ └───────────────────┴────────────────────┴────────────────────┘ or: ┌─────────────────────────────────────────────┬───────────────┐ │ frame 1 │ frame 2 │ ┝━━━━━━━━━━━━━━━━━━━┯━━━━━━━━━━━━━━━━━━━━┯━━━━┷━━━━━━━━━━━━━━━┥ │ clear1 | cipher 1 │ clear 2 | cipher 2 │ clear 3 | cipher 3 │ └───────────────────┴────────────────────┴────────────────────┘ a cipher section crosses a frame boundary: (this is an error and is caught) ┌───────────────────┬────────────────────┐ │ frame 1 │ frame 2 │ ┝━━━━━━━━━━━━━━━━━━━┷━━━━━━━━━━━━━━━━━━━━┥ │ clear1 | cipher 1 │ └────────────────────────────────────────┘ Bug: 881922 Bug: 836557 Change-Id: I7e69be34221702f77ec67daa8647c1767661bb51 Reviewed-on: https://chromium-review.googlesource.com/c/1307059 Reviewed-by: Xiaohan Wang <xhwang@chromium.org> Reviewed-by: Rintaro Kuroiwa <rkuroiwa@chromium.org> Commit-Queue: Ted Meyer <tmathmeyer@chromium.org> Cr-Commit-Position: refs/heads/master@{#611378}
Chromium is an open-source browser project that aims to build a safer, faster, and more stable way for all users to experience the web.
The project's web site is https://www.chromium.org.
Documentation in the source is rooted in docs/README.md.
Learn how to Get Around the Chromium Source Code Directory Structure .