From 02e2ff4745f7ddefd857158d02bcc537a86069fd Mon Sep 17 00:00:00 2001 From: Wan-Teh Chang Date: Wed, 7 Aug 2024 13:34:26 -0700 Subject: [PATCH] Note stride params of HalfFloatPlane are in bytes The HalfFloatPlane() function does not follow libyuv's convention of buffer stride in units of the corresponding buffer pointer. Document that. Change-Id: Id8d466ccc2df263a49ad788ab349bc3993a48259 Reviewed-on: https://chromium-review.googlesource.com/c/libyuv/libyuv/+/5770639 Reviewed-by: Frank Barchard --- include/libyuv/planar_functions.h | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/include/libyuv/planar_functions.h b/include/libyuv/planar_functions.h index f93447214..678074a14 100644 --- a/include/libyuv/planar_functions.h +++ b/include/libyuv/planar_functions.h @@ -766,6 +766,10 @@ int ARGBPolynomial(const uint8_t* src_argb, // Convert plane of 16 bit shorts to half floats. // Source values are multiplied by scale before storing as half float. +// +// Note: Unlike other libyuv functions that operate on uint16_t buffers, the +// src_stride_y and dst_stride_y parameters of HalfFloatPlane() are in bytes, +// not in units of uint16_t. LIBYUV_API int HalfFloatPlane(const uint16_t* src_y, int src_stride_y,