Commit graph

112692 commits

Author SHA1 Message Date
nyanmisaka
521affc277 fixup! lavu: add RKMPP hwcontext
add initial support for rk3576

Signed-off-by: nyanmisaka <nst799610810@gmail.com>
2024-10-16 16:32:04 +08:00
nyanmisaka
5ddd3d4f5b fixup! lavc/rkmppdec: refactor RKMPP decoders and extend codecs
support keyframe-only decoding: '-skip_frame nokey'

Signed-off-by: nyanmisaka <nst799610810@gmail.com>
2024-09-20 02:00:17 +08:00
nyanmisaka
27443ed8eb fixup! lavf/rkrga: add RKRGA scale, vpp and overlay filter
switch to require_pkg_config for librga.

Signed-off-by: nyanmisaka <nst799610810@gmail.com>
2024-09-02 00:37:01 +08:00
nyanmisaka
8164ff7dad fixup! lavc/rkmppdec: refactor RKMPP decoders and extend codecs
fix mpeg4 rkmpp hardware decoding.

Signed-off-by: nyanmisaka <nst799610810@gmail.com>
2024-07-17 00:35:05 +08:00
nyanmisaka
9efe5bcff0 fixup! lavu: add RKMPP hwcontext
fix the rga fully-planar alignment regression.

Signed-off-by: nyanmisaka <nst799610810@gmail.com>
2024-05-30 11:28:31 +08:00
nyanmisaka
2093e2b984 fixup! lsws/input: add NV15 and NV20 formats support
add unscaled copy from nv15/nv20 to yuv420p1x/yuv422p1x

Signed-off-by: nyanmisaka <nst799610810@gmail.com>
2024-05-21 00:15:20 +08:00
nyanmisaka
09cd2a2d18 fixup! lavc/rkmppenc: add RKMPP H264 and HEVC encoder
Signed-off-by: nyanmisaka <nst799610810@gmail.com>
2024-05-04 16:19:04 +08:00
nyanmisaka
6f88a29491 fixup! lavc/rkmppdec: refactor RKMPP decoders and extend codecs
Add `dump_extra` bsf to h264/hevc_rkmpp decoder since
in rtsp, sequence header is passed through sdp and video
stream may not have sequence header.

Signed-off-by: nyanmisaka <nst799610810@gmail.com>
2024-04-24 21:22:21 +08:00
nyanmisaka
ba84e56c51 fixup! lavc/rkmppenc: add RKMPP H264 and HEVC encoder
Update encoder input size quirks.

Signed-off-by: nyanmisaka <nst799610810@gmail.com>
2024-03-28 21:27:15 +08:00
nyanmisaka
257e7ebf7d fixup! lavu: add RKMPP hwcontext
Fix yuv420p/yuv422p encoding at specific resolutions.

Signed-off-by: nyanmisaka <nst799610810@gmail.com>
2024-03-28 21:27:15 +08:00
nyanmisaka
733309bc7e fixup! README: update for ffmpeg-rockchip
Signed-off-by: nyanmisaka <nst799610810@gmail.com>
2024-03-26 22:35:48 +08:00
nyanmisaka
ab1bad7034 lavc/rkmppenc: add RKMPP MJPEG encoder
Signed-off-by: nyanmisaka <nst799610810@gmail.com>
2024-03-26 22:16:43 +08:00
nyanmisaka
9de0f4b793 lavu/hwcontext_rkmpp: add BE formats
Signed-off-by: nyanmisaka <nst799610810@gmail.com>
2024-03-26 22:16:43 +08:00
nyanmisaka
1fa586ac7f fixup! lavc/rkmppdec: refactor RKMPP decoders and extend codecs
Switch the decoder logic to the lower latency one. This results
in slightly higher CPU usage in exchange for low latency and
better compatibility.

Signed-off-by: nyanmisaka <nst799610810@gmail.com>
2024-03-13 22:54:00 +08:00
nyanmisaka
76203202f6 lavc/rkmppenc: add low_delay flag support for RKMPP encoders
Signed-off-by: nyanmisaka <nst799610810@gmail.com>
2024-03-13 22:54:00 +08:00
nyanmisaka
c7de8d3827 lavc/rkmppenc: add profile tier option to HEVC encoder
Signed-off-by: nyanmisaka <nst799610810@gmail.com>
2024-03-13 15:54:42 +08:00
nyanmisaka
7a0200bdfa fixup! lavc/rkmppenc: add RKMPP H264 and HEVC encoder
Don't return EAGAIN in draining/eof to avoid a potential frame loss.

Credit by @mcerveny

Signed-off-by: nyanmisaka <nst799610810@gmail.com>
2024-03-10 23:59:00 +08:00
nyanmisaka
27136b05e0 fixup! lavf/rkrga: add RKRGA scale, vpp and overlay filter
fix the draining/eof prematurely.

Signed-off-by: nyanmisaka <nst799610810@gmail.com>
2024-03-09 21:24:37 +08:00
nyanmisaka
d43f4f54e6 fixup! lavf/rkrga: add force_{yuv,chroma} options for vpp filter
Signed-off-by: nyanmisaka <nst799610810@gmail.com>
2024-02-29 23:19:02 +08:00
nyanmisaka
97638cffe1 fixup! lavf/rkrga: add force_{yuv,chroma} options for vpp filter
Auto fallback to 8-bit formats on RGA2 hardware.

Signed-off-by: nyanmisaka <nst799610810@gmail.com>
2024-02-29 22:49:05 +08:00
nyanmisaka
377fa2c622 fixup! lavf/rkrga: add RKRGA scale, vpp and overlay filter
Drain the fifo during filter reset to avoid leaking one fence_fd.

Signed-off-by: nyanmisaka <nst799610810@gmail.com>
2024-02-29 17:17:59 +08:00
nyanmisaka
6b13265d70 fixup! lavc/rkmppdec: refactor RKMPP decoders and extend codecs
EOS frame may contain valid data. Check frame buf to determine it.

```
[hevc_rkmpp @ 0xaaab1462eb20] Received a 'EOS' frame
[hevc_rkmpp @ 0xaaab1462eb20] Received a frame
[hevc_rkmpp @ 0xaaab1462eb20] Received a 'EOS' frame
[hevc_rkmpp @ 0xaaab1462eb20] Decoder is at EOF
[vist#0:0/hevc @ 0xaaab1463e380] Decoder returned EOF, finishing
[vist#0:0/hevc @ 0xaaab1463e380] Terminating decoder thread
```

Signed-off-by: nyanmisaka <nst799610810@gmail.com>
2024-02-05 00:31:57 +08:00
boogie
28b4194646 lavf/rkrga: add force_yuv=auto option for auto un-compact 2024-01-28 23:00:24 +08:00
boogie
99ea69d6d4 lavc/rkmppdec: allow to set decoder options from env
This allows decoder options to be overriden via env FFMPEG_RKMPP_DEC_OPT
where the client has not support to change the decoder options.
Additionally AVOptions are printed as VERBOSE on infochange.
2024-01-28 01:16:06 +08:00
boogie
1a9a968810 fixup! lavc/rkmppenc: add RKMPP H264 and HEVC encoder
- Use crop_top to handle MPP decoder AFBC offset_y.
- Apply stride multiplier to drm_prime AFBC frame.

Co-authored-by: nyanmisaka <nst799610810@gmail.com>
2024-01-24 20:36:24 +08:00
boogie
1cb7e3d2e2 fixup! lavf/rkrga: add RKRGA scale, vpp and overlay filter
- Use crop_top to handle MPP decoder AFBC offset_y.
- Apply stride multiplier to drm_prime AFBC frame.

Co-authored-by: nyanmisaka <nst799610810@gmail.com>
2024-01-24 20:36:23 +08:00
boogie
74050e5a85 fixup! lavc/rkmppdec: refactor RKMPP decoders and extend codecs
- Use crop_top to handle MPP decoder AFBC offset_y.
- Apply stride multiplier to drm_prime AFBC frame.

Co-authored-by: nyanmisaka <nst799610810@gmail.com>
2024-01-24 20:36:23 +08:00
nyanmisaka
4c1997e5a8 lavf/rkrga: add force_{yuv,chroma} options for vpp filter
They are used to set the output to an uncompact and linear format while
maintaining the same chroma sub-sampling with the input. The user does
not have to know the input format in advance.

Signed-off-by: nyanmisaka <nst799610810@gmail.com>
2024-01-24 20:06:50 +08:00
nyanmisaka
30b1033ec4 fixup! lavu: add RKMPP hwcontext
Enlarge the buffer size a little bit to fix a corner
case issue in RGA AFBC 8K cropping and MPP encoder.

Signed-off-by: nyanmisaka <nst799610810@gmail.com>
2024-01-24 20:00:04 +08:00
nyanmisaka
f508e46403 Revert "HACK: lavu: allow image copy for NV15 and NV20"
This reverts commit c359d00d13.
2024-01-24 01:52:48 +08:00
nyanmisaka
d023c944ac lavu: add NV20 bitstream format support
Signed-off-by: nyanmisaka <nst799610810@gmail.com>
2024-01-24 01:52:48 +08:00
nyanmisaka
caef8e7f05 fixup! lavf/rkrga: add RKRGA scale, vpp and overlay filter
Fix the issue that some PGSSUB subtitle have incorrect color.

Signed-off-by: nyanmisaka <nst799610810@gmail.com>
2024-01-23 16:18:33 +08:00
nyanmisaka
e753665e6d fixup! lavc/rkmppdec: refactor RKMPP decoders and extend codecs
Fix the latency issue in decoder output.

Signed-off-by: nyanmisaka <nst799610810@gmail.com>
2024-01-23 16:18:33 +08:00
boogie
668585f514 lavf/rkrga: add P210 format support 2024-01-21 18:21:25 +08:00
boogie
e0775b91e2 lavu/hwcontext_drm: add P210 format 2024-01-21 18:21:25 +08:00
nyanmisaka
2b2e075476 fixup! lavf/rkrga: add RKRGA scale, vpp and overlay filter
disable `force_{original_aspect_ratio,divisible_by}` options for
the vpp_rkrga filter and leave it to scale_rkrga.

Signed-off-by: nyanmisaka <nst799610810@gmail.com>
2024-01-19 20:42:22 +08:00
boogie
d0a1484db4 fixup! lavc/rkmppdec: refactor RKMPP decoders and extend codecs
Add HwFramesContext config method support.
2024-01-19 02:04:45 +08:00
nyanmisaka
2938ac0758 fixup! lavc/rkmppenc: add RKMPP H264 and HEVC encoder
Improve RKMPP HWdevice selection.

Signed-off-by: nyanmisaka <nst799610810@gmail.com>
2024-01-15 22:25:58 +08:00
nyanmisaka
97e6a5ef20 fixup! lavu/hwcontext_drm: preparations for RKMPP hwcontext
adapt rkmppdec half-internal mode to use AVRKMPPDRMFrameDescriptor.

Signed-off-by: nyanmisaka <nst799610810@gmail.com>
2024-01-13 17:38:31 +08:00
nyanmisaka
428a11f982 fixup! lavc/rkmppdec: refactor RKMPP decoders and extend codecs
EAGAIN should never happen during draining.

Signed-off-by: nyanmisaka <nst799610810@gmail.com>
2024-01-12 18:24:50 +08:00
nyanmisaka
c437e64c98 lavc/rkmppenc: add GRAY8/YUV400 monochroma support
Signed-off-by: nyanmisaka <nst799610810@gmail.com>
2024-01-12 15:19:36 +08:00
boogie
50cc62684a fixup! lavu/hwcontext_drm: preparations for RKMPP hwcontext
Introduce AVRKMPPDRMFrameDescriptor

This is exactly like AVDRMFrameDescriptor but attionally it holds
MppBuffer instance used on each index. With that, AVDRMObjectDescriptor
can be kept as is, and no need to modify the existing API.
2024-01-03 23:14:06 +08:00
nyanmisaka
9e7314093f fixup! lavc/rkmppdec: refactor RKMPP decoders and extend codecs
Signed-off-by: nyanmisaka <nst799610810@gmail.com>
2023-12-31 19:12:48 +08:00
nyanmisaka
ade2725455 README: update for ffmpeg-rockchip
Signed-off-by: nyanmisaka <nst799610810@gmail.com>
2023-12-28 20:45:04 +08:00
boogie
99a325f1f6 v4l2: use always channel 0 if driver does not return it. Always ignore device select / set errors 2023-12-28 20:45:04 +08:00
rigaya
4d2e94eb6d avdevice/v4l2: estimate framerate from dv-timings when VIDIOC_G_PARM returns error. 2023-12-28 20:45:04 +08:00
rigaya
b067f43df6 avdevice/v4l2: add option to ignore input error (-ignore_input_error).
Some device returns error with VIDIOC_S_INPUT, VIDIOC_G_INPUT.
2023-12-28 20:45:04 +08:00
rigaya
cab552d7e1 avdevice/v4l2: add nv16, nv24 support 2023-12-28 20:45:04 +08:00
rigaya
9aa7638eed avdevice/v4l2: add v4l2 multi-planar API support 2023-12-28 20:45:04 +08:00
nyanmisaka
d3d5921549 lavc/rkmppenc: add RKMPP H264 and HEVC encoder
Signed-off-by: nyanmisaka <nst799610810@gmail.com>
2023-12-28 02:50:06 +08:00