summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRon Economos <w6rz@comcast.net>2020-10-22 01:35:23 -0700
committermormj <34754695+mormj@users.noreply.github.com>2020-10-23 09:32:16 -0400
commit1a0d2d4c6d2d19baaeea496c1881619c75b7b65c (patch)
treee08592c54b847c32ec6c9f5677b52080cbeca2af
parent159f4eb7d7b2858fce0f99a3765d8ad548b8c4a2 (diff)
gr-video-sdl: Fix YUV formats.
-rw-r--r--gr-video-sdl/grc/video_sdl_sink.block.yml6
-rw-r--r--gr-video-sdl/include/gnuradio/video_sdl/sink_s.h2
-rw-r--r--gr-video-sdl/include/gnuradio/video_sdl/sink_uc.h2
-rw-r--r--gr-video-sdl/lib/sink_s_impl.cc2
-rw-r--r--gr-video-sdl/lib/sink_uc_impl.cc2
-rw-r--r--gr-video-sdl/python/video_sdl/bindings/sink_s_python.cc2
-rw-r--r--gr-video-sdl/python/video_sdl/bindings/sink_uc_python.cc2
7 files changed, 9 insertions, 9 deletions
diff --git a/gr-video-sdl/grc/video_sdl_sink.block.yml b/gr-video-sdl/grc/video_sdl_sink.block.yml
index 9476a00efe..99470ff9d3 100644
--- a/gr-video-sdl/grc/video_sdl_sink.block.yml
+++ b/gr-video-sdl/grc/video_sdl_sink.block.yml
@@ -32,9 +32,9 @@ parameters:
default: '0'
- id: num_channels
label: Channels
- dtype: enum
+ dtype: int
options: ['1', '2', '3']
- option_labels: [1 (Grayscale), '2 (Y, alternating pixels U and V)', 3 (YUV)]
+ option_labels: [1 (Grayscale), '2 (Y, U and V 4:2:2)', '3 (YUV 4:4:4)']
hide: part
inputs:
@@ -62,7 +62,7 @@ documentation: |-
In 1-channel mode, input data is assumed to be grayscale, with each input item mapping to a single pixel.
- In 2-channel mode, the first channel is Y for every pixel while the second channel alternates between pixels values for U and V.
+ In 2-channel mode, the first channel is Y for every pixel while the second channel alternates between pixel values for U and V.
In 3-channel mode, input channels are assumed to be matching triples of YUV values, one byte per pixel, per channel.
diff --git a/gr-video-sdl/include/gnuradio/video_sdl/sink_s.h b/gr-video-sdl/include/gnuradio/video_sdl/sink_s.h
index 75d6d49df8..51bfd188de 100644
--- a/gr-video-sdl/include/gnuradio/video_sdl/sink_s.h
+++ b/gr-video-sdl/include/gnuradio/video_sdl/sink_s.h
@@ -22,7 +22,7 @@ namespace video_sdl {
*
* input signature is one, two or three streams of signed short.
* One stream: stream is grey (Y)
- * two streems: first is grey (Y), second is alternating U and V
+ * two streams: first is grey (Y), second is alternating U and V
* Three streams: first is grey (Y), second is U, third is V
* Input samples must be in the range [0,255].
*/
diff --git a/gr-video-sdl/include/gnuradio/video_sdl/sink_uc.h b/gr-video-sdl/include/gnuradio/video_sdl/sink_uc.h
index 95e57d5c89..dae931b19a 100644
--- a/gr-video-sdl/include/gnuradio/video_sdl/sink_uc.h
+++ b/gr-video-sdl/include/gnuradio/video_sdl/sink_uc.h
@@ -22,7 +22,7 @@ namespace video_sdl {
*
* input signature is one, two or three streams of uchar.
* One stream: stream is grey (Y)
- * two streems: first is grey (Y), second is alternating U and V
+ * two streams: first is grey (Y), second is alternating U and V
* Three streams: first is grey (Y), second is U, third is V
* Input samples must be in the range [0,255].
*/
diff --git a/gr-video-sdl/lib/sink_s_impl.cc b/gr-video-sdl/lib/sink_s_impl.cc
index 641f56bf8f..f1bf59eff4 100644
--- a/gr-video-sdl/lib/sink_s_impl.cc
+++ b/gr-video-sdl/lib/sink_s_impl.cc
@@ -201,7 +201,7 @@ int sink_s_impl::copy_plane_to_surface(int plane,
unsigned char* dst_pixels_2 = (unsigned char*)d_image->pixels[second_dst_plane];
dst_pixels_2 = &dst_pixels_2[current_line * d_image->pitches[second_dst_plane]];
- int src_width = (0 == plane || 12 == plane || 1122 == plane) ? d_width : d_width / 2;
+ int src_width = d_width;
int noutput_items_produced = 0;
int max_height = (0 == plane) ? d_height - 1 : d_height / 2 - 1;
diff --git a/gr-video-sdl/lib/sink_uc_impl.cc b/gr-video-sdl/lib/sink_uc_impl.cc
index e26fe54c83..ba30576a00 100644
--- a/gr-video-sdl/lib/sink_uc_impl.cc
+++ b/gr-video-sdl/lib/sink_uc_impl.cc
@@ -195,7 +195,7 @@ int sink_uc_impl::copy_plane_to_surface(int plane,
unsigned char* dst_pixels_2 = (unsigned char*)d_image->pixels[second_dst_plane];
dst_pixels_2 = &dst_pixels_2[current_line * d_image->pitches[second_dst_plane]];
- int src_width = (0 == plane || 12 == plane || 1122 == plane) ? d_width : d_width / 2;
+ int src_width = d_width;
int noutput_items_produced = 0;
int max_height = (0 == plane) ? d_height - 1 : d_height / 2 - 1;
diff --git a/gr-video-sdl/python/video_sdl/bindings/sink_s_python.cc b/gr-video-sdl/python/video_sdl/bindings/sink_s_python.cc
index 172525e8dc..cc9bd4d35e 100644
--- a/gr-video-sdl/python/video_sdl/bindings/sink_s_python.cc
+++ b/gr-video-sdl/python/video_sdl/bindings/sink_s_python.cc
@@ -14,7 +14,7 @@
/* BINDTOOL_GEN_AUTOMATIC(0) */
/* BINDTOOL_USE_PYGCCXML(0) */
/* BINDTOOL_HEADER_FILE(sink_s.h) */
-/* BINDTOOL_HEADER_FILE_HASH(15f36b3f61a071fa6a28398c6af1e4f4) */
+/* BINDTOOL_HEADER_FILE_HASH(d03e405a0f05388481c19349dbc08a51) */
/***********************************************************************************/
#include <pybind11/complex.h>
diff --git a/gr-video-sdl/python/video_sdl/bindings/sink_uc_python.cc b/gr-video-sdl/python/video_sdl/bindings/sink_uc_python.cc
index 4f86aee0e1..3106548b02 100644
--- a/gr-video-sdl/python/video_sdl/bindings/sink_uc_python.cc
+++ b/gr-video-sdl/python/video_sdl/bindings/sink_uc_python.cc
@@ -14,7 +14,7 @@
/* BINDTOOL_GEN_AUTOMATIC(0) */
/* BINDTOOL_USE_PYGCCXML(0) */
/* BINDTOOL_HEADER_FILE(sink_uc.h) */
-/* BINDTOOL_HEADER_FILE_HASH(d7fd4b5abcf667140169527a0b454a6f) */
+/* BINDTOOL_HEADER_FILE_HASH(49c2aee2770a14d64b019ea2a551e7c7) */
/***********************************************************************************/
#include <pybind11/complex.h>