Commit graph

113 commits

Author SHA1 Message Date
Cameron Gutman
bf4332b9e7 Prefer D3D11VA in non-FSE modes for improved performance 2022-08-21 17:50:56 -05:00
Cameron Gutman
be2f4433db Avoid hardcoding VIDEO_FORMAT_H265_MAIN10 for HDR/10-bit color 2022-06-26 16:22:05 -05:00
Cameron Gutman
2bb2745f91 Enhance frame pacing logic for HDR renderers 2022-05-07 16:21:17 -05:00
Cameron Gutman
220f50ebe4 Revert "Allow renderers to apply size and display changes seamlessly"
This reverts commit c989133d27.
2022-04-24 16:12:12 -05:00
Cameron Gutman
c989133d27 Allow renderers to apply size and display changes seamlessly 2022-04-24 15:42:08 -05:00
Cameron Gutman
09ed82db65 Fix build with HAVE_MMAL 2022-04-02 16:16:40 -05:00
Cameron Gutman
a56cb0e88a Don't waste time retrying the same renderer again 2022-04-02 16:14:04 -05:00
Cameron Gutman
9acf5ff0ef Update workaround to prevent deadlock with h264_mmal 2022-04-02 16:06:39 -05:00
Cameron Gutman
742f1b1283 Prefer hevc_nvv4l2 over hevc_nvmpi 2022-03-26 22:54:54 -05:00
The Great Wizard Azkali
0b127a2f3b
Add support for h264_nvv4l2 and hevc_nvv4l2 (#745)
* Add support for h264_nvv4l2

A new implementation of nvv4l2 decoder has been made by @CTCaer and will be released in thr next switchroot (Linux for Nintendo Switch) update. This implementation of ffmpeg can also be used by other Jetson boards. A repository will be soon hosted so Jetson users can install it.
Prior to the new implementation distribution, we add it to the project who currently use nvmpi implementation.

* Add support for hevc_nvv4l2

Following previous PR, add hevc support as well.
2022-03-26 22:02:00 -05:00
Cameron Gutman
f256407789 Implement D3D11VA video rendering 2022-02-04 21:51:34 -06:00
Cameron Gutman
67612f607e WIP: D3D11VA support
Overlays work, but drawing the actual video is unimplemented
2022-02-03 19:45:07 -06:00
Cameron Gutman
cf089fdfe9 Add support for HDR with VAAPI using DRM frontend renderer 2022-01-29 18:16:39 -06:00
Cameron Gutman
1cbdd0e675 Display the HDR option if the platform has a decoder that supports it 2022-01-29 00:59:04 -06:00
Cameron Gutman
254526a213 Plumb HDR mode information to the decoders 2022-01-28 22:10:50 -06:00
Cameron Gutman
f0659b4f3c Fix random crash on stream start with renderers that require test frames 2022-01-18 18:19:28 -06:00
Cameron Gutman
c138cbf994 Fix Windows build 2022-01-17 15:47:36 -06:00
Cameron Gutman
dfe275ab67 Avoid consuming stale data during/after decoder reset 2022-01-17 15:26:00 -06:00
Cameron Gutman
d6cfbdb273 Rewrite FFmpeg decoder to use pull model
This allows us to keep asynchronous decoders like MMAL and V4L2M2M fed
while we're waiting for output frames. Behavior for synchronous decoders
should be identical.

Continuing to feed new data while waiting for output frames is crucial for
acceptable performance on 1080p video on the Raspberry Pi using V4L2M2M,
since it allows the decode and copy operations to be pipelined.
2022-01-17 15:06:12 -06:00
Cameron Gutman
1616d237ae Avoid h264_v4l2m2m by default on RPi builds 2021-12-28 16:28:04 -06:00
Cameron Gutman
d8acf24af0 Don't use SdlRenderer with MMAL 2021-12-19 20:58:50 -06:00
Cameron Gutman
1e6ca18193 Fix error checking in decode test 2021-12-15 17:33:28 -06:00
Cameron Gutman
5a32992497 Try to learn if decoders support retrying avcodec_receive_frame() 2021-12-14 20:41:27 -06:00
Cameron Gutman
9999ded933 Quiet down log spam for asynchronous decoders 2021-12-11 18:37:39 -06:00
Cameron Gutman
80128e8293 Properly support asynchronous decoders that return multiple frames at a time 2021-12-11 18:15:49 -06:00
Cameron Gutman
3e9aea1f7a Optimize CUDA support to avoid roundtrip to CPU memory 2021-12-06 18:23:40 -06:00
Cameron Gutman
56119eebae Adapt to constification of AVCodec in FFmpeg master 2021-05-24 23:27:31 -05:00
Cameron Gutman
c17c8e2a2c Remove receive time from performance overlay
It is largely superseded by network latency
2021-05-22 13:59:14 -05:00
Cameron Gutman
e45a60f2ed Save RTT in VIDEO_STATS so it can be logged on disconnect 2021-05-22 13:57:12 -05:00
Cameron Gutman
581c9438ca Add network latency to stats overlay 2021-05-15 14:40:31 -05:00
Cameron Gutman
8fcef63890 Don't waste time performing extra decoder initializations for EGL when it's not supported 2021-04-30 20:52:09 -05:00
Cameron Gutman
e74753bec1 Allow fallback from EGL to direct on EGLImage export failure 2021-03-22 22:51:29 -05:00
Cameron Gutman
96f79688dd Use av_packet_alloc() instead of av_init_packet()
sizeof(AVPacket) may be deprecated from ABI in the near future
2021-03-05 17:47:04 -06:00
Cameron Gutman
d63a1b0eb0 Handle custom hwaccel decoders 2021-02-02 19:45:22 -06:00
Cameron Gutman
88391b0274 Use the decoder's supported pix_fmts to select a suitable renderer 2021-02-02 19:05:27 -06:00
Cameron Gutman
cedba501ee Query the frontend renderer to determine fullscreen-only limitations 2021-01-30 17:57:34 -06:00
Cameron Gutman
541784382a Add support for AV_HWDEVICE_TYPE_DRM hwaccels 2021-01-30 10:00:01 -06:00
Cameron Gutman
2a7fae2c82 Revert "Add logic to try LibreELEC's out-of-tree stateless V4L2 decoders"
v4l2request is a hwaccel not a decoder

This reverts commit ed3a5448b1.
2021-01-29 20:30:01 -06:00
Cameron Gutman
ed3a5448b1 Add logic to try LibreELEC's out-of-tree stateless V4L2 decoders 2021-01-29 20:19:27 -06:00
Cameron Gutman
390544cd9a Charge time spent in the decode unit queue to the decoder rather than receive time 2020-12-31 16:10:01 -06:00
Cameron Gutman
5a7a49d1d5 Display resolution and codec in OSD 2020-08-20 20:52:05 -07:00
Cameron Gutman
586a93d7aa Use the new EGL renderer for VAAPI by default 2020-06-13 20:21:54 -07:00
Cameron Gutman
728377cba3 Set AV_PKT_FLAG_KEY for key frames 2020-05-25 18:31:19 -07:00
Antoine Damhet
0a396f3112 Introduce a new FFMPEG frontend renderer: EGLRenderer
Right now this renderer works on X11 & Wayland with VAAPI as a backend.

Some rendering latency benchmarks on my `i7-10510U` (with
`intel-media-driver` 20.1.1 which cause a *huge* regression with the
SDL_Renderer):
|             | X11    | Wayland |
| Before      | 6.78ms | 22.50ms |
| EGLRenderer | 0.76ms | 00.77ms |

Signed-off-by: Antoine Damhet <antoine.damhet@lse.epita.fr>
2020-05-12 11:11:35 +02:00
Cameron Gutman
979de190dc Cap resolution options at 1080p on Steam Link and Raspberry Pi due to hardware limitations 2020-02-23 00:43:43 -08:00
Cameron Gutman
57a1c5eb76 Disable the window mode options for always full-screen renderers 2020-02-09 11:35:05 -08:00
Cameron Gutman
529fdf0341 Add decoder options dictionary to prepareDecoderContext() 2020-02-08 17:47:26 -08:00
Cameron Gutman
4794f44a6d Charge decoders for time spent holding on to frames 2020-01-26 20:15:11 -08:00
Cameron Gutman
f0119b1231 Add support for the out-of-tree Jetson FFmpeg NVMPI decoders
https://github.com/jocover/jetson-ffmpeg
2020-01-26 19:16:03 -08:00
Cameron Gutman
4c579aa826 Provide another frame if avcodec_receive_frame() returns EAGAIN 2020-01-26 15:36:22 -08:00