/linux/drivers/media/platform/verisilicon/ |
H A D | hantro_g2_regs.h | diff 5423e2d220bebb4304f7ff739d02180f676eefd0 Thu May 16 10:41:07 CEST 2024 Benjamin Gaignard <benjamin.gaignard@collabora.com> media: verisilicon: Add reference buffer compression feature
Reference frame compression is a feature added in the G2 decoder to compress frame buffers so that the bandwidth of storing/loading reference frames can be reduced, especially with high resolution decoded streams.
The impact of compressed frames is confirmed when using perf to monitor the number of memory accesses with or without the compression feature. The following command:
perf stat -a -e \ imx8_ddr0/cycles/,imx8_ddr0/read-cycles/,imx8_ddr0/write-cycles/ \ gst-launch-1.0 filesrc \ location=Jockey_3840x2160_120fps_420_8bit_HEVC_RAW.hevc ! queue ! \ h265parse ! v4l2slh265dec ! video/x-raw,format=NV12 ! fakesink
Gives us these results without the compression feature: Performance counter stats for 'system wide':
1711300345 imx8_ddr0/cycles/ 892207924 imx8_ddr0/read-cycles/ 1291785864 imx8_ddr0/write-cycles/
13.760048353 seconds time elapsed
With the compression feature: Performance counter stats for 'system wide':
274526799 imx8_ddr0/cycles/ 453120194 imx8_ddr0/read-cycles/ 833391434 imx8_ddr0/write-cycles/
18.257831534 seconds time elapsed
As expected the number of read/write cycles are really lower when compression is used.
Since storing the compression data requires more memory a module parameter named 'hevc_use_compression' is used to enable/disable this feature and, by default, compression isn't used.
Enabling the compression feature means that the output-frames of the decoder are stored with a specific compression pixel-format. Since this pixel format is unknown, this patch restrains the compression feature usage to the cases where post-processor pixel-formats (NV12 or NV15) are selected by the applications.
The Fluster compliance HEVC test suite score is still 141/147 with this patch.
Signed-off-by: Benjamin Gaignard <benjamin.gaignard@collabora.com> Tested-by: Nicolas Dufresne <nicolas.dufresne@collabora.com> Signed-off-by: Sebastian Fricke <sebastian.fricke@collabora.com> Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
|
H A D | hantro_g2.c | diff 5423e2d220bebb4304f7ff739d02180f676eefd0 Thu May 16 10:41:07 CEST 2024 Benjamin Gaignard <benjamin.gaignard@collabora.com> media: verisilicon: Add reference buffer compression feature
Reference frame compression is a feature added in the G2 decoder to compress frame buffers so that the bandwidth of storing/loading reference frames can be reduced, especially with high resolution decoded streams.
The impact of compressed frames is confirmed when using perf to monitor the number of memory accesses with or without the compression feature. The following command:
perf stat -a -e \ imx8_ddr0/cycles/,imx8_ddr0/read-cycles/,imx8_ddr0/write-cycles/ \ gst-launch-1.0 filesrc \ location=Jockey_3840x2160_120fps_420_8bit_HEVC_RAW.hevc ! queue ! \ h265parse ! v4l2slh265dec ! video/x-raw,format=NV12 ! fakesink
Gives us these results without the compression feature: Performance counter stats for 'system wide':
1711300345 imx8_ddr0/cycles/ 892207924 imx8_ddr0/read-cycles/ 1291785864 imx8_ddr0/write-cycles/
13.760048353 seconds time elapsed
With the compression feature: Performance counter stats for 'system wide':
274526799 imx8_ddr0/cycles/ 453120194 imx8_ddr0/read-cycles/ 833391434 imx8_ddr0/write-cycles/
18.257831534 seconds time elapsed
As expected the number of read/write cycles are really lower when compression is used.
Since storing the compression data requires more memory a module parameter named 'hevc_use_compression' is used to enable/disable this feature and, by default, compression isn't used.
Enabling the compression feature means that the output-frames of the decoder are stored with a specific compression pixel-format. Since this pixel format is unknown, this patch restrains the compression feature usage to the cases where post-processor pixel-formats (NV12 or NV15) are selected by the applications.
The Fluster compliance HEVC test suite score is still 141/147 with this patch.
Signed-off-by: Benjamin Gaignard <benjamin.gaignard@collabora.com> Tested-by: Nicolas Dufresne <nicolas.dufresne@collabora.com> Signed-off-by: Sebastian Fricke <sebastian.fricke@collabora.com> Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
|
H A D | hantro_hevc.c | diff 5423e2d220bebb4304f7ff739d02180f676eefd0 Thu May 16 10:41:07 CEST 2024 Benjamin Gaignard <benjamin.gaignard@collabora.com> media: verisilicon: Add reference buffer compression feature
Reference frame compression is a feature added in the G2 decoder to compress frame buffers so that the bandwidth of storing/loading reference frames can be reduced, especially with high resolution decoded streams.
The impact of compressed frames is confirmed when using perf to monitor the number of memory accesses with or without the compression feature. The following command:
perf stat -a -e \ imx8_ddr0/cycles/,imx8_ddr0/read-cycles/,imx8_ddr0/write-cycles/ \ gst-launch-1.0 filesrc \ location=Jockey_3840x2160_120fps_420_8bit_HEVC_RAW.hevc ! queue ! \ h265parse ! v4l2slh265dec ! video/x-raw,format=NV12 ! fakesink
Gives us these results without the compression feature: Performance counter stats for 'system wide':
1711300345 imx8_ddr0/cycles/ 892207924 imx8_ddr0/read-cycles/ 1291785864 imx8_ddr0/write-cycles/
13.760048353 seconds time elapsed
With the compression feature: Performance counter stats for 'system wide':
274526799 imx8_ddr0/cycles/ 453120194 imx8_ddr0/read-cycles/ 833391434 imx8_ddr0/write-cycles/
18.257831534 seconds time elapsed
As expected the number of read/write cycles are really lower when compression is used.
Since storing the compression data requires more memory a module parameter named 'hevc_use_compression' is used to enable/disable this feature and, by default, compression isn't used.
Enabling the compression feature means that the output-frames of the decoder are stored with a specific compression pixel-format. Since this pixel format is unknown, this patch restrains the compression feature usage to the cases where post-processor pixel-formats (NV12 or NV15) are selected by the applications.
The Fluster compliance HEVC test suite score is still 141/147 with this patch.
Signed-off-by: Benjamin Gaignard <benjamin.gaignard@collabora.com> Tested-by: Nicolas Dufresne <nicolas.dufresne@collabora.com> Signed-off-by: Sebastian Fricke <sebastian.fricke@collabora.com> Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
|
H A D | hantro_g2_hevc_dec.c | diff 5423e2d220bebb4304f7ff739d02180f676eefd0 Thu May 16 10:41:07 CEST 2024 Benjamin Gaignard <benjamin.gaignard@collabora.com> media: verisilicon: Add reference buffer compression feature
Reference frame compression is a feature added in the G2 decoder to compress frame buffers so that the bandwidth of storing/loading reference frames can be reduced, especially with high resolution decoded streams.
The impact of compressed frames is confirmed when using perf to monitor the number of memory accesses with or without the compression feature. The following command:
perf stat -a -e \ imx8_ddr0/cycles/,imx8_ddr0/read-cycles/,imx8_ddr0/write-cycles/ \ gst-launch-1.0 filesrc \ location=Jockey_3840x2160_120fps_420_8bit_HEVC_RAW.hevc ! queue ! \ h265parse ! v4l2slh265dec ! video/x-raw,format=NV12 ! fakesink
Gives us these results without the compression feature: Performance counter stats for 'system wide':
1711300345 imx8_ddr0/cycles/ 892207924 imx8_ddr0/read-cycles/ 1291785864 imx8_ddr0/write-cycles/
13.760048353 seconds time elapsed
With the compression feature: Performance counter stats for 'system wide':
274526799 imx8_ddr0/cycles/ 453120194 imx8_ddr0/read-cycles/ 833391434 imx8_ddr0/write-cycles/
18.257831534 seconds time elapsed
As expected the number of read/write cycles are really lower when compression is used.
Since storing the compression data requires more memory a module parameter named 'hevc_use_compression' is used to enable/disable this feature and, by default, compression isn't used.
Enabling the compression feature means that the output-frames of the decoder are stored with a specific compression pixel-format. Since this pixel format is unknown, this patch restrains the compression feature usage to the cases where post-processor pixel-formats (NV12 or NV15) are selected by the applications.
The Fluster compliance HEVC test suite score is still 141/147 with this patch.
Signed-off-by: Benjamin Gaignard <benjamin.gaignard@collabora.com> Tested-by: Nicolas Dufresne <nicolas.dufresne@collabora.com> Signed-off-by: Sebastian Fricke <sebastian.fricke@collabora.com> Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
|
H A D | Kconfig | diff 5423e2d220bebb4304f7ff739d02180f676eefd0 Thu May 16 10:41:07 CEST 2024 Benjamin Gaignard <benjamin.gaignard@collabora.com> media: verisilicon: Add reference buffer compression feature
Reference frame compression is a feature added in the G2 decoder to compress frame buffers so that the bandwidth of storing/loading reference frames can be reduced, especially with high resolution decoded streams.
The impact of compressed frames is confirmed when using perf to monitor the number of memory accesses with or without the compression feature. The following command:
perf stat -a -e \ imx8_ddr0/cycles/,imx8_ddr0/read-cycles/,imx8_ddr0/write-cycles/ \ gst-launch-1.0 filesrc \ location=Jockey_3840x2160_120fps_420_8bit_HEVC_RAW.hevc ! queue ! \ h265parse ! v4l2slh265dec ! video/x-raw,format=NV12 ! fakesink
Gives us these results without the compression feature: Performance counter stats for 'system wide':
1711300345 imx8_ddr0/cycles/ 892207924 imx8_ddr0/read-cycles/ 1291785864 imx8_ddr0/write-cycles/
13.760048353 seconds time elapsed
With the compression feature: Performance counter stats for 'system wide':
274526799 imx8_ddr0/cycles/ 453120194 imx8_ddr0/read-cycles/ 833391434 imx8_ddr0/write-cycles/
18.257831534 seconds time elapsed
As expected the number of read/write cycles are really lower when compression is used.
Since storing the compression data requires more memory a module parameter named 'hevc_use_compression' is used to enable/disable this feature and, by default, compression isn't used.
Enabling the compression feature means that the output-frames of the decoder are stored with a specific compression pixel-format. Since this pixel format is unknown, this patch restrains the compression feature usage to the cases where post-processor pixel-formats (NV12 or NV15) are selected by the applications.
The Fluster compliance HEVC test suite score is still 141/147 with this patch.
Signed-off-by: Benjamin Gaignard <benjamin.gaignard@collabora.com> Tested-by: Nicolas Dufresne <nicolas.dufresne@collabora.com> Signed-off-by: Sebastian Fricke <sebastian.fricke@collabora.com> Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
|
H A D | hantro_hw.h | diff 5423e2d220bebb4304f7ff739d02180f676eefd0 Thu May 16 10:41:07 CEST 2024 Benjamin Gaignard <benjamin.gaignard@collabora.com> media: verisilicon: Add reference buffer compression feature
Reference frame compression is a feature added in the G2 decoder to compress frame buffers so that the bandwidth of storing/loading reference frames can be reduced, especially with high resolution decoded streams.
The impact of compressed frames is confirmed when using perf to monitor the number of memory accesses with or without the compression feature. The following command:
perf stat -a -e \ imx8_ddr0/cycles/,imx8_ddr0/read-cycles/,imx8_ddr0/write-cycles/ \ gst-launch-1.0 filesrc \ location=Jockey_3840x2160_120fps_420_8bit_HEVC_RAW.hevc ! queue ! \ h265parse ! v4l2slh265dec ! video/x-raw,format=NV12 ! fakesink
Gives us these results without the compression feature: Performance counter stats for 'system wide':
1711300345 imx8_ddr0/cycles/ 892207924 imx8_ddr0/read-cycles/ 1291785864 imx8_ddr0/write-cycles/
13.760048353 seconds time elapsed
With the compression feature: Performance counter stats for 'system wide':
274526799 imx8_ddr0/cycles/ 453120194 imx8_ddr0/read-cycles/ 833391434 imx8_ddr0/write-cycles/
18.257831534 seconds time elapsed
As expected the number of read/write cycles are really lower when compression is used.
Since storing the compression data requires more memory a module parameter named 'hevc_use_compression' is used to enable/disable this feature and, by default, compression isn't used.
Enabling the compression feature means that the output-frames of the decoder are stored with a specific compression pixel-format. Since this pixel format is unknown, this patch restrains the compression feature usage to the cases where post-processor pixel-formats (NV12 or NV15) are selected by the applications.
The Fluster compliance HEVC test suite score is still 141/147 with this patch.
Signed-off-by: Benjamin Gaignard <benjamin.gaignard@collabora.com> Tested-by: Nicolas Dufresne <nicolas.dufresne@collabora.com> Signed-off-by: Sebastian Fricke <sebastian.fricke@collabora.com> Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
|
H A D | hantro_postproc.c | diff 5423e2d220bebb4304f7ff739d02180f676eefd0 Thu May 16 10:41:07 CEST 2024 Benjamin Gaignard <benjamin.gaignard@collabora.com> media: verisilicon: Add reference buffer compression feature
Reference frame compression is a feature added in the G2 decoder to compress frame buffers so that the bandwidth of storing/loading reference frames can be reduced, especially with high resolution decoded streams.
The impact of compressed frames is confirmed when using perf to monitor the number of memory accesses with or without the compression feature. The following command:
perf stat -a -e \ imx8_ddr0/cycles/,imx8_ddr0/read-cycles/,imx8_ddr0/write-cycles/ \ gst-launch-1.0 filesrc \ location=Jockey_3840x2160_120fps_420_8bit_HEVC_RAW.hevc ! queue ! \ h265parse ! v4l2slh265dec ! video/x-raw,format=NV12 ! fakesink
Gives us these results without the compression feature: Performance counter stats for 'system wide':
1711300345 imx8_ddr0/cycles/ 892207924 imx8_ddr0/read-cycles/ 1291785864 imx8_ddr0/write-cycles/
13.760048353 seconds time elapsed
With the compression feature: Performance counter stats for 'system wide':
274526799 imx8_ddr0/cycles/ 453120194 imx8_ddr0/read-cycles/ 833391434 imx8_ddr0/write-cycles/
18.257831534 seconds time elapsed
As expected the number of read/write cycles are really lower when compression is used.
Since storing the compression data requires more memory a module parameter named 'hevc_use_compression' is used to enable/disable this feature and, by default, compression isn't used.
Enabling the compression feature means that the output-frames of the decoder are stored with a specific compression pixel-format. Since this pixel format is unknown, this patch restrains the compression feature usage to the cases where post-processor pixel-formats (NV12 or NV15) are selected by the applications.
The Fluster compliance HEVC test suite score is still 141/147 with this patch.
Signed-off-by: Benjamin Gaignard <benjamin.gaignard@collabora.com> Tested-by: Nicolas Dufresne <nicolas.dufresne@collabora.com> Signed-off-by: Sebastian Fricke <sebastian.fricke@collabora.com> Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
|