summaryrefslogtreecommitdiff
path: root/vp8/common/postproc.c
diff options
context:
space:
mode:
Diffstat (limited to 'vp8/common/postproc.c')
-rw-r--r--vp8/common/postproc.c73
1 files changed, 37 insertions, 36 deletions
diff --git a/vp8/common/postproc.c b/vp8/common/postproc.c
index 42e37da30..6f419435a 100644
--- a/vp8/common/postproc.c
+++ b/vp8/common/postproc.c
@@ -25,28 +25,28 @@
(-(0.148*(float)(t>>16)) - (0.291*(float)(t>>8&0xff)) + (0.439*(float)(t&0xff)) + 128), \
( (0.439*(float)(t>>16)) - (0.368*(float)(t>>8&0xff)) - (0.071*(float)(t&0xff)) + 128)
-// global constants
+/* global constants */
static const unsigned char MB_PREDICTION_MODE_colors[MB_MODE_COUNT][3] =
{
- { RGB_TO_YUV(0x98FB98) }, // PaleGreen
- { RGB_TO_YUV(0x00FF00) }, // Green
- { RGB_TO_YUV(0xADFF2F) }, // GreenYellow
- { RGB_TO_YUV(0x228B22) }, // ForestGreen
- { RGB_TO_YUV(0x006400) }, // DarkGreen
- { RGB_TO_YUV(0x98F5FF) }, // Cadet Blue
- { RGB_TO_YUV(0x6CA6CD) }, // Sky Blue
- { RGB_TO_YUV(0x00008B) }, // Dark blue
- { RGB_TO_YUV(0x551A8B) }, // Purple
- { RGB_TO_YUV(0xFF0000) } // Red
+ { RGB_TO_YUV(0x98FB98) }, /* PaleGreen */
+ { RGB_TO_YUV(0x00FF00) }, /* Green */
+ { RGB_TO_YUV(0xADFF2F) }, /* GreenYellow */
+ { RGB_TO_YUV(0x228B22) }, /* ForestGreen */
+ { RGB_TO_YUV(0x006400) }, /* DarkGreen */
+ { RGB_TO_YUV(0x98F5FF) }, /* Cadet Blue */
+ { RGB_TO_YUV(0x6CA6CD) }, /* Sky Blue */
+ { RGB_TO_YUV(0x00008B) }, /* Dark blue */
+ { RGB_TO_YUV(0x551A8B) }, /* Purple */
+ { RGB_TO_YUV(0xFF0000) } /* Red */
};
static const unsigned char MV_REFERENCE_FRAME_colors[MB_MODE_COUNT][3] =
{
- { RGB_TO_YUV(0x00ff00) }, // Blue
- { RGB_TO_YUV(0x0000ff) }, // Green
- { RGB_TO_YUV(0xffff00) }, // Yellow
- { RGB_TO_YUV(0xff0000) }, // Red
+ { RGB_TO_YUV(0x00ff00) }, /* Blue */
+ { RGB_TO_YUV(0x0000ff) }, /* Green */
+ { RGB_TO_YUV(0xffff00) }, /* Yellow */
+ { RGB_TO_YUV(0xff0000) }, /* Red */
};
static const short kernel5[] =
@@ -129,7 +129,7 @@ void vp8_post_proc_down_and_across_c
for (row = 0; row < rows; row++)
{
- // post_proc_down for one row
+ /* post_proc_down for one row */
p_src = src_ptr;
p_dst = dst_ptr;
@@ -152,7 +152,7 @@ void vp8_post_proc_down_and_across_c
p_dst[col] = v;
}
- // now post_proc_across
+ /* now post_proc_across */
p_src = dst_ptr;
p_dst = dst_ptr;
@@ -181,12 +181,12 @@ void vp8_post_proc_down_and_across_c
p_dst[col-2] = d[(col-2)&7];
}
- //handle the last two pixels
+ /* handle the last two pixels */
p_dst[col-2] = d[(col-2)&7];
p_dst[col-1] = d[(col-1)&7];
- //next row
+ /* next row */
src_ptr += pitch;
dst_ptr += pitch;
}
@@ -379,9 +379,9 @@ static void fillrd(struct postproc_state *state, int q, int a)
sigma = ai + .5 + .6 * (63 - qi) / 63.0;
- // set up a lookup table of 256 entries that matches
- // a gaussian distribution with sigma determined by q.
- //
+ /* set up a lookup table of 256 entries that matches
+ * a gaussian distribution with sigma determined by q.
+ */
{
double i;
int next, j;
@@ -472,9 +472,10 @@ void vp8_plane_add_noise_c(unsigned char *Start, char *noise,
}
}
-// Blend the macro block with a solid colored square. Leave the
-// edges unblended to give distinction to macro blocks in areas
-// filled with the same color block.
+/* Blend the macro block with a solid colored square. Leave the
+ * edges unblended to give distinction to macro blocks in areas
+ * filled with the same color block.
+ */
void vp8_blend_mb_c (unsigned char *y, unsigned char *u, unsigned char *v,
int y1, int u1, int v1, int alpha, int stride)
{
@@ -575,7 +576,7 @@ int vp8_post_proc_frame(VP8_COMMON *oci, YV12_BUFFER_CONFIG *dest, int deblock_l
{
*dest = *oci->frame_to_show;
- // handle problem with extending borders
+ /* handle problem with extending borders */
dest->y_width = oci->Width;
dest->y_height = oci->Height;
dest->uv_height = dest->y_height / 2;
@@ -644,7 +645,7 @@ int vp8_post_proc_frame(VP8_COMMON *oci, YV12_BUFFER_CONFIG *dest, int deblock_l
y_ptr = post->y_buffer + 4 * post->y_stride + 4;
- // vp8_filter each macro block
+ /* vp8_filter each macro block */
for (i = 0; i < mb_rows; i++)
{
for (j = 0; j < mb_cols; j++)
@@ -658,7 +659,7 @@ int vp8_post_proc_frame(VP8_COMMON *oci, YV12_BUFFER_CONFIG *dest, int deblock_l
y_ptr += 16;
}
- mb_index ++; //border
+ mb_index ++; /* border */
y_ptr += post->y_stride * 16 - post->y_width;
}
@@ -676,7 +677,7 @@ int vp8_post_proc_frame(VP8_COMMON *oci, YV12_BUFFER_CONFIG *dest, int deblock_l
y_ptr = post->y_buffer + 4 * post->y_stride + 4;
- // vp8_filter each macro block
+ /* vp8_filter each macro block */
for (i = 0; i < mb_rows; i++)
{
for (j = 0; j < mb_cols; j++)
@@ -693,7 +694,7 @@ int vp8_post_proc_frame(VP8_COMMON *oci, YV12_BUFFER_CONFIG *dest, int deblock_l
y_ptr += 16;
}
- mb_index ++; //border
+ mb_index ++; /* border */
y_ptr += post->y_stride * 16 - post->y_width;
}
@@ -714,7 +715,7 @@ int vp8_post_proc_frame(VP8_COMMON *oci, YV12_BUFFER_CONFIG *dest, int deblock_l
y_ptr = post->y_buffer + 4 * post->y_stride + 4;
- // vp8_filter each macro block
+ /* vp8_filter each macro block */
for (i = 0; i < mb_rows; i++)
{
for (j = 0; j < mb_cols; j++)
@@ -727,7 +728,7 @@ int vp8_post_proc_frame(VP8_COMMON *oci, YV12_BUFFER_CONFIG *dest, int deblock_l
y_ptr += 16;
}
- mb_index ++; //border
+ mb_index ++; /* border */
y_ptr += post->y_stride * 16 - post->y_width;
}
@@ -736,7 +737,7 @@ int vp8_post_proc_frame(VP8_COMMON *oci, YV12_BUFFER_CONFIG *dest, int deblock_l
}
- // Draw motion vectors
+ /* Draw motion vectors */
if (flags & VP8D_DEBUG_LEVEL5)
{
YV12_BUFFER_CONFIG *post = &oci->post_proc_buffer;
@@ -777,7 +778,7 @@ int vp8_post_proc_frame(VP8_COMMON *oci, YV12_BUFFER_CONFIG *dest, int deblock_l
}
}
- // Color in block modes
+ /* Color in block modes */
if (flags & VP8D_DEBUG_LEVEL6)
{
int i, j;
@@ -813,7 +814,7 @@ int vp8_post_proc_frame(VP8_COMMON *oci, YV12_BUFFER_CONFIG *dest, int deblock_l
}
}
- // Color in frame reference blocks
+ /* Color in frame reference blocks */
if (flags & VP8D_DEBUG_LEVEL7)
{
int i, j;
@@ -851,7 +852,7 @@ int vp8_post_proc_frame(VP8_COMMON *oci, YV12_BUFFER_CONFIG *dest, int deblock_l
*dest = oci->post_proc_buffer;
- // handle problem with extending borders
+ /* handle problem with extending borders */
dest->y_width = oci->Width;
dest->y_height = oci->Height;
dest->uv_height = dest->y_height / 2;