tor-browser

The Tor Browser
git clone https://git.dasho.dev/tor-browser.git
Log | Files | Refs | README | LICENSE

VideoColorSpace.webidl (1697B)


      1 /* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
      2 /* This Source Code Form is subject to the terms of the Mozilla Public
      3 * License, v. 2.0. If a copy of the MPL was not distributed with this file,
      4 * You can obtain one at http://mozilla.org/MPL/2.0/.
      5 *
      6 * The origin of this IDL file is
      7 * https://w3c.github.io/webcodecs/#videocolorspace
      8 */
      9 
     10 [Exposed=(Window,DedicatedWorker), Func="mozilla::dom::VideoFrame::PrefEnabled"]
     11 interface VideoColorSpace {
     12  [Throws]
     13  constructor(optional VideoColorSpaceInit init = {});
     14 
     15  readonly attribute VideoColorPrimaries? primaries;
     16  readonly attribute VideoTransferCharacteristics? transfer;
     17  readonly attribute VideoMatrixCoefficients? matrix;
     18  readonly attribute boolean? fullRange;
     19 
     20  // https://github.com/w3c/webcodecs/issues/486
     21  [Default] object toJSON();
     22 };
     23 
     24 dictionary VideoColorSpaceInit {
     25  VideoColorPrimaries? primaries = null;
     26  VideoTransferCharacteristics? transfer = null;
     27  VideoMatrixCoefficients? matrix = null;
     28  boolean? fullRange = null;
     29 };
     30 
     31 enum VideoColorPrimaries {
     32  "bt709",      // BT.709, sRGB
     33  "bt470bg",    // BT.601 PAL
     34  "smpte170m",  // BT.601 NTSC
     35  "bt2020",     // BT.2020, BT.2100
     36  "smpte432",   // P3 D65
     37 };
     38 
     39 enum VideoTransferCharacteristics {
     40  "bt709",         // BT.709
     41  "smpte170m",     // BT.601 (functionally the same as bt709)
     42  "iec61966-2-1",  // sRGB
     43  "linear",        // linear RGB
     44  "pq",            // BT.2100 PQ
     45  "hlg",           // BT.2100 HLG
     46 };
     47 
     48 enum VideoMatrixCoefficients {
     49  "rgb",        // sRGB
     50  "bt709",      // BT.709
     51  "bt470bg",    // BT.601 PAL
     52  "smpte170m",  // BT.601 NTSC (functionally the same as bt470bg)
     53  "bt2020-ncl", // BT.2020 NCL
     54 };