mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-12-23 00:36:51 +00:00
videotestsrc: use C comments instead of C++-style comments
This commit is contained in:
parent
8ff8195108
commit
0ed09fef0d
2 changed files with 22 additions and 22 deletions
|
@ -1278,15 +1278,15 @@ gst_video_test_src_zoneplate (GstVideoTestSrc * v, unsigned char *dest,
|
||||||
for (j = 0, y = yreset; j < h; j++, y++) {
|
for (j = 0, y = yreset; j < h; j++, y++) {
|
||||||
for (i = 0, x = xreset; i < w; i++, x++) {
|
for (i = 0, x = xreset; i < w; i++, x++) {
|
||||||
|
|
||||||
//zero order
|
/* zero order */
|
||||||
int phase = v->k0;
|
int phase = v->k0;
|
||||||
|
|
||||||
//first order
|
/* first order */
|
||||||
phase = phase + (v->kx * i) + (v->ky * j) + (v->kt * t);
|
phase = phase + (v->kx * i) + (v->ky * j) + (v->kt * t);
|
||||||
|
|
||||||
//cross term
|
/* cross term */
|
||||||
//phase = phase + (v->kxt * i * t) + (v->kyt * j * t);
|
/* phase = phase + (v->kxt * i * t) + (v->kyt * j * t); */
|
||||||
//phase = phase + (v->kxy * x * y) / (w/2);
|
/* phase = phase + (v->kxy * x * y) / (w/2); */
|
||||||
|
|
||||||
/*second order */
|
/*second order */
|
||||||
/*normalise x/y terms to rate of change of phase at the picture edge */
|
/*normalise x/y terms to rate of change of phase at the picture edge */
|
||||||
|
@ -1319,27 +1319,27 @@ gst_video_test_src_zoneplate (GstVideoTestSrc * v, unsigned char *dest,
|
||||||
ky2 = (v->ky2 * y * y) / h;
|
ky2 = (v->ky2 * y * y) / h;
|
||||||
for (i = 0, x = xreset; i < w; i++, x++) {
|
for (i = 0, x = xreset; i < w; i++, x++) {
|
||||||
|
|
||||||
//zero order
|
/* zero order */
|
||||||
int phase = v->k0;
|
int phase = v->k0;
|
||||||
|
|
||||||
//first order
|
/* first order */
|
||||||
accum_kx += v->kx;
|
accum_kx += v->kx;
|
||||||
//phase = phase + (v->kx * i) + (v->ky * j) + (v->kt * t);
|
/* phase = phase + (v->kx * i) + (v->ky * j) + (v->kt * t); */
|
||||||
phase = phase + accum_kx + accum_ky + kt;
|
phase = phase + accum_kx + accum_ky + kt;
|
||||||
|
|
||||||
//cross term
|
/* cross term */
|
||||||
accum_kxt += delta_kxt;
|
accum_kxt += delta_kxt;
|
||||||
accum_kxy += delta_kxy;
|
accum_kxy += delta_kxy;
|
||||||
//phase = phase + (v->kxt * i * t) + (v->kyt * j * t);
|
/* phase = phase + (v->kxt * i * t) + (v->kyt * j * t); */
|
||||||
phase = phase + accum_kxt + accum_kyt;
|
phase = phase + accum_kxt + accum_kyt;
|
||||||
|
|
||||||
//phase = phase + (v->kxy * x * y) / (w/2);
|
/* phase = phase + (v->kxy * x * y) / (w/2); */
|
||||||
//phase = phase + accum_kxy / (w/2) ;
|
/* phase = phase + accum_kxy / (w/2); */
|
||||||
phase = phase + (accum_kxy >> 16);
|
phase = phase + (accum_kxy >> 16);
|
||||||
|
|
||||||
/*second order */
|
/*second order */
|
||||||
/*normalise x/y terms to rate of change of phase at the picture edge */
|
/*normalise x/y terms to rate of change of phase at the picture edge */
|
||||||
//phase = phase + ((v->kx2 * x * x)/w) + ((v->ky2 * y * y)/h) + ((v->kt2 * t * t)>>1);
|
/*phase = phase + ((v->kx2 * x * x)/w) + ((v->ky2 * y * y)/h) + ((v->kt2 * t * t)>>1); */
|
||||||
phase = phase + ((v->kx2 * x * x * scale_kx2) >> 16) + ky2 + (kt2 >> 1);
|
phase = phase + ((v->kx2 * x * x * scale_kx2) >> 16) + ky2 + (kt2 >> 1);
|
||||||
|
|
||||||
yuv_color.Y = sine_array[phase & 0xff];
|
yuv_color.Y = sine_array[phase & 0xff];
|
||||||
|
@ -1447,27 +1447,27 @@ gst_video_test_src_chromazoneplate (GstVideoTestSrc * v, unsigned char *dest,
|
||||||
ky2 = (v->ky2 * y * y) / h;
|
ky2 = (v->ky2 * y * y) / h;
|
||||||
for (i = 0, x = xreset; i < w; i++, x++) {
|
for (i = 0, x = xreset; i < w; i++, x++) {
|
||||||
|
|
||||||
//zero order
|
/* zero order */
|
||||||
int phase = v->k0;
|
int phase = v->k0;
|
||||||
|
|
||||||
//first order
|
/* first order */
|
||||||
accum_kx += v->kx;
|
accum_kx += v->kx;
|
||||||
//phase = phase + (v->kx * i) + (v->ky * j) + (v->kt * t);
|
/* phase = phase + (v->kx * i) + (v->ky * j) + (v->kt * t); */
|
||||||
phase = phase + accum_kx + accum_ky + kt;
|
phase = phase + accum_kx + accum_ky + kt;
|
||||||
|
|
||||||
//cross term
|
/* cross term */
|
||||||
accum_kxt += delta_kxt;
|
accum_kxt += delta_kxt;
|
||||||
accum_kxy += delta_kxy;
|
accum_kxy += delta_kxy;
|
||||||
//phase = phase + (v->kxt * i * t) + (v->kyt * j * t);
|
/* phase = phase + (v->kxt * i * t) + (v->kyt * j * t); */
|
||||||
phase = phase + accum_kxt + accum_kyt;
|
phase = phase + accum_kxt + accum_kyt;
|
||||||
|
|
||||||
//phase = phase + (v->kxy * x * y) / (w/2);
|
/* phase = phase + (v->kxy * x * y) / (w/2); */
|
||||||
//phase = phase + accum_kxy / (w/2) ;
|
/* phase = phase + accum_kxy / (w/2); */
|
||||||
phase = phase + (accum_kxy >> 16);
|
phase = phase + (accum_kxy >> 16);
|
||||||
|
|
||||||
/*second order */
|
/*second order */
|
||||||
/*normalise x/y terms to rate of change of phase at the picture edge */
|
/*normalise x/y terms to rate of change of phase at the picture edge */
|
||||||
//phase = phase + ((v->kx2 * x * x)/w) + ((v->ky2 * y * y)/h) + ((v->kt2 * t * t)>>1);
|
/*phase = phase + ((v->kx2 * x * x)/w) + ((v->ky2 * y * y)/h) + ((v->kt2 * t * t)>>1); */
|
||||||
phase = phase + ((v->kx2 * x * x * scale_kx2) >> 16) + ky2 + (kt2 >> 1);
|
phase = phase + ((v->kx2 * x * x * scale_kx2) >> 16) + ky2 + (kt2 >> 1);
|
||||||
|
|
||||||
yuv_color.Y = 128;
|
yuv_color.Y = 128;
|
||||||
|
|
|
@ -58,7 +58,7 @@ struct paintinfo_struct
|
||||||
const struct vts_color_struct_rgb *rgb_color;
|
const struct vts_color_struct_rgb *rgb_color;
|
||||||
const struct vts_color_struct_yuv *yuv_color;
|
const struct vts_color_struct_yuv *yuv_color;
|
||||||
const struct vts_color_struct_gray *gray_color;
|
const struct vts_color_struct_gray *gray_color;
|
||||||
//const struct vts_color_struct *color;
|
/* const struct vts_color_struct *color; */
|
||||||
void (*paint_hline) (paintinfo * p, int x, int y, int w);
|
void (*paint_hline) (paintinfo * p, int x, int y, int w);
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue