diff options
author | Hans Verkuil <hverkuil-cisco@xs4all.nl> | 2021-11-25 10:57:14 +0100 |
---|---|---|
committer | Hans Verkuil <hverkuil-cisco@xs4all.nl> | 2021-11-25 10:57:14 +0100 |
commit | 0349bea74d06578b4d1c06533317876985c64ace (patch) | |
tree | ae1814440e75888e2e1e3917498d737c8c23f12f | |
parent | 68d9f4636f4ec465fc05f1fa811e65f09380bdb3 (diff) | |
download | v4l-utils-0349bea74d06578b4d1c06533317876985c64ace.tar.gz |
libv4lconvert: HM12 -> NV12_16L16
Rename HM12 to NV12_16L16 (HM12 is now redefined to this new, more generic,
pixel format).
So don't use the old name anymore, only use the new pixel format name.
Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
-rw-r--r-- | lib/libv4lconvert/Android.mk | 2 | ||||
-rw-r--r-- | lib/libv4lconvert/Makefile.am | 2 | ||||
-rw-r--r-- | lib/libv4lconvert/libv4lconvert-priv.h | 6 | ||||
-rw-r--r-- | lib/libv4lconvert/libv4lconvert.c | 12 | ||||
-rw-r--r-- | lib/libv4lconvert/nv12_16l16.c (renamed from lib/libv4lconvert/hm12.c) | 16 |
5 files changed, 19 insertions, 19 deletions
diff --git a/lib/libv4lconvert/Android.mk b/lib/libv4lconvert/Android.mk index 99a136b4..a4e75c95 100644 --- a/lib/libv4lconvert/Android.mk +++ b/lib/libv4lconvert/Android.mk @@ -8,7 +8,7 @@ LOCAL_SRC_FILES := \ crop.c \ flip.c \ helper.c \ - hm12.c \ + nv12_16l16.c \ jidctflt.c \ jl2005bcd.c \ jpeg.c \ diff --git a/lib/libv4lconvert/Makefile.am b/lib/libv4lconvert/Makefile.am index f266f3e7..71152b54 100644 --- a/lib/libv4lconvert/Makefile.am +++ b/lib/libv4lconvert/Makefile.am @@ -13,7 +13,7 @@ endif libv4lconvert_la_SOURCES = \ libv4lconvert.c tinyjpeg.c sn9c10x.c sn9c20x.c pac207.c mr97310a.c \ flip.c crop.c jidctflt.c spca561-decompress.c \ - rgbyuv.c sn9c2028-decomp.c spca501.c sq905c.c bayer.c hm12.c \ + rgbyuv.c sn9c2028-decomp.c spca501.c sq905c.c bayer.c nv12_16l16.c \ stv0680.c cpia1.c se401.c jpgl.c jpeg.c jl2005bcd.c \ control/libv4lcontrol.c control/libv4lcontrol.h control/libv4lcontrol-priv.h \ processing/libv4lprocessing.c processing/whitebalance.c processing/autogain.c \ diff --git a/lib/libv4lconvert/libv4lconvert-priv.h b/lib/libv4lconvert/libv4lconvert-priv.h index ce5970c9..6b9128ce 100644 --- a/lib/libv4lconvert/libv4lconvert-priv.h +++ b/lib/libv4lconvert/libv4lconvert-priv.h @@ -274,13 +274,13 @@ void v4lconvert_bayer10p_to_bayer8(unsigned char *bayer10p, void v4lconvert_bayer16_to_bayer8(unsigned char *bayer16, unsigned char *bayer8, int width, int height); -void v4lconvert_hm12_to_rgb24(const unsigned char *src, +void v4lconvert_nv12_16l16_to_rgb24(const unsigned char *src, unsigned char *dst, int width, int height); -void v4lconvert_hm12_to_bgr24(const unsigned char *src, +void v4lconvert_nv12_16l16_to_bgr24(const unsigned char *src, unsigned char *dst, int width, int height); -void v4lconvert_hm12_to_yuv420(const unsigned char *src, +void v4lconvert_nv12_16l16_to_yuv420(const unsigned char *src, unsigned char *dst, int width, int height, int yvu); void v4lconvert_hsv_to_rgb24(const unsigned char *src, unsigned char *dest, diff --git a/lib/libv4lconvert/libv4lconvert.c b/lib/libv4lconvert/libv4lconvert.c index 5945be43..e794ec00 100644 --- a/lib/libv4lconvert/libv4lconvert.c +++ b/lib/libv4lconvert/libv4lconvert.c @@ -138,7 +138,7 @@ static const struct v4lconvert_pixfmt supported_src_pixfmts[] = { { V4L2_PIX_FMT_KONICA420, 12, 6, 3, 1 }, { V4L2_PIX_FMT_SN9C20X_I420, 12, 6, 3, 1 }, { V4L2_PIX_FMT_M420, 12, 6, 3, 1 }, - { V4L2_PIX_FMT_HM12, 12, 6, 3, 1 }, + { V4L2_PIX_FMT_NV12_16L16, 12, 6, 3, 1 }, { V4L2_PIX_FMT_NV12, 12, 6, 3, 1 }, { V4L2_PIX_FMT_CPIA1, 0, 6, 3, 1 }, /* JPEG and variants */ @@ -916,19 +916,19 @@ static int v4lconvert_convert_pixfmt(struct v4lconvert_data *data, } /* Conexant cx2341x raw video macroblock format */ - case V4L2_PIX_FMT_HM12: + case V4L2_PIX_FMT_NV12_16L16: switch (dest_pix_fmt) { case V4L2_PIX_FMT_RGB24: - v4lconvert_hm12_to_rgb24(src, dest, width, height); + v4lconvert_nv12_16l16_to_rgb24(src, dest, width, height); break; case V4L2_PIX_FMT_BGR24: - v4lconvert_hm12_to_bgr24(src, dest, width, height); + v4lconvert_nv12_16l16_to_bgr24(src, dest, width, height); break; case V4L2_PIX_FMT_YUV420: - v4lconvert_hm12_to_yuv420(src, dest, width, height, 0); + v4lconvert_nv12_16l16_to_yuv420(src, dest, width, height, 0); break; case V4L2_PIX_FMT_YVU420: - v4lconvert_hm12_to_yuv420(src, dest, width, height, 1); + v4lconvert_nv12_16l16_to_yuv420(src, dest, width, height, 1); break; } break; diff --git a/lib/libv4lconvert/hm12.c b/lib/libv4lconvert/nv12_16l16.c index 4286ce2c..d44a5485 100644 --- a/lib/libv4lconvert/hm12.c +++ b/lib/libv4lconvert/nv12_16l16.c @@ -1,6 +1,6 @@ /* -cx2341x HM12 conversion routines +cx2341x NV12_16L16 conversion routines (C) 2009 Hans Verkuil <hverkuil@xs4all.nl> @@ -23,7 +23,7 @@ Foundation, Inc., 51 Franklin Street, Suite 500, Boston, MA 02110-1335 USA #include "libv4lconvert-priv.h" #include <string.h> -/* The HM12 format is used in the Conexant cx23415/6/8 MPEG encoder devices. +/* The NV12_16L16 format is used in the Conexant cx23415/6/8 MPEG encoder devices. It is a macroblock format with separate Y and UV planes, each plane consisting of 16x16 values. All lines are always 720 bytes long. If the width of the image is less than 720, then the remainder is padding. @@ -40,7 +40,7 @@ Foundation, Inc., 51 Franklin Street, Suite 500, Boston, MA 02110-1335 USA static const int stride = 720; -static void v4lconvert_hm12_to_rgb(const unsigned char *src, unsigned char *dest, +static void v4lconvert_nv12_16l16_to_rgb(const unsigned char *src, unsigned char *dest, int width, int height, int rgb) { unsigned int y, x, i, j; @@ -91,16 +91,16 @@ static void v4lconvert_hm12_to_rgb(const unsigned char *src, unsigned char *dest } } -void v4lconvert_hm12_to_rgb24(const unsigned char *src, unsigned char *dest, +void v4lconvert_nv12_16l16_to_rgb24(const unsigned char *src, unsigned char *dest, int width, int height) { - v4lconvert_hm12_to_rgb(src, dest, width, height, 1); + v4lconvert_nv12_16l16_to_rgb(src, dest, width, height, 1); } -void v4lconvert_hm12_to_bgr24(const unsigned char *src, unsigned char *dest, +void v4lconvert_nv12_16l16_to_bgr24(const unsigned char *src, unsigned char *dest, int width, int height) { - v4lconvert_hm12_to_rgb(src, dest, width, height, 0); + v4lconvert_nv12_16l16_to_rgb(src, dest, width, height, 0); } static void de_macro_uv(unsigned char *dstu, unsigned char *dstv, @@ -146,7 +146,7 @@ static void de_macro_y(unsigned char *dst, const unsigned char *src, } } -void v4lconvert_hm12_to_yuv420(const unsigned char *src, unsigned char *dest, +void v4lconvert_nv12_16l16_to_yuv420(const unsigned char *src, unsigned char *dest, int width, int height, int yvu) { de_macro_y(dest, src, width, height); |