HEVC acceleration

classic Classic list List threaded Threaded
6 messages Options
Reply | Threaded
Open this post in threaded view
|

HEVC acceleration

mohammed bey ahmed khernache
Hello,
I am trying to decode HEVC-encoded content using ffmpeg. I am still unable
to leverage the HEVC accelerator, which is hevc_v4l2m2m in the case of the
platform I am using, RB3.
Below are the command and the output.

-----------------------------------------------------------------
root@linaro-developer:~# ffmpeg -c:v hevc_v4l2m2m  -i blue_sky_fps_25.265
-f null /dev/null
ffmpeg version 4.3 Copyright (c) 2000-2020 the FFmpeg developers
  built with gcc 8 (Debian 8.3.0-6)
  configuration: --enable-gpl --enable-nonfree --enable-static
--disable-shared --enable-pthreads --enable-neon --enable-thumb
--enable-optimizations --enable-hwaccel=hevc_v4l2m2m
  libavutil      56. 51.100 / 56. 51.100
  libavcodec     58. 91.100 / 58. 91.100
  libavformat    58. 45.100 / 58. 45.100
  libavdevice    58. 10.100 / 58. 10.100
  libavfilter     7. 85.100 /  7. 85.100
  libswscale      5.  7.100 /  5.  7.100
  libswresample   3.  7.100 /  3.  7.100
  libpostproc    55.  7.100 / 55.  7.100
Input #0, hevc, from 'blue_sky_fps_25.265':
  Duration: N/A, bitrate: N/A
    Stream #0:0: Video: hevc (Main), yuv420p(tv), 1920x1080, 25 fps, 25
tbr, 1200k tbn, 25 tbc
[hevc_v4l2m2m @ 0xaaaadc9c13b0] Using device /dev/video1
[hevc_v4l2m2m @ 0xaaaadc9c13b0] driver 'qcom-venus' on card 'Qualcomm Venus
video decoder' in mplane mode
[hevc_v4l2m2m @ 0xaaaadc9c13b0] requesting formats: output=HEVC capture=NV12
Stream mapping:
  Stream #0:0 -> #0:0 (hevc (hevc_v4l2m2m) -> wrapped_avframe (native))
Press [q] to stop, [?] for help
[hevc_v4l2m2m @ 0xaaaadc9c13b0] VIDIOC_G_FMT ioctl
free(): double free detected in tcache 2
Aborted
-----------------------------------------------------------------

Any help is welcome. Thank you in advance.
Best regards
_______________________________________________
ffmpeg-user mailing list
[hidden email]
https://ffmpeg.org/mailman/listinfo/ffmpeg-user

To unsubscribe, visit link above, or email
[hidden email] with subject "unsubscribe".
Reply | Threaded
Open this post in threaded view
|

Re: HEVC acceleration

Carl Eugen Hoyos-2
Am Mi., 24. Juni 2020 um 16:28 Uhr schrieb Mohammed Bey Ahmed
Khernache <[hidden email]>:

>
> Hello,
> I am trying to decode HEVC-encoded content using ffmpeg. I am still unable
> to leverage the HEVC accelerator, which is hevc_v4l2m2m in the case of the
> platform I am using, RB3.
> Below are the command and the output.
>
> -----------------------------------------------------------------
> root@linaro-developer:~# ffmpeg -c:v hevc_v4l2m2m  -i blue_sky_fps_25.265
> -f null /dev/null
> ffmpeg version 4.3 Copyright (c) 2000-2020 the FFmpeg developers

You should probably also try with older FFmpeg versions...

>   built with gcc 8 (Debian 8.3.0-6)
>   configuration: --enable-gpl --enable-nonfree --enable-static
> --disable-shared --enable-pthreads --enable-neon --enable-thumb
> --enable-optimizations --enable-hwaccel=hevc_v4l2m2m
>   libavutil      56. 51.100 / 56. 51.100
>   libavcodec     58. 91.100 / 58. 91.100
>   libavformat    58. 45.100 / 58. 45.100
>   libavdevice    58. 10.100 / 58. 10.100
>   libavfilter     7. 85.100 /  7. 85.100
>   libswscale      5.  7.100 /  5.  7.100
>   libswresample   3.  7.100 /  3.  7.100
>   libpostproc    55.  7.100 / 55.  7.100
> Input #0, hevc, from 'blue_sky_fps_25.265':
>   Duration: N/A, bitrate: N/A
>     Stream #0:0: Video: hevc (Main), yuv420p(tv), 1920x1080, 25 fps, 25
> tbr, 1200k tbn, 25 tbc
> [hevc_v4l2m2m @ 0xaaaadc9c13b0] Using device /dev/video1
> [hevc_v4l2m2m @ 0xaaaadc9c13b0] driver 'qcom-venus' on card 'Qualcomm Venus
> video decoder' in mplane mode
> [hevc_v4l2m2m @ 0xaaaadc9c13b0] requesting formats: output=HEVC capture=NV12
> Stream mapping:
>   Stream #0:0 -> #0:0 (hevc (hevc_v4l2m2m) -> wrapped_avframe (native))
> Press [q] to stop, [?] for help
> [hevc_v4l2m2m @ 0xaaaadc9c13b0] VIDIOC_G_FMT ioctl
> free(): double free detected in tcache 2
> Aborted

... and older drivers, also use valgrind or gdb to find the source of the crash.

Carl Eugen
_______________________________________________
ffmpeg-user mailing list
[hidden email]
https://ffmpeg.org/mailman/listinfo/ffmpeg-user

To unsubscribe, visit link above, or email
[hidden email] with subject "unsubscribe".
Reply | Threaded
Open this post in threaded view
|

Re: HEVC acceleration

Andriy Gelman
In reply to this post by mohammed bey ahmed khernache
On Wed, 24 Jun 2020 at 10:28, Mohammed Bey Ahmed Khernache <
[hidden email]> wrote:

> Hello,
> I am trying to decode HEVC-encoded content using ffmpeg. I am still unable
> to leverage the HEVC accelerator, which is hevc_v4l2m2m in the case of the
> platform I am using, RB3.
> Below are the command and the output.
>
> -----------------------------------------------------------------
> root@linaro-developer:~# ffmpeg -c:v hevc_v4l2m2m  -i blue_sky_fps_25.265
> -f null /dev/null
> ffmpeg version 4.3 Copyright (c) 2000-2020 the FFmpeg developers
>   built with gcc 8 (Debian 8.3.0-6)
>   configuration: --enable-gpl --enable-nonfree --enable-static
> --disable-shared --enable-pthreads --enable-neon --enable-thumb
> --enable-optimizations --enable-hwaccel=hevc_v4l2m2m
>   libavutil      56. 51.100 / 56. 51.100
>   libavcodec     58. 91.100 / 58. 91.100
>   libavformat    58. 45.100 / 58. 45.100
>   libavdevice    58. 10.100 / 58. 10.100
>   libavfilter     7. 85.100 /  7. 85.100
>   libswscale      5.  7.100 /  5.  7.100
>   libswresample   3.  7.100 /  3.  7.100
>   libpostproc    55.  7.100 / 55.  7.100
> Input #0, hevc, from 'blue_sky_fps_25.265':
>   Duration: N/A, bitrate: N/A
>     Stream #0:0: Video: hevc (Main), yuv420p(tv), 1920x1080, 25 fps, 25
> tbr, 1200k tbn, 25 tbc
> [hevc_v4l2m2m @ 0xaaaadc9c13b0] Using device /dev/video1
> [hevc_v4l2m2m @ 0xaaaadc9c13b0] driver 'qcom-venus' on card 'Qualcomm Venus
> video decoder' in mplane mode
> [hevc_v4l2m2m @ 0xaaaadc9c13b0] requesting formats: output=HEVC
> capture=NV12
> Stream mapping:
>   Stream #0:0 -> #0:0 (hevc (hevc_v4l2m2m) -> wrapped_avframe (native))
> Press [q] to stop, [?] for help
> [hevc_v4l2m2m @ 0xaaaadc9c13b0] VIDIOC_G_FMT ioctl
> free(): double free detected in tcache 2
> Aborted
> -----------------------------------------------------------------
>

Hi Mohammed,

Could you check if this patch solves the double free?
https://patchwork.ffmpeg.org/project/ffmpeg/patch/20200509173541.7667-1-andriy.gelman@.../

Thanks,
Andriy
_______________________________________________
ffmpeg-user mailing list
[hidden email]
https://ffmpeg.org/mailman/listinfo/ffmpeg-user

To unsubscribe, visit link above, or email
[hidden email] with subject "unsubscribe".
Reply | Threaded
Open this post in threaded view
|

Re: HEVC acceleration

mohammed bey ahmed khernache
In reply to this post by Carl Eugen Hoyos-2
> You should probably also try with older FFmpeg versions...
I tried with an older version of ffmpeg (3.4.7), and it works.
The issue is that I don't see any difference when using ffmpeg with and
without the "-c:v hevc_v4l2m2m" option.
This means that the HEVC accelerator is not enabled. Am I right?
Am I missing something in the command line of ffmpeg?

Mohammed

>
> _______________________________________________
> ffmpeg-user mailing list
> [hidden email]
> https://ffmpeg.org/mailman/listinfo/ffmpeg-user
>
> To unsubscribe, visit link above, or email
> [hidden email] with subject "unsubscribe".
_______________________________________________
ffmpeg-user mailing list
[hidden email]
https://ffmpeg.org/mailman/listinfo/ffmpeg-user

To unsubscribe, visit link above, or email
[hidden email] with subject "unsubscribe".
Reply | Threaded
Open this post in threaded view
|

Re: HEVC acceleration

Andriy Gelman
On Thu, 25 Jun 2020 at 15:27, Mohammed Bey Ahmed Khernache <
[hidden email]> wrote:

> > You should probably also try with older FFmpeg versions...
> I tried with an older version of ffmpeg (3.4.7), and it works.
> The issue is that I don't see any difference when using ffmpeg with and
> without the "-c:v hevc_v4l2m2m" option.
> This means that the HEVC accelerator is not enabled. Am I right?
> Am I missing something in the command line of ffmpeg?
>
> Mohammed
>

It's probably working :)
Please create a ticket on trac.ffmpeg.org . Could you run git bisect to
identify which commit caused the problem?

Thanks,
Andriy
_______________________________________________
ffmpeg-user mailing list
[hidden email]
https://ffmpeg.org/mailman/listinfo/ffmpeg-user

To unsubscribe, visit link above, or email
[hidden email] with subject "unsubscribe".
Reply | Threaded
Open this post in threaded view
|

Re: HEVC acceleration

mohammed bey ahmed khernache
In reply to this post by Andriy Gelman
Hi Andriy,
Thank you for the patch. Now, the hardware decoding is working fine.

Here's how I applied the patch:
git apply -v <file.patch>

Mohammed

> _______________________________________________
> ffmpeg-user mailing list
> [hidden email]
> https://ffmpeg.org/mailman/listinfo/ffmpeg-user
>
> To unsubscribe, visit link above, or email
> [hidden email] with subject "unsubscribe".
_______________________________________________
ffmpeg-user mailing list
[hidden email]
https://ffmpeg.org/mailman/listinfo/ffmpeg-user

To unsubscribe, visit link above, or email
[hidden email] with subject "unsubscribe".