[libcamera-devel] [PATCH 2/4] utils: rkisp1: Fix sensor format parsing
paul.elder at ideasonboard.com
paul.elder at ideasonboard.com
Fri Jul 15 09:31:00 CEST 2022
Hi Laurent,
On Tue, Jun 21, 2022 at 12:06:56AM +0300, Laurent Pinchart via libcamera-devel wrote:
> With sensors supporting crop, the regexp used to parse the media-ctl
> output isn't correct as the pad configuration may span multiple lines
> and contain other parameters. Fix it.
>
> Signed-off-by: Laurent Pinchart <laurent.pinchart at ideasonboard.com>
Reviewed-by: Paul Elder <paul.elder at ideasonboard.com>
> ---
> utils/rkisp1/rkisp1-capture.sh | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/utils/rkisp1/rkisp1-capture.sh b/utils/rkisp1/rkisp1-capture.sh
> index d5ebe5b1d1ba..eee6b8027261 100755
> --- a/utils/rkisp1/rkisp1-capture.sh
> +++ b/utils/rkisp1/rkisp1-capture.sh
> @@ -51,7 +51,7 @@ get_sensor_format() {
> local format
> local sensor=$1
>
> - format=$($mediactl --get-v4l2 "'$sensor':0" | sed 's/\[\([^ ]*\).*/\1/')
> + format=$($mediactl --get-v4l2 "'$sensor':0" | grep 'fmt:' | sed 's/.*\(fmt:\S*\).*/\1/')
> sensor_mbus_code=$(echo $format | sed 's/fmt:\([A-Z0-9_]*\).*/\1/')
> sensor_size=$(echo $format | sed 's/[^\/]*\/\([0-9x]*\).*/\1/')
>
> --
More information about the libcamera-devel
mailing list