From 9cebc199b7e3727abc960de64e0c238b849a60bd Mon Sep 17 00:00:00 2001 From: Josuah Demangeon Date: Fri, 10 Jan 2025 22:43:05 +0000 Subject: [PATCH] doc: releases: 4.1: announce switch to video_bits_per_pixel() The previous commit introduces video_bits_per_pixel() and converts all invocation relying on video_pix_fmt_bpp(), 3rd-party users will need to do the same on their code, and this is not a 100% drop-in API, so better document it on the release notes. Signed-off-by: Josuah Demangeon --- doc/releases/migration-guide-4.1.rst | 5 +++++ doc/releases/release-notes-4.1.rst | 3 +++ 2 files changed, 8 insertions(+) diff --git a/doc/releases/migration-guide-4.1.rst b/doc/releases/migration-guide-4.1.rst index b5325beba59f..ec6e0e17fce5 100644 --- a/doc/releases/migration-guide-4.1.rst +++ b/doc/releases/migration-guide-4.1.rst @@ -354,6 +354,11 @@ Video The new ``video-controls.h`` source now contains description of each control ID to help disambiguating. +* The ``video_pix_fmt_bpp()`` function was returning a byte count, this got replaced by + ``video_bits_per_pixel()`` which return a bit count. For instance, invocations such as + ``pitch = width * video_pix_fmt_bpp(pixfmt)`` needs to be replaced by an equivalent + ``pitch = width * video_bits_per_pixel(pixfmt) / BITS_PER_BYTE``. + Watchdog ======== diff --git a/doc/releases/release-notes-4.1.rst b/doc/releases/release-notes-4.1.rst index 688dd20b6e4f..27b5665eb8cc 100644 --- a/doc/releases/release-notes-4.1.rst +++ b/doc/releases/release-notes-4.1.rst @@ -300,6 +300,9 @@ Drivers and Sensors * Changed :file:`include/zephyr/drivers/video-controls.h` to have control IDs (CIDs) matching those present in the Linux kernel. + * Changed ``video_pix_fmt_bpp()`` returning the byte count and only supports 8-bit depth, + into ``video_bits_per_pixel()`` returning the bit count and supports any color depth. + * Watchdog * Added :kconfig:option:`CONFIG_HAS_WDT_NO_CALLBACKS` which drivers select when they do not support