summaryrefslogtreecommitdiff
path: root/linux/drivers/media/video/ivtv/ivtv-vbi.c
diff options
context:
space:
mode:
Diffstat (limited to 'linux/drivers/media/video/ivtv/ivtv-vbi.c')
-rw-r--r--linux/drivers/media/video/ivtv/ivtv-vbi.c38
1 files changed, 19 insertions, 19 deletions
diff --git a/linux/drivers/media/video/ivtv/ivtv-vbi.c b/linux/drivers/media/video/ivtv/ivtv-vbi.c
index 747827b2e..71acc97b1 100644
--- a/linux/drivers/media/video/ivtv/ivtv-vbi.c
+++ b/linux/drivers/media/video/ivtv/ivtv-vbi.c
@@ -218,7 +218,7 @@ static int ivtv_convert_ivtv_vbi(struct ivtv *itv, u8 *p)
ssize_t ivtv_write_vbi(struct ivtv *itv, const char __user *ubuf, size_t count)
{
- // Should be a __user pointer, but sparse doesn't parse this bit correctly.
+ /* Should be a __user pointer, but sparse doesn't parse this bit correctly. */
const struct v4l2_sliced_vbi_data *p = (const struct v4l2_sliced_vbi_data *)ubuf;
u8 cc[4] = { 0x80, 0x80, 0x80, 0x80 };
int found_cc = 0;
@@ -262,7 +262,7 @@ ssize_t ivtv_write_vbi(struct ivtv *itv, const char __user *ubuf, size_t count)
case V4L2_SLICED_WSS_625:
if (p->line == 23 && p->field == 0 &&
(itv->vbi.service_set_out & V4L2_SLICED_WSS_625)) {
- // No lock needed for WSS
+ /* No lock needed for WSS */
itv->vbi.wss = p->data[0] | (p->data[1] << 8);
itv->vbi.wss_found = 1;
set_bit(IVTV_F_I_UPDATE_WSS, &itv->i_flags);
@@ -288,9 +288,9 @@ ssize_t ivtv_write_vbi(struct ivtv *itv, const char __user *ubuf, size_t count)
return (const char __user *)p - ubuf;
}
-// Compress raw VBI format, removes leading SAV codes and surplus space after the
-// field.
-// Returns new compressed size.
+/* Compress raw VBI format, removes leading SAV codes and surplus space after the
+ field.
+ Returns new compressed size. */
static u32 compress_raw_buf(struct ivtv *itv, u8 *buf, u32 size)
{
u32 line_size = itv->vbi.raw_decoder_line_size;
@@ -304,7 +304,7 @@ static u32 compress_raw_buf(struct ivtv *itv, u8 *buf, u32 size)
for (i = 0; i < lines; i++) {
p = buf + i * line_size;
- // Look for SAV code
+ /* Look for SAV code */
if (p[0] != 0xff || p[1] || p[2] || (p[3] != sav1 && p[3] != sav2)) {
break;
}
@@ -315,15 +315,15 @@ static u32 compress_raw_buf(struct ivtv *itv, u8 *buf, u32 size)
}
-// Compressed VBI format, all found sliced blocks put next to one another
-// Returns new compressed size
+/* Compressed VBI format, all found sliced blocks put next to one another
+ Returns new compressed size */
static u32 compress_sliced_buf(struct ivtv *itv, u32 line, u8 *buf, u32 size, u8 sav)
{
u32 line_size = itv->vbi.sliced_decoder_line_size;
struct v4l2_decode_vbi_line vbi;
int i;
- // find the first valid line
+ /* find the first valid line */
for (i = 0; i < size; i++, buf++) {
if (buf[0] == 0xff && !buf[1] && !buf[2] && buf[3] == sav)
break;
@@ -336,7 +336,7 @@ static u32 compress_sliced_buf(struct ivtv *itv, u32 line, u8 *buf, u32 size, u8
for (i = 0; i < size / line_size; i++) {
u8 *p = buf + i * line_size;
- // Look for SAV code
+ /* Look for SAV code */
if (p[0] != 0xff || p[1] || p[2] || p[3] != sav) {
continue;
}
@@ -360,7 +360,7 @@ void ivtv_process_vbi_data(struct ivtv *itv, struct ivtv_buffer *buf,
u32 size = buf->bytesused;
int y;
- // Raw VBI data
+ /* Raw VBI data */
if (streamtype == IVTV_ENC_STREAM_TYPE_VBI && itv->vbi.sliced_in->service_set == 0) {
u8 type;
@@ -370,7 +370,7 @@ void ivtv_process_vbi_data(struct ivtv *itv, struct ivtv_buffer *buf,
size = buf->bytesused = compress_raw_buf(itv, p, size);
- // second field of the frame?
+ /* second field of the frame? */
if (type == itv->vbi.raw_decoder_sav_even_field) {
/* Dirty hack needed for backwards
compatibility of old VBI software. */
@@ -381,21 +381,21 @@ void ivtv_process_vbi_data(struct ivtv *itv, struct ivtv_buffer *buf,
return;
}
- // Sliced VBI data with data insertion
+ /* Sliced VBI data with data insertion */
if (streamtype == IVTV_ENC_STREAM_TYPE_VBI) {
int lines;
ivtv_buf_swap(buf);
- // first field
+ /* first field */
lines = compress_sliced_buf(itv, 0, p, size / 2,
itv->vbi.sliced_decoder_sav_odd_field);
- // second field
- // experimentation shows that the second half does not always begin
- // at the exact address. So start a bit earlier (hence 32).
+ /* second field */
+ /* experimentation shows that the second half does not always begin
+ at the exact address. So start a bit earlier (hence 32). */
lines = compress_sliced_buf(itv, lines, p + size / 2 - 32, size / 2 + 32,
itv->vbi.sliced_decoder_sav_even_field);
- // always return at least one empty line
+ /* always return at least one empty line */
if (lines == 0) {
itv->vbi.sliced_data[0].id = 0;
itv->vbi.sliced_data[0].line = 0;
@@ -412,7 +412,7 @@ void ivtv_process_vbi_data(struct ivtv *itv, struct ivtv_buffer *buf,
return;
}
- // Sliced VBI re-inserted from an MPEG stream
+ /* Sliced VBI re-inserted from an MPEG stream */
if (streamtype == IVTV_DEC_STREAM_TYPE_VBI) {
/* If the size is not 4-byte aligned, then the starting address
for the swapping is also shifted. After swapping the data the