Skip to content

Commit

Permalink
Converted more adoc to md
Browse files Browse the repository at this point in the history
  • Loading branch information
x1y committed Oct 29, 2024
1 parent 08d3020 commit fa903c2
Show file tree
Hide file tree
Showing 5 changed files with 115 additions and 214 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -17,121 +17,74 @@ This page is incomplete, you're welcome to improve it.

On most consumer-oriented SoCs, there is what is referred to as a VPU (Video Processing Unit). The VPU is responsible for power-efficient encoding and decoding of videos. Hardware-accelerated video decoding can be useful to get smoother video playback on your devices, lower power consumption, and lower CPU utilisation. Below is information regarding various hardware PINE64 uses and software that works with it.

== Hardware
## Hardware

Here's a table of the current support for different hardware. "In review" means the patch series to enable support has been posted to the mailing lists but is undergoing review, "linux-next" means it has been accepted and staged for the next Linux merge window.

[cols="1,1,1,1,1"]
|===
| | RK3328 | RK3399 | RK3566 | RK3588
| | RK3328 | RK3399 | RK3566 | RK3588 |
| -------- | ------- | ------- | ------- | ------- |
| JPEG | No | Yes | No | No |
| MPEG-2 | Yes | Yes | Yes | No |
| MPEG-4 Part 2/H.263 | No | No | No | No |
| VP8 | Yes | Yes | Yes | No |
| H.264/AVC | Yes | Yes | Yes¹| No |
| H.265/HEVC | In review | In review | No | No |
| VP9 | Yes | Yes | No | No |
| AVS2 | N/A | N/A | N/A | No |
| AV1 | N/A | N/A | N/A | No |

| JPEG
| No
| Yes
| No
| No
### Notes

| MPEG-2
| Yes
| Yes
| Yes
| No
¹ only Hantro, not rkvdec2, so with a maximum resolution of 1080p for now

| MPEG-4 Part 2/H.263
| No
| No
| No
| No
### Cedrus

| VP8
| Yes
| Yes
| Yes
| No
In 2018, Bootlin launched a crowdfunding campaign to bring a open source Allwinner VPU driver to mainline Linux, which came to be called Cedrus. The Cedrus media driver (For Allwinner SOCs such as A64) supported by mainline Linux supports H.264 and H.265 video decoding as of Linux 5.10, and with 5.11 came VP8 decoding support and a H.264 stateless video decoder interface. For more information refer to the [Sunxi wiki](https://linux-sunxi.org/Sunxi-Cedrus#Codec_Support).

| H.264/AVC
| Yes
| Yes
| Yes ^a^
| No
### Hantro

| H.265/HEVC
| In review
| In review
| No
| No
The Hantro media driver supports Rockchip and NXP SoCs including the RK3399 used in the Pinebook Pro and RockPro64. In November 2020 it [was announced](https://www.cnx-software.com/2020/11/24/hantro-h1-hardware-accelerated-video-encoding-support-in-mainline-linux/) that Bootlin was working on encoding support for the driver.

| VP9
| Yes
| Yes
| No
| No
### rkvdec

| AVS2
| N/A
| N/A
| N/A
| No
rkvdec is the video decoding hardware that's developed by Rockchip presumably in house. It's what Rockchip uses for decoding 4K H.264/AVC, VP9 and H.265/HEVC content. The driver in mainline linux for the first generation rkvdec (used in RK3328 and RK3399) supports VP9 and H.264, [patches for HEVC support](https://patchwork.kernel.org/project/linux-rockchip/list/?series=659401) are also in the process of review.

| AV1
| N/A
| N/A
| N/A
| No
|===
RK3566, RK3568 and likely RK3588 use a second generation of rkvdec called rkvdec2. No mainline driver for this exists yet. The rkvdec instance on RK3588 additionally supports the [AVS2 video codec](https://en.wikipedia.org/wiki/Audio_Video_Standard).

=== Notes

^a^ only Hantro, not rkvdec2, so with a maximum resolution of 1080p for now

=== Cedrus

In 2018, Bootlin launched a crowdfunding campaign to bring a open source Allwinner VPU driver to mainline Linux, which came to be called Cedrus. The Cedrus media driver (For Allwinner SOCs such as A64) supported by mainline Linux supports H.264 and H.265 video decoding as of Linux 5.10, and with 5.11 came VP8 decoding support and a H.264 stateless video decoder interface. For more information refer to the https://linux-sunxi.org/Sunxi-Cedrus#Codec_Support[Sunxi wiki].

=== Hantro

The Hantro media driver supports Rockchip and NXP SoCs including the RK3399 used in the Pinebook Pro and RockPro64. In November 2020 it https://www.cnx-software.com/2020/11/24/hantro-h1-hardware-accelerated-video-encoding-support-in-mainline-linux/[was announced] that Bootlin was working on encoding support for the driver.

=== rkvdec

rkvdec is the video decoding hardware that's developed by Rockchip presumably in house. It's what Rockchip uses for decoding 4K H.264/AVC, VP9 and H.265/HEVC content. The driver in mainline linux for the first generation rkvdec (used in RK3328 and RK3399) supports VP9 and H.264, https://patchwork.kernel.org/project/linux-rockchip/list/?series=659401[patches for HEVC support] are also in the process of review.

RK3566, RK3568 and likely RK3588 use a second generation of rkvdec called rkvdec2. No mainline driver for this exists yet. The rkvdec instance on RK3588 additionally supports the https://en.wikipedia.org/wiki/Audio_Video_Standard[AVS2 video codec].

=== rkdjpeg
### rkdjpeg

rkdjpeg is Rockchip's in-house hardware accelerated JPEG decoder. It can be found on the RK3566 and RK3568 as well as the RK3588.

No mainline driver exists for it so far.

== Software
## Software

=== GStreamer
### GStreamer

H.264 video decoding is possible when using GStreamer built from source, or an application utilizing it such as https://github.com/Rafostar/clapper[Clapper] or https://flathub.org/apps/details/org.sigxcpu.Livi[µPlayer]. µPlayer includes a indicator of when hardware acceleration is properly working and in use.
H.264 video decoding is possible when using GStreamer built from source, or an application utilizing it such as [Clapper](https://github.com/Rafostar/clapper) or [µPlayer](https://flathub.org/apps/details/org.sigxcpu.Livi). µPlayer includes a indicator of when hardware acceleration is properly working and in use.

=== FFmpeg
### FFmpeg

Mainline FFmpeg currently lacks the necessary patches to use the v4l2-requests based API, but https://github.com/jernejsk/FFmpeg[a fork that can utilise it exists].
Mainline FFmpeg currently lacks the necessary patches to use the v4l2-requests based API, but [a fork that can utilise it exists](https://github.com/jernejsk/FFmpeg).

With the patched ffmpeg, you can utilise hardware decoding using the `-hwaccel drm` parameter, e.g.:

ffmpeg -hwaccel drm -i input.mp4 -f null - -benchmark
`ffmpeg -hwaccel drm -i input.mp4 -f null - -benchmark`

to measure how fast it decodes.

=== mpv
### mpv

mpv v0.35 or later, built against the aforementioned FFmpeg fork, can be used to play back videos with hardware accelerated decoding. The hardware decoder path features interop with the GPU output, saving an expensive copyback operation. You can utilise the hardware decoding with e.g.:

mpv --hwdec=drm _video_
`mpv --hwdec=drm [FILE]`

In mpv versions prior to 0.35, you can use the copyback hwdec with:

mpv --hwdec=drm-copy _video_
`mpv --hwdec=drm-copy [FILE]`

== More Resources
## More Resources

* https://xnux.eu/devices/feature/cedrus-pp.html[Megi's Cedrus Information]
* https://briandaniels.me/2021/06/27/hardware-accelerated-video-playback-on-the-pinephone.html[HW accelerated GStreamer playback on the PinePhone]
* https://briandaniels.me/2021/07/06/hardware-accelerated-video-playback-on-the-pinephone-with-clapper.html[HW accelerated Clapper video player on the PinePhone]
* [Megi's Cedrus Information](https://xnux.eu/devices/feature/cedrus-pp.html)
* [HW accelerated GStreamer playback on the PinePhone](https://briandaniels.me/2021/06/27/hardware-accelerated-video-playback-on-the-pinephone.html)
* [HW accelerated Clapper video player on the PinePhone](https://briandaniels.me/2021/07/06/hardware-accelerated-video-playback-on-the-pinephone-with-clapper.html)
Original file line number Diff line number Diff line change
Expand Up @@ -9,26 +9,19 @@ menu:
weight: 2
---

|===
2+| Default JTAG pins

| GPIO Pin | JTAG Pin

| GPIO17 | TDI

| GPIO11 | TDO

| GPIO12 | TMS

| GPIO14 | TCK

|===
| Default JTAG pins | |
| -------- | ------- |
| GPIO Pin | JTAG Pin |
| GPIO17 | TDI |
| GPIO11 | TDO |
| GPIO12 | TMS |
| GPIO14 | TCK |

BL602 multiplexes four GPIO pins to provide the familiar JTAG lines. See the accompanying table for the default pin mappings.

These are the default JTAG pins in use after a cold boot. However, many pieces of software, including the demo that's installed by default on new PineCones, remap these pins to other functions. You cannot use the default wiring for JTAG while such software is running. This issue is especially prevalent on the PineCone because three of the default JTAG pins are connected to the onboard RGB LED. Nothing about the LED itself interferes with JTAG, but any program that uses the LED will necessarily remap some of the default JTAG pins to be GPIO.

The MaskROM download mode that the BL602 enters when you tie GPIO8 high does *not* remap the default JTAG pins, and so you can and should use that mode while checking basic functionality of your JTAG adapter.

Note that, just as software can remap the default JTAG pins to be something else, it can also remap other pins to be JTAG. Control over this is quite granular, with 5-6 candidate pins for each individual JTAG signal that can be mapped independently of one another. LEE Lup Yuen has written some https://lupyuen.github.io/articles/openocd#free-the-led-from-jtag-port[sample code] showing how to remap the JTAG pins so that your software can use the LED without giving up support for debugging.
Note that, just as software can remap the default JTAG pins to be something else, it can also remap other pins to be JTAG. Control over this is quite granular, with 5-6 candidate pins for each individual JTAG signal that can be mapped independently of one another. LEE Lup Yuen has written some [sample code](https://lupyuen.github.io/articles/openocd#free-the-led-from-jtag-port) showing how to remap the JTAG pins so that your software can use the LED without giving up support for debugging.

49 changes: 0 additions & 49 deletions content/documentation/PineTab-V/Software/Releases.adoc

This file was deleted.

44 changes: 44 additions & 0 deletions content/documentation/PineTab-V/Software/Releases.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
---
title: "Releases"
draft: false
menu:
docs:
title:
parent: "PineTab-V/Software"
identifier: "PineTab-V/Software/Releases"
weight: 2
---

This page contains a list of all available releases and tools for the PineTab-V in alphabetical order.

## Factory releases

The PineTab-V ships with _Factory Test Code_. The factory test reference source code can be found here:

* [PineTab-V_factorytestcode_SDK-20230725.tar.gz](https://files.pine64.org/SDK/PineTab-V/PineTab-V_factorytestcode_SDK-20230725.tar.gz) from _pine64.org_ (8.36GB, MD5 of the TAR-GZip file: _3e35e2760d82155b024f7601ac2b1275_)

Community releases:

* [sdcard.img](https://pine64.my-ho.st:8443/pinetabv/factoryimage/) pre-built image from the community member Fishwaldo derived from the factory SDK. Note: Use _dd_ to write it to microSD card or the eMMC.

## Linux

### Gentoo

A Gentoo overlay is available [here](https://gitlab.com/bingch/gentoo-overlay), it shares most ebuilds for [StarFive VisionFive 2](https://wiki.gentoo.org/wiki/Embedded_Handbook/Boards/StarFive_VisionFive_2) except the kernel source ebuild contains patches from the above factory SDK.

### KDE Plasma Yocto

A KDE Plasma Yocto Image from the community member Fishwaldo. Based on the Star64 images developed [here](https://github.com/Fishwaldo/meta-pine64). Please see this [issue](https://github.com/Fishwaldo/meta-pine64/issues/12) for known problems.

#### Download

* https://github.com/Fishwaldo/meta-pine64/releases/

| Default credentials | |
| -------- | ------- |
| Root | `root`/`pine64`
| Default user | `pine64`/`pine64` |

#### Notes
* Use _dd_ or _Balena Etcher_ to copy to a microSD card and then insert the microSD card into your PineTab-V and boot
Loading

0 comments on commit fa903c2

Please sign in to comment.