<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: hantro h264 broken in kernel 6.6.52 in i.MX Processors</title>
    <link>https://community.nxp.com/t5/i-MX-Processors/hantro-h264-broken-in-kernel-6-6-52/m-p/2143454#M239694</link>
    <description>&lt;P&gt;I have basically the same issue using the kernel 6.6.52 (Yocto 5.x Scarthgap) then I applied the patch you suggested and with the imx vpu hantro 1.35 I get the same error.&lt;BR /&gt;What am I missing ?&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;&lt;LI-CODE lang="c"&gt;# uname -a
Linux mx8mm 6.6.52-ucm-imx8m-mini-4.0-g1be724da3a09 #1 SMP PREEMPT Tue Jul 29 17:42:41 UTC 2025 aarch64 GNU/Linux


# gst-launch-1.0 videotestsrc ! video/x-raw, format=I420, width=640, height=480 ! vpuenc_h264 ! h264parse  ! v4l2h264dec ! fakesink

Setting pipeline to PAUSED ...

====== V4L2DEC: 1.24.0 build on May  6 2024 08:51:28. ======
====== VPUENC: 4.9.0 build on May  8 2024 06:06:55. ======
	wrapper: 3.0.0 (VPUWRAPPER_ARM64_LINUX Build on Apr 24 2024 06:33:53)
	vpulib: 1.1.1
	firmware: 1.1.1.127
ERROR: from element /GstPipeline:pipeline0/vpuenc_h264:vpuenc_h264-0: Could not initialize supporting library.
Additional debug info:
/usr/src/debug/gstreamer1.0-plugins-base/1.24.0.imx/gst-libs/gst/video/gstvideoencoder.c(1799): gst_video_encoder_change_state (): /GstPipeline:pipeline0/vpuenc_h264:vpuenc_h264-0:
Failed to start encoder
ERROR: pipeline doesn't want to preroll.
Failed to set pipeline to PAUSED.
Setting pipeline to NULL ...
Freeing pipeline ...


# grep hantro /proc/interrupts
 32:          0          0          0          0     GICv3  39 Level     hantrodec
 33:          0          0          0          0     GICv3  40 Level     hantrodec&lt;/LI-CODE&gt;&lt;P&gt;&lt;BR /&gt;I added to the image the following packages&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;&lt;LI-CODE lang="c"&gt;# Core VPU packages
IMAGE_INSTALL:append = " \
    imx-gst1.0-plugin \
    linux-firmware \
    imx-vpu-hantro \
    imx-vpu-hantro-daemon \
    imx-vpu-hantro-vc \
    libimxvpuapi2 \
"&lt;/LI-CODE&gt;&lt;P&gt;&lt;BR /&gt;Thanks&lt;/P&gt;</description>
    <pubDate>Wed, 30 Jul 2025 10:01:37 GMT</pubDate>
    <dc:creator>marcocavallini</dc:creator>
    <dc:date>2025-07-30T10:01:37Z</dc:date>
    <item>
      <title>hantro h264 broken in kernel 6.6.52</title>
      <link>https://community.nxp.com/t5/i-MX-Processors/hantro-h264-broken-in-kernel-6-6-52/m-p/2074983#M235946</link>
      <description>&lt;P&gt;Hi all,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;There is a regresion on a kernel v6.6 due to commit&amp;nbsp;&lt;A href="https://github.com/nxp-imx/linux-imx/commit/4ca7e59f00e03acb01476e106de3870214efc682" target="_blank"&gt;https://github.com/nxp-imx/linux-imx/commit/4ca7e59f00e03acb01476e106de3870214efc682&lt;/A&gt;&lt;/P&gt;&lt;P&gt;You can try the next command to test the h264 codec, or well reproduce a video containing it.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;gst-launch-1.0 videotestsrc ! video/x-raw, format=I420, width=640, height=480 ! vpuenc_h264 ! h264parse ! v4l2h264dec ! fakesink&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Reverting that commit solves the problem, but the real problem is in the file&amp;nbsp;drivers/mxc/hantro_v4l2/vsi-v4l2.h, where adding a new field in the "struct v4l2_daemon_dec_buffers " causes a missaligment (in the specific commit it is the field "u64 process_time")&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Can you point to a proper fix for having h264 working?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;BR / Isaac&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 07 Apr 2025 08:45:16 GMT</pubDate>
      <guid>https://community.nxp.com/t5/i-MX-Processors/hantro-h264-broken-in-kernel-6-6-52/m-p/2074983#M235946</guid>
      <dc:creator>ihermida</dc:creator>
      <dc:date>2025-04-07T08:45:16Z</dc:date>
    </item>
    <item>
      <title>Re: hantro h264 broken in kernel 6.6.52</title>
      <link>https://community.nxp.com/t5/i-MX-Processors/hantro-h264-broken-in-kernel-6-6-52/m-p/2075061#M235960</link>
      <description>&lt;P&gt;do you use imx8mm? what kind of issue do you find when you use this command? I haven't got imx8mm now, pls share the detailed issue or logfile with me&lt;/P&gt;</description>
      <pubDate>Mon, 07 Apr 2025 09:57:34 GMT</pubDate>
      <guid>https://community.nxp.com/t5/i-MX-Processors/hantro-h264-broken-in-kernel-6-6-52/m-p/2075061#M235960</guid>
      <dc:creator>joanxie</dc:creator>
      <dc:date>2025-04-07T09:57:34Z</dc:date>
    </item>
    <item>
      <title>Re: hantro h264 broken in kernel 6.6.52</title>
      <link>https://community.nxp.com/t5/i-MX-Processors/hantro-h264-broken-in-kernel-6-6-52/m-p/2075074#M235961</link>
      <description>&lt;P&gt;Yes, I reproduce it in the i.mx8m mini. We have seen it using default NXP images for Android, and I narrow it down till linux and the mentioned commit.&lt;/P&gt;&lt;P&gt;You can monitor the "hantrodec" interrupts and see how they are not generated. and the video is not reproduced. Try the command&amp;nbsp;&lt;BR /&gt;&lt;BR /&gt;&lt;FONT face="monospace"&gt;gst-launch-1.0 videotestsrc ! video/x-raw, format=I420, width=640, height=480 ! vpuenc_h264 ! h264parse&amp;nbsp; ! v4l2h264dec ! fakesink&lt;/FONT&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;(or fpsdisplaysink).&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;The error is that the command just get locked (no video, no interrupts, nothing in dmesg).&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;"""&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;root@ccimx8mm-dvk:~# gst-launch-1.0 videotestsrc ! video/x-raw, format=I420, width=640&lt;BR /&gt;, height=480 ! vpuenc_h264 ! h264parse &amp;nbsp;! v4l2h264dec ! fakesink&lt;BR /&gt;Setting pipeline to PAUSED ...&lt;BR /&gt;&lt;BR /&gt;====== V4L2DEC: 1.24.0 build on Jul 24 2024 02:25:45. ======&lt;BR /&gt;====== VPUENC: 4.9.1 build on Aug &amp;nbsp;8 2024 05:28:21. ======&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;wrapper: 3.0.0 (VPUWRAPPER_ARM64_LINUX Build on Jul 24 2024 01:56:50)&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;vpulib: 1.1.1&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;firmware: 1.1.1.65535&lt;BR /&gt;Pipeline is PREROLLING ...&lt;BR /&gt;Redistribute latency..&lt;BR /&gt;""&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;You can use gplay and a video with h264 codec. Gplay just fails as it cannot reproduce the video. Use whatever command to reproduce the problem. And check the interrupts.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;root@ccimx8mm-dvk:~# grep hantro /proc/interrupts&lt;BR /&gt;29: &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;0 &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;0 &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;0 &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;0 &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;GICv3 &amp;nbsp;39 Level &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;hantrodec&lt;BR /&gt;30: &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;0 &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;0 &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;0 &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;0 &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;GICv3 &amp;nbsp;40 Level &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;hantrodec&lt;BR /&gt;&lt;A href="mailto:root@ccimx8mm-dvk:~" target="_blank"&gt;root@ccimx8mm-dvk:~#&lt;/A&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;In case of internal vpu error, it fails "silently" so there is not any relevant information in the dmesg output.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;The error using a h264 video with gplay is "a general stream error"&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;"""&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;ERROR Error from element /GstPlayBin3:playbin3/GstURIDecodeBin3:uridecodebin3/GstURISo&lt;BR /&gt;urceBin:urisourcebin0/GstParseBin:parsebin0/GstAiurDemux:aiurdemux0: GStreamer encount&lt;BR /&gt;ered a general stream error.&lt;BR /&gt;GStreamer encountered a general stream error.&lt;BR /&gt;/usr/src/debug/imx-gst1.0-plugin/4.9.1+git/plugins/aiurdemux/aiurdemux.c(1229): aiurde&lt;BR /&gt;mux_pull_task (): /GstPlayBin3:playbin3/GstURIDecodeBin3:uridecodebin3/GstURISourceBin&lt;BR /&gt;:urisourcebin0/GstParseBin:parsebin0/GstAiurDemux:aiurdemux0:&lt;BR /&gt;streaming stopped, reason not-negotiated, state 3 for /mnt/data/3DMark_1280x720_h264_a&lt;BR /&gt;ac_44100&lt;BR /&gt;"""&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Mon, 07 Apr 2025 10:14:59 GMT</pubDate>
      <guid>https://community.nxp.com/t5/i-MX-Processors/hantro-h264-broken-in-kernel-6-6-52/m-p/2075074#M235961</guid>
      <dc:creator>ihermida</dc:creator>
      <dc:date>2025-04-07T10:14:59Z</dc:date>
    </item>
    <item>
      <title>Re: hantro h264 broken in kernel 6.6.52</title>
      <link>https://community.nxp.com/t5/i-MX-Processors/hantro-h264-broken-in-kernel-6-6-52/m-p/2091298#M236924</link>
      <description>&lt;P&gt;&lt;BR /&gt;I found where the problem comes...&lt;/P&gt;&lt;P&gt;We were using the meta-freescale layer, which is using the imx-vpu-hantro version 1.32.&lt;/P&gt;&lt;P&gt;This recent commit in the layer solved the problem&lt;/P&gt;&lt;P&gt;&lt;A href="https://github.com/Freescale/meta-freescale/commit/a63a107a3681d4a6342145290f62e98d8607ec0f" target="_blank"&gt;https://github.com/Freescale/meta-freescale/commit/a63a107a3681d4a6342145290f62e98d8607ec0f&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;It might be a missaligment between the kernel (that introduced the u64&amp;nbsp;process_time value) and the imx vpu code.&lt;/P&gt;&lt;P&gt;Using the kernel 6.6.52 with the imx vpu hantro 1.35 works.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 05 May 2025 08:36:53 GMT</pubDate>
      <guid>https://community.nxp.com/t5/i-MX-Processors/hantro-h264-broken-in-kernel-6-6-52/m-p/2091298#M236924</guid>
      <dc:creator>ihermida</dc:creator>
      <dc:date>2025-05-05T08:36:53Z</dc:date>
    </item>
    <item>
      <title>Re: hantro h264 broken in kernel 6.6.52</title>
      <link>https://community.nxp.com/t5/i-MX-Processors/hantro-h264-broken-in-kernel-6-6-52/m-p/2143454#M239694</link>
      <description>&lt;P&gt;I have basically the same issue using the kernel 6.6.52 (Yocto 5.x Scarthgap) then I applied the patch you suggested and with the imx vpu hantro 1.35 I get the same error.&lt;BR /&gt;What am I missing ?&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;&lt;LI-CODE lang="c"&gt;# uname -a
Linux mx8mm 6.6.52-ucm-imx8m-mini-4.0-g1be724da3a09 #1 SMP PREEMPT Tue Jul 29 17:42:41 UTC 2025 aarch64 GNU/Linux


# gst-launch-1.0 videotestsrc ! video/x-raw, format=I420, width=640, height=480 ! vpuenc_h264 ! h264parse  ! v4l2h264dec ! fakesink

Setting pipeline to PAUSED ...

====== V4L2DEC: 1.24.0 build on May  6 2024 08:51:28. ======
====== VPUENC: 4.9.0 build on May  8 2024 06:06:55. ======
	wrapper: 3.0.0 (VPUWRAPPER_ARM64_LINUX Build on Apr 24 2024 06:33:53)
	vpulib: 1.1.1
	firmware: 1.1.1.127
ERROR: from element /GstPipeline:pipeline0/vpuenc_h264:vpuenc_h264-0: Could not initialize supporting library.
Additional debug info:
/usr/src/debug/gstreamer1.0-plugins-base/1.24.0.imx/gst-libs/gst/video/gstvideoencoder.c(1799): gst_video_encoder_change_state (): /GstPipeline:pipeline0/vpuenc_h264:vpuenc_h264-0:
Failed to start encoder
ERROR: pipeline doesn't want to preroll.
Failed to set pipeline to PAUSED.
Setting pipeline to NULL ...
Freeing pipeline ...


# grep hantro /proc/interrupts
 32:          0          0          0          0     GICv3  39 Level     hantrodec
 33:          0          0          0          0     GICv3  40 Level     hantrodec&lt;/LI-CODE&gt;&lt;P&gt;&lt;BR /&gt;I added to the image the following packages&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;&lt;LI-CODE lang="c"&gt;# Core VPU packages
IMAGE_INSTALL:append = " \
    imx-gst1.0-plugin \
    linux-firmware \
    imx-vpu-hantro \
    imx-vpu-hantro-daemon \
    imx-vpu-hantro-vc \
    libimxvpuapi2 \
"&lt;/LI-CODE&gt;&lt;P&gt;&lt;BR /&gt;Thanks&lt;/P&gt;</description>
      <pubDate>Wed, 30 Jul 2025 10:01:37 GMT</pubDate>
      <guid>https://community.nxp.com/t5/i-MX-Processors/hantro-h264-broken-in-kernel-6-6-52/m-p/2143454#M239694</guid>
      <dc:creator>marcocavallini</dc:creator>
      <dc:date>2025-07-30T10:01:37Z</dc:date>
    </item>
  </channel>
</rss>

