Skip to content

Commit

Permalink
Update implementation details and comparison with Firefox
Browse files Browse the repository at this point in the history
  • Loading branch information
StaZhu committed Dec 22, 2023
1 parent dda1784 commit 8b4f64a
Show file tree
Hide file tree
Showing 2 changed files with 36 additions and 18 deletions.
27 changes: 18 additions & 9 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -89,20 +89,23 @@ Apple M1, M1 Pro, M1 Max, M1 Ultra and above

[NVIDIA](https://bluesky-soft.com/en/dxvac/deviceInfo/decoder/nvidia.html)

## HDR Supports? (Compared with Edge / Safari)
## HDR Supports? (Compared with Edge / Safari / Firefox)

| | PQ | HDR10 | HDR10+ | HLG | DV P5 | DV P8.1 | DV P8.4 |
| :-------------- | :------- | :------- | :------- | :------- |:-------- |:--------- |:----------- |
| Chrome 117 Mac ||||||||
| Chrome 117 Win ||||||||
| Edge 117 Mac ||||||||
| Edge 117 Win ||||||||
| Safari 17.0 Mac ||||||||
| Chrome Mac ||||||||
| Chrome Win ||||||||
| Edge Mac ||||||||
| Edge Win ||||||||
| Safari Mac ||||||||
| Firefox Win<sup>[1]</sup>||||||||

On Windows platform, Chrome supports PQ, HDR10 (PQ with static metadata), and HLG. Automatic Tone-mapping will be enabled based on static metadata (if present). HDR10+ SEI dynamic metadata wil be ignored while decoding and playback will downgrade to HDR10.

On macOS platform, Chrome supports PQ, HDR10 (PQ with static metadata), HLG. In SDR / HDR / Hybrid mode, the macOS system will automatically perform EDR to ensure that HDR is displayed correctly. Chrome / Edge shared the same code thus has the same decoding ability, Safari also supports the above all HDR formats.

*Note 1: Firefox >= 120 just added HEVC decoding support (Windows platform only, experimental, need to manually set `media.wmf.hevc.enabled=1` to enable the feature). Based on my testing, Firefox supports HEVC Main profile while doesn't support Main10 profile (HDR contents usually encoded with Main10 profile) yet, if the bug got fixed, I will re-test and update the table later.*

#### Dolby Vision Supports Status

There are two type of support type here:
Expand Down Expand Up @@ -315,17 +318,21 @@ try {
}
```

## What's the tech diff? (Compared with Edge / Safari)
## What's the tech diff? (Compared with Edge / Safari / Firefox)

#### Windows

Edge uses `MediaFoundationRenderer` to call `MediaFoundation` (need to install `HEVC Video Extension`) to finish the HEVC HW decoding which is the same tech behind `Movies and TV` builtin system app.

Chromium uses `D3D11VideoDecoder` to call `D3D11VA` (no need to install anything) to finish the HEVC HW decoding which is the same tech behind video players like `VLC`.
Firefox (>= 120, experimental, need to manually set `media.wmf.hevc.enabled=1` to enable the feature) uses DXVA MFT (need to install `HEVC Video Extension`) to finish the HEVC HW decoding which is the same tech behind `Movies and TV` builtin system app.

Chrome uses `D3D11VideoDecoder` to call `D3D11VA` (no need to install anything) to finish the HEVC HW decoding which is the same tech behind video players like `VLC`.

#### macOS

Safari and Chromium use the same `VideoToolbox` to finish the HEVC HW decoding.
Edge and Chrome use the same decoding implementations on macOS.

Safari and Chrome use the same `VideoToolbox` to finish the HEVC HW decoding.

## How to verify HEVC hardware support is enabled?

Expand Down Expand Up @@ -370,6 +377,8 @@ If Electron >= v22.0.0, the HEVC HW decoding feature for macOS, Windows, and Lin

## Change Log

`2023-12-22` Update implementation details and comparison with Firefox

`2023-12-08` Improved Dolby Vision playback capabilities (Chrome >= `122.0.6168.0`)

`2023-11-16` Support MV-HEVC Base Layer playback (Chrome >= `121.0.6131.0`)
Expand Down
27 changes: 18 additions & 9 deletions README.zh_CN.md
Original file line number Diff line number Diff line change
Expand Up @@ -89,20 +89,23 @@ Apple M1, M1 Pro, M1 Max, M1 Ultra 及以上

[NVIDIA](https://bluesky-soft.com/en/dxvac/deviceInfo/decoder/nvidia.html)

## HDR 支持?(与Edge / Safari的对比)
## HDR 支持?(与 Edge / Safari / Firefox 的对比)

| | PQ | HDR10 | HDR10+ | HLG | DV P5 | DV P8.1 | DV P8.4 |
| :-------------- | :------- | :------- | :------- | :------- |:-------- |:--------- |:----------- |
| Chrome 117 Mac ||||||||
| Chrome 117 Win ||||||||
| Edge 117 Mac ||||||||
| Edge 117 Win ||||||||
| Safari 17.0 Mac ||||||||
| Chrome Mac ||||||||
| Chrome Win ||||||||
| Edge Mac ||||||||
| Edge Win ||||||||
| Safari Mac ||||||||
|Firefox Win<sup>[1]</sup>||||||||

在 Windows 平台,Chrome 支持 PQ、HDR10 (含静态元数据的 PQ)、HLG,会基于静态元数据(如果存在)自动进行 Tone-mapping。HDR10+ 的 SEI 动态元数据在解码时会被忽略,并以 HDR10 降级播放。

在 macOS 平台,Chrome 支持 PQ、HDR10 (含静态元数据的 PQ)、HLG。在 SDR / HDR / 自动模式下,macOS 系统会自动进行 EDR 以确保 HDR 显示正确,Chrome / Edge 实现相同,支持情况一致,Safari 同样支持上述所有 HDR 格式。

*注1:Firefox >= 120 新增 HEVC 解码支持 (仅 Windows 平台,实验功能,需手动设置 `media.wmf.hevc.enabled=1` 开启),经测试 Firefox 支持 HEVC Main profile,但还暂不支持 HEVC Main10 profile (通常 HDR 视频以 Main10 profile 编码),如 Firefox 后续修复,我会重新测试并更新上表。*

#### Dolby Vision 支持情况说明

这里情况分为两种:
Expand Down Expand Up @@ -312,17 +315,21 @@ try {
}
```

## 技术实现区别?(与Edge / Safari的对比)
## 技术实现区别?(与 Edge / Safari / Firefox 的对比)

#### Windows

Edge 使用 `MediaFoundationRenderer` 调用 `MediaFoundation`(需要安装`HEVC视频扩展`插件)完成硬解,和系统自带的 `电影与电视` 用的解码器相同。

Chromium 使用 `D3D11VideoDecoder` 调用 `D3D11VA` (无需安装插件)完成硬解,和 `VLC` 等视频播放器用的解码器相同。
Firefox (>= 120, 实验功能, 需手动设置 `media.wmf.hevc.enabled=1` 开启) 使用 DXVA MFT(需要安装`HEVC视频扩展`插件)完成硬解,和系统自带的 `电影与电视` 用的解码器相同。

Chrome 使用 `D3D11VideoDecoder` 调用 `D3D11VA` (无需安装插件)完成硬解,和 `VLC` 等视频播放器用的解码器相同。

#### macOS

Safari 和 Chromium 二者均使用 `VideoToolbox` 解码器完成硬解。
Edge 和 Chrome 在 macOS 的解码实现没有任何区别。

Safari 和 Chrome 二者均使用 `VideoToolbox` 解码器完成硬解。

## 如何验证视频播放是否走硬解?

Expand Down Expand Up @@ -367,6 +374,8 @@ Electron >= v22.0.0 已集成好 macOS, Windows, 和 Linux (仅 VAAPI) 平台的

## 更新历史

`2023-12-22` 更新与 Firefox 技术实现细节的对比

`2023-12-08` 提升杜比视界播放能力 (Chrome >= `122.0.6168.0`)

`2023-11-16` 支持 MV-HEVC Base Layer 播放 (Chrome >= `121.0.6131.0`)
Expand Down

0 comments on commit 8b4f64a

Please sign in to comment.