summaryrefslogtreecommitdiff
path: root/vp8
diff options
context:
space:
mode:
Diffstat (limited to 'vp8')
-rw-r--r--vp8/common/alloccommon.c8
-rw-r--r--vp8/common/arm/bilinearfilter_arm.c22
-rw-r--r--vp8/common/arm/filter_arm.c82
-rw-r--r--vp8/common/arm/loopfilter_arm.c20
-rw-r--r--vp8/common/arm/neon/recon_neon.c2
-rw-r--r--vp8/common/blockd.h78
-rw-r--r--vp8/common/debugmodes.c10
-rw-r--r--vp8/common/defaultcoefcounts.h72
-rw-r--r--vp8/common/entropy.h26
-rw-r--r--vp8/common/entropymv.c16
-rw-r--r--vp8/common/extend.c31
-rw-r--r--vp8/common/filter_c.c76
-rw-r--r--vp8/common/findnearmv.c4
-rw-r--r--vp8/common/generic/systemdependent.c2
-rw-r--r--vp8/common/invtrans.c4
-rw-r--r--vp8/common/loopfilter.c132
-rw-r--r--vp8/common/loopfilter.h12
-rw-r--r--vp8/common/loopfilter_filters.c69
-rw-r--r--vp8/common/mbpitch.c8
-rw-r--r--vp8/common/modecont.c12
-rw-r--r--vp8/common/modecontext.c220
-rw-r--r--vp8/common/onyxc_int.h38
-rw-r--r--vp8/common/postproc.c73
-rw-r--r--vp8/common/ppflags.h2
-rw-r--r--vp8/common/recon.c8
-rw-r--r--vp8/common/recon.h4
-rw-r--r--vp8/common/reconinter.c49
-rw-r--r--vp8/common/reconintra.c46
-rw-r--r--vp8/common/reconintra4x4.c7
-rw-r--r--vp8/common/setupintrarecon.c2
-rw-r--r--vp8/common/textblit.c2
-rw-r--r--vp8/common/threading.h6
-rw-r--r--vp8/common/treecoder.h2
-rw-r--r--vp8/common/type_aliases.h14
-rw-r--r--vp8/common/x86/loopfilter_x86.c16
-rw-r--r--vp8/common/x86/vp8_asm_stubs.c36
-rw-r--r--vp8/common/x86/x86_systemdependent.c2
-rw-r--r--vp8/decoder/arm/arm_dsystemdependent.c4
-rw-r--r--vp8/decoder/arm/dboolhuff_arm.h10
-rw-r--r--vp8/decoder/dboolhuff.h19
-rw-r--r--vp8/decoder/decodemv.c44
-rw-r--r--vp8/decoder/decodframe.c122
-rw-r--r--vp8/decoder/dequantize.c4
-rw-r--r--vp8/decoder/detokenize.c39
-rw-r--r--vp8/decoder/generic/dsystemdependent.c4
-rw-r--r--vp8/decoder/onyxd_if.c38
-rw-r--r--vp8/decoder/onyxd_int.h14
-rw-r--r--vp8/decoder/reconintra_mt.c98
-rw-r--r--vp8/decoder/reconintra_mt.h2
-rw-r--r--vp8/decoder/threading.c132
-rw-r--r--vp8/encoder/firstpass.c8
-rw-r--r--vp8/vp8_dx_iface.c26
52 files changed, 910 insertions, 867 deletions
diff --git a/vp8/common/alloccommon.c b/vp8/common/alloccommon.c
index 408c25306..9dce8c8f6 100644
--- a/vp8/common/alloccommon.c
+++ b/vp8/common/alloccommon.c
@@ -56,7 +56,7 @@ int vp8_alloc_frame_buffers(VP8_COMMON *oci, int width, int height)
vp8_de_alloc_frame_buffers(oci);
- // our internal buffers are always multiples of 16
+ /* our internal buffers are always multiples of 16 */
if ((width & 0xf) != 0)
width += 16 - (width & 0xf);
@@ -153,7 +153,7 @@ void vp8_setup_version(VP8_COMMON *cm)
cm->full_pixel = 1;
break;
default:
- //4,5,6,7 are reserved for future use
+ /*4,5,6,7 are reserved for future use*/
cm->no_lpf = 0;
cm->simpler_lpf = 0;
cm->use_bilinear_mc_filter = 0;
@@ -177,10 +177,10 @@ void vp8_create_common(VP8_COMMON *oci)
oci->clr_type = REG_YUV;
oci->clamp_type = RECON_CLAMP_REQUIRED;
- // Initialise reference frame sign bias structure to defaults
+ /* Initialise reference frame sign bias structure to defaults */
vpx_memset(oci->ref_frame_sign_bias, 0, sizeof(oci->ref_frame_sign_bias));
- // Default disable buffer to buffer copying
+ /* Default disable buffer to buffer copying */
oci->copy_buffer_to_gf = 0;
oci->copy_buffer_to_arf = 0;
}
diff --git a/vp8/common/arm/bilinearfilter_arm.c b/vp8/common/arm/bilinearfilter_arm.c
index 247f95b6c..65afb41a1 100644
--- a/vp8/common/arm/bilinearfilter_arm.c
+++ b/vp8/common/arm/bilinearfilter_arm.c
@@ -49,7 +49,7 @@ extern void vp8_filter_block2d_bil_second_pass_armv6
const short *vp8_filter
);
-/*
+#if 0
void vp8_filter_block2d_bil_first_pass_6
(
unsigned char *src_ptr,
@@ -66,14 +66,14 @@ void vp8_filter_block2d_bil_first_pass_6
{
for ( j=0; j<output_width; j++ )
{
- // Apply bilinear filter
+ /* Apply bilinear filter */
output_ptr[j] = ( ( (int)src_ptr[0] * vp8_filter[0]) +
((int)src_ptr[1] * vp8_filter[1]) +
(VP8_FILTER_WEIGHT/2) ) >> VP8_FILTER_SHIFT;
src_ptr++;
}
- // Next row...
+ /* Next row... */
src_ptr += src_pixels_per_line - output_width;
output_ptr += output_width;
}
@@ -96,7 +96,7 @@ void vp8_filter_block2d_bil_second_pass_6
{
for ( j=0; j<output_width; j++ )
{
- // Apply filter
+ /* Apply filter */
Temp = ((int)src_ptr[0] * vp8_filter[0]) +
((int)src_ptr[output_width] * vp8_filter[1]) +
(VP8_FILTER_WEIGHT/2);
@@ -104,12 +104,12 @@ void vp8_filter_block2d_bil_second_pass_6
src_ptr++;
}
- // Next row...
- //src_ptr += src_pixels_per_line - output_width;
+ /* Next row... */
+ /*src_ptr += src_pixels_per_line - output_width;*/
output_ptr += output_pitch;
}
}
-*/
+#endif
void vp8_filter_block2d_bil_armv6
(
@@ -124,13 +124,13 @@ void vp8_filter_block2d_bil_armv6
)
{
- unsigned short FData[36*16]; // Temp data bufffer used in filtering
+ unsigned short FData[36*16]; /* Temp data bufffer used in filtering */
- // First filter 1-D horizontally...
- // pixel_step = 1;
+ /* First filter 1-D horizontally... */
+ /* pixel_step = 1; */
vp8_filter_block2d_bil_first_pass_armv6(src_ptr, FData, src_pixels_per_line, Height + 1, Width, HFilter);
- // then 1-D vertically...
+ /* then 1-D vertically... */
vp8_filter_block2d_bil_second_pass_armv6(FData, output_ptr, dst_pitch, Height, Width, VFilter);
}
diff --git a/vp8/common/arm/filter_arm.c b/vp8/common/arm/filter_arm.c
index 4bfa3ab34..b4f2fe6ca 100644
--- a/vp8/common/arm/filter_arm.c
+++ b/vp8/common/arm/filter_arm.c
@@ -20,13 +20,13 @@
DECLARE_ALIGNED(16, static const short, sub_pel_filters[8][6]) =
{
- { 0, 0, 128, 0, 0, 0 }, // note that 1/8 pel positions are just as per alpha -0.5 bicubic
+ { 0, 0, 128, 0, 0, 0 }, /* note that 1/8 pel positions are just as per alpha -0.5 bicubic */
{ 0, -6, 123, 12, -1, 0 },
- { 2, -11, 108, 36, -8, 1 }, // New 1/4 pel 6 tap filter
+ { 2, -11, 108, 36, -8, 1 }, /* New 1/4 pel 6 tap filter */
{ 0, -9, 93, 50, -6, 0 },
- { 3, -16, 77, 77, -16, 3 }, // New 1/2 pel 6 tap filter
+ { 3, -16, 77, 77, -16, 3 }, /* New 1/2 pel 6 tap filter */
{ 0, -6, 50, 93, -9, 0 },
- { 1, -8, 36, 108, -11, 2 }, // New 1/4 pel 6 tap filter
+ { 1, -8, 36, 108, -11, 2 }, /* New 1/4 pel 6 tap filter */
{ 0, -1, 12, 123, -6, 0 },
};
@@ -93,34 +93,34 @@ void vp8_sixtap_predict_armv6
{
const short *HFilter;
const short *VFilter;
- DECLARE_ALIGNED_ARRAY(4, short, FData, 12*4); // Temp data bufffer used in filtering
+ DECLARE_ALIGNED_ARRAY(4, short, FData, 12*4); /* Temp data bufffer used in filtering */
- HFilter = sub_pel_filters[xoffset]; // 6 tap
- VFilter = sub_pel_filters[yoffset]; // 6 tap
+ HFilter = sub_pel_filters[xoffset]; /* 6 tap */
+ VFilter = sub_pel_filters[yoffset]; /* 6 tap */
- // Vfilter is null. First pass only
+ /* Vfilter is null. First pass only */
if (xoffset && !yoffset)
{
- //vp8_filter_block2d_first_pass_armv6 ( src_ptr, FData+2, src_pixels_per_line, 4, 4, HFilter );
- //vp8_filter_block2d_second_pass_armv6 ( FData+2, dst_ptr, dst_pitch, 4, VFilter );
+ /*vp8_filter_block2d_first_pass_armv6 ( src_ptr, FData+2, src_pixels_per_line, 4, 4, HFilter );
+ vp8_filter_block2d_second_pass_armv6 ( FData+2, dst_ptr, dst_pitch, 4, VFilter );*/
vp8_filter_block2d_first_pass_only_armv6(src_ptr, dst_ptr, src_pixels_per_line, 4, dst_pitch, HFilter);
}
- // Hfilter is null. Second pass only
+ /* Hfilter is null. Second pass only */
else if (!xoffset && yoffset)
{
vp8_filter_block2d_second_pass_only_armv6(src_ptr, dst_ptr, src_pixels_per_line, 4, dst_pitch, VFilter);
}
else
{
- // Vfilter is a 4 tap filter
+ /* Vfilter is a 4 tap filter */
if (yoffset & 0x1)
{
vp8_filter_block2d_first_pass_armv6(src_ptr - src_pixels_per_line, FData + 1, src_pixels_per_line, 4, 7, HFilter);
vp8_filter4_block2d_second_pass_armv6(FData + 2, dst_ptr, dst_pitch, 4, VFilter);
}
- // Vfilter is 6 tap filter
+ /* Vfilter is 6 tap filter */
else
{
vp8_filter_block2d_first_pass_armv6(src_ptr - (2 * src_pixels_per_line), FData, src_pixels_per_line, 4, 9, HFilter);
@@ -129,7 +129,7 @@ void vp8_sixtap_predict_armv6
}
}
-/*
+#if 0
void vp8_sixtap_predict8x4_armv6
(
unsigned char *src_ptr,
@@ -142,33 +142,33 @@ void vp8_sixtap_predict8x4_armv6
{
const short *HFilter;
const short *VFilter;
- DECLARE_ALIGNED_ARRAY(4, short, FData, 16*8); // Temp data bufffer used in filtering
+ DECLARE_ALIGNED_ARRAY(4, short, FData, 16*8); /* Temp data bufffer used in filtering */
- HFilter = sub_pel_filters[xoffset]; // 6 tap
- VFilter = sub_pel_filters[yoffset]; // 6 tap
+ HFilter = sub_pel_filters[xoffset]; /* 6 tap */
+ VFilter = sub_pel_filters[yoffset]; /* 6 tap */
-// if (xoffset && !yoffset)
-// {
-// vp8_filter_block2d_first_pass_only_armv6 ( src_ptr, dst_ptr, src_pixels_per_line, 8, dst_pitch, HFilter );
-// }
- // Hfilter is null. Second pass only
-// else if (!xoffset && yoffset)
-// {
-// vp8_filter_block2d_second_pass_only_armv6 ( src_ptr, dst_ptr, src_pixels_per_line, 8, dst_pitch, VFilter );
-// }
-// else
-// {
-// if (yoffset & 0x1)
- // vp8_filter_block2d_first_pass_armv6 ( src_ptr-src_pixels_per_line, FData+1, src_pixels_per_line, 8, 7, HFilter );
- // else
+ /*if (xoffset && !yoffset)
+ {
+ vp8_filter_block2d_first_pass_only_armv6 ( src_ptr, dst_ptr, src_pixels_per_line, 8, dst_pitch, HFilter );
+ }*/
+ /* Hfilter is null. Second pass only */
+ /*else if (!xoffset && yoffset)
+ {
+ vp8_filter_block2d_second_pass_only_armv6 ( src_ptr, dst_ptr, src_pixels_per_line, 8, dst_pitch, VFilter );
+ }
+ else
+ {
+ if (yoffset & 0x1)
+ vp8_filter_block2d_first_pass_armv6 ( src_ptr-src_pixels_per_line, FData+1, src_pixels_per_line, 8, 7, HFilter );
+ else*/
vp8_filter_block2d_first_pass_armv6 ( src_ptr-(2*src_pixels_per_line), FData, src_pixels_per_line, 8, 9, HFilter );
vp8_filter_block2d_second_pass_armv6 ( FData+2, dst_ptr, dst_pitch, 4, 8, VFilter );
-// }
+ /*}*/
}
-*/
+#endif
void vp8_sixtap_predict8x8_armv6
(
@@ -182,16 +182,16 @@ void vp8_sixtap_predict8x8_armv6
{
const short *HFilter;
const short *VFilter;
- DECLARE_ALIGNED_ARRAY(4, short, FData, 16*8); // Temp data bufffer used in filtering
+ DECLARE_ALIGNED_ARRAY(4, short, FData, 16*8); /* Temp data bufffer used in filtering */
- HFilter = sub_pel_filters[xoffset]; // 6 tap
- VFilter = sub_pel_filters[yoffset]; // 6 tap
+ HFilter = sub_pel_filters[xoffset]; /* 6 tap */
+ VFilter = sub_pel_filters[yoffset]; /* 6 tap */
if (xoffset && !yoffset)
{
vp8_filter_block2d_first_pass_only_armv6(src_ptr, dst_ptr, src_pixels_per_line, 8, dst_pitch, HFilter);
}
- // Hfilter is null. Second pass only
+ /* Hfilter is null. Second pass only */
else if (!xoffset && yoffset)
{
vp8_filter_block2d_second_pass_only_armv6(src_ptr, dst_ptr, src_pixels_per_line, 8, dst_pitch, VFilter);
@@ -224,16 +224,16 @@ void vp8_sixtap_predict16x16_armv6
{
const short *HFilter;
const short *VFilter;
- DECLARE_ALIGNED_ARRAY(4, short, FData, 24*16); // Temp data bufffer used in filtering
+ DECLARE_ALIGNED_ARRAY(4, short, FData, 24*16); /* Temp data bufffer used in filtering */
- HFilter = sub_pel_filters[xoffset]; // 6 tap
- VFilter = sub_pel_filters[yoffset]; // 6 tap
+ HFilter = sub_pel_filters[xoffset]; /* 6 tap */
+ VFilter = sub_pel_filters[yoffset]; /* 6 tap */
if (xoffset && !yoffset)
{
vp8_filter_block2d_first_pass_only_armv6(src_ptr, dst_ptr, src_pixels_per_line, 16, dst_pitch, HFilter);
}
- // Hfilter is null. Second pass only
+ /* Hfilter is null. Second pass only */
else if (!xoffset && yoffset)
{
vp8_filter_block2d_second_pass_only_armv6(src_ptr, dst_ptr, src_pixels_per_line, 16, dst_pitch, VFilter);
diff --git a/vp8/common/arm/loopfilter_arm.c b/vp8/common/arm/loopfilter_arm.c
index f86bca1ea..a81c50588 100644
--- a/vp8/common/arm/loopfilter_arm.c
+++ b/vp8/common/arm/loopfilter_arm.c
@@ -35,8 +35,8 @@ extern loop_filter_uvfunction vp8_mbloop_filter_vertical_edge_uv_neon;
#if HAVE_ARMV6
-//ARMV6 loopfilter functions
-// Horizontal MB filtering
+/*ARMV6 loopfilter functions*/
+/* Horizontal MB filtering */
void vp8_loop_filter_mbh_armv6(unsigned char *y_ptr, unsigned char *u_ptr, unsigned char *v_ptr,
int y_stride, int uv_stride, loop_filter_info *lfi, int simpler_lpf)
{
@@ -60,7 +60,7 @@ void vp8_loop_filter_mbhs_armv6(unsigned char *y_ptr, unsigned char *u_ptr, unsi
vp8_loop_filter_simple_horizontal_edge_armv6(y_ptr, y_stride, lfi->mbflim, lfi->lim, lfi->mbthr, 2);
}
-// Vertical MB Filtering
+/* Vertical MB Filtering */
void vp8_loop_filter_mbv_armv6(unsigned char *y_ptr, unsigned char *u_ptr, unsigned char *v_ptr,
int y_stride, int uv_stride, loop_filter_info *lfi, int simpler_lpf)
{
@@ -84,7 +84,7 @@ void vp8_loop_filter_mbvs_armv6(unsigned char *y_ptr, unsigned char *u_ptr, unsi
vp8_loop_filter_simple_vertical_edge_armv6(y_ptr, y_stride, lfi->mbflim, lfi->lim, lfi->mbthr, 2);
}
-// Horizontal B Filtering
+/* Horizontal B Filtering */
void vp8_loop_filter_bh_armv6(unsigned char *y_ptr, unsigned char *u_ptr, unsigned char *v_ptr,
int y_stride, int uv_stride, loop_filter_info *lfi, int simpler_lpf)
{
@@ -112,7 +112,7 @@ void vp8_loop_filter_bhs_armv6(unsigned char *y_ptr, unsigned char *u_ptr, unsig
vp8_loop_filter_simple_horizontal_edge_armv6(y_ptr + 12 * y_stride, y_stride, lfi->flim, lfi->lim, lfi->thr, 2);
}
-// Vertical B Filtering
+/* Vertical B Filtering */
void vp8_loop_filter_bv_armv6(unsigned char *y_ptr, unsigned char *u_ptr, unsigned char *v_ptr,
int y_stride, int uv_stride, loop_filter_info *lfi, int simpler_lpf)
{
@@ -142,8 +142,8 @@ void vp8_loop_filter_bvs_armv6(unsigned char *y_ptr, unsigned char *u_ptr, unsig
#endif
#if HAVE_ARMV7
-// NEON loopfilter functions
-// Horizontal MB filtering
+/* NEON loopfilter functions */
+/* Horizontal MB filtering */
void vp8_loop_filter_mbh_neon(unsigned char *y_ptr, unsigned char *u_ptr, unsigned char *v_ptr,
int y_stride, int uv_stride, loop_filter_info *lfi, int simpler_lpf)
{
@@ -164,7 +164,7 @@ void vp8_loop_filter_mbhs_neon(unsigned char *y_ptr, unsigned char *u_ptr, unsig
vp8_loop_filter_simple_horizontal_edge_neon(y_ptr, y_stride, lfi->mbflim, lfi->lim, lfi->mbthr, 2);
}
-// Vertical MB Filtering
+/* Vertical MB Filtering */
void vp8_loop_filter_mbv_neon(unsigned char *y_ptr, unsigned char *u_ptr, unsigned char *v_ptr,
int y_stride, int uv_stride, loop_filter_info *lfi, int simpler_lpf)
{
@@ -185,7 +185,7 @@ void vp8_loop_filter_mbvs_neon(unsigned char *y_ptr, unsigned char *u_ptr, unsig
vp8_loop_filter_simple_vertical_edge_neon(y_ptr, y_stride, lfi->mbflim, lfi->lim, lfi->mbthr, 2);
}
-// Horizontal B Filtering
+/* Horizontal B Filtering */
void vp8_loop_filter_bh_neon(unsigned char *y_ptr, unsigned char *u_ptr, unsigned char *v_ptr,
int y_stride, int uv_stride, loop_filter_info *lfi, int simpler_lpf)
{
@@ -210,7 +210,7 @@ void vp8_loop_filter_bhs_neon(unsigned char *y_ptr, unsigned char *u_ptr, unsign
vp8_loop_filter_simple_horizontal_edge_neon(y_ptr + 12 * y_stride, y_stride, lfi->flim, lfi->lim, lfi->thr, 2);
}
-// Vertical B Filtering
+/* Vertical B Filtering */
void vp8_loop_filter_bv_neon(unsigned char *y_ptr, unsigned char *u_ptr, unsigned char *v_ptr,
int y_stride, int uv_stride, loop_filter_info *lfi, int simpler_lpf)
{
diff --git a/vp8/common/arm/neon/recon_neon.c b/vp8/common/arm/neon/recon_neon.c
index 3b2df4c9f..f7930ee5f 100644
--- a/vp8/common/arm/neon/recon_neon.c
+++ b/vp8/common/arm/neon/recon_neon.c
@@ -23,7 +23,7 @@ void vp8_recon_mb_neon(const vp8_recon_rtcd_vtable_t *rtcd, MACROBLOCKD *x)
unsigned char *udst_ptr = x->dst.u_buffer;
unsigned char *vdst_ptr = x->dst.v_buffer;
int ystride = x->dst.y_stride;
- //int uv_stride = x->dst.uv_stride;
+ /*int uv_stride = x->dst.uv_stride;*/
vp8_recon16x16mb_neon(pred_ptr, diff_ptr, dst_ptr, ystride, udst_ptr, vdst_ptr);
}
diff --git a/vp8/common/blockd.h b/vp8/common/blockd.h
index a81bc8b95..a38f0b72b 100644
--- a/vp8/common/blockd.h
+++ b/vp8/common/blockd.h
@@ -24,7 +24,7 @@ void vpx_log(const char *format, ...);
#define TRUE 1
#define FALSE 0
-//#define DCPRED 1
+/*#define DCPRED 1*/
#define DCPREDSIMTHRESH 0
#define DCPREDCNTTHRESH 3
@@ -39,7 +39,7 @@ void vpx_log(const char *format, ...);
#define MAX_REF_LF_DELTAS 4
#define MAX_MODE_LF_DELTAS 4
-// Segment Feature Masks
+/* Segment Feature Masks */
#define SEGMENT_DELTADATA 0
#define SEGMENT_ABSDATA 1
@@ -75,11 +75,11 @@ typedef enum
typedef enum
{
- DC_PRED, // average of above and left pixels
- V_PRED, // vertical prediction
- H_PRED, // horizontal prediction
- TM_PRED, // Truemotion prediction
- B_PRED, // block based prediction, each block has its own prediction mode
+ DC_PRED, /* average of above and left pixels */
+ V_PRED, /* vertical prediction */
+ H_PRED, /* horizontal prediction */
+ TM_PRED, /* Truemotion prediction */
+ B_PRED, /* block based prediction, each block has its own prediction mode */
NEARESTMV,
NEARMV,
@@ -90,16 +90,16 @@ typedef enum
MB_MODE_COUNT
} MB_PREDICTION_MODE;
-// Macroblock level features
+/* Macroblock level features */
typedef enum
{
- MB_LVL_ALT_Q = 0, // Use alternate Quantizer ....
- MB_LVL_ALT_LF = 1, // Use alternate loop filter value...
- MB_LVL_MAX = 2, // Number of MB level features supported
+ MB_LVL_ALT_Q = 0, /* Use alternate Quantizer .... */
+ MB_LVL_ALT_LF = 1, /* Use alternate loop filter value... */
+ MB_LVL_MAX = 2 /* Number of MB level features supported */
} MB_LVL_FEATURES;
-// Segment Feature Masks
+/* Segment Feature Masks */
#define SEGMENT_ALTQ 0x01
#define SEGMENT_ALT_LF 0x02
@@ -110,11 +110,11 @@ typedef enum
typedef enum
{
- B_DC_PRED, // average of above and left pixels
+ B_DC_PRED, /* average of above and left pixels */
B_TM_PRED,
- B_VE_PRED, // vertical prediction
- B_HE_PRED, // horizontal prediction
+ B_VE_PRED, /* vertical prediction */
+ B_HE_PRED, /* horizontal prediction */
B_LD_PRED,
B_RD_PRED,
@@ -170,13 +170,13 @@ typedef struct
} mv;
unsigned char partitioning;
- unsigned char mb_skip_coeff; //does this mb has coefficients at all, 1=no coefficients, 0=need decode tokens
+ unsigned char mb_skip_coeff; /* does this mb has coefficients at all, 1=no coefficients, 0=need decode tokens */
unsigned char dc_diff;
unsigned char need_to_clamp_mvs;
- unsigned char segment_id; // Which set of segmentation parameters should be used for this MB
+ unsigned char segment_id; /* Which set of segmentation parameters should be used for this MB */
- unsigned char force_no_skip; //encoder only
+ unsigned char force_no_skip; /* encoder only */
} MB_MODE_INFO;
@@ -197,7 +197,7 @@ typedef struct
short *dequant;
- // 16 Y blocks, 4 U blocks, 4 V blocks each with 16 entries
+ /* 16 Y blocks, 4 U blocks, 4 V blocks each with 16 entries */
unsigned char **base_pre;
int pre;
int pre_stride;
@@ -214,17 +214,17 @@ typedef struct
typedef struct
{
- DECLARE_ALIGNED(16, short, diff[400]); // from idct diff
+ DECLARE_ALIGNED(16, short, diff[400]); /* from idct diff */
DECLARE_ALIGNED(16, unsigned char, predictor[384]);
-//not used DECLARE_ALIGNED(16, short, reference[384]);
+/* not used DECLARE_ALIGNED(16, short, reference[384]); */
DECLARE_ALIGNED(16, short, qcoeff[400]);
DECLARE_ALIGNED(16, short, dqcoeff[400]);
DECLARE_ALIGNED(16, char, eobs[25]);
- // 16 Y blocks, 4 U, 4 V, 1 DC 2nd order block, each with 16 entries.
+ /* 16 Y blocks, 4 U, 4 V, 1 DC 2nd order block, each with 16 entries. */
BLOCKD block[25];
- YV12_BUFFER_CONFIG pre; // Filtered copy of previous frame reconstruction
+ YV12_BUFFER_CONFIG pre; /* Filtered copy of previous frame reconstruction */
YV12_BUFFER_CONFIG dst;
MODE_INFO *mode_info_context;
@@ -235,39 +235,39 @@ typedef struct
int up_available;
int left_available;
- // Y,U,V,Y2
+ /* Y,U,V,Y2 */
ENTROPY_CONTEXT_PLANES *above_context;
ENTROPY_CONTEXT_PLANES *left_context;
- // 0 indicates segmentation at MB level is not enabled. Otherwise the individual bits indicate which features are active.
+ /* 0 indicates segmentation at MB level is not enabled. Otherwise the individual bits indicate which features are active. */
unsigned char segmentation_enabled;
- // 0 (do not update) 1 (update) the macroblock segmentation map.
+ /* 0 (do not update) 1 (update) the macroblock segmentation map. */
unsigned char update_mb_segmentation_map;
- // 0 (do not update) 1 (update) the macroblock segmentation feature data.
+ /* 0 (do not update) 1 (update) the macroblock segmentation feature data. */
unsigned char update_mb_segmentation_data;
- // 0 (do not update) 1 (update) the macroblock segmentation feature data.
+ /* 0 (do not update) 1 (update) the macroblock segmentation feature data. */
unsigned char mb_segement_abs_delta;
- // Per frame flags that define which MB level features (such as quantizer or loop filter level)
- // are enabled and when enabled the proabilities used to decode the per MB flags in MB_MODE_INFO
- vp8_prob mb_segment_tree_probs[MB_FEATURE_TREE_PROBS]; // Probability Tree used to code Segment number
+ /* Per frame flags that define which MB level features (such as quantizer or loop filter level) */
+ /* are enabled and when enabled the proabilities used to decode the per MB flags in MB_MODE_INFO */
+ vp8_prob mb_segment_tree_probs[MB_FEATURE_TREE_PROBS]; /* Probability Tree used to code Segment number */
- signed char segment_feature_data[MB_LVL_MAX][MAX_MB_SEGMENTS]; // Segment parameters
+ signed char segment_feature_data[MB_LVL_MAX][MAX_MB_SEGMENTS]; /* Segment parameters */
- // mode_based Loop filter adjustment
+ /* mode_based Loop filter adjustment */
unsigned char mode_ref_lf_delta_enabled;
unsigned char mode_ref_lf_delta_update;
- // Delta values have the range +/- MAX_LOOP_FILTER
- signed char last_ref_lf_deltas[MAX_REF_LF_DELTAS]; // 0 = Intra, Last, GF, ARF
- signed char ref_lf_deltas[MAX_REF_LF_DELTAS]; // 0 = Intra, Last, GF, ARF
- signed char last_mode_lf_deltas[MAX_MODE_LF_DELTAS]; // 0 = BPRED, ZERO_MV, MV, SPLIT
- signed char mode_lf_deltas[MAX_MODE_LF_DELTAS]; // 0 = BPRED, ZERO_MV, MV, SPLIT
+ /* Delta values have the range +/- MAX_LOOP_FILTER */
+ signed char last_ref_lf_deltas[MAX_REF_LF_DELTAS]; /* 0 = Intra, Last, GF, ARF */
+ signed char ref_lf_deltas[MAX_REF_LF_DELTAS]; /* 0 = Intra, Last, GF, ARF */
+ signed char last_mode_lf_deltas[MAX_MODE_LF_DELTAS]; /* 0 = BPRED, ZERO_MV, MV, SPLIT */
+ signed char mode_lf_deltas[MAX_MODE_LF_DELTAS]; /* 0 = BPRED, ZERO_MV, MV, SPLIT */
- // Distance of MB away from frame edges
+ /* Distance of MB away from frame edges */
int mb_to_left_edge;
int mb_to_right_edge;
int mb_to_top_edge;
diff --git a/vp8/common/debugmodes.c b/vp8/common/debugmodes.c
index c3ac88fc8..8c03480fa 100644
--- a/vp8/common/debugmodes.c
+++ b/vp8/common/debugmodes.c
@@ -21,7 +21,7 @@ void vp8_print_modes_and_motion_vectors(MODE_INFO *mi, int rows, int cols, int f
int mb_index = 0;
FILE *mvs = fopen("mvs.stt", "a");
- // print out the macroblock Y modes
+ /* print out the macroblock Y modes */
mb_index = 0;
fprintf(mvs, "Mb Modes for Frame %d\n", frame);
@@ -60,7 +60,7 @@ void vp8_print_modes_and_motion_vectors(MODE_INFO *mi, int rows, int cols, int f
fprintf(mvs, "\n");
- // print out the macroblock UV modes
+ /* print out the macroblock UV modes */
mb_index = 0;
fprintf(mvs, "UV Modes for Frame %d\n", frame);
@@ -80,7 +80,7 @@ void vp8_print_modes_and_motion_vectors(MODE_INFO *mi, int rows, int cols, int f
fprintf(mvs, "\n");
- // print out the block modes
+ /* print out the block modes */
mb_index = 0;
fprintf(mvs, "Mbs for Frame %d\n", frame);
{
@@ -108,7 +108,7 @@ void vp8_print_modes_and_motion_vectors(MODE_INFO *mi, int rows, int cols, int f
}
fprintf(mvs, "\n");
- // print out the macroblock mvs
+ /* print out the macroblock mvs */
mb_index = 0;
fprintf(mvs, "MVs for Frame %d\n", frame);
@@ -128,7 +128,7 @@ void vp8_print_modes_and_motion_vectors(MODE_INFO *mi, int rows, int cols, int f
fprintf(mvs, "\n");
- // print out the block modes
+ /* print out the block modes */
mb_index = 0;
fprintf(mvs, "MVs for Frame %d\n", frame);
{
diff --git a/vp8/common/defaultcoefcounts.h b/vp8/common/defaultcoefcounts.h
index b85f59b9f..ca58d565a 100644
--- a/vp8/common/defaultcoefcounts.h
+++ b/vp8/common/defaultcoefcounts.h
@@ -15,204 +15,204 @@ static const unsigned int default_coef_counts [BLOCK_TYPES] [COEF_BANDS] [PREV_C
{
{
- // Block Type ( 0 )
+ /* Block Type ( 0 ) */
{
- // Coeff Band ( 0 )
+ /* Coeff Band ( 0 ) */
{ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,},
{ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,},
{ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,},
},
{
- // Coeff Band ( 1 )
+ /* Coeff Band ( 1 ) */
{30190, 26544, 225, 24, 4, 0, 0, 0, 0, 0, 0, 4171593,},
{26846, 25157, 1241, 130, 26, 6, 1, 0, 0, 0, 0, 149987,},
{10484, 9538, 1006, 160, 36, 18, 0, 0, 0, 0, 0, 15104,},
},
{
- // Coeff Band ( 2 )
+ /* Coeff Band ( 2 ) */
{25842, 40456, 1126, 83, 11, 2, 0, 0, 0, 0, 0, 0,},
{9338, 8010, 512, 73, 7, 3, 2, 0, 0, 0, 0, 43294,},
{1047, 751, 149, 31, 13, 6, 1, 0, 0, 0, 0, 879,},
},
{
- // Coeff Band ( 3 )
+ /* Coeff Band ( 3 ) */
{26136, 9826, 252, 13, 0, 0, 0, 0, 0, 0, 0, 0,},
{8134, 5574, 191, 14, 2, 0, 0, 0, 0, 0, 0, 35302,},
{ 605, 677, 116, 9, 1, 0, 0, 0, 0, 0, 0, 611,},
},
{
- // Coeff Band ( 4 )
+ /* Coeff Band ( 4 ) */
{10263, 15463, 283, 17, 0, 0, 0, 0, 0, 0, 0, 0,},
{2773, 2191, 128, 9, 2, 2, 0, 0, 0, 0, 0, 10073,},
{ 134, 125, 32, 4, 0, 2, 0, 0, 0, 0, 0, 50,},
},
{
- // Coeff Band ( 5 )
+ /* Coeff Band ( 5 ) */
{10483, 2663, 23, 1, 0, 0, 0, 0, 0, 0, 0, 0,},
{2137, 1251, 27, 1, 1, 0, 0, 0, 0, 0, 0, 14362,},
{ 116, 156, 14, 2, 1, 0, 0, 0, 0, 0, 0, 190,},
},
{
- // Coeff Band ( 6 )
+ /* Coeff Band ( 6 ) */
{40977, 27614, 412, 28, 0, 0, 0, 0, 0, 0, 0, 0,},
{6113, 5213, 261, 22, 3, 0, 0, 0, 0, 0, 0, 26164,},
{ 382, 312, 50, 14, 2, 0, 0, 0, 0, 0, 0, 345,},
},
{
- // Coeff Band ( 7 )
+ /* Coeff Band ( 7 ) */
{ 0, 26, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,},
{ 0, 13, 0, 0, 0, 0, 0, 0, 0, 0, 0, 319,},
{ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 8,},
},
},
{
- // Block Type ( 1 )
+ /* Block Type ( 1 ) */
{
- // Coeff Band ( 0 )
+ /* Coeff Band ( 0 ) */
{3268, 19382, 1043, 250, 93, 82, 49, 26, 17, 8, 25, 82289,},
{8758, 32110, 5436, 1832, 827, 668, 420, 153, 24, 0, 3, 52914,},
{9337, 23725, 8487, 3954, 2107, 1836, 1069, 399, 59, 0, 0, 18620,},
},
{
- // Coeff Band ( 1 )
+ /* Coeff Band ( 1 ) */
{12419, 8420, 452, 62, 9, 1, 0, 0, 0, 0, 0, 0,},
{11715, 8705, 693, 92, 15, 7, 2, 0, 0, 0, 0, 53988,},
{7603, 8585, 2306, 778, 270, 145, 39, 5, 0, 0, 0, 9136,},
},
{
- // Coeff Band ( 2 )
+ /* Coeff Band ( 2 ) */
{15938, 14335, 1207, 184, 55, 13, 4, 1, 0, 0, 0, 0,},
{7415, 6829, 1138, 244, 71, 26, 7, 0, 0, 0, 0, 9980,},
{1580, 1824, 655, 241, 89, 46, 10, 2, 0, 0, 0, 429,},
},
{
- // Coeff Band ( 3 )
+ /* Coeff Band ( 3 ) */
{19453, 5260, 201, 19, 0, 0, 0, 0, 0, 0, 0, 0,},
{9173, 3758, 213, 22, 1, 1, 0, 0, 0, 0, 0, 9820,},
{1689, 1277, 276, 51, 17, 4, 0, 0, 0, 0, 0, 679,},
},
{
- // Coeff Band ( 4 )
+ /* Coeff Band ( 4 ) */
{12076, 10667, 620, 85, 19, 9, 5, 0, 0, 0, 0, 0,},
{4665, 3625, 423, 55, 19, 9, 0, 0, 0, 0, 0, 5127,},
{ 415, 440, 143, 34, 20, 7, 2, 0, 0, 0, 0, 101,},
},
{
- // Coeff Band ( 5 )
+ /* Coeff Band ( 5 ) */
{12183, 4846, 115, 11, 1, 0, 0, 0, 0, 0, 0, 0,},
{4226, 3149, 177, 21, 2, 0, 0, 0, 0, 0, 0, 7157,},
{ 375, 621, 189, 51, 11, 4, 1, 0, 0, 0, 0, 198,},
},
{
- // Coeff Band ( 6 )
+ /* Coeff Band ( 6 ) */
{61658, 37743, 1203, 94, 10, 3, 0, 0, 0, 0, 0, 0,},
{15514, 11563, 903, 111, 14, 5, 0, 0, 0, 0, 0, 25195,},
{ 929, 1077, 291, 78, 14, 7, 1, 0, 0, 0, 0, 507,},
},
{
- // Coeff Band ( 7 )
+ /* Coeff Band ( 7 ) */
{ 0, 990, 15, 3, 0, 0, 0, 0, 0, 0, 0, 0,},
{ 0, 412, 13, 0, 0, 0, 0, 0, 0, 0, 0, 1641,},
{ 0, 18, 7, 1, 0, 0, 0, 0, 0, 0, 0, 30,},
},
},
{
- // Block Type ( 2 )
+ /* Block Type ( 2 ) */
{
- // Coeff Band ( 0 )
+ /* Coeff Band ( 0 ) */
{ 953, 24519, 628, 120, 28, 12, 4, 0, 0, 0, 0, 2248798,},
{1525, 25654, 2647, 617, 239, 143, 42, 5, 0, 0, 0, 66837,},
{1180, 11011, 3001, 1237, 532, 448, 239, 54, 5, 0, 0, 7122,},
},
{
- // Coeff Band ( 1 )
+ /* Coeff Band ( 1 ) */
{1356, 2220, 67, 10, 4, 1, 0, 0, 0, 0, 0, 0,},
{1450, 2544, 102, 18, 4, 3, 0, 0, 0, 0, 0, 57063,},
{1182, 2110, 470, 130, 41, 21, 0, 0, 0, 0, 0, 6047,},
},
{
- // Coeff Band ( 2 )
+ /* Coeff Band ( 2 ) */
{ 370, 3378, 200, 30, 5, 4, 1, 0, 0, 0, 0, 0,},
{ 293, 1006, 131, 29, 11, 0, 0, 0, 0, 0, 0, 5404,},
{ 114, 387, 98, 23, 4, 8, 1, 0, 0, 0, 0, 236,},
},
{
- // Coeff Band ( 3 )
+ /* Coeff Band ( 3 ) */
{ 579, 194, 4, 0, 0, 0, 0, 0, 0, 0, 0, 0,},
{ 395, 213, 5, 1, 0, 0, 0, 0, 0, 0, 0, 4157,},
{ 119, 122, 4, 0, 0, 0, 0, 0, 0, 0, 0, 300,},
},
{
- // Coeff Band ( 4 )
+ /* Coeff Band ( 4 ) */
{ 38, 557, 19, 0, 0, 0, 0, 0, 0, 0, 0, 0,},
{ 21, 114, 12, 1, 0, 0, 0, 0, 0, 0, 0, 427,},
{ 0, 5, 0, 0, 0, 0, 0, 0, 0, 0, 0, 7,},
},
{
- // Coeff Band ( 5 )
+ /* Coeff Band ( 5 ) */
{ 52, 7, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,},
{ 18, 6, 0, 0, 0, 0, 0, 0, 0, 0, 0, 652,},
{ 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 30,},
},
{
- // Coeff Band ( 6 )
+ /* Coeff Band ( 6 ) */
{ 640, 569, 10, 0, 0, 0, 0, 0, 0, 0, 0, 0,},
{ 25, 77, 2, 0, 0, 0, 0, 0, 0, 0, 0, 517,},
{ 4, 7, 0, 0, 0, 0, 0, 0, 0, 0, 0, 3,},
},
{
- // Coeff Band ( 7 )
+ /* Coeff Band ( 7 ) */
{ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,},
{ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,},
{ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,},
},
},
{
- // Block Type ( 3 )
+ /* Block Type ( 3 ) */
{
- // Coeff Band ( 0 )
+ /* Coeff Band ( 0 ) */
{2506, 20161, 2707, 767, 261, 178, 107, 30, 14, 3, 0, 100694,},
{8806, 36478, 8817, 3268, 1280, 850, 401, 114, 42, 0, 0, 58572,},
{11003, 27214, 11798, 5716, 2482, 2072, 1048, 175, 32, 0, 0, 19284,},
},
{
- // Coeff Band ( 1 )
+ /* Coeff Band ( 1 ) */
{9738, 11313, 959, 205, 70, 18, 11, 1, 0, 0, 0, 0,},
{12628, 15085, 1507, 273, 52, 19, 9, 0, 0, 0, 0, 54280,},
{10701, 15846, 5561, 1926, 813, 570, 249, 36, 0, 0, 0, 6460,},
},
{
- // Coeff Band ( 2 )
+ /* Coeff Band ( 2 ) */
{6781, 22539, 2784, 634, 182, 123, 20, 4, 0, 0, 0, 0,},
{6263, 11544, 2649, 790, 259, 168, 27, 5, 0, 0, 0, 20539,},
{3109, 4075, 2031, 896, 457, 386, 158, 29, 0, 0, 0, 1138,},
},
{
- // Coeff Band ( 3 )
+ /* Coeff Band ( 3 ) */
{11515, 4079, 465, 73, 5, 14, 2, 0, 0, 0, 0, 0,},
{9361, 5834, 650, 96, 24, 8, 4, 0, 0, 0, 0, 22181,},
{4343, 3974, 1360, 415, 132, 96, 14, 1, 0, 0, 0, 1267,},
},
{
- // Coeff Band ( 4 )
+ /* Coeff Band ( 4 ) */
{4787, 9297, 823, 168, 44, 12, 4, 0, 0, 0, 0, 0,},
{3619, 4472, 719, 198, 60, 31, 3, 0, 0, 0, 0, 8401,},
{1157, 1175, 483, 182, 88, 31, 8, 0, 0, 0, 0, 268,},
},
{
- // Coeff Band ( 5 )
+ /* Coeff Band ( 5 ) */
{8299, 1226, 32, 5, 1, 0, 0, 0, 0, 0, 0, 0,},
{3502, 1568, 57, 4, 1, 1, 0, 0, 0, 0, 0, 9811,},
{1055, 1070, 166, 29, 6, 1, 0, 0, 0, 0, 0, 527,},
},
{
- // Coeff Band ( 6 )
+ /* Coeff Band ( 6 ) */
{27414, 27927, 1989, 347, 69, 26, 0, 0, 0, 0, 0, 0,},
{5876, 10074, 1574, 341, 91, 24, 4, 0, 0, 0, 0, 21954,},
{1571, 2171, 778, 324, 124, 65, 16, 0, 0, 0, 0, 979,},
},
{
- // Coeff Band ( 7 )
+ /* Coeff Band ( 7 ) */
{ 0, 29, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,},
{ 0, 23, 0, 0, 0, 0, 0, 0, 0, 0, 0, 459,},
{ 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 13,},
diff --git a/vp8/common/entropy.h b/vp8/common/entropy.h
index 80b481700..0685cd0ae 100644
--- a/vp8/common/entropy.h
+++ b/vp8/common/entropy.h
@@ -17,18 +17,18 @@
/* Coefficient token alphabet */
-#define ZERO_TOKEN 0 //0 Extra Bits 0+0
-#define ONE_TOKEN 1 //1 Extra Bits 0+1
-#define TWO_TOKEN 2 //2 Extra Bits 0+1
-#define THREE_TOKEN 3 //3 Extra Bits 0+1
-#define FOUR_TOKEN 4 //4 Extra Bits 0+1
-#define DCT_VAL_CATEGORY1 5 //5-6 Extra Bits 1+1
-#define DCT_VAL_CATEGORY2 6 //7-10 Extra Bits 2+1
-#define DCT_VAL_CATEGORY3 7 //11-26 Extra Bits 4+1
-#define DCT_VAL_CATEGORY4 8 //11-26 Extra Bits 5+1
-#define DCT_VAL_CATEGORY5 9 //27-58 Extra Bits 5+1
-#define DCT_VAL_CATEGORY6 10 //59+ Extra Bits 11+1
-#define DCT_EOB_TOKEN 11 //EOB Extra Bits 0+0
+#define ZERO_TOKEN 0 /* 0 Extra Bits 0+0 */
+#define ONE_TOKEN 1 /* 1 Extra Bits 0+1 */
+#define TWO_TOKEN 2 /* 2 Extra Bits 0+1 */
+#define THREE_TOKEN 3 /* 3 Extra Bits 0+1 */
+#define FOUR_TOKEN 4 /* 4 Extra Bits 0+1 */
+#define DCT_VAL_CATEGORY1 5 /* 5-6 Extra Bits 1+1 */
+#define DCT_VAL_CATEGORY2 6 /* 7-10 Extra Bits 2+1 */
+#define DCT_VAL_CATEGORY3 7 /* 11-26 Extra Bits 4+1 */
+#define DCT_VAL_CATEGORY4 8 /* 11-26 Extra Bits 5+1 */
+#define DCT_VAL_CATEGORY5 9 /* 27-58 Extra Bits 5+1 */
+#define DCT_VAL_CATEGORY6 10 /* 59+ Extra Bits 11+1 */
+#define DCT_EOB_TOKEN 11 /* EOB Extra Bits 0+0 */
#define vp8_coef_tokens 12
#define MAX_ENTROPY_TOKENS vp8_coef_tokens
@@ -83,7 +83,7 @@ extern DECLARE_ALIGNED(16, const unsigned char, vp8_coef_bands[16]);
coefficient band (and since zigzag positions 0, 1, and 2 are in
distinct bands). */
-/*# define DC_TOKEN_CONTEXTS 3 // 00, 0!0, !0!0 */
+/*# define DC_TOKEN_CONTEXTS 3*/ /* 00, 0!0, !0!0 */
# define PREV_COEF_CONTEXTS 3
extern DECLARE_ALIGNED(16, const unsigned char, vp8_prev_token_class[vp8_coef_tokens]);
diff --git a/vp8/common/entropymv.c b/vp8/common/entropymv.c
index 8e72881e9..e5df1f095 100644
--- a/vp8/common/entropymv.c
+++ b/vp8/common/entropymv.c
@@ -29,21 +29,21 @@ const MV_CONTEXT vp8_mv_update_probs[2] =
const MV_CONTEXT vp8_default_mv_context[2] =
{
{{
- // row
- 162, // is short
- 128, // sign
- 225, 146, 172, 147, 214, 39, 156, // short tree
- 128, 129, 132, 75, 145, 178, 206, 239, 254, 254 // long bits
+ /* row */
+ 162, /* is short */
+ 128, /* sign */
+ 225, 146, 172, 147, 214, 39, 156, /* short tree */
+ 128, 129, 132, 75, 145, 178, 206, 239, 254, 254 /* long bits */
}},
{{
- // same for column
- 164, // is short
+ /* same for column */
+ 164, /* is short */
128,
204, 170, 119, 235, 140, 230, 228,
- 128, 130, 130, 74, 148, 180, 203, 236, 254, 254 // long bits
+ 128, 130, 130, 74, 148, 180, 203, 236, 254, 254 /* long bits */
}}
};
diff --git a/vp8/common/extend.c b/vp8/common/extend.c
index 7e06ac30c..47207fa79 100644
--- a/vp8/common/extend.c
+++ b/vp8/common/extend.c
@@ -15,14 +15,14 @@
static void extend_plane_borders
(
- unsigned char *s, // source
- int sp, // pitch
- int h, // height
- int w, // width
- int et, // extend top border
- int el, // extend left border
- int eb, // extend bottom border
- int er // extend right border
+ unsigned char *s, /* source */
+ int sp, /* pitch */
+ int h, /* height */
+ int w, /* width */
+ int et, /* extend top border */
+ int el, /* extend left border */
+ int eb, /* extend bottom border */
+ int er /* extend right border */
)
{
@@ -31,7 +31,7 @@ static void extend_plane_borders
unsigned char *dest_ptr1, *dest_ptr2;
int linesize;
- // copy the left and right most columns out
+ /* copy the left and right most columns out */
src_ptr1 = s;
src_ptr2 = s + w - 1;
dest_ptr1 = s - el;
@@ -39,8 +39,9 @@ static void extend_plane_borders
for (i = 0; i < h - 0 + 1; i++)
{
- // Some linkers will complain if we call vpx_memset with el set to a
- // constant 0.
+ /* Some linkers will complain if we call vpx_memset with el set to a
+ * constant 0.
+ */
if (el)
vpx_memset(dest_ptr1, src_ptr1[0], el);
vpx_memset(dest_ptr2, src_ptr2[0], er);
@@ -50,7 +51,7 @@ static void extend_plane_borders
dest_ptr2 += sp;
}
- // Now copy the top and bottom source lines into each line of the respective borders
+ /* Now copy the top and bottom source lines into each line of the respective borders */
src_ptr1 = s - el;
src_ptr2 = s + sp * (h - 1) - el;
dest_ptr1 = s + sp * (-et) - el;
@@ -76,12 +77,12 @@ void vp8_extend_to_multiple_of16(YV12_BUFFER_CONFIG *ybf, int width, int height)
int er = 0xf & (16 - (width & 0xf));
int eb = 0xf & (16 - (height & 0xf));
- // check for non multiples of 16
+ /* check for non multiples of 16 */
if (er != 0 || eb != 0)
{
extend_plane_borders(ybf->y_buffer, ybf->y_stride, height, width, 0, 0, eb, er);
- //adjust for uv
+ /* adjust for uv */
height = (height + 1) >> 1;
width = (width + 1) >> 1;
er = 0x7 & (8 - (width & 0x7));
@@ -95,7 +96,7 @@ void vp8_extend_to_multiple_of16(YV12_BUFFER_CONFIG *ybf, int width, int height)
}
}
-// note the extension is only for the last row, for intra prediction purpose
+/* note the extension is only for the last row, for intra prediction purpose */
void vp8_extend_mb_row(YV12_BUFFER_CONFIG *ybf, unsigned char *YPtr, unsigned char *UPtr, unsigned char *VPtr)
{
int i;
diff --git a/vp8/common/filter_c.c b/vp8/common/filter_c.c
index 3d18d8191..399a847d5 100644
--- a/vp8/common/filter_c.c
+++ b/vp8/common/filter_c.c
@@ -32,13 +32,13 @@ static const int bilinear_filters[8][2] =
static const short sub_pel_filters[8][6] =
{
- { 0, 0, 128, 0, 0, 0 }, // note that 1/8 pel positions are just as per alpha -0.5 bicubic
+ { 0, 0, 128, 0, 0, 0 }, /* note that 1/8 pel positions are just as per alpha -0.5 bicubic */
{ 0, -6, 123, 12, -1, 0 },
- { 2, -11, 108, 36, -8, 1 }, // New 1/4 pel 6 tap filter
+ { 2, -11, 108, 36, -8, 1 }, /* New 1/4 pel 6 tap filter */
{ 0, -9, 93, 50, -6, 0 },
- { 3, -16, 77, 77, -16, 3 }, // New 1/2 pel 6 tap filter
+ { 3, -16, 77, 77, -16, 3 }, /* New 1/2 pel 6 tap filter */
{ 0, -6, 50, 93, -9, 0 },
- { 1, -8, 36, 108, -11, 2 }, // New 1/4 pel 6 tap filter
+ { 1, -8, 36, 108, -11, 2 }, /* New 1/4 pel 6 tap filter */
{ 0, -1, 12, 123, -6, 0 },
@@ -69,9 +69,9 @@ void vp8_filter_block2d_first_pass
((int)src_ptr[pixel_step] * vp8_filter[3]) +
((int)src_ptr[2*pixel_step] * vp8_filter[4]) +
((int)src_ptr[3*pixel_step] * vp8_filter[5]) +
- (VP8_FILTER_WEIGHT >> 1); // Rounding
+ (VP8_FILTER_WEIGHT >> 1); /* Rounding */
- // Normalize back to 0-255
+ /* Normalize back to 0-255 */
Temp = Temp >> VP8_FILTER_SHIFT;
if (Temp < 0)
@@ -83,7 +83,7 @@ void vp8_filter_block2d_first_pass
src_ptr++;
}
- // Next row...
+ /* Next row... */
src_ptr += src_pixels_per_line - output_width;
output_ptr += output_width;
}
@@ -108,16 +108,16 @@ void vp8_filter_block2d_second_pass
{
for (j = 0; j < output_width; j++)
{
- // Apply filter
+ /* Apply filter */
Temp = ((int)src_ptr[-2 * (int)pixel_step] * vp8_filter[0]) +
((int)src_ptr[-1 * (int)pixel_step] * vp8_filter[1]) +
((int)src_ptr[0] * vp8_filter[2]) +
((int)src_ptr[pixel_step] * vp8_filter[3]) +
((int)src_ptr[2*pixel_step] * vp8_filter[4]) +
((int)src_ptr[3*pixel_step] * vp8_filter[5]) +
- (VP8_FILTER_WEIGHT >> 1); // Rounding
+ (VP8_FILTER_WEIGHT >> 1); /* Rounding */
- // Normalize back to 0-255
+ /* Normalize back to 0-255 */
Temp = Temp >> VP8_FILTER_SHIFT;
if (Temp < 0)
@@ -129,7 +129,7 @@ void vp8_filter_block2d_second_pass
src_ptr++;
}
- // Start next row
+ /* Start next row */
src_ptr += src_pixels_per_line - output_width;
output_ptr += output_pitch;
}
@@ -146,12 +146,12 @@ void vp8_filter_block2d
const short *VFilter
)
{
- int FData[9*4]; // Temp data bufffer used in filtering
+ int FData[9*4]; /* Temp data bufffer used in filtering */
- // First filter 1-D horizontally...
+ /* First filter 1-D horizontally... */
vp8_filter_block2d_first_pass(src_ptr - (2 * src_pixels_per_line), FData, src_pixels_per_line, 1, 9, 4, HFilter);
- // then filter verticaly...
+ /* then filter verticaly... */
vp8_filter_block2d_second_pass(FData + 8, output_ptr, output_pitch, 4, 4, 4, 4, VFilter);
}
@@ -195,8 +195,8 @@ void vp8_sixtap_predict_c
const short *HFilter;
const short *VFilter;
- HFilter = sub_pel_filters[xoffset]; // 6 tap
- VFilter = sub_pel_filters[yoffset]; // 6 tap
+ HFilter = sub_pel_filters[xoffset]; /* 6 tap */
+ VFilter = sub_pel_filters[yoffset]; /* 6 tap */
vp8_filter_block2d(src_ptr, dst_ptr, src_pixels_per_line, dst_pitch, HFilter, VFilter);
}
@@ -212,16 +212,16 @@ void vp8_sixtap_predict8x8_c
{
const short *HFilter;
const short *VFilter;
- int FData[13*16]; // Temp data bufffer used in filtering
+ int FData[13*16]; /* Temp data bufffer used in filtering */
- HFilter = sub_pel_filters[xoffset]; // 6 tap
- VFilter = sub_pel_filters[yoffset]; // 6 tap
+ HFilter = sub_pel_filters[xoffset]; /* 6 tap */
+ VFilter = sub_pel_filters[yoffset]; /* 6 tap */
- // First filter 1-D horizontally...
+ /* First filter 1-D horizontally... */
vp8_filter_block2d_first_pass(src_ptr - (2 * src_pixels_per_line), FData, src_pixels_per_line, 1, 13, 8, HFilter);
- // then filter verticaly...
+ /* then filter verticaly... */
vp8_filter_block2d_second_pass(FData + 16, dst_ptr, dst_pitch, 8, 8, 8, 8, VFilter);
}
@@ -238,16 +238,16 @@ void vp8_sixtap_predict8x4_c
{
const short *HFilter;
const short *VFilter;
- int FData[13*16]; // Temp data bufffer used in filtering
+ int FData[13*16]; /* Temp data bufffer used in filtering */
- HFilter = sub_pel_filters[xoffset]; // 6 tap
- VFilter = sub_pel_filters[yoffset]; // 6 tap
+ HFilter = sub_pel_filters[xoffset]; /* 6 tap */
+ VFilter = sub_pel_filters[yoffset]; /* 6 tap */
- // First filter 1-D horizontally...
+ /* First filter 1-D horizontally... */
vp8_filter_block2d_first_pass(src_ptr - (2 * src_pixels_per_line), FData, src_pixels_per_line, 1, 9, 8, HFilter);
- // then filter verticaly...
+ /* then filter verticaly... */
vp8_filter_block2d_second_pass(FData + 16, dst_ptr, dst_pitch, 8, 8, 4, 8, VFilter);
}
@@ -264,16 +264,16 @@ void vp8_sixtap_predict16x16_c
{
const short *HFilter;
const short *VFilter;
- int FData[21*24]; // Temp data bufffer used in filtering
+ int FData[21*24]; /* Temp data bufffer used in filtering */
- HFilter = sub_pel_filters[xoffset]; // 6 tap
- VFilter = sub_pel_filters[yoffset]; // 6 tap
+ HFilter = sub_pel_filters[xoffset]; /* 6 tap */
+ VFilter = sub_pel_filters[yoffset]; /* 6 tap */
- // First filter 1-D horizontally...
+ /* First filter 1-D horizontally... */
vp8_filter_block2d_first_pass(src_ptr - (2 * src_pixels_per_line), FData, src_pixels_per_line, 1, 21, 16, HFilter);
- // then filter verticaly...
+ /* then filter verticaly... */
vp8_filter_block2d_second_pass(FData + 32, dst_ptr, dst_pitch, 16, 16, 16, 16, VFilter);
}
@@ -324,14 +324,14 @@ void vp8_filter_block2d_bil_first_pass
{
for (j = 0; j < output_width; j++)
{
- // Apply bilinear filter
+ /* Apply bilinear filter */
output_ptr[j] = (((int)src_ptr[0] * vp8_filter[0]) +
((int)src_ptr[pixel_step] * vp8_filter[1]) +
(VP8_FILTER_WEIGHT / 2)) >> VP8_FILTER_SHIFT;
src_ptr++;
}
- // Next row...
+ /* Next row... */
src_ptr += src_pixels_per_line - output_width;
output_ptr += output_width;
}
@@ -384,7 +384,7 @@ void vp8_filter_block2d_bil_second_pass
{
for (j = 0; j < output_width; j++)
{
- // Apply filter
+ /* Apply filter */
Temp = ((int)src_ptr[0] * vp8_filter[0]) +
((int)src_ptr[pixel_step] * vp8_filter[1]) +
(VP8_FILTER_WEIGHT / 2);
@@ -392,7 +392,7 @@ void vp8_filter_block2d_bil_second_pass
src_ptr++;
}
- // Next row...
+ /* Next row... */
src_ptr += src_pixels_per_line - output_width;
output_ptr += output_pitch;
}
@@ -432,12 +432,12 @@ void vp8_filter_block2d_bil
)
{
- unsigned short FData[17*16]; // Temp data bufffer used in filtering
+ unsigned short FData[17*16]; /* Temp data bufffer used in filtering */
- // First filter 1-D horizontally...
+ /* First filter 1-D horizontally... */
vp8_filter_block2d_bil_first_pass(src_ptr, FData, src_pixels_per_line, 1, Height + 1, Width, HFilter);
- // then 1-D vertically...
+ /* then 1-D vertically... */
vp8_filter_block2d_bil_second_pass(FData, output_ptr, dst_pitch, Width, Width, Height, Width, VFilter);
}
diff --git a/vp8/common/findnearmv.c b/vp8/common/findnearmv.c
index 41037f707..e63d4ef8d 100644
--- a/vp8/common/findnearmv.c
+++ b/vp8/common/findnearmv.c
@@ -168,7 +168,7 @@ void vp8_find_near_mvs
vp8_clamp_mv(nearest, xd);
vp8_clamp_mv(nearby, xd);
- vp8_clamp_mv(best_mv, xd); //TODO: move this up before the copy
+ vp8_clamp_mv(best_mv, xd); /*TODO: move this up before the copy*/
}
vp8_prob *vp8_mv_ref_probs(
@@ -179,7 +179,7 @@ vp8_prob *vp8_mv_ref_probs(
p[1] = vp8_mode_contexts [near_mv_ref_ct[1]] [1];
p[2] = vp8_mode_contexts [near_mv_ref_ct[2]] [2];
p[3] = vp8_mode_contexts [near_mv_ref_ct[3]] [3];
- //p[3] = vp8_mode_contexts [near_mv_ref_ct[1] + near_mv_ref_ct[2] + near_mv_ref_ct[3]] [3];
+ /*p[3] = vp8_mode_contexts [near_mv_ref_ct[1] + near_mv_ref_ct[2] + near_mv_ref_ct[3]] [3];*/
return p;
}
diff --git a/vp8/common/generic/systemdependent.c b/vp8/common/generic/systemdependent.c
index c624242a5..7b1a84b70 100644
--- a/vp8/common/generic/systemdependent.c
+++ b/vp8/common/generic/systemdependent.c
@@ -73,7 +73,7 @@ void vp8_machine_specific_config(VP8_COMMON *ctx)
#endif
#endif
- // Pure C:
+ /* Pure C: */
vp8_build_intra_predictors_mby_ptr = vp8_build_intra_predictors_mby;
vp8_build_intra_predictors_mby_s_ptr = vp8_build_intra_predictors_mby_s;
diff --git a/vp8/common/invtrans.c b/vp8/common/invtrans.c
index 4cb433a80..81a3f2d89 100644
--- a/vp8/common/invtrans.c
+++ b/vp8/common/invtrans.c
@@ -38,7 +38,7 @@ void vp8_inverse_transform_mby(const vp8_idct_rtcd_vtable_t *rtcd, MACROBLOCKD *
{
int i;
- // do 2nd order transform on the dc block
+ /* do 2nd order transform on the dc block */
IDCT_INVOKE(rtcd, iwalsh16)(x->block[24].dqcoeff, x->block[24].diff);
recon_dcblock(x);
@@ -68,7 +68,7 @@ void vp8_inverse_transform_mb(const vp8_idct_rtcd_vtable_t *rtcd, MACROBLOCKD *x
if (x->mode_info_context->mbmi.mode != B_PRED &&
x->mode_info_context->mbmi.mode != SPLITMV)
{
- // do 2nd order transform on the dc block
+ /* do 2nd order transform on the dc block */
IDCT_INVOKE(rtcd, iwalsh16)(&x->block[24].dqcoeff[0], x->block[24].diff);
recon_dcblock(x);
diff --git a/vp8/common/loopfilter.c b/vp8/common/loopfilter.c
index da9ca2871..f9d082304 100644
--- a/vp8/common/loopfilter.c
+++ b/vp8/common/loopfilter.c
@@ -23,7 +23,7 @@ prototype_loopfilter(vp8_mbloop_filter_vertical_edge_c);
prototype_loopfilter(vp8_loop_filter_simple_horizontal_edge_c);
prototype_loopfilter(vp8_loop_filter_simple_vertical_edge_c);
-// Horizontal MB filtering
+/* Horizontal MB filtering */
void vp8_loop_filter_mbh_c(unsigned char *y_ptr, unsigned char *u_ptr, unsigned char *v_ptr,
int y_stride, int uv_stride, loop_filter_info *lfi, int simpler_lpf)
{
@@ -47,7 +47,7 @@ void vp8_loop_filter_mbhs_c(unsigned char *y_ptr, unsigned char *u_ptr, unsigned
vp8_loop_filter_simple_horizontal_edge_c(y_ptr, y_stride, lfi->mbflim, lfi->lim, lfi->mbthr, 2);
}
-// Vertical MB Filtering
+/* Vertical MB Filtering */
void vp8_loop_filter_mbv_c(unsigned char *y_ptr, unsigned char *u_ptr, unsigned char *v_ptr,
int y_stride, int uv_stride, loop_filter_info *lfi, int simpler_lpf)
{
@@ -71,7 +71,7 @@ void vp8_loop_filter_mbvs_c(unsigned char *y_ptr, unsigned char *u_ptr, unsigned
vp8_loop_filter_simple_vertical_edge_c(y_ptr, y_stride, lfi->mbflim, lfi->lim, lfi->mbthr, 2);
}
-// Horizontal B Filtering
+/* Horizontal B Filtering */
void vp8_loop_filter_bh_c(unsigned char *y_ptr, unsigned char *u_ptr, unsigned char *v_ptr,
int y_stride, int uv_stride, loop_filter_info *lfi, int simpler_lpf)
{
@@ -99,7 +99,7 @@ void vp8_loop_filter_bhs_c(unsigned char *y_ptr, unsigned char *u_ptr, unsigned
vp8_loop_filter_simple_horizontal_edge_c(y_ptr + 12 * y_stride, y_stride, lfi->flim, lfi->lim, lfi->thr, 2);
}
-// Vertical B Filtering
+/* Vertical B Filtering */
void vp8_loop_filter_bv_c(unsigned char *y_ptr, unsigned char *u_ptr, unsigned char *v_ptr,
int y_stride, int uv_stride, loop_filter_info *lfi, int simpler_lpf)
{
@@ -140,7 +140,7 @@ void vp8_init_loop_filter(VP8_COMMON *cm)
const int yhedge_boost = 2;
const int uvhedge_boost = 2;
- // For each possible value for the loop filter fill out a "loop_filter_info" entry.
+ /* For each possible value for the loop filter fill out a "loop_filter_info" entry. */
for (i = 0; i <= MAX_LOOP_FILTER; i++)
{
int filt_lvl = i;
@@ -166,7 +166,7 @@ void vp8_init_loop_filter(VP8_COMMON *cm)
HEVThresh = 0;
}
- // Set loop filter paramaeters that control sharpness.
+ /* Set loop filter paramaeters that control sharpness. */
block_inside_limit = filt_lvl >> (sharpness_lvl > 0);
block_inside_limit = block_inside_limit >> (sharpness_lvl > 4);
@@ -195,7 +195,7 @@ void vp8_init_loop_filter(VP8_COMMON *cm)
}
- // Set up the function pointers depending on the type of loop filtering selected
+ /* Set up the function pointers depending on the type of loop filtering selected */
if (lft == NORMAL_LOOPFILTER)
{
cm->lf_mbv = LF_INVOKE(&cm->rtcd.loopfilter, normal_mb_v);
@@ -212,14 +212,15 @@ void vp8_init_loop_filter(VP8_COMMON *cm)
}
}
-// Put vp8_init_loop_filter() in vp8dx_create_decompressor(). Only call vp8_frame_init_loop_filter() while decoding
-// each frame. Check last_frame_type to skip the function most of times.
+/* Put vp8_init_loop_filter() in vp8dx_create_decompressor(). Only call vp8_frame_init_loop_filter() while decoding
+ * each frame. Check last_frame_type to skip the function most of times.
+ */
void vp8_frame_init_loop_filter(loop_filter_info *lfi, int frame_type)
{
int HEVThresh;
int i, j;
- // For each possible value for the loop filter fill out a "loop_filter_info" entry.
+ /* For each possible value for the loop filter fill out a "loop_filter_info" entry. */
for (i = 0; i <= MAX_LOOP_FILTER; i++)
{
int filt_lvl = i;
@@ -247,15 +248,15 @@ void vp8_frame_init_loop_filter(loop_filter_info *lfi, int frame_type)
for (j = 0; j < 16; j++)
{
- //lfi[i].lim[j] = block_inside_limit;
- //lfi[i].mbflim[j] = filt_lvl+yhedge_boost;
+ /*lfi[i].lim[j] = block_inside_limit;
+ lfi[i].mbflim[j] = filt_lvl+yhedge_boost;*/
lfi[i].mbthr[j] = HEVThresh;
- //lfi[i].flim[j] = filt_lvl;
+ /*lfi[i].flim[j] = filt_lvl;*/
lfi[i].thr[j] = HEVThresh;
- //lfi[i].uvlim[j] = block_inside_limit;
- //lfi[i].uvmbflim[j] = filt_lvl+uvhedge_boost;
+ /*lfi[i].uvlim[j] = block_inside_limit;
+ lfi[i].uvmbflim[j] = filt_lvl+uvhedge_boost;*/
lfi[i].uvmbthr[j] = HEVThresh;
- //lfi[i].uvflim[j] = filt_lvl;
+ /*lfi[i].uvflim[j] = filt_lvl;*/
lfi[i].uvthr[j] = HEVThresh;
}
}
@@ -268,32 +269,32 @@ void vp8_adjust_mb_lf_value(MACROBLOCKD *mbd, int *filter_level)
if (mbd->mode_ref_lf_delta_enabled)
{
- // Aplly delta for reference frame
+ /* Apply delta for reference frame */
*filter_level += mbd->ref_lf_deltas[mbmi->ref_frame];
- // Apply delta for mode
+ /* Apply delta for mode */
if (mbmi->ref_frame == INTRA_FRAME)
{
- // Only the split mode BPRED has a further special case
+ /* Only the split mode BPRED has a further special case */
if (mbmi->mode == B_PRED)
*filter_level += mbd->mode_lf_deltas[0];
}
else
{
- // Zero motion mode
+ /* Zero motion mode */
if (mbmi->mode == ZEROMV)
*filter_level += mbd->mode_lf_deltas[1];
- // Split MB motion mode
+ /* Split MB motion mode */
else if (mbmi->mode == SPLITMV)
*filter_level += mbd->mode_lf_deltas[3];
- // All other inter motion modes (Nearest, Near, New)
+ /* All other inter motion modes (Nearest, Near, New) */
else
*filter_level += mbd->mode_lf_deltas[2];
}
- // Range check
+ /* Range check */
if (*filter_level > MAX_LOOP_FILTER)
*filter_level = MAX_LOOP_FILTER;
else if (*filter_level < 0)
@@ -311,7 +312,7 @@ void vp8_loop_filter_frame
{
YV12_BUFFER_CONFIG *post = cm->frame_to_show;
loop_filter_info *lfi = cm->lf_info;
- int frame_type = cm->frame_type;
+ FRAME_TYPE frame_type = cm->frame_type;
int mb_row;
int mb_col;
@@ -324,21 +325,21 @@ void vp8_loop_filter_frame
int i;
unsigned char *y_ptr, *u_ptr, *v_ptr;
- mbd->mode_info_context = cm->mi; // Point at base of Mb MODE_INFO list
+ mbd->mode_info_context = cm->mi; /* Point at base of Mb MODE_INFO list */
- // Note the baseline filter values for each segment
+ /* Note the baseline filter values for each segment */
if (alt_flt_enabled)
{
for (i = 0; i < MAX_MB_SEGMENTS; i++)
{
- // Abs value
+ /* Abs value */
if (mbd->mb_segement_abs_delta == SEGMENT_ABSDATA)
baseline_filter_level[i] = mbd->segment_feature_data[MB_LVL_ALT_LF][i];
- // Delta Value
+ /* Delta Value */
else
{
baseline_filter_level[i] = default_filt_lvl + mbd->segment_feature_data[MB_LVL_ALT_LF][i];
- baseline_filter_level[i] = (baseline_filter_level[i] >= 0) ? ((baseline_filter_level[i] <= MAX_LOOP_FILTER) ? baseline_filter_level[i] : MAX_LOOP_FILTER) : 0; // Clamp to valid range
+ baseline_filter_level[i] = (baseline_filter_level[i] >= 0) ? ((baseline_filter_level[i] <= MAX_LOOP_FILTER) ? baseline_filter_level[i] : MAX_LOOP_FILTER) : 0; /* Clamp to valid range */
}
}
}
@@ -348,18 +349,18 @@ void vp8_loop_filter_frame
baseline_filter_level[i] = default_filt_lvl;
}
- // Initialize the loop filter for this frame.
+ /* Initialize the loop filter for this frame. */
if ((cm->last_filter_type != cm->filter_type) || (cm->last_sharpness_level != cm->sharpness_level))
vp8_init_loop_filter(cm);
else if (frame_type != cm->last_frame_type)
vp8_frame_init_loop_filter(lfi, frame_type);
- // Set up the buffer pointers
+ /* Set up the buffer pointers */
y_ptr = post->y_buffer;
u_ptr = post->u_buffer;
v_ptr = post->v_buffer;
- // vp8_filter each macro block
+ /* vp8_filter each macro block */
for (mb_row = 0; mb_row < cm->mb_rows; mb_row++)
{
for (mb_col = 0; mb_col < cm->mb_cols; mb_col++)
@@ -368,9 +369,10 @@ void vp8_loop_filter_frame
filter_level = baseline_filter_level[Segment];
- // Distance of Mb to the various image edges.
- // These specified to 8th pel as they are always compared to values that are in 1/8th pel units
- // Apply any context driven MB level adjustment
+ /* Distance of Mb to the various image edges.
+ * These specified to 8th pel as they are always compared to values that are in 1/8th pel units
+ * Apply any context driven MB level adjustment
+ */
vp8_adjust_mb_lf_value(mbd, &filter_level);
if (filter_level)
@@ -381,7 +383,7 @@ void vp8_loop_filter_frame
if (mbd->mode_info_context->mbmi.dc_diff > 0)
cm->lf_bv(y_ptr, u_ptr, v_ptr, post->y_stride, post->uv_stride, &lfi[filter_level], cm->simpler_lpf);
- // don't apply across umv border
+ /* don't apply across umv border */
if (mb_row > 0)
cm->lf_mbh(y_ptr, u_ptr, v_ptr, post->y_stride, post->uv_stride, &lfi[filter_level], cm->simpler_lpf);
@@ -393,14 +395,14 @@ void vp8_loop_filter_frame
u_ptr += 8;
v_ptr += 8;
- mbd->mode_info_context++; // step to next MB
+ mbd->mode_info_context++; /* step to next MB */
}
y_ptr += post->y_stride * 16 - post->y_width;
u_ptr += post->uv_stride * 8 - post->uv_width;
v_ptr += post->uv_stride * 8 - post->uv_width;
- mbd->mode_info_context++; // Skip border mb
+ mbd->mode_info_context++; /* Skip border mb */
}
}
@@ -424,26 +426,26 @@ void vp8_loop_filter_frame_yonly
int baseline_filter_level[MAX_MB_SEGMENTS];
int filter_level;
int alt_flt_enabled = mbd->segmentation_enabled;
- int frame_type = cm->frame_type;
+ FRAME_TYPE frame_type = cm->frame_type;
(void) sharpness_lvl;
- //MODE_INFO * this_mb_mode_info = cm->mi; // Point at base of Mb MODE_INFO list
- mbd->mode_info_context = cm->mi; // Point at base of Mb MODE_INFO list
+ /*MODE_INFO * this_mb_mode_info = cm->mi;*/ /* Point at base of Mb MODE_INFO list */
+ mbd->mode_info_context = cm->mi; /* Point at base of Mb MODE_INFO list */
- // Note the baseline filter values for each segment
+ /* Note the baseline filter values for each segment */
if (alt_flt_enabled)
{
for (i = 0; i < MAX_MB_SEGMENTS; i++)
{
- // Abs value
+ /* Abs value */
if (mbd->mb_segement_abs_delta == SEGMENT_ABSDATA)
baseline_filter_level[i] = mbd->segment_feature_data[MB_LVL_ALT_LF][i];
- // Delta Value
+ /* Delta Value */
else
{
baseline_filter_level[i] = default_filt_lvl + mbd->segment_feature_data[MB_LVL_ALT_LF][i];
- baseline_filter_level[i] = (baseline_filter_level[i] >= 0) ? ((baseline_filter_level[i] <= MAX_LOOP_FILTER) ? baseline_filter_level[i] : MAX_LOOP_FILTER) : 0; // Clamp to valid range
+ baseline_filter_level[i] = (baseline_filter_level[i] >= 0) ? ((baseline_filter_level[i] <= MAX_LOOP_FILTER) ? baseline_filter_level[i] : MAX_LOOP_FILTER) : 0; /* Clamp to valid range */
}
}
}
@@ -453,16 +455,16 @@ void vp8_loop_filter_frame_yonly
baseline_filter_level[i] = default_filt_lvl;
}
- // Initialize the loop filter for this frame.
+ /* Initialize the loop filter for this frame. */
if ((cm->last_filter_type != cm->filter_type) || (cm->last_sharpness_level != cm->sharpness_level))
vp8_init_loop_filter(cm);
else if (frame_type != cm->last_frame_type)
vp8_frame_init_loop_filter(lfi, frame_type);
- // Set up the buffer pointers
+ /* Set up the buffer pointers */
y_ptr = post->y_buffer;
- // vp8_filter each macro block
+ /* vp8_filter each macro block */
for (mb_row = 0; mb_row < cm->mb_rows; mb_row++)
{
for (mb_col = 0; mb_col < cm->mb_cols; mb_col++)
@@ -470,7 +472,7 @@ void vp8_loop_filter_frame_yonly
int Segment = (alt_flt_enabled) ? mbd->mode_info_context->mbmi.segment_id : 0;
filter_level = baseline_filter_level[Segment];
- // Apply any context driven MB level adjustment
+ /* Apply any context driven MB level adjustment */
vp8_adjust_mb_lf_value(mbd, &filter_level);
if (filter_level)
@@ -481,7 +483,7 @@ void vp8_loop_filter_frame_yonly
if (mbd->mode_info_context->mbmi.dc_diff > 0)
cm->lf_bv(y_ptr, 0, 0, post->y_stride, 0, &lfi[filter_level], 0);
- // don't apply across umv border
+ /* don't apply across umv border */
if (mb_row > 0)
cm->lf_mbh(y_ptr, 0, 0, post->y_stride, 0, &lfi[filter_level], 0);
@@ -490,12 +492,12 @@ void vp8_loop_filter_frame_yonly
}
y_ptr += 16;
- mbd->mode_info_context ++; // step to next MB
+ mbd->mode_info_context ++; /* step to next MB */
}
y_ptr += post->y_stride * 16 - post->y_width;
- mbd->mode_info_context ++; // Skip border mb
+ mbd->mode_info_context ++; /* Skip border mb */
}
}
@@ -516,7 +518,7 @@ void vp8_loop_filter_partial_frame
unsigned char *y_ptr;
int mb_row;
int mb_col;
- //int mb_rows = post->y_height >> 4;
+ /*int mb_rows = post->y_height >> 4;*/
int mb_cols = post->y_width >> 4;
int linestocopy;
@@ -525,12 +527,12 @@ void vp8_loop_filter_partial_frame
int baseline_filter_level[MAX_MB_SEGMENTS];
int filter_level;
int alt_flt_enabled = mbd->segmentation_enabled;
- int frame_type = cm->frame_type;
+ FRAME_TYPE frame_type = cm->frame_type;
(void) sharpness_lvl;
- //MODE_INFO * this_mb_mode_info = cm->mi + (post->y_height>>5) * (mb_cols + 1); // Point at base of Mb MODE_INFO list
- mbd->mode_info_context = cm->mi + (post->y_height >> 5) * (mb_cols + 1); // Point at base of Mb MODE_INFO list
+ /*MODE_INFO * this_mb_mode_info = cm->mi + (post->y_height>>5) * (mb_cols + 1);*/ /* Point at base of Mb MODE_INFO list */
+ mbd->mode_info_context = cm->mi + (post->y_height >> 5) * (mb_cols + 1); /* Point at base of Mb MODE_INFO list */
linestocopy = (post->y_height >> (4 + Fraction));
@@ -539,19 +541,19 @@ void vp8_loop_filter_partial_frame
linestocopy <<= 4;
- // Note the baseline filter values for each segment
+ /* Note the baseline filter values for each segment */
if (alt_flt_enabled)
{
for (i = 0; i < MAX_MB_SEGMENTS; i++)
{
- // Abs value
+ /* Abs value */
if (mbd->mb_segement_abs_delta == SEGMENT_ABSDATA)
baseline_filter_level[i] = mbd->segment_feature_data[MB_LVL_ALT_LF][i];
- // Delta Value
+ /* Delta Value */
else
{
baseline_filter_level[i] = default_filt_lvl + mbd->segment_feature_data[MB_LVL_ALT_LF][i];
- baseline_filter_level[i] = (baseline_filter_level[i] >= 0) ? ((baseline_filter_level[i] <= MAX_LOOP_FILTER) ? baseline_filter_level[i] : MAX_LOOP_FILTER) : 0; // Clamp to valid range
+ baseline_filter_level[i] = (baseline_filter_level[i] >= 0) ? ((baseline_filter_level[i] <= MAX_LOOP_FILTER) ? baseline_filter_level[i] : MAX_LOOP_FILTER) : 0; /* Clamp to valid range */
}
}
}
@@ -561,16 +563,16 @@ void vp8_loop_filter_partial_frame
baseline_filter_level[i] = default_filt_lvl;
}
- // Initialize the loop filter for this frame.
+ /* Initialize the loop filter for this frame. */
if ((cm->last_filter_type != cm->filter_type) || (cm->last_sharpness_level != cm->sharpness_level))
vp8_init_loop_filter(cm);
else if (frame_type != cm->last_frame_type)
vp8_frame_init_loop_filter(lfi, frame_type);
- // Set up the buffer pointers
+ /* Set up the buffer pointers */
y_ptr = post->y_buffer + (post->y_height >> 5) * 16 * post->y_stride;
- // vp8_filter each macro block
+ /* vp8_filter each macro block */
for (mb_row = 0; mb_row<(linestocopy >> 4); mb_row++)
{
for (mb_col = 0; mb_col < mb_cols; mb_col++)
@@ -593,10 +595,10 @@ void vp8_loop_filter_partial_frame
}
y_ptr += 16;
- mbd->mode_info_context += 1; // step to next MB
+ mbd->mode_info_context += 1; /* step to next MB */
}
y_ptr += post->y_stride * 16 - post->y_width;
- mbd->mode_info_context += 1; // Skip border mb
+ mbd->mode_info_context += 1; /* Skip border mb */
}
}
diff --git a/vp8/common/loopfilter.h b/vp8/common/loopfilter.h
index a2049bf61..e45683460 100644
--- a/vp8/common/loopfilter.h
+++ b/vp8/common/loopfilter.h
@@ -22,10 +22,10 @@ typedef enum
SIMPLE_LOOPFILTER = 1
} LOOPFILTERTYPE;
-// FRK
-// Need to align this structure so when it is declared and
-// passed it can be loaded into vector registers.
-// FRK
+/* FRK
+ * Need to align this structure so when it is declared and
+ * passed it can be loaded into vector registers.
+ */
typedef struct
{
DECLARE_ALIGNED(16, signed char, lim[16]);
@@ -119,8 +119,8 @@ typedef struct
typedef void loop_filter_uvfunction
(
- unsigned char *u, // source pointer
- int p, // pitch
+ unsigned char *u, /* source pointer */
+ int p, /* pitch */
const signed char *flimit,
const signed char *limit,
const signed char *thresh,
diff --git a/vp8/common/loopfilter_filters.c b/vp8/common/loopfilter_filters.c
index 1b92e00aa..694052924 100644
--- a/vp8/common/loopfilter_filters.c
+++ b/vp8/common/loopfilter_filters.c
@@ -23,7 +23,7 @@ static __inline signed char vp8_signed_char_clamp(int t)
}
-// should we apply any filter at all ( 11111111 yes, 00000000 no)
+/* should we apply any filter at all ( 11111111 yes, 00000000 no) */
static __inline signed char vp8_filter_mask(signed char limit, signed char flimit,
uc p3, uc p2, uc p1, uc p0, uc q0, uc q1, uc q2, uc q3)
{
@@ -39,7 +39,7 @@ static __inline signed char vp8_filter_mask(signed char limit, signed char flimi
return mask;
}
-// is there high variance internal edge ( 11111111 yes, 00000000 no)
+/* is there high variance internal edge ( 11111111 yes, 00000000 no) */
static __inline signed char vp8_hevmask(signed char thresh, uc p1, uc p0, uc q0, uc q1)
{
signed char hev = 0;
@@ -61,17 +61,18 @@ static __inline void vp8_filter(signed char mask, signed char hev, uc *op1, uc *
qs0 = (signed char) * oq0 ^ 0x80;
qs1 = (signed char) * oq1 ^ 0x80;
- // add outer taps if we have high edge variance
+ /* add outer taps if we have high edge variance */
vp8_filter = vp8_signed_char_clamp(ps1 - qs1);
vp8_filter &= hev;
- // inner taps
+ /* inner taps */
vp8_filter = vp8_signed_char_clamp(vp8_filter + 3 * (qs0 - ps0));
vp8_filter &= mask;
- // save bottom 3 bits so that we round one side +4 and the other +3
- // if it equals 4 we'll set to adjust by -1 to account for the fact
- // we'd round 3 the other way
+ /* save bottom 3 bits so that we round one side +4 and the other +3
+ * if it equals 4 we'll set to adjust by -1 to account for the fact
+ * we'd round 3 the other way
+ */
Filter1 = vp8_signed_char_clamp(vp8_filter + 4);
Filter2 = vp8_signed_char_clamp(vp8_filter + 3);
Filter1 >>= 3;
@@ -82,7 +83,7 @@ static __inline void vp8_filter(signed char mask, signed char hev, uc *op1, uc *
*op0 = u ^ 0x80;
vp8_filter = Filter1;
- // outer tap adjustments
+ /* outer tap adjustments */
vp8_filter += 1;
vp8_filter >>= 1;
vp8_filter &= ~hev;
@@ -96,19 +97,20 @@ static __inline void vp8_filter(signed char mask, signed char hev, uc *op1, uc *
void vp8_loop_filter_horizontal_edge_c
(
unsigned char *s,
- int p, //pitch
+ int p, /* pitch */
const signed char *flimit,
const signed char *limit,
const signed char *thresh,
int count
)
{
- int hev = 0; // high edge variance
+ int hev = 0; /* high edge variance */
signed char mask = 0;
int i = 0;
- // loop filter designed to work using chars so that we can make maximum use
- // of 8 bit simd instructions.
+ /* loop filter designed to work using chars so that we can make maximum use
+ * of 8 bit simd instructions.
+ */
do
{
mask = vp8_filter_mask(limit[i], flimit[i],
@@ -134,12 +136,13 @@ void vp8_loop_filter_vertical_edge_c
int count
)
{
- int hev = 0; // high edge variance
+ int hev = 0; /* high edge variance */
signed char mask = 0;
int i = 0;
- // loop filter designed to work using chars so that we can make maximum use
- // of 8 bit simd instructions.
+ /* loop filter designed to work using chars so that we can make maximum use
+ * of 8 bit simd instructions.
+ */
do
{
mask = vp8_filter_mask(limit[i], flimit[i],
@@ -166,7 +169,7 @@ static __inline void vp8_mbfilter(signed char mask, signed char hev,
signed char qs1 = (signed char) * oq1 ^ 0x80;
signed char qs2 = (signed char) * oq2 ^ 0x80;
- // add outer taps if we have high edge variance
+ /* add outer taps if we have high edge variance */
vp8_filter = vp8_signed_char_clamp(ps1 - qs1);
vp8_filter = vp8_signed_char_clamp(vp8_filter + 3 * (qs0 - ps0));
vp8_filter &= mask;
@@ -174,7 +177,7 @@ static __inline void vp8_mbfilter(signed char mask, signed char hev,
Filter2 = vp8_filter;
Filter2 &= hev;
- // save bottom 3 bits so that we round one side +4 and the other +3
+ /* save bottom 3 bits so that we round one side +4 and the other +3 */
Filter1 = vp8_signed_char_clamp(Filter2 + 4);
Filter2 = vp8_signed_char_clamp(Filter2 + 3);
Filter1 >>= 3;
@@ -183,25 +186,25 @@ static __inline void vp8_mbfilter(signed char mask, signed char hev,
ps0 = vp8_signed_char_clamp(ps0 + Filter2);
- // only apply wider filter if not high edge variance
+ /* only apply wider filter if not high edge variance */
vp8_filter &= ~hev;
Filter2 = vp8_filter;
- // roughly 3/7th difference across boundary
+ /* roughly 3/7th difference across boundary */
u = vp8_signed_char_clamp((63 + Filter2 * 27) >> 7);
s = vp8_signed_char_clamp(qs0 - u);
*oq0 = s ^ 0x80;
s = vp8_signed_char_clamp(ps0 + u);
*op0 = s ^ 0x80;
- // roughly 2/7th difference across boundary
+ /* roughly 2/7th difference across boundary */
u = vp8_signed_char_clamp((63 + Filter2 * 18) >> 7);
s = vp8_signed_char_clamp(qs1 - u);
*oq1 = s ^ 0x80;
s = vp8_signed_char_clamp(ps1 + u);
*op1 = s ^ 0x80;
- // roughly 1/7th difference across boundary
+ /* roughly 1/7th difference across boundary */
u = vp8_signed_char_clamp((63 + Filter2 * 9) >> 7);
s = vp8_signed_char_clamp(qs2 - u);
*oq2 = s ^ 0x80;
@@ -219,12 +222,13 @@ void vp8_mbloop_filter_horizontal_edge_c
int count
)
{
- signed char hev = 0; // high edge variance
+ signed char hev = 0; /* high edge variance */
signed char mask = 0;
int i = 0;
- // loop filter designed to work using chars so that we can make maximum use
- // of 8 bit simd instructions.
+ /* loop filter designed to work using chars so that we can make maximum use
+ * of 8 bit simd instructions.
+ */
do
{
@@ -253,7 +257,7 @@ void vp8_mbloop_filter_vertical_edge_c
int count
)
{
- signed char hev = 0; // high edge variance
+ signed char hev = 0; /* high edge variance */
signed char mask = 0;
int i = 0;
@@ -273,12 +277,13 @@ void vp8_mbloop_filter_vertical_edge_c
}
-// should we apply any filter at all ( 11111111 yes, 00000000 no)
+/* should we apply any filter at all ( 11111111 yes, 00000000 no) */
static __inline signed char vp8_simple_filter_mask(signed char limit, signed char flimit, uc p1, uc p0, uc q0, uc q1)
{
-// Why does this cause problems for win32?
-// error C2143: syntax error : missing ';' before 'type'
-// (void) limit;
+/* Why does this cause problems for win32?
+ * error C2143: syntax error : missing ';' before 'type'
+ * (void) limit;
+ */
signed char mask = (abs(p0 - q0) * 2 + abs(p1 - q1) / 2 <= flimit * 2 + limit) * -1;
return mask;
}
@@ -296,7 +301,7 @@ static __inline void vp8_simple_filter(signed char mask, uc *op1, uc *op0, uc *o
vp8_filter = vp8_signed_char_clamp(vp8_filter + 3 * (q0 - p0));
vp8_filter &= mask;
- // save bottom 3 bits so that we round one side +4 and the other +3
+ /* save bottom 3 bits so that we round one side +4 and the other +3 */
Filter1 = vp8_signed_char_clamp(vp8_filter + 4);
Filter1 >>= 3;
u = vp8_signed_char_clamp(q0 - Filter1);
@@ -324,7 +329,7 @@ void vp8_loop_filter_simple_horizontal_edge_c
do
{
- //mask = vp8_simple_filter_mask( limit[i], flimit[i],s[-1*p],s[0*p]);
+ /*mask = vp8_simple_filter_mask( limit[i], flimit[i],s[-1*p],s[0*p]);*/
mask = vp8_simple_filter_mask(limit[i], flimit[i], s[-2*p], s[-1*p], s[0*p], s[1*p]);
vp8_simple_filter(mask, s - 2 * p, s - 1 * p, s, s + 1 * p);
++s;
@@ -348,7 +353,7 @@ void vp8_loop_filter_simple_vertical_edge_c
do
{
- //mask = vp8_simple_filter_mask( limit[i], flimit[i],s[-1],s[0]);
+ /*mask = vp8_simple_filter_mask( limit[i], flimit[i],s[-1],s[0]);*/
mask = vp8_simple_filter_mask(limit[i], flimit[i], s[-2], s[-1], s[0], s[1]);
vp8_simple_filter(mask, s - 2, s - 1, s, s + 1);
s += p;
diff --git a/vp8/common/mbpitch.c b/vp8/common/mbpitch.c
index ce40d16ca..af55e2fe0 100644
--- a/vp8/common/mbpitch.c
+++ b/vp8/common/mbpitch.c
@@ -14,7 +14,7 @@
typedef enum
{
PRED = 0,
- DEST = 1,
+ DEST = 1
} BLOCKSET;
void vp8_setup_block
@@ -62,13 +62,13 @@ void vp8_setup_macroblock(MACROBLOCKD *x, BLOCKSET bs)
v = &x->pre.v_buffer;
}
- for (block = 0; block < 16; block++) // y blocks
+ for (block = 0; block < 16; block++) /* y blocks */
{
vp8_setup_block(&x->block[block], x->dst.y_stride, y, x->dst.y_stride,
(block >> 2) * 4 * x->dst.y_stride + (block & 3) * 4, bs);
}
- for (block = 16; block < 20; block++) // U and V blocks
+ for (block = 16; block < 20; block++) /* U and V blocks */
{
vp8_setup_block(&x->block[block], x->dst.uv_stride, u, x->dst.uv_stride,
((block - 16) >> 1) * 4 * x->dst.uv_stride + (block & 1) * 4, bs);
@@ -123,7 +123,7 @@ void vp8_setup_block_dptrs(MACROBLOCKD *x)
void vp8_build_block_doffsets(MACROBLOCKD *x)
{
- // handle the destination pitch features
+ /* handle the destination pitch features */
vp8_setup_macroblock(x, DEST);
vp8_setup_macroblock(x, PRED);
}
diff --git a/vp8/common/modecont.c b/vp8/common/modecont.c
index 0fa299577..86a74bc0f 100644
--- a/vp8/common/modecont.c
+++ b/vp8/common/modecont.c
@@ -14,27 +14,27 @@
const int vp8_mode_contexts[6][4] =
{
{
- // 0
+ /* 0 */
7, 1, 1, 143,
},
{
- // 1
+ /* 1 */
14, 18, 14, 107,
},
{
- // 2
+ /* 2 */
135, 64, 57, 68,
},
{
- // 3
+ /* 3 */
60, 56, 128, 65,
},
{
- // 4
+ /* 4 */
159, 134, 128, 34,
},
{
- // 5
+ /* 5 */
234, 188, 128, 28,
},
};
diff --git a/vp8/common/modecontext.c b/vp8/common/modecontext.c
index 8e483b800..a31a561c8 100644
--- a/vp8/common/modecontext.c
+++ b/vp8/common/modecontext.c
@@ -14,133 +14,133 @@
const unsigned int vp8_kf_default_bmode_counts [VP8_BINTRAMODES] [VP8_BINTRAMODES] [VP8_BINTRAMODES] =
{
{
- //Above Mode : 0
- { 43438, 2195, 470, 316, 615, 171, 217, 412, 124, 160, }, // left_mode 0
- { 5722, 2751, 296, 291, 81, 68, 80, 101, 100, 170, }, // left_mode 1
- { 1629, 201, 307, 25, 47, 16, 34, 72, 19, 28, }, // left_mode 2
- { 332, 266, 36, 500, 20, 65, 23, 14, 154, 106, }, // left_mode 3
- { 450, 97, 10, 24, 117, 10, 2, 12, 8, 71, }, // left_mode 4
- { 384, 49, 29, 44, 12, 162, 51, 5, 87, 42, }, // left_mode 5
- { 495, 53, 157, 27, 14, 57, 180, 17, 17, 34, }, // left_mode 6
- { 695, 64, 62, 9, 27, 5, 3, 147, 10, 26, }, // left_mode 7
- { 230, 54, 20, 124, 16, 125, 29, 12, 283, 37, }, // left_mode 8
- { 260, 87, 21, 120, 32, 16, 33, 16, 33, 203, }, // left_mode 9
+ /*Above Mode : 0*/
+ { 43438, 2195, 470, 316, 615, 171, 217, 412, 124, 160, }, /* left_mode 0 */
+ { 5722, 2751, 296, 291, 81, 68, 80, 101, 100, 170, }, /* left_mode 1 */
+ { 1629, 201, 307, 25, 47, 16, 34, 72, 19, 28, }, /* left_mode 2 */
+ { 332, 266, 36, 500, 20, 65, 23, 14, 154, 106, }, /* left_mode 3 */
+ { 450, 97, 10, 24, 117, 10, 2, 12, 8, 71, }, /* left_mode 4 */
+ { 384, 49, 29, 44, 12, 162, 51, 5, 87, 42, }, /* left_mode 5 */
+ { 495, 53, 157, 27, 14, 57, 180, 17, 17, 34, }, /* left_mode 6 */
+ { 695, 64, 62, 9, 27, 5, 3, 147, 10, 26, }, /* left_mode 7 */
+ { 230, 54, 20, 124, 16, 125, 29, 12, 283, 37, }, /* left_mode 8 */
+ { 260, 87, 21, 120, 32, 16, 33, 16, 33, 203, }, /* left_mode 9 */
},
{
- //Above Mode : 1
- { 3934, 2573, 355, 137, 128, 87, 133, 117, 37, 27, }, // left_mode 0
- { 1036, 1929, 278, 135, 27, 37, 48, 55, 41, 91, }, // left_mode 1
- { 223, 256, 253, 15, 13, 9, 28, 64, 3, 3, }, // left_mode 2
- { 120, 129, 17, 316, 15, 11, 9, 4, 53, 74, }, // left_mode 3
- { 129, 58, 6, 11, 38, 2, 0, 5, 2, 67, }, // left_mode 4
- { 53, 22, 11, 16, 8, 26, 14, 3, 19, 12, }, // left_mode 5
- { 59, 26, 61, 11, 4, 9, 35, 13, 8, 8, }, // left_mode 6
- { 101, 52, 40, 8, 5, 2, 8, 59, 2, 20, }, // left_mode 7
- { 48, 34, 10, 52, 8, 15, 6, 6, 63, 20, }, // left_mode 8
- { 96, 48, 22, 63, 11, 14, 5, 8, 9, 96, }, // left_mode 9
+ /*Above Mode : 1*/
+ { 3934, 2573, 355, 137, 128, 87, 133, 117, 37, 27, }, /* left_mode 0 */
+ { 1036, 1929, 278, 135, 27, 37, 48, 55, 41, 91, }, /* left_mode 1 */
+ { 223, 256, 253, 15, 13, 9, 28, 64, 3, 3, }, /* left_mode 2 */
+ { 120, 129, 17, 316, 15, 11, 9, 4, 53, 74, }, /* left_mode 3 */
+ { 129, 58, 6, 11, 38, 2, 0, 5, 2, 67, }, /* left_mode 4 */
+ { 53, 22, 11, 16, 8, 26, 14, 3, 19, 12, }, /* left_mode 5 */
+ { 59, 26, 61, 11, 4, 9, 35, 13, 8, 8, }, /* left_mode 6 */
+ { 101, 52, 40, 8, 5, 2, 8, 59, 2, 20, }, /* left_mode 7 */
+ { 48, 34, 10, 52, 8, 15, 6, 6, 63, 20, }, /* left_mode 8 */
+ { 96, 48, 22, 63, 11, 14, 5, 8, 9, 96, }, /* left_mode 9 */
},
{
- //Above Mode : 2
- { 709, 461, 506, 36, 27, 33, 151, 98, 24, 6, }, // left_mode 0
- { 201, 375, 442, 27, 13, 8, 46, 58, 6, 19, }, // left_mode 1
- { 122, 140, 417, 4, 13, 3, 33, 59, 4, 2, }, // left_mode 2
- { 36, 17, 22, 16, 6, 8, 12, 17, 9, 21, }, // left_mode 3
- { 51, 15, 7, 1, 14, 0, 4, 5, 3, 22, }, // left_mode 4
- { 18, 11, 30, 9, 7, 20, 11, 5, 2, 6, }, // left_mode 5
- { 38, 21, 103, 9, 4, 12, 79, 13, 2, 5, }, // left_mode 6
- { 64, 17, 66, 2, 12, 4, 2, 65, 4, 5, }, // left_mode 7
- { 14, 7, 7, 16, 3, 11, 4, 13, 15, 16, }, // left_mode 8
- { 36, 8, 32, 9, 9, 4, 14, 7, 6, 24, }, // left_mode 9
+ /*Above Mode : 2*/
+ { 709, 461, 506, 36, 27, 33, 151, 98, 24, 6, }, /* left_mode 0 */
+ { 201, 375, 442, 27, 13, 8, 46, 58, 6, 19, }, /* left_mode 1 */
+ { 122, 140, 417, 4, 13, 3, 33, 59, 4, 2, }, /* left_mode 2 */
+ { 36, 17, 22, 16, 6, 8, 12, 17, 9, 21, }, /* left_mode 3 */
+ { 51, 15, 7, 1, 14, 0, 4, 5, 3, 22, }, /* left_mode 4 */
+ { 18, 11, 30, 9, 7, 20, 11, 5, 2, 6, }, /* left_mode 5 */
+ { 38, 21, 103, 9, 4, 12, 79, 13, 2, 5, }, /* left_mode 6 */
+ { 64, 17, 66, 2, 12, 4, 2, 65, 4, 5, }, /* left_mode 7 */
+ { 14, 7, 7, 16, 3, 11, 4, 13, 15, 16, }, /* left_mode 8 */
+ { 36, 8, 32, 9, 9, 4, 14, 7, 6, 24, }, /* left_mode 9 */
},
{
- //Above Mode : 3
- { 1340, 173, 36, 119, 30, 10, 13, 10, 20, 26, }, // left_mode 0
- { 156, 293, 26, 108, 5, 16, 2, 4, 23, 30, }, // left_mode 1
- { 60, 34, 13, 7, 3, 3, 0, 8, 4, 5, }, // left_mode 2
- { 72, 64, 1, 235, 3, 9, 2, 7, 28, 38, }, // left_mode 3
- { 29, 14, 1, 3, 5, 0, 2, 2, 5, 13, }, // left_mode 4
- { 22, 7, 4, 11, 2, 5, 1, 2, 6, 4, }, // left_mode 5
- { 18, 14, 5, 6, 4, 3, 14, 0, 9, 2, }, // left_mode 6
- { 41, 10, 7, 1, 2, 0, 0, 10, 2, 1, }, // left_mode 7
- { 23, 19, 2, 33, 1, 5, 2, 0, 51, 8, }, // left_mode 8
- { 33, 26, 7, 53, 3, 9, 3, 3, 9, 19, }, // left_mode 9
+ /*Above Mode : 3*/
+ { 1340, 173, 36, 119, 30, 10, 13, 10, 20, 26, }, /* left_mode 0 */
+ { 156, 293, 26, 108, 5, 16, 2, 4, 23, 30, }, /* left_mode 1 */
+ { 60, 34, 13, 7, 3, 3, 0, 8, 4, 5, }, /* left_mode 2 */
+ { 72, 64, 1, 235, 3, 9, 2, 7, 28, 38, }, /* left_mode 3 */
+ { 29, 14, 1, 3, 5, 0, 2, 2, 5, 13, }, /* left_mode 4 */
+ { 22, 7, 4, 11, 2, 5, 1, 2, 6, 4, }, /* left_mode 5 */
+ { 18, 14, 5, 6, 4, 3, 14, 0, 9, 2, }, /* left_mode 6 */
+ { 41, 10, 7, 1, 2, 0, 0, 10, 2, 1, }, /* left_mode 7 */
+ { 23, 19, 2, 33, 1, 5, 2, 0, 51, 8, }, /* left_mode 8 */
+ { 33, 26, 7, 53, 3, 9, 3, 3, 9, 19, }, /* left_mode 9 */
},
{
- //Above Mode : 4
- { 410, 165, 43, 31, 66, 15, 30, 54, 8, 17, }, // left_mode 0
- { 115, 64, 27, 18, 30, 7, 11, 15, 4, 19, }, // left_mode 1
- { 31, 23, 25, 1, 7, 2, 2, 10, 0, 5, }, // left_mode 2
- { 17, 4, 1, 6, 8, 2, 7, 5, 5, 21, }, // left_mode 3
- { 120, 12, 1, 2, 83, 3, 0, 4, 1, 40, }, // left_mode 4
- { 4, 3, 1, 2, 1, 2, 5, 0, 3, 6, }, // left_mode 5
- { 10, 2, 13, 6, 6, 6, 8, 2, 4, 5, }, // left_mode 6
- { 58, 10, 5, 1, 28, 1, 1, 33, 1, 9, }, // left_mode 7
- { 8, 2, 1, 4, 2, 5, 1, 1, 2, 10, }, // left_mode 8
- { 76, 7, 5, 7, 18, 2, 2, 0, 5, 45, }, // left_mode 9
+ /*Above Mode : 4*/
+ { 410, 165, 43, 31, 66, 15, 30, 54, 8, 17, }, /* left_mode 0 */
+ { 115, 64, 27, 18, 30, 7, 11, 15, 4, 19, }, /* left_mode 1 */
+ { 31, 23, 25, 1, 7, 2, 2, 10, 0, 5, }, /* left_mode 2 */
+ { 17, 4, 1, 6, 8, 2, 7, 5, 5, 21, }, /* left_mode 3 */
+ { 120, 12, 1, 2, 83, 3, 0, 4, 1, 40, }, /* left_mode 4 */
+ { 4, 3, 1, 2, 1, 2, 5, 0, 3, 6, }, /* left_mode 5 */
+ { 10, 2, 13, 6, 6, 6, 8, 2, 4, 5, }, /* left_mode 6 */
+ { 58, 10, 5, 1, 28, 1, 1, 33, 1, 9, }, /* left_mode 7 */
+ { 8, 2, 1, 4, 2, 5, 1, 1, 2, 10, }, /* left_mode 8 */
+ { 76, 7, 5, 7, 18, 2, 2, 0, 5, 45, }, /* left_mode 9 */
},
{
- //Above Mode : 5
- { 444, 46, 47, 20, 14, 110, 60, 14, 60, 7, }, // left_mode 0
- { 59, 57, 25, 18, 3, 17, 21, 6, 14, 6, }, // left_mode 1
- { 24, 17, 20, 6, 4, 13, 7, 2, 3, 2, }, // left_mode 2
- { 13, 11, 5, 14, 4, 9, 2, 4, 15, 7, }, // left_mode 3
- { 8, 5, 2, 1, 4, 0, 1, 1, 2, 12, }, // left_mode 4
- { 19, 5, 5, 7, 4, 40, 6, 3, 10, 4, }, // left_mode 5
- { 16, 5, 9, 1, 1, 16, 26, 2, 10, 4, }, // left_mode 6
- { 11, 4, 8, 1, 1, 4, 4, 5, 4, 1, }, // left_mode 7
- { 15, 1, 3, 7, 3, 21, 7, 1, 34, 5, }, // left_mode 8
- { 18, 5, 1, 3, 4, 3, 7, 1, 2, 9, }, // left_mode 9
+ /*Above Mode : 5*/
+ { 444, 46, 47, 20, 14, 110, 60, 14, 60, 7, }, /* left_mode 0 */
+ { 59, 57, 25, 18, 3, 17, 21, 6, 14, 6, }, /* left_mode 1 */
+ { 24, 17, 20, 6, 4, 13, 7, 2, 3, 2, }, /* left_mode 2 */
+ { 13, 11, 5, 14, 4, 9, 2, 4, 15, 7, }, /* left_mode 3 */
+ { 8, 5, 2, 1, 4, 0, 1, 1, 2, 12, }, /* left_mode 4 */
+ { 19, 5, 5, 7, 4, 40, 6, 3, 10, 4, }, /* left_mode 5 */
+ { 16, 5, 9, 1, 1, 16, 26, 2, 10, 4, }, /* left_mode 6 */
+ { 11, 4, 8, 1, 1, 4, 4, 5, 4, 1, }, /* left_mode 7 */
+ { 15, 1, 3, 7, 3, 21, 7, 1, 34, 5, }, /* left_mode 8 */
+ { 18, 5, 1, 3, 4, 3, 7, 1, 2, 9, }, /* left_mode 9 */
},
{
- //Above Mode : 6
- { 476, 149, 94, 13, 14, 77, 291, 27, 23, 3, }, // left_mode 0
- { 79, 83, 42, 14, 2, 12, 63, 2, 4, 14, }, // left_mode 1
- { 43, 36, 55, 1, 3, 8, 42, 11, 5, 1, }, // left_mode 2
- { 9, 9, 6, 16, 1, 5, 6, 3, 11, 10, }, // left_mode 3
- { 10, 3, 1, 3, 10, 1, 0, 1, 1, 4, }, // left_mode 4
- { 14, 6, 15, 5, 1, 20, 25, 2, 5, 0, }, // left_mode 5
- { 28, 7, 51, 1, 0, 8, 127, 6, 2, 5, }, // left_mode 6
- { 13, 3, 3, 2, 3, 1, 2, 8, 1, 2, }, // left_mode 7
- { 10, 3, 3, 3, 3, 8, 2, 2, 9, 3, }, // left_mode 8
- { 13, 7, 11, 4, 0, 4, 6, 2, 5, 8, }, // left_mode 9
+ /*Above Mode : 6*/
+ { 476, 149, 94, 13, 14, 77, 291, 27, 23, 3, }, /* left_mode 0 */
+ { 79, 83, 42, 14, 2, 12, 63, 2, 4, 14, }, /* left_mode 1 */
+ { 43, 36, 55, 1, 3, 8, 42, 11, 5, 1, }, /* left_mode 2 */
+ { 9, 9, 6, 16, 1, 5, 6, 3, 11, 10, }, /* left_mode 3 */
+ { 10, 3, 1, 3, 10, 1, 0, 1, 1, 4, }, /* left_mode 4 */
+ { 14, 6, 15, 5, 1, 20, 25, 2, 5, 0, }, /* left_mode 5 */
+ { 28, 7, 51, 1, 0, 8, 127, 6, 2, 5, }, /* left_mode 6 */
+ { 13, 3, 3, 2, 3, 1, 2, 8, 1, 2, }, /* left_mode 7 */
+ { 10, 3, 3, 3, 3, 8, 2, 2, 9, 3, }, /* left_mode 8 */
+ { 13, 7, 11, 4, 0, 4, 6, 2, 5, 8, }, /* left_mode 9 */
},
{
- //Above Mode : 7
- { 376, 135, 119, 6, 32, 8, 31, 224, 9, 3, }, // left_mode 0
- { 93, 60, 54, 6, 13, 7, 8, 92, 2, 12, }, // left_mode 1
- { 74, 36, 84, 0, 3, 2, 9, 67, 2, 1, }, // left_mode 2
- { 19, 4, 4, 8, 8, 2, 4, 7, 6, 16, }, // left_mode 3
- { 51, 7, 4, 1, 77, 3, 0, 14, 1, 15, }, // left_mode 4
- { 7, 7, 5, 7, 4, 7, 4, 5, 0, 3, }, // left_mode 5
- { 18, 2, 19, 2, 2, 4, 12, 11, 1, 2, }, // left_mode 6
- { 129, 6, 27, 1, 21, 3, 0, 189, 0, 6, }, // left_mode 7
- { 9, 1, 2, 8, 3, 7, 0, 5, 3, 3, }, // left_mode 8
- { 20, 4, 5, 10, 4, 2, 7, 17, 3, 16, }, // left_mode 9
+ /*Above Mode : 7*/
+ { 376, 135, 119, 6, 32, 8, 31, 224, 9, 3, }, /* left_mode 0 */
+ { 93, 60, 54, 6, 13, 7, 8, 92, 2, 12, }, /* left_mode 1 */
+ { 74, 36, 84, 0, 3, 2, 9, 67, 2, 1, }, /* left_mode 2 */
+ { 19, 4, 4, 8, 8, 2, 4, 7, 6, 16, }, /* left_mode 3 */
+ { 51, 7, 4, 1, 77, 3, 0, 14, 1, 15, }, /* left_mode 4 */
+ { 7, 7, 5, 7, 4, 7, 4, 5, 0, 3, }, /* left_mode 5 */
+ { 18, 2, 19, 2, 2, 4, 12, 11, 1, 2, }, /* left_mode 6 */
+ { 129, 6, 27, 1, 21, 3, 0, 189, 0, 6, }, /* left_mode 7 */
+ { 9, 1, 2, 8, 3, 7, 0, 5, 3, 3, }, /* left_mode 8 */
+ { 20, 4, 5, 10, 4, 2, 7, 17, 3, 16, }, /* left_mode 9 */
},
{
- //Above Mode : 8
- { 617, 68, 34, 79, 11, 27, 25, 14, 75, 13, }, // left_mode 0
- { 51, 82, 21, 26, 6, 12, 13, 1, 26, 16, }, // left_mode 1
- { 29, 9, 12, 11, 3, 7, 1, 10, 2, 2, }, // left_mode 2
- { 17, 19, 11, 74, 4, 3, 2, 0, 58, 13, }, // left_mode 3
- { 10, 1, 1, 3, 4, 1, 0, 2, 1, 8, }, // left_mode 4
- { 14, 4, 5, 5, 1, 13, 2, 0, 27, 8, }, // left_mode 5
- { 10, 3, 5, 4, 1, 7, 6, 4, 5, 1, }, // left_mode 6
- { 10, 2, 6, 2, 1, 1, 1, 4, 2, 1, }, // left_mode 7
- { 14, 8, 5, 23, 2, 12, 6, 2, 117, 5, }, // left_mode 8
- { 9, 6, 2, 19, 1, 6, 3, 2, 9, 9, }, // left_mode 9
+ /*Above Mode : 8*/
+ { 617, 68, 34, 79, 11, 27, 25, 14, 75, 13, }, /* left_mode 0 */
+ { 51, 82, 21, 26, 6, 12, 13, 1, 26, 16, }, /* left_mode 1 */
+ { 29, 9, 12, 11, 3, 7, 1, 10, 2, 2, }, /* left_mode 2 */
+ { 17, 19, 11, 74, 4, 3, 2, 0, 58, 13, }, /* left_mode 3 */
+ { 10, 1, 1, 3, 4, 1, 0, 2, 1, 8, }, /* left_mode 4 */
+ { 14, 4, 5, 5, 1, 13, 2, 0, 27, 8, }, /* left_mode 5 */
+ { 10, 3, 5, 4, 1, 7, 6, 4, 5, 1, }, /* left_mode 6 */
+ { 10, 2, 6, 2, 1, 1, 1, 4, 2, 1, }, /* left_mode 7 */
+ { 14, 8, 5, 23, 2, 12, 6, 2, 117, 5, }, /* left_mode 8 */
+ { 9, 6, 2, 19, 1, 6, 3, 2, 9, 9, }, /* left_mode 9 */
},
{
- //Above Mode : 9
- { 680, 73, 22, 38, 42, 5, 11, 9, 6, 28, }, // left_mode 0
- { 113, 112, 21, 22, 10, 2, 8, 4, 6, 42, }, // left_mode 1
- { 44, 20, 24, 6, 5, 4, 3, 3, 1, 2, }, // left_mode 2
- { 40, 23, 7, 71, 5, 2, 4, 1, 7, 22, }, // left_mode 3
- { 85, 9, 4, 4, 17, 2, 0, 3, 2, 23, }, // left_mode 4
- { 13, 4, 2, 6, 1, 7, 0, 1, 7, 6, }, // left_mode 5
- { 26, 6, 8, 3, 2, 3, 8, 1, 5, 4, }, // left_mode 6
- { 54, 8, 9, 6, 7, 0, 1, 11, 1, 3, }, // left_mode 7
- { 9, 10, 4, 13, 2, 5, 4, 2, 14, 8, }, // left_mode 8
- { 92, 9, 5, 19, 15, 3, 3, 1, 6, 58, }, // left_mode 9
+ /*Above Mode : 9*/
+ { 680, 73, 22, 38, 42, 5, 11, 9, 6, 28, }, /* left_mode 0 */
+ { 113, 112, 21, 22, 10, 2, 8, 4, 6, 42, }, /* left_mode 1 */
+ { 44, 20, 24, 6, 5, 4, 3, 3, 1, 2, }, /* left_mode 2 */
+ { 40, 23, 7, 71, 5, 2, 4, 1, 7, 22, }, /* left_mode 3 */
+ { 85, 9, 4, 4, 17, 2, 0, 3, 2, 23, }, /* left_mode 4 */
+ { 13, 4, 2, 6, 1, 7, 0, 1, 7, 6, }, /* left_mode 5 */
+ { 26, 6, 8, 3, 2, 3, 8, 1, 5, 4, }, /* left_mode 6 */
+ { 54, 8, 9, 6, 7, 0, 1, 11, 1, 3, }, /* left_mode 7 */
+ { 9, 10, 4, 13, 2, 5, 4, 2, 14, 8, }, /* left_mode 8 */
+ { 92, 9, 5, 19, 15, 3, 3, 1, 6, 58, }, /* left_mode 9 */
},
};
diff --git a/vp8/common/onyxc_int.h b/vp8/common/onyxc_int.h
index d12143d4d..7e44c1f0c 100644
--- a/vp8/common/onyxc_int.h
+++ b/vp8/common/onyxc_int.h
@@ -21,9 +21,9 @@
#include "recon.h"
#include "postproc.h"
-//#ifdef PACKET_TESTING
+/*#ifdef PACKET_TESTING*/
#include "header.h"
-//#endif
+/*#endif*/
/* Create/destroy static data structures. */
@@ -43,7 +43,7 @@ typedef struct frame_contexts
vp8_prob sub_mv_ref_prob [VP8_SUBMVREFS-1];
vp8_prob coef_probs [BLOCK_TYPES] [COEF_BANDS] [PREV_COEF_CONTEXTS] [vp8_coef_tokens-1];
MV_CONTEXT mvc[2];
- MV_CONTEXT pre_mvc[2]; //not to caculate the mvcost for the frame if mvc doesn't change.
+ MV_CONTEXT pre_mvc[2]; /* not to caculate the mvcost for the frame if mvc doesn't change. */
} FRAME_CONTEXT;
typedef enum
@@ -105,7 +105,7 @@ typedef struct VP8Common
YV12_BUFFER_CONFIG post_proc_buffer;
YV12_BUFFER_CONFIG temp_scale_frame;
- FRAME_TYPE last_frame_type; //Add to check if vp8_frame_init_loop_filter() can be skipped.
+ FRAME_TYPE last_frame_type; /* Add to check if vp8_frame_init_loop_filter() can be skipped. */
FRAME_TYPE frame_type;
int show_frame;
@@ -116,7 +116,7 @@ typedef struct VP8Common
int mb_cols;
int mode_info_stride;
- // prfile settings
+ /* profile settings */
int mb_no_coeff_skip;
int no_lpf;
int simpler_lpf;
@@ -124,7 +124,7 @@ typedef struct VP8Common
int full_pixel;
int base_qindex;
- int last_kf_gf_q; // Q used on the last GF or KF
+ int last_kf_gf_q; /* Q used on the last GF or KF */
int y1dc_delta_q;
int y2dc_delta_q;
@@ -154,31 +154,31 @@ typedef struct VP8Common
int last_sharpness_level;
int sharpness_level;
- int refresh_last_frame; // Two state 0 = NO, 1 = YES
- int refresh_golden_frame; // Two state 0 = NO, 1 = YES
- int refresh_alt_ref_frame; // Two state 0 = NO, 1 = YES
+ int refresh_last_frame; /* Two state 0 = NO, 1 = YES */
+ int refresh_golden_frame; /* Two state 0 = NO, 1 = YES */
+ int refresh_alt_ref_frame; /* Two state 0 = NO, 1 = YES */
- int copy_buffer_to_gf; // 0 none, 1 Last to GF, 2 ARF to GF
- int copy_buffer_to_arf; // 0 none, 1 Last to ARF, 2 GF to ARF
+ int copy_buffer_to_gf; /* 0 none, 1 Last to GF, 2 ARF to GF */
+ int copy_buffer_to_arf; /* 0 none, 1 Last to ARF, 2 GF to ARF */
- int refresh_entropy_probs; // Two state 0 = NO, 1 = YES
+ int refresh_entropy_probs; /* Two state 0 = NO, 1 = YES */
- int ref_frame_sign_bias[MAX_REF_FRAMES]; // Two state 0, 1
+ int ref_frame_sign_bias[MAX_REF_FRAMES]; /* Two state 0, 1 */
- // Y,U,V,Y2
- ENTROPY_CONTEXT_PLANES *above_context; // row of context for each plane
- ENTROPY_CONTEXT_PLANES left_context; // (up to) 4 contexts ""
+ /* Y,U,V,Y2 */
+ ENTROPY_CONTEXT_PLANES *above_context; /* row of context for each plane */
+ ENTROPY_CONTEXT_PLANES left_context; /* (up to) 4 contexts "" */
- // keyframe block modes are predicted by their above, left neighbors
+ /* keyframe block modes are predicted by their above, left neighbors */
vp8_prob kf_bmode_prob [VP8_BINTRAMODES] [VP8_BINTRAMODES] [VP8_BINTRAMODES-1];
vp8_prob kf_ymode_prob [VP8_YMODES-1]; /* keyframe "" */
vp8_prob kf_uv_mode_prob [VP8_UV_MODES-1];
- FRAME_CONTEXT lfc; // last frame entropy
- FRAME_CONTEXT fc; // this frame entropy
+ FRAME_CONTEXT lfc; /* last frame entropy */
+ FRAME_CONTEXT fc; /* this frame entropy */
unsigned int current_video_frame;
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;
diff --git a/vp8/common/ppflags.h b/vp8/common/ppflags.h
index 651671a43..6a51d2cd6 100644
--- a/vp8/common/ppflags.h
+++ b/vp8/common/ppflags.h
@@ -23,7 +23,7 @@ enum
VP8D_DEBUG_LEVEL4 = 1<<6,
VP8D_DEBUG_LEVEL5 = 1<<7,
VP8D_DEBUG_LEVEL6 = 1<<8,
- VP8D_DEBUG_LEVEL7 = 1<<9,
+ VP8D_DEBUG_LEVEL7 = 1<<9
};
#endif
diff --git a/vp8/common/recon.c b/vp8/common/recon.c
index 2cb3bc6ce..d72d6e410 100644
--- a/vp8/common/recon.c
+++ b/vp8/common/recon.c
@@ -112,15 +112,15 @@ void vp8_recon_mby_c(const vp8_recon_rtcd_vtable_t *rtcd, MACROBLOCKD *x)
BLOCKD *b = &x->block[0];
RECON_INVOKE(rtcd, recon4)(b->predictor, b->diff, *(b->base_dst) + b->dst, b->dst_stride);
- //b = &x->block[4];
+ /*b = &x->block[4];*/
b += 4;
RECON_INVOKE(rtcd, recon4)(b->predictor, b->diff, *(b->base_dst) + b->dst, b->dst_stride);
- //b = &x->block[8];
+ /*b = &x->block[8];*/
b += 4;
RECON_INVOKE(rtcd, recon4)(b->predictor, b->diff, *(b->base_dst) + b->dst, b->dst_stride);
- //b = &x->block[12];
+ /*b = &x->block[12];*/
b += 4;
RECON_INVOKE(rtcd, recon4)(b->predictor, b->diff, *(b->base_dst) + b->dst, b->dst_stride);
#else
@@ -149,7 +149,7 @@ void vp8_recon_mb_c(const vp8_recon_rtcd_vtable_t *rtcd, MACROBLOCKD *x)
RECON_INVOKE(rtcd, recon4)(b->predictor, b->diff, *(b->base_dst) + b->dst, b->dst_stride);
b += 4;
- //b = &x->block[16];
+ /*b = &x->block[16];*/
RECON_INVOKE(rtcd, recon2)(b->predictor, b->diff, *(b->base_dst) + b->dst, b->dst_stride);
b++;
diff --git a/vp8/common/recon.h b/vp8/common/recon.h
index c432c7bd2..1e6e343fc 100644
--- a/vp8/common/recon.h
+++ b/vp8/common/recon.h
@@ -18,10 +18,10 @@
void sym(unsigned char *src, int src_pitch, unsigned char *dst, int dst_pitch)
#define prototype_recon_block(sym) \
- void sym(unsigned char *pred, short *diff, unsigned char *dst, int pitch);
+ void sym(unsigned char *pred, short *diff, unsigned char *dst, int pitch)
#define prototype_recon_macroblock(sym) \
- void sym(const struct vp8_recon_rtcd_vtable *rtcd, MACROBLOCKD *x);
+ void sym(const struct vp8_recon_rtcd_vtable *rtcd, MACROBLOCKD *x)
struct vp8_recon_rtcd_vtable;
diff --git a/vp8/common/reconinter.c b/vp8/common/reconinter.c
index 2a7f12908..74871c0e8 100644
--- a/vp8/common/reconinter.c
+++ b/vp8/common/reconinter.c
@@ -18,9 +18,10 @@
#include "onyxc_int.h"
#endif
-// use this define on systems where unaligned int reads and writes are
-// not allowed, i.e. ARM architectures
-//#define MUST_BE_ALIGNED
+/* use this define on systems where unaligned int reads and writes are
+ * not allowed, i.e. ARM architectures
+ */
+/*#define MUST_BE_ALIGNED*/
static const int bbb[4] = {0, 2, 8, 10};
@@ -255,7 +256,7 @@ void vp8_build_inter_predictors_mbuv(MACROBLOCKD *x)
}
}
-//encoder only
+/*encoder only*/
void vp8_build_inter_predictors_mby(MACROBLOCKD *x)
{
@@ -491,15 +492,16 @@ void vp8_build_uvmvs(MACROBLOCKD *x, int fullpixel)
}
-// The following functions are wriiten for skip_recon_mb() to call. Since there is no recon in this
-// situation, we can write the result directly to dst buffer instead of writing it to predictor
-// buffer and then copying it to dst buffer.
+/* The following functions are wriiten for skip_recon_mb() to call. Since there is no recon in this
+ * situation, we can write the result directly to dst buffer instead of writing it to predictor
+ * buffer and then copying it to dst buffer.
+ */
static void vp8_build_inter_predictors_b_s(BLOCKD *d, unsigned char *dst_ptr, vp8_subpix_fn_t sppf)
{
int r;
unsigned char *ptr_base;
unsigned char *ptr;
- //unsigned char *pred_ptr = d->predictor;
+ /*unsigned char *pred_ptr = d->predictor;*/
int dst_stride = d->dst_stride;
int pre_stride = d->pre_stride;
@@ -535,8 +537,8 @@ static void vp8_build_inter_predictors_b_s(BLOCKD *d, unsigned char *dst_ptr, vp
void vp8_build_inter_predictors_mb_s(MACROBLOCKD *x)
{
- //unsigned char *pred_ptr = x->block[0].predictor;
- //unsigned char *dst_ptr = *(x->block[0].base_dst) + x->block[0].dst;
+ /*unsigned char *pred_ptr = x->block[0].predictor;
+ unsigned char *dst_ptr = *(x->block[0].base_dst) + x->block[0].dst;*/
unsigned char *pred_ptr = x->predictor;
unsigned char *dst_ptr = x->dst.y_buffer;
@@ -546,26 +548,26 @@ void vp8_build_inter_predictors_mb_s(MACROBLOCKD *x)
unsigned char *ptr_base;
unsigned char *ptr;
unsigned char *uptr, *vptr;
- //unsigned char *pred_ptr = x->predictor;
- //unsigned char *upred_ptr = &x->predictor[256];
- //unsigned char *vpred_ptr = &x->predictor[320];
+ /*unsigned char *pred_ptr = x->predictor;
+ unsigned char *upred_ptr = &x->predictor[256];
+ unsigned char *vpred_ptr = &x->predictor[320];*/
unsigned char *udst_ptr = x->dst.u_buffer;
unsigned char *vdst_ptr = x->dst.v_buffer;
int mv_row = x->mode_info_context->mbmi.mv.as_mv.row;
int mv_col = x->mode_info_context->mbmi.mv.as_mv.col;
- int pre_stride = x->dst.y_stride; //x->block[0].pre_stride;
+ int pre_stride = x->dst.y_stride; /*x->block[0].pre_stride;*/
ptr_base = x->pre.y_buffer;
ptr = ptr_base + (mv_row >> 3) * pre_stride + (mv_col >> 3);
if ((mv_row | mv_col) & 7)
{
- x->subpixel_predict16x16(ptr, pre_stride, mv_col & 7, mv_row & 7, dst_ptr, x->dst.y_stride); //x->block[0].dst_stride);
+ x->subpixel_predict16x16(ptr, pre_stride, mv_col & 7, mv_row & 7, dst_ptr, x->dst.y_stride); /*x->block[0].dst_stride);*/
}
else
{
- RECON_INVOKE(&x->rtcd->recon, copy16x16)(ptr, pre_stride, dst_ptr, x->dst.y_stride); //x->block[0].dst_stride);
+ RECON_INVOKE(&x->rtcd->recon, copy16x16)(ptr, pre_stride, dst_ptr, x->dst.y_stride); /*x->block[0].dst_stride);*/
}
mv_row = x->block[16].bmi.mv.as_mv.row;
@@ -588,8 +590,9 @@ void vp8_build_inter_predictors_mb_s(MACROBLOCKD *x)
}
else
{
- //note: this whole ELSE part is not executed at all. So, no way to test the correctness of my modification. Later,
- //if sth is wrong, go back to what it is in build_inter_predictors_mb.
+ /* note: this whole ELSE part is not executed at all. So, no way to test the correctness of my modification. Later,
+ * if sth is wrong, go back to what it is in build_inter_predictors_mb.
+ */
int i;
if (x->mode_info_context->mbmi.partitioning < 3)
@@ -597,7 +600,7 @@ void vp8_build_inter_predictors_mb_s(MACROBLOCKD *x)
for (i = 0; i < 4; i++)
{
BLOCKD *d = &x->block[bbb[i]];
- //vp8_build_inter_predictors4b(x, d, 16);
+ /*vp8_build_inter_predictors4b(x, d, 16);*/
{
unsigned char *ptr_base;
@@ -609,11 +612,11 @@ void vp8_build_inter_predictors_mb_s(MACROBLOCKD *x)
if (d->bmi.mv.as_mv.row & 7 || d->bmi.mv.as_mv.col & 7)
{
- x->subpixel_predict8x8(ptr, d->pre_stride, d->bmi.mv.as_mv.col & 7, d->bmi.mv.as_mv.row & 7, dst_ptr, x->dst.y_stride); //x->block[0].dst_stride);
+ x->subpixel_predict8x8(ptr, d->pre_stride, d->bmi.mv.as_mv.col & 7, d->bmi.mv.as_mv.row & 7, dst_ptr, x->dst.y_stride); /*x->block[0].dst_stride);*/
}
else
{
- RECON_INVOKE(&x->rtcd->recon, copy8x8)(ptr, d->pre_stride, dst_ptr, x->dst.y_stride); //x->block[0].dst_stride);
+ RECON_INVOKE(&x->rtcd->recon, copy8x8)(ptr, d->pre_stride, dst_ptr, x->dst.y_stride); /*x->block[0].dst_stride);*/
}
}
}
@@ -627,7 +630,7 @@ void vp8_build_inter_predictors_mb_s(MACROBLOCKD *x)
if (d0->bmi.mv.as_int == d1->bmi.mv.as_int)
{
- //vp8_build_inter_predictors2b(x, d0, 16);
+ /*vp8_build_inter_predictors2b(x, d0, 16);*/
unsigned char *ptr_base;
unsigned char *ptr;
unsigned char *pred_ptr = d0->predictor;
@@ -659,7 +662,7 @@ void vp8_build_inter_predictors_mb_s(MACROBLOCKD *x)
if (d0->bmi.mv.as_int == d1->bmi.mv.as_int)
{
- //vp8_build_inter_predictors2b(x, d0, 8);
+ /*vp8_build_inter_predictors2b(x, d0, 8);*/
unsigned char *ptr_base;
unsigned char *ptr;
unsigned char *pred_ptr = d0->predictor;
diff --git a/vp8/common/reconintra.c b/vp8/common/reconintra.c
index ce0b1b8ec..9cf5f6a88 100644
--- a/vp8/common/reconintra.c
+++ b/vp8/common/reconintra.c
@@ -14,9 +14,9 @@
#include "reconintra.h"
#include "vpx_mem/vpx_mem.h"
-// For skip_recon_mb(), add vp8_build_intra_predictors_mby_s(MACROBLOCKD *x) and
-// vp8_build_intra_predictors_mbuv_s(MACROBLOCKD *x).
-
+/* For skip_recon_mb(), add vp8_build_intra_predictors_mby_s(MACROBLOCKD *x) and
+ * vp8_build_intra_predictors_mbuv_s(MACROBLOCKD *x).
+ */
void vp8_recon_intra_mbuv(const vp8_recon_rtcd_vtable_t *rtcd, MACROBLOCKD *x)
{
int i;
@@ -42,7 +42,7 @@ void vp8_build_intra_predictors_mby(MACROBLOCKD *x)
yleft_col[i] = x->dst.y_buffer [i* x->dst.y_stride -1];
}
- // for Y
+ /* for Y */
switch (x->mode_info_context->mbmi.mode)
{
case DC_PRED:
@@ -156,14 +156,14 @@ void vp8_build_intra_predictors_mby_s(MACROBLOCKD *x)
int r, c, i;
int y_stride = x->dst.y_stride;
- ypred_ptr = x->dst.y_buffer; //x->predictor;
+ ypred_ptr = x->dst.y_buffer; /*x->predictor;*/
for (i = 0; i < 16; i++)
{
yleft_col[i] = x->dst.y_buffer [i* x->dst.y_stride -1];
}
- // for Y
+ /* for Y */
switch (x->mode_info_context->mbmi.mode)
{
case DC_PRED:
@@ -204,11 +204,11 @@ void vp8_build_intra_predictors_mby_s(MACROBLOCKD *x)
expected_dc = 128;
}
- //vpx_memset(ypred_ptr, expected_dc, 256);
+ /*vpx_memset(ypred_ptr, expected_dc, 256);*/
for (r = 0; r < 16; r++)
{
vpx_memset(ypred_ptr, expected_dc, 16);
- ypred_ptr += y_stride; //16;
+ ypred_ptr += y_stride; /*16;*/
}
}
break;
@@ -222,7 +222,7 @@ void vp8_build_intra_predictors_mby_s(MACROBLOCKD *x)
((int *)ypred_ptr)[1] = ((int *)yabove_row)[1];
((int *)ypred_ptr)[2] = ((int *)yabove_row)[2];
((int *)ypred_ptr)[3] = ((int *)yabove_row)[3];
- ypred_ptr += y_stride; //16;
+ ypred_ptr += y_stride; /*16;*/
}
}
break;
@@ -233,7 +233,7 @@ void vp8_build_intra_predictors_mby_s(MACROBLOCKD *x)
{
vpx_memset(ypred_ptr, yleft_col[r], 16);
- ypred_ptr += y_stride; //16;
+ ypred_ptr += y_stride; /*16;*/
}
}
@@ -256,7 +256,7 @@ void vp8_build_intra_predictors_mby_s(MACROBLOCKD *x)
ypred_ptr[c] = pred;
}
- ypred_ptr += y_stride; //16;
+ ypred_ptr += y_stride; /*16;*/
}
}
@@ -418,8 +418,8 @@ void vp8_build_intra_predictors_mbuv_s(MACROBLOCKD *x)
unsigned char *vabove_row = x->dst.v_buffer - x->dst.uv_stride;
unsigned char vleft_col[20];
unsigned char vtop_left = vabove_row[-1];
- unsigned char *upred_ptr = x->dst.u_buffer; //&x->predictor[256];
- unsigned char *vpred_ptr = x->dst.v_buffer; //&x->predictor[320];
+ unsigned char *upred_ptr = x->dst.u_buffer; /*&x->predictor[256];*/
+ unsigned char *vpred_ptr = x->dst.v_buffer; /*&x->predictor[320];*/
int uv_stride = x->dst.uv_stride;
int i, j;
@@ -472,14 +472,14 @@ void vp8_build_intra_predictors_mbuv_s(MACROBLOCKD *x)
}
- //vpx_memset(upred_ptr,expected_udc,64);
- //vpx_memset(vpred_ptr,expected_vdc,64);
+ /*vpx_memset(upred_ptr,expected_udc,64);*/
+ /*vpx_memset(vpred_ptr,expected_vdc,64);*/
for (i = 0; i < 8; i++)
{
vpx_memset(upred_ptr, expected_udc, 8);
vpx_memset(vpred_ptr, expected_vdc, 8);
- upred_ptr += uv_stride; //8;
- vpred_ptr += uv_stride; //8;
+ upred_ptr += uv_stride; /*8;*/
+ vpred_ptr += uv_stride; /*8;*/
}
}
break;
@@ -491,8 +491,8 @@ void vp8_build_intra_predictors_mbuv_s(MACROBLOCKD *x)
{
vpx_memcpy(upred_ptr, uabove_row, 8);
vpx_memcpy(vpred_ptr, vabove_row, 8);
- upred_ptr += uv_stride; //8;
- vpred_ptr += uv_stride; //8;
+ upred_ptr += uv_stride; /*8;*/
+ vpred_ptr += uv_stride; /*8;*/
}
}
@@ -505,8 +505,8 @@ void vp8_build_intra_predictors_mbuv_s(MACROBLOCKD *x)
{
vpx_memset(upred_ptr, uleft_col[i], 8);
vpx_memset(vpred_ptr, vleft_col[i], 8);
- upred_ptr += uv_stride; //8;
- vpred_ptr += uv_stride; //8;
+ upred_ptr += uv_stride; /*8;*/
+ vpred_ptr += uv_stride; /*8;*/
}
}
@@ -538,8 +538,8 @@ void vp8_build_intra_predictors_mbuv_s(MACROBLOCKD *x)
vpred_ptr[j] = predv;
}
- upred_ptr += uv_stride; //8;
- vpred_ptr += uv_stride; //8;
+ upred_ptr += uv_stride; /*8;*/
+ vpred_ptr += uv_stride; /*8;*/
}
}
diff --git a/vp8/common/reconintra4x4.c b/vp8/common/reconintra4x4.c
index 315135184..db44fa190 100644
--- a/vp8/common/reconintra4x4.c
+++ b/vp8/common/reconintra4x4.c
@@ -56,7 +56,7 @@ void vp8_predict_intra4x4(BLOCKD *x,
break;
case B_TM_PRED:
{
- // prediction similar to true_motion prediction
+ /* prediction similar to true_motion prediction */
for (r = 0; r < 4; r++)
{
for (c = 0; c < 4; c++)
@@ -295,8 +295,9 @@ void vp8_predict_intra4x4(BLOCKD *x,
}
}
-// copy 4 bytes from the above right down so that the 4x4 prediction modes using pixels above and
-// to the right prediction have filled in pixels to use.
+/* copy 4 bytes from the above right down so that the 4x4 prediction modes using pixels above and
+ * to the right prediction have filled in pixels to use.
+ */
void vp8_intra_prediction_down_copy(MACROBLOCKD *x)
{
unsigned char *above_right = *(x->block[0].base_dst) + x->block[0].dst - x->block[0].dst_stride + 16;
diff --git a/vp8/common/setupintrarecon.c b/vp8/common/setupintrarecon.c
index 8647ae2aa..7976e252b 100644
--- a/vp8/common/setupintrarecon.c
+++ b/vp8/common/setupintrarecon.c
@@ -16,7 +16,7 @@ void vp8_setup_intra_recon(YV12_BUFFER_CONFIG *ybf)
{
int i;
- // set up frame new frame for intra coded blocks
+ /* set up frame new frame for intra coded blocks */
vpx_memset(ybf->y_buffer - 1 - ybf->y_stride, 127, ybf->y_width + 5);
for (i = 0; i < ybf->y_height; i++)
ybf->y_buffer[ybf->y_stride *i - 1] = (unsigned char) 129;
diff --git a/vp8/common/textblit.c b/vp8/common/textblit.c
index b7922d385..1756100a7 100644
--- a/vp8/common/textblit.c
+++ b/vp8/common/textblit.c
@@ -57,7 +57,7 @@ static void plot (const int x, const int y, unsigned char *image, const int pitc
image [x+y*pitch] ^= 255;
}
-// Bresenham line algorithm
+/* Bresenham line algorithm */
void vp8_blit_line(int x0, int x1, int y0, int y1, unsigned char *image, const int pitch)
{
int steep = abs(y1 - y0) > abs(x1 - x0);
diff --git a/vp8/common/threading.h b/vp8/common/threading.h
index f9a257460..1929f7c4f 100644
--- a/vp8/common/threading.h
+++ b/vp8/common/threading.h
@@ -12,7 +12,7 @@
#ifndef _PTHREAD_EMULATION
#define _PTHREAD_EMULATION
-#define VPXINFINITE 10000 //10second.
+#define VPXINFINITE 10000 /* 10second. */
/* Thread management macros */
#ifdef _WIN32
@@ -72,11 +72,11 @@
#define sem_wait(sem) (semaphore_wait(*sem) )
#define sem_post(sem) semaphore_signal(*sem)
#define sem_destroy(sem) semaphore_destroy(mach_task_self(),*sem)
-#define thread_sleep(nms) // { struct timespec ts;ts.tv_sec=0; ts.tv_nsec = 1000*nms;nanosleep(&ts, NULL);}
+#define thread_sleep(nms) /* { struct timespec ts;ts.tv_sec=0; ts.tv_nsec = 1000*nms;nanosleep(&ts, NULL);} */
#else
#include <unistd.h>
#include <sched.h>
-#define thread_sleep(nms) sched_yield();// {struct timespec ts;ts.tv_sec=0; ts.tv_nsec = 1000*nms;nanosleep(&ts, NULL);}
+#define thread_sleep(nms) sched_yield();/* {struct timespec ts;ts.tv_sec=0; ts.tv_nsec = 1000*nms;nanosleep(&ts, NULL);} */
#endif
/* Not Windows. Assume pthreads */
diff --git a/vp8/common/treecoder.h b/vp8/common/treecoder.h
index 35e5be10c..ebf51c5ed 100644
--- a/vp8/common/treecoder.h
+++ b/vp8/common/treecoder.h
@@ -12,7 +12,7 @@
#ifndef __INC_TREECODER_H
#define __INC_TREECODER_H
-typedef unsigned char vp8bc_index_t; // probability index
+typedef unsigned char vp8bc_index_t; /* probability index */
typedef unsigned char vp8_prob;
diff --git a/vp8/common/type_aliases.h b/vp8/common/type_aliases.h
index f2a370298..22b531a76 100644
--- a/vp8/common/type_aliases.h
+++ b/vp8/common/type_aliases.h
@@ -64,32 +64,32 @@ typedef signed char INT8;
#endif
#ifndef TYPE_INT16
-//#define TYPE_INT16
+/*#define TYPE_INT16*/
typedef signed short INT16;
#endif
#ifndef TYPE_INT32
-//#define TYPE_INT32
+/*#define TYPE_INT32*/
typedef signed int INT32;
#endif
#ifndef TYPE_UINT8
-//#define TYPE_UINT8
+/*#define TYPE_UINT8*/
typedef unsigned char UINT8;
#endif
#ifndef TYPE_UINT32
-//#define TYPE_UINT32
+/*#define TYPE_UINT32*/
typedef unsigned int UINT32;
#endif
#ifndef TYPE_UINT16
-//#define TYPE_UINT16
+/*#define TYPE_UINT16*/
typedef unsigned short UINT16;
#endif
#ifndef TYPE_BOOL
-//#define TYPE_BOOL
+/*#define TYPE_BOOL*/
typedef int BOOL;
#endif
@@ -101,7 +101,7 @@ typedef __int64 INT64;
#ifndef TYPE_INT64
#ifdef _TMS320C6X
-//for now we only have 40bits
+/* for now we only have 40bits */
typedef long INT64;
#else
typedef long long INT64;
diff --git a/vp8/common/x86/loopfilter_x86.c b/vp8/common/x86/loopfilter_x86.c
index 3ff8c4e12..93107e179 100644
--- a/vp8/common/x86/loopfilter_x86.c
+++ b/vp8/common/x86/loopfilter_x86.c
@@ -40,7 +40,7 @@ extern loop_filter_uvfunction vp8_mbloop_filter_horizontal_edge_uv_sse2;
extern loop_filter_uvfunction vp8_mbloop_filter_vertical_edge_uv_sse2;
#if HAVE_MMX
-// Horizontal MB filtering
+/* Horizontal MB filtering */
void vp8_loop_filter_mbh_mmx(unsigned char *y_ptr, unsigned char *u_ptr, unsigned char *v_ptr,
int y_stride, int uv_stride, loop_filter_info *lfi, int simpler_lpf)
{
@@ -66,7 +66,7 @@ void vp8_loop_filter_mbhs_mmx(unsigned char *y_ptr, unsigned char *u_ptr, unsign
}
-// Vertical MB Filtering
+/* Vertical MB Filtering */
void vp8_loop_filter_mbv_mmx(unsigned char *y_ptr, unsigned char *u_ptr, unsigned char *v_ptr,
int y_stride, int uv_stride, loop_filter_info *lfi, int simpler_lpf)
{
@@ -92,7 +92,7 @@ void vp8_loop_filter_mbvs_mmx(unsigned char *y_ptr, unsigned char *u_ptr, unsign
}
-// Horizontal B Filtering
+/* Horizontal B Filtering */
void vp8_loop_filter_bh_mmx(unsigned char *y_ptr, unsigned char *u_ptr, unsigned char *v_ptr,
int y_stride, int uv_stride, loop_filter_info *lfi, int simpler_lpf)
{
@@ -122,7 +122,7 @@ void vp8_loop_filter_bhs_mmx(unsigned char *y_ptr, unsigned char *u_ptr, unsigne
}
-// Vertical B Filtering
+/* Vertical B Filtering */
void vp8_loop_filter_bv_mmx(unsigned char *y_ptr, unsigned char *u_ptr, unsigned char *v_ptr,
int y_stride, int uv_stride, loop_filter_info *lfi, int simpler_lpf)
{
@@ -153,7 +153,7 @@ void vp8_loop_filter_bvs_mmx(unsigned char *y_ptr, unsigned char *u_ptr, unsigne
#endif
-// Horizontal MB filtering
+/* Horizontal MB filtering */
#if HAVE_SSE2
void vp8_loop_filter_mbh_sse2(unsigned char *y_ptr, unsigned char *u_ptr, unsigned char *v_ptr,
int y_stride, int uv_stride, loop_filter_info *lfi, int simpler_lpf)
@@ -177,7 +177,7 @@ void vp8_loop_filter_mbhs_sse2(unsigned char *y_ptr, unsigned char *u_ptr, unsig
}
-// Vertical MB Filtering
+/* Vertical MB Filtering */
void vp8_loop_filter_mbv_sse2(unsigned char *y_ptr, unsigned char *u_ptr, unsigned char *v_ptr,
int y_stride, int uv_stride, loop_filter_info *lfi, int simpler_lpf)
{
@@ -200,7 +200,7 @@ void vp8_loop_filter_mbvs_sse2(unsigned char *y_ptr, unsigned char *u_ptr, unsig
}
-// Horizontal B Filtering
+/* Horizontal B Filtering */
void vp8_loop_filter_bh_sse2(unsigned char *y_ptr, unsigned char *u_ptr, unsigned char *v_ptr,
int y_stride, int uv_stride, loop_filter_info *lfi, int simpler_lpf)
{
@@ -227,7 +227,7 @@ void vp8_loop_filter_bhs_sse2(unsigned char *y_ptr, unsigned char *u_ptr, unsign
}
-// Vertical B Filtering
+/* Vertical B Filtering */
void vp8_loop_filter_bv_sse2(unsigned char *y_ptr, unsigned char *u_ptr, unsigned char *v_ptr,
int y_stride, int uv_stride, loop_filter_info *lfi, int simpler_lpf)
{
diff --git a/vp8/common/x86/vp8_asm_stubs.c b/vp8/common/x86/vp8_asm_stubs.c
index 950d96262..8dd07c90d 100644
--- a/vp8/common/x86/vp8_asm_stubs.c
+++ b/vp8/common/x86/vp8_asm_stubs.c
@@ -128,7 +128,7 @@ void vp8_sixtap_predict4x4_mmx
int dst_pitch
)
{
- DECLARE_ALIGNED_ARRAY(16, unsigned short, FData2, 16*16); // Temp data bufffer used in filtering
+ DECLARE_ALIGNED_ARRAY(16, unsigned short, FData2, 16*16); /* Temp data bufffer used in filtering */
const short *HFilter, *VFilter;
HFilter = vp8_six_tap_mmx[xoffset];
vp8_filter_block1d_h6_mmx(src_ptr - (2 * src_pixels_per_line), FData2, src_pixels_per_line, 1, 9, 8, HFilter);
@@ -149,7 +149,7 @@ void vp8_sixtap_predict16x16_mmx
)
{
- DECLARE_ALIGNED_ARRAY(16, unsigned short, FData2, 24*24); // Temp data bufffer used in filtering
+ DECLARE_ALIGNED_ARRAY(16, unsigned short, FData2, 24*24); /* Temp data bufffer used in filtering */
const short *HFilter, *VFilter;
@@ -181,7 +181,7 @@ void vp8_sixtap_predict8x8_mmx
)
{
- DECLARE_ALIGNED_ARRAY(16, unsigned short, FData2, 256); // Temp data bufffer used in filtering
+ DECLARE_ALIGNED_ARRAY(16, unsigned short, FData2, 256); /* Temp data bufffer used in filtering */
const short *HFilter, *VFilter;
@@ -207,7 +207,7 @@ void vp8_sixtap_predict8x4_mmx
)
{
- DECLARE_ALIGNED_ARRAY(16, unsigned short, FData2, 256); // Temp data bufffer used in filtering
+ DECLARE_ALIGNED_ARRAY(16, unsigned short, FData2, 256); /* Temp data bufffer used in filtering */
const short *HFilter, *VFilter;
@@ -253,7 +253,7 @@ void vp8_sixtap_predict16x16_sse2
)
{
- DECLARE_ALIGNED_ARRAY(16, unsigned short, FData2, 24*24); // Temp data bufffer used in filtering
+ DECLARE_ALIGNED_ARRAY(16, unsigned short, FData2, 24*24); /* Temp data bufffer used in filtering */
const short *HFilter, *VFilter;
@@ -268,14 +268,14 @@ void vp8_sixtap_predict16x16_sse2
}
else
{
- // First-pass only
+ /* First-pass only */
HFilter = vp8_six_tap_mmx[xoffset];
vp8_filter_block1d16_h6_only_sse2(src_ptr, src_pixels_per_line, dst_ptr, dst_pitch, 16, HFilter);
}
}
else
{
- // Second-pass only
+ /* Second-pass only */
VFilter = vp8_six_tap_mmx[yoffset];
vp8_unpack_block1d16_h6_sse2(src_ptr - (2 * src_pixels_per_line), FData2, src_pixels_per_line, 21, 32);
vp8_filter_block1d16_v6_sse2(FData2 + 32, dst_ptr, dst_pitch, 32, 16 , 16, dst_pitch, VFilter);
@@ -293,7 +293,7 @@ void vp8_sixtap_predict8x8_sse2
int dst_pitch
)
{
- DECLARE_ALIGNED_ARRAY(16, unsigned short, FData2, 256); // Temp data bufffer used in filtering
+ DECLARE_ALIGNED_ARRAY(16, unsigned short, FData2, 256); /* Temp data bufffer used in filtering */
const short *HFilter, *VFilter;
if (xoffset)
@@ -307,14 +307,14 @@ void vp8_sixtap_predict8x8_sse2
}
else
{
- // First-pass only
+ /* First-pass only */
HFilter = vp8_six_tap_mmx[xoffset];
vp8_filter_block1d8_h6_only_sse2(src_ptr, src_pixels_per_line, dst_ptr, dst_pitch, 8, HFilter);
}
}
else
{
- // Second-pass only
+ /* Second-pass only */
VFilter = vp8_six_tap_mmx[yoffset];
vp8_filter_block1d8_v6_only_sse2(src_ptr - (2 * src_pixels_per_line), src_pixels_per_line, dst_ptr, dst_pitch, 8, VFilter);
}
@@ -331,7 +331,7 @@ void vp8_sixtap_predict8x4_sse2
int dst_pitch
)
{
- DECLARE_ALIGNED_ARRAY(16, unsigned short, FData2, 256); // Temp data bufffer used in filtering
+ DECLARE_ALIGNED_ARRAY(16, unsigned short, FData2, 256); /* Temp data bufffer used in filtering */
const short *HFilter, *VFilter;
if (xoffset)
@@ -345,14 +345,14 @@ void vp8_sixtap_predict8x4_sse2
}
else
{
- // First-pass only
+ /* First-pass only */
HFilter = vp8_six_tap_mmx[xoffset];
vp8_filter_block1d8_h6_only_sse2(src_ptr, src_pixels_per_line, dst_ptr, dst_pitch, 4, HFilter);
}
}
else
{
- // Second-pass only
+ /* Second-pass only */
VFilter = vp8_six_tap_mmx[yoffset];
vp8_filter_block1d8_v6_only_sse2(src_ptr - (2 * src_pixels_per_line), src_pixels_per_line, dst_ptr, dst_pitch, 4, VFilter);
}
@@ -444,13 +444,13 @@ void vp8_sixtap_predict16x16_ssse3
}
else
{
- // First-pass only
+ /* First-pass only */
vp8_filter_block1d16_h6_ssse3(src_ptr, src_pixels_per_line, dst_ptr, dst_pitch, 16, xoffset);
}
}
else
{
- // Second-pass only
+ /* Second-pass only */
vp8_filter_block1d16_v6_ssse3(src_ptr - (2 * src_pixels_per_line) , src_pixels_per_line, dst_ptr, dst_pitch, 16, yoffset);
}
}
@@ -481,7 +481,7 @@ void vp8_sixtap_predict8x8_ssse3
}
else
{
- // Second-pass only
+ /* Second-pass only */
vp8_filter_block1d8_v6_ssse3(src_ptr - (2 * src_pixels_per_line), src_pixels_per_line, dst_ptr, dst_pitch, 8, yoffset);
}
}
@@ -508,13 +508,13 @@ void vp8_sixtap_predict8x4_ssse3
}
else
{
- // First-pass only
+ /* First-pass only */
vp8_filter_block1d8_h6_ssse3(src_ptr, src_pixels_per_line, dst_ptr, dst_pitch, 4, xoffset);
}
}
else
{
- // Second-pass only
+ /* Second-pass only */
vp8_filter_block1d8_v6_ssse3(src_ptr - (2 * src_pixels_per_line), src_pixels_per_line, dst_ptr, dst_pitch, 4, yoffset);
}
}
diff --git a/vp8/common/x86/x86_systemdependent.c b/vp8/common/x86/x86_systemdependent.c
index b983bc27e..38500fd01 100644
--- a/vp8/common/x86/x86_systemdependent.c
+++ b/vp8/common/x86/x86_systemdependent.c
@@ -74,7 +74,7 @@ void vp8_arch_x86_common_init(VP8_COMMON *ctx)
#if CONFIG_POSTPROC
rtcd->postproc.down = vp8_mbpost_proc_down_mmx;
- //rtcd->postproc.across = vp8_mbpost_proc_across_ip_c;
+ /*rtcd->postproc.across = vp8_mbpost_proc_across_ip_c;*/
rtcd->postproc.downacross = vp8_post_proc_down_and_across_mmx;
rtcd->postproc.addnoise = vp8_plane_add_noise_mmx;
#endif
diff --git a/vp8/decoder/arm/arm_dsystemdependent.c b/vp8/decoder/arm/arm_dsystemdependent.c
index 77cff47db..e9741e286 100644
--- a/vp8/decoder/arm/arm_dsystemdependent.c
+++ b/vp8/decoder/arm/arm_dsystemdependent.c
@@ -35,7 +35,7 @@ void vp8_arch_arm_decode_init(VP8D_COMP *pbi)
pbi->dequant.dc_idct_add_y_block = vp8_dequant_dc_idct_add_y_block_v6;
pbi->dequant.idct_add_y_block = vp8_dequant_idct_add_y_block_v6;
pbi->dequant.idct_add_uv_block = vp8_dequant_idct_add_uv_block_v6;
-#if 0 //For use with RTCD, when implemented
+#if 0 /*For use with RTCD, when implemented*/
pbi->dboolhuff.start = vp8dx_start_decode_c;
pbi->dboolhuff.fill = vp8dx_bool_decoder_fill_c;
pbi->dboolhuff.debool = vp8dx_decode_bool_c;
@@ -54,7 +54,7 @@ void vp8_arch_arm_decode_init(VP8D_COMP *pbi)
pbi->dequant.dc_idct_add_y_block = vp8_dequant_dc_idct_add_y_block_neon;
pbi->dequant.idct_add_y_block = vp8_dequant_idct_add_y_block_neon;
pbi->dequant.idct_add_uv_block = vp8_dequant_idct_add_uv_block_neon;
-#if 0 //For use with RTCD, when implemented
+#if 0 /*For use with RTCD, when implemented*/
pbi->dboolhuff.start = vp8dx_start_decode_c;
pbi->dboolhuff.fill = vp8dx_bool_decoder_fill_c;
pbi->dboolhuff.debool = vp8dx_decode_bool_c;
diff --git a/vp8/decoder/arm/dboolhuff_arm.h b/vp8/decoder/arm/dboolhuff_arm.h
index d2ebc71e8..985951c7c 100644
--- a/vp8/decoder/arm/dboolhuff_arm.h
+++ b/vp8/decoder/arm/dboolhuff_arm.h
@@ -11,7 +11,7 @@
* to be useless. However, its been left (for now)
* for reference.
*/
-/*
+#if 0
#if HAVE_ARMV6
#undef vp8_dbool_start
#define vp8_dbool_start vp8dx_start_decode_v6
@@ -24,7 +24,7 @@
#undef vp8_dbool_devalue
#define vp8_dbool_devalue vp8_decode_value_v6
-#endif // HAVE_ARMV6
+#endif /* HAVE_ARMV6 */
#if HAVE_ARMV7
#undef vp8_dbool_start
@@ -38,6 +38,6 @@
#undef vp8_dbool_devalue
#define vp8_dbool_devalue vp8_decode_value_neon
-#endif // HAVE_ARMV7
-*/
-#endif // DBOOLHUFF_ARM_H
+#endif /* HAVE_ARMV7 */
+#endif
+#endif /* DBOOLHUFF_ARM_H */
diff --git a/vp8/decoder/dboolhuff.h b/vp8/decoder/dboolhuff.h
index c72bc0330..c851aa7e5 100644
--- a/vp8/decoder/dboolhuff.h
+++ b/vp8/decoder/dboolhuff.h
@@ -45,7 +45,7 @@ typedef struct
const unsigned char *source, unsigned int source_sz)
#define prototype_dbool_fill(sym) void sym(BOOL_DECODER *br)
#define prototype_dbool_debool(sym) int sym(BOOL_DECODER *br, int probability)
-#define prototype_dbool_devalue(sym) int sym(BOOL_DECODER *br, int bits);
+#define prototype_dbool_devalue(sym) int sym(BOOL_DECODER *br, int bits)
#if ARCH_ARM
#include "arm/dboolhuff_arm.h"
@@ -84,16 +84,17 @@ typedef struct vp8_dboolhuff_rtcd_vtable {
vp8_dbool_devalue_fn_t devalue;
} vp8_dboolhuff_rtcd_vtable_t;
-// There are no processor-specific versions of these
-// functions right now. Disable RTCD to avoid using
-// function pointers which gives a speed boost
-//#ifdef ENABLE_RUNTIME_CPU_DETECT
-//#define DBOOLHUFF_INVOKE(ctx,fn) (ctx)->fn
-//#define IF_RTCD(x) (x)
-//#else
+/* There are no processor-specific versions of these
+ * functions right now. Disable RTCD to avoid using
+ * function pointers which gives a speed boost
+ */
+/*#ifdef ENABLE_RUNTIME_CPU_DETECT
+#define DBOOLHUFF_INVOKE(ctx,fn) (ctx)->fn
+#define IF_RTCD(x) (x)
+#else*/
#define DBOOLHUFF_INVOKE(ctx,fn) vp8_dbool_##fn
#define IF_RTCD(x) NULL
-//#endif
+/*#endif*/
DECLARE_ALIGNED(16, extern const unsigned char, vp8dx_bitreader_norm[256]);
diff --git a/vp8/decoder/decodemv.c b/vp8/decoder/decodemv.c
index 106dbde06..203d72dd2 100644
--- a/vp8/decoder/decodemv.c
+++ b/vp8/decoder/decodemv.c
@@ -51,10 +51,10 @@ static int vp8_read_uv_mode(vp8_reader *bc, const vp8_prob *p)
static void vp8_read_mb_features(vp8_reader *r, MB_MODE_INFO *mi, MACROBLOCKD *x)
{
- // Is segmentation enabled
+ /* Is segmentation enabled */
if (x->segmentation_enabled && x->update_mb_segmentation_map)
{
- // If so then read the segment id.
+ /* If so then read the segment id. */
if (vp8_read(r, x->mb_segment_tree_probs[0]))
mi->segment_id = (unsigned char)(2 + vp8_read(r, x->mb_segment_tree_probs[2]));
else
@@ -70,14 +70,15 @@ static void vp8_kfread_modes(VP8D_COMP *pbi, MODE_INFO *m, int mb_row, int mb_co
{
MB_PREDICTION_MODE y_mode;
- // Read the Macroblock segmentation map if it is being updated explicitly this frame (reset to 0 above by default)
- // By default on a key frame reset all MBs to segment 0
+ /* Read the Macroblock segmentation map if it is being updated explicitly this frame (reset to 0 above by default)
+ * By default on a key frame reset all MBs to segment 0
+ */
m->mbmi.segment_id = 0;
if (pbi->mb.update_mb_segmentation_map)
vp8_read_mb_features(bc, &m->mbmi, &pbi->mb);
- // Read the macroblock coeff skip flag if this feature is in use, else default to 0
+ /* Read the macroblock coeff skip flag if this feature is in use, else default to 0 */
if (pbi->common.mb_no_coeff_skip)
m->mbmi.mb_skip_coeff = vp8_read(bc, pbi->prob_skip_false);
else
@@ -306,8 +307,9 @@ void vp8_read_mb_modes_mv(VP8D_COMP *pbi, MODE_INFO *mi, MB_MODE_INFO *mbmi,
mb_to_bottom_edge += RIGHT_BOTTOM_MARGIN;
mbmi->need_to_clamp_mvs = 0;
- // Distance of Mb to the various image edges.
- // These specified to 8th pel as they are always compared to MV values that are in 1/8th pel units
+ /* Distance of Mb to the various image edges.
+ * These specified to 8th pel as they are always compared to MV values that are in 1/8th pel units
+ */
pbi->mb.mb_to_left_edge =
mb_to_left_edge = -((mb_col * 16) << 3);
mb_to_left_edge -= LEFT_TOP_MARGIN;
@@ -316,11 +318,11 @@ void vp8_read_mb_modes_mv(VP8D_COMP *pbi, MODE_INFO *mi, MB_MODE_INFO *mbmi,
mb_to_right_edge = ((pbi->common.mb_cols - 1 - mb_col) * 16) << 3;
mb_to_right_edge += RIGHT_BOTTOM_MARGIN;
- // If required read in new segmentation data for this MB
+ /* If required read in new segmentation data for this MB */
if (pbi->mb.update_mb_segmentation_map)
vp8_read_mb_features(bc, mbmi, &pbi->mb);
- // Read the macroblock coeff skip flag if this feature is in use, else default to 0
+ /* Read the macroblock coeff skip flag if this feature is in use, else default to 0 */
if (pbi->common.mb_no_coeff_skip)
mbmi->mb_skip_coeff = vp8_read(bc, pbi->prob_skip_false);
else
@@ -362,7 +364,7 @@ void vp8_read_mb_modes_mv(VP8D_COMP *pbi, MODE_INFO *mi, MB_MODE_INFO *mbmi,
mv_contz = vp8_mv_cont(&(vp8_left_bmi(mi, k)->mv.as_mv), &(vp8_above_bmi(mi, k, mis)->mv.as_mv));
- switch (bmi.mode = (B_PREDICTION_MODE) sub_mv_ref(bc, vp8_sub_mv_ref_prob2 [mv_contz])) //pc->fc.sub_mv_ref_prob))
+ switch (bmi.mode = (B_PREDICTION_MODE) sub_mv_ref(bc, vp8_sub_mv_ref_prob2 [mv_contz])) /*pc->fc.sub_mv_ref_prob))*/
{
case NEW4X4:
read_mv(bc, mv, (const MV_CONTEXT *) mvc);
@@ -425,7 +427,7 @@ void vp8_read_mb_modes_mv(VP8D_COMP *pbi, MODE_INFO *mi, MB_MODE_INFO *mbmi,
case NEARMV:
*mv = nearby;
- // Clip "next_nearest" so that it does not extend to far out of image
+ /* Clip "next_nearest" so that it does not extend to far out of image */
mv->col = (mv->col < mb_to_left_edge) ? mb_to_left_edge : mv->col;
mv->col = (mv->col > mb_to_right_edge) ? mb_to_right_edge : mv->col;
mv->row = (mv->row < mb_to_top_edge) ? mb_to_top_edge : mv->row;
@@ -434,7 +436,7 @@ void vp8_read_mb_modes_mv(VP8D_COMP *pbi, MODE_INFO *mi, MB_MODE_INFO *mbmi,
case NEARESTMV:
*mv = nearest;
- // Clip "next_nearest" so that it does not extend to far out of image
+ /* Clip "next_nearest" so that it does not extend to far out of image */
mv->col = (mv->col < mb_to_left_edge) ? mb_to_left_edge : mv->col;
mv->col = (mv->col > mb_to_right_edge) ? mb_to_right_edge : mv->col;
mv->row = (mv->row < mb_to_top_edge) ? mb_to_top_edge : mv->row;
@@ -462,12 +464,12 @@ void vp8_read_mb_modes_mv(VP8D_COMP *pbi, MODE_INFO *mi, MB_MODE_INFO *mbmi,
propagate_mv: /* same MV throughout */
{
- //int i=0;
- //do
- //{
- // mi->bmi[i].mv.as_mv = *mv;
- //}
- //while( ++i < 16);
+ /*int i=0;
+ do
+ {
+ mi->bmi[i].mv.as_mv = *mv;
+ }
+ while( ++i < 16);*/
mi->bmi[0].mv.as_mv = *mv;
mi->bmi[1].mv.as_mv = *mv;
@@ -541,16 +543,16 @@ void vp8_decode_mode_mvs(VP8D_COMP *pbi)
while (++mb_col < pbi->common.mb_cols)
{
-// vp8_read_mb_modes_mv(pbi, xd->mode_info_context, &xd->mode_info_context->mbmi, mb_row, mb_col);
+ /*vp8_read_mb_modes_mv(pbi, xd->mode_info_context, &xd->mode_info_context->mbmi, mb_row, mb_col);*/
if(pbi->common.frame_type == KEY_FRAME)
vp8_kfread_modes(pbi, mi, mb_row, mb_col);
else
vp8_read_mb_modes_mv(pbi, mi, &mi->mbmi, mb_row, mb_col);
- mi++; // next macroblock
+ mi++; /* next macroblock */
}
- mi++; // skip left predictor each row
+ mi++; /* skip left predictor each row */
}
}
diff --git a/vp8/decoder/decodframe.c b/vp8/decoder/decodframe.c
index 273bdb694..1bdc3d946 100644
--- a/vp8/decoder/decodframe.c
+++ b/vp8/decoder/decodframe.c
@@ -50,7 +50,7 @@ void vp8cx_init_de_quantizer(VP8D_COMP *pbi)
pc->Y2dequant[Q][0] = (short)vp8_dc2quant(Q, pc->y2dc_delta_q);
pc->UVdequant[Q][0] = (short)vp8_dc_uv_quant(Q, pc->uvdc_delta_q);
- // all the ac values = ;
+ /* all the ac values = ; */
for (i = 1; i < 16; i++)
{
int rc = vp8_default_zig_zag1d[i];
@@ -69,24 +69,24 @@ void mb_init_dequantizer(VP8D_COMP *pbi, MACROBLOCKD *xd)
MB_MODE_INFO *mbmi = &xd->mode_info_context->mbmi;
VP8_COMMON *const pc = & pbi->common;
- // Decide whether to use the default or alternate baseline Q value.
+ /* Decide whether to use the default or alternate baseline Q value. */
if (xd->segmentation_enabled)
{
- // Abs Value
+ /* Abs Value */
if (xd->mb_segement_abs_delta == SEGMENT_ABSDATA)
QIndex = xd->segment_feature_data[MB_LVL_ALT_Q][mbmi->segment_id];
- // Delta Value
+ /* Delta Value */
else
{
QIndex = pc->base_qindex + xd->segment_feature_data[MB_LVL_ALT_Q][mbmi->segment_id];
- QIndex = (QIndex >= 0) ? ((QIndex <= MAXQ) ? QIndex : MAXQ) : 0; // Clamp to valid range
+ QIndex = (QIndex >= 0) ? ((QIndex <= MAXQ) ? QIndex : MAXQ) : 0; /* Clamp to valid range */
}
}
else
QIndex = pc->base_qindex;
- // Set up the block level dequant pointers
+ /* Set up the block level dequant pointers */
for (i = 0; i < 16; i++)
{
xd->block[i].dequant = pc->Y1dequant[QIndex];
@@ -107,8 +107,9 @@ void mb_init_dequantizer(VP8D_COMP *pbi, MACROBLOCKD *xd)
#define RTCD_VTABLE(x) NULL
#endif
-//skip_recon_mb() is Modified: Instead of writing the result to predictor buffer and then copying it
-// to dst buffer, we can write the result directly to dst buffer. This eliminates unnecessary copy.
+/* skip_recon_mb() is Modified: Instead of writing the result to predictor buffer and then copying it
+ * to dst buffer, we can write the result directly to dst buffer. This eliminates unnecessary copy.
+ */
static void skip_recon_mb(VP8D_COMP *pbi, MACROBLOCKD *xd)
{
if (xd->frame_type == KEY_FRAME || xd->mode_info_context->mbmi.ref_frame == INTRA_FRAME)
@@ -207,7 +208,7 @@ void vp8_decode_macroblock(VP8D_COMP *pbi, MACROBLOCKD *xd)
if (xd->segmentation_enabled)
mb_init_dequantizer(pbi, xd);
- // do prediction
+ /* do prediction */
if (xd->frame_type == KEY_FRAME || xd->mode_info_context->mbmi.ref_frame == INTRA_FRAME)
{
vp8_build_intra_predictors_mbuv(xd);
@@ -224,13 +225,13 @@ void vp8_decode_macroblock(VP8D_COMP *pbi, MACROBLOCKD *xd)
vp8_build_inter_predictors_mb(xd);
}
- // dequantization and idct
+ /* dequantization and idct */
if (xd->mode_info_context->mbmi.mode != B_PRED && xd->mode_info_context->mbmi.mode != SPLITMV)
{
BLOCKD *b = &xd->block[24];
DEQUANT_INVOKE(&pbi->dequant, block)(b);
- // do 2nd order transform on the dc block
+ /* do 2nd order transform on the dc block */
if (xd->eobs[24] > 1)
{
IDCT_INVOKE(RTCD_VTABLE(idct), iwalsh16)(&b->dqcoeff[0], b->diff);
@@ -336,7 +337,7 @@ void vp8_decode_mb_row(VP8D_COMP *pbi,
vpx_memset(&pc->left_context, 0, sizeof(pc->left_context));
recon_yoffset = mb_row * recon_y_stride * 16;
recon_uvoffset = mb_row * recon_uv_stride * 8;
- // reset above block coeffs
+ /* reset above block coeffs */
xd->above_context = pc->above_context;
xd->up_available = (mb_row != 0);
@@ -356,8 +357,9 @@ void vp8_decode_mb_row(VP8D_COMP *pbi,
}
}
- // Distance of Mb to the various image edges.
- // These specified to 8th pel as they are always compared to values that are in 1/8th pel units
+ /* Distance of Mb to the various image edges.
+ * These are specified to 8th pel as they are always compared to values that are in 1/8th pel units
+ */
xd->mb_to_left_edge = -((mb_col * 16) << 3);
xd->mb_to_right_edge = ((pc->mb_cols - 1 - mb_col) * 16) << 3;
@@ -367,7 +369,7 @@ void vp8_decode_mb_row(VP8D_COMP *pbi,
xd->left_available = (mb_col != 0);
- // Select the appropriate reference frame for this MB
+ /* Select the appropriate reference frame for this MB */
if (xd->mode_info_context->mbmi.ref_frame == LAST_FRAME)
ref_fb_idx = pc->lst_fb_idx;
else if (xd->mode_info_context->mbmi.ref_frame == GOLDEN_FRAME)
@@ -399,7 +401,7 @@ void vp8_decode_mb_row(VP8D_COMP *pbi,
}
- // adjust to the next row of mbs
+ /* adjust to the next row of mbs */
vp8_extend_mb_row(
&pc->yv12_fb[dst_fb_idx],
xd->dst.y_buffer + 16, xd->dst.u_buffer + 8, xd->dst.v_buffer + 8
@@ -445,7 +447,7 @@ static void setup_token_decoder(VP8D_COMP *pbi,
for (i = 0; i < num_part; i++)
{
const unsigned char *partition_size_ptr = cx_data + i * 3;
- unsigned int partition_size;
+ ptrdiff_t partition_size;
/* Calculate the length of this partition. The last partition
* size is implicit.
@@ -496,7 +498,7 @@ static void init_frame(VP8D_COMP *pbi)
if (pc->frame_type == KEY_FRAME)
{
- // Various keyframe initializations
+ /* Various keyframe initializations */
vpx_memcpy(pc->fc.mvc, vp8_default_mv_context, sizeof(vp8_default_mv_context));
vp8_init_mbmode_probs(pc);
@@ -504,22 +506,23 @@ static void init_frame(VP8D_COMP *pbi)
vp8_default_coef_probs(pc);
vp8_kf_default_bmode_probs(pc->kf_bmode_prob);
- // reset the segment feature data to 0 with delta coding (Default state).
+ /* reset the segment feature data to 0 with delta coding (Default state). */
vpx_memset(xd->segment_feature_data, 0, sizeof(xd->segment_feature_data));
xd->mb_segement_abs_delta = SEGMENT_DELTADATA;
- // reset the mode ref deltasa for loop filter
+ /* reset the mode ref deltasa for loop filter */
vpx_memset(xd->ref_lf_deltas, 0, sizeof(xd->ref_lf_deltas));
vpx_memset(xd->mode_lf_deltas, 0, sizeof(xd->mode_lf_deltas));
- // All buffers are implicitly updated on key frames.
+ /* All buffers are implicitly updated on key frames. */
pc->refresh_golden_frame = 1;
pc->refresh_alt_ref_frame = 1;
pc->copy_buffer_to_gf = 0;
pc->copy_buffer_to_arf = 0;
- // Note that Golden and Altref modes cannot be used on a key frame so
- // ref_frame_sign_bias[] is undefined and meaningless
+ /* Note that Golden and Altref modes cannot be used on a key frame so
+ * ref_frame_sign_bias[] is undefined and meaningless
+ */
pc->ref_frame_sign_bias[GOLDEN_FRAME] = 0;
pc->ref_frame_sign_bias[ALTREF_FRAME] = 0;
}
@@ -530,7 +533,7 @@ static void init_frame(VP8D_COMP *pbi)
else
pc->mcomp_filter_type = BILINEAR;
- // To enable choice of different interploation filters
+ /* To enable choice of different interploation filters */
if (pc->mcomp_filter_type == SIXTAP)
{
xd->subpixel_predict = SUBPIX_INVOKE(RTCD_VTABLE(subpix), sixtap4x4);
@@ -561,7 +564,7 @@ int vp8_decode_frame(VP8D_COMP *pbi)
MACROBLOCKD *const xd = & pbi->mb;
const unsigned char *data = (const unsigned char *)pbi->Source;
const unsigned char *const data_end = data + pbi->source_sz;
- unsigned int first_partition_length_in_bytes;
+ ptrdiff_t first_partition_length_in_bytes;
int mb_row;
int i, j, k, l;
@@ -587,7 +590,7 @@ int vp8_decode_frame(VP8D_COMP *pbi)
const int Width = pc->Width;
const int Height = pc->Height;
- // vet via sync code
+ /* vet via sync code */
if (data[0] != 0x9d || data[1] != 0x01 || data[2] != 0x2a)
vpx_internal_error(&pc->error, VPX_CODEC_UNSUP_BITSTREAM,
"Invalid frame sync code");
@@ -643,12 +646,12 @@ int vp8_decode_frame(VP8D_COMP *pbi)
pc->clamp_type = (CLAMP_TYPE)vp8_read_bit(bc);
}
- // Is segmentation enabled
+ /* Is segmentation enabled */
xd->segmentation_enabled = (unsigned char)vp8_read_bit(bc);
if (xd->segmentation_enabled)
{
- // Signal whether or not the segmentation map is being explicitly updated this frame.
+ /* Signal whether or not the segmentation map is being explicitly updated this frame. */
xd->update_mb_segmentation_map = (unsigned char)vp8_read_bit(bc);
xd->update_mb_segmentation_data = (unsigned char)vp8_read_bit(bc);
@@ -658,12 +661,12 @@ int vp8_decode_frame(VP8D_COMP *pbi)
vpx_memset(xd->segment_feature_data, 0, sizeof(xd->segment_feature_data));
- // For each segmentation feature (Quant and loop filter level)
+ /* For each segmentation feature (Quant and loop filter level) */
for (i = 0; i < MB_LVL_MAX; i++)
{
for (j = 0; j < MAX_MB_SEGMENTS; j++)
{
- // Frame level data
+ /* Frame level data */
if (vp8_read_bit(bc))
{
xd->segment_feature_data[i][j] = (signed char)vp8_read_literal(bc, mb_feature_data_bits[i]);
@@ -679,57 +682,57 @@ int vp8_decode_frame(VP8D_COMP *pbi)
if (xd->update_mb_segmentation_map)
{
- // Which macro block level features are enabled
+ /* Which macro block level features are enabled */
vpx_memset(xd->mb_segment_tree_probs, 255, sizeof(xd->mb_segment_tree_probs));
- // Read the probs used to decode the segment id for each macro block.
+ /* Read the probs used to decode the segment id for each macro block. */
for (i = 0; i < MB_FEATURE_TREE_PROBS; i++)
{
- // If not explicitly set value is defaulted to 255 by memset above
+ /* If not explicitly set value is defaulted to 255 by memset above */
if (vp8_read_bit(bc))
xd->mb_segment_tree_probs[i] = (vp8_prob)vp8_read_literal(bc, 8);
}
}
}
- // Read the loop filter level and type
+ /* Read the loop filter level and type */
pc->filter_type = (LOOPFILTERTYPE) vp8_read_bit(bc);
pc->filter_level = vp8_read_literal(bc, 6);
pc->sharpness_level = vp8_read_literal(bc, 3);
- // Read in loop filter deltas applied at the MB level based on mode or ref frame.
+ /* Read in loop filter deltas applied at the MB level based on mode or ref frame. */
xd->mode_ref_lf_delta_update = 0;
xd->mode_ref_lf_delta_enabled = (unsigned char)vp8_read_bit(bc);
if (xd->mode_ref_lf_delta_enabled)
{
- // Do the deltas need to be updated
+ /* Do the deltas need to be updated */
xd->mode_ref_lf_delta_update = (unsigned char)vp8_read_bit(bc);
if (xd->mode_ref_lf_delta_update)
{
- // Send update
+ /* Send update */
for (i = 0; i < MAX_REF_LF_DELTAS; i++)
{
if (vp8_read_bit(bc))
{
- //sign = vp8_read_bit( bc );
+ /*sign = vp8_read_bit( bc );*/
xd->ref_lf_deltas[i] = (signed char)vp8_read_literal(bc, 6);
- if (vp8_read_bit(bc)) // Apply sign
+ if (vp8_read_bit(bc)) /* Apply sign */
xd->ref_lf_deltas[i] = xd->ref_lf_deltas[i] * -1;
}
}
- // Send update
+ /* Send update */
for (i = 0; i < MAX_MODE_LF_DELTAS; i++)
{
if (vp8_read_bit(bc))
{
- //sign = vp8_read_bit( bc );
+ /*sign = vp8_read_bit( bc );*/
xd->mode_lf_deltas[i] = (signed char)vp8_read_literal(bc, 6);
- if (vp8_read_bit(bc)) // Apply sign
+ if (vp8_read_bit(bc)) /* Apply sign */
xd->mode_lf_deltas[i] = xd->mode_lf_deltas[i] * -1;
}
}
@@ -739,11 +742,11 @@ int vp8_decode_frame(VP8D_COMP *pbi)
setup_token_decoder(pbi, data + first_partition_length_in_bytes);
xd->current_bc = &pbi->bc2;
- // Read the default quantizers.
+ /* Read the default quantizers. */
{
int Q, q_update;
- Q = vp8_read_literal(bc, 7); // AC 1st order Q = default
+ Q = vp8_read_literal(bc, 7); /* AC 1st order Q = default */
pc->base_qindex = Q;
q_update = 0;
pc->y1dc_delta_q = get_delta_q(bc, pc->y1dc_delta_q, &q_update);
@@ -755,20 +758,21 @@ int vp8_decode_frame(VP8D_COMP *pbi)
if (q_update)
vp8cx_init_de_quantizer(pbi);
- // MB level dequantizer setup
+ /* MB level dequantizer setup */
mb_init_dequantizer(pbi, &pbi->mb);
}
- // Determine if the golden frame or ARF buffer should be updated and how.
- // For all non key frames the GF and ARF refresh flags and sign bias
- // flags must be set explicitly.
+ /* Determine if the golden frame or ARF buffer should be updated and how.
+ * For all non key frames the GF and ARF refresh flags and sign bias
+ * flags must be set explicitly.
+ */
if (pc->frame_type != KEY_FRAME)
{
- // Should the GF or ARF be updated from the current frame
+ /* Should the GF or ARF be updated from the current frame */
pc->refresh_golden_frame = vp8_read_bit(bc);
pc->refresh_alt_ref_frame = vp8_read_bit(bc);
- // Buffer to buffer copy flags.
+ /* Buffer to buffer copy flags. */
pc->copy_buffer_to_gf = 0;
if (!pc->refresh_golden_frame)
@@ -806,7 +810,7 @@ int vp8_decode_frame(VP8D_COMP *pbi)
{
- // read coef probability tree
+ /* read coef probability tree */
for (i = 0; i < BLOCK_TYPES; i++)
for (j = 0; j < COEF_BANDS; j++)
@@ -827,7 +831,7 @@ int vp8_decode_frame(VP8D_COMP *pbi)
vpx_memcpy(&xd->pre, &pc->yv12_fb[pc->lst_fb_idx], sizeof(YV12_BUFFER_CONFIG));
vpx_memcpy(&xd->dst, &pc->yv12_fb[pc->new_fb_idx], sizeof(YV12_BUFFER_CONFIG));
- // set up frame new frame for intra coded blocks
+ /* set up frame new frame for intra coded blocks */
if (!(pbi->b_multithreaded_rd) || pc->multi_token_partition == ONE_PARTITION || !(pc->filter_level))
vp8_setup_intra_recon(&pc->yv12_fb[pc->new_fb_idx]);
@@ -835,10 +839,10 @@ int vp8_decode_frame(VP8D_COMP *pbi)
vp8_build_block_doffsets(xd);
- // clear out the coeff buffer
+ /* clear out the coeff buffer */
vpx_memset(xd->qcoeff, 0, sizeof(xd->qcoeff));
- // Read the mb_no_coeff_skip flag
+ /* Read the mb_no_coeff_skip flag */
pc->mb_no_coeff_skip = (int)vp8_read_bit(bc);
@@ -853,20 +857,20 @@ int vp8_decode_frame(VP8D_COMP *pbi)
vp8mt_decode_mb_rows(pbi, xd);
if(pbi->common.filter_level)
{
- //vp8_mt_loop_filter_frame(pbi); //cm, &pbi->mb, cm->filter_level);
+ /*vp8_mt_loop_filter_frame(pbi);*/ /*cm, &pbi->mb, cm->filter_level);*/
pc->last_frame_type = pc->frame_type;
pc->last_filter_type = pc->filter_type;
pc->last_sharpness_level = pc->sharpness_level;
}
- vp8_yv12_extend_frame_borders_ptr(&pc->yv12_fb[pc->new_fb_idx]); //cm->frame_to_show);
+ vp8_yv12_extend_frame_borders_ptr(&pc->yv12_fb[pc->new_fb_idx]); /*cm->frame_to_show);*/
}
else
{
int ibc = 0;
int num_part = 1 << pc->multi_token_partition;
- // Decode the individual macro block
+ /* Decode the individual macro block */
for (mb_row = 0; mb_row < pc->mb_rows; mb_row++)
{
@@ -886,9 +890,9 @@ int vp8_decode_frame(VP8D_COMP *pbi)
stop_token_decoder(pbi);
- // vpx_log("Decoder: Frame Decoded, Size Roughly:%d bytes \n",bc->pos+pbi->bc2.pos);
+ /* vpx_log("Decoder: Frame Decoded, Size Roughly:%d bytes \n",bc->pos+pbi->bc2.pos); */
- // If this was a kf or Gf note the Q used
+ /* If this was a kf or Gf note the Q used */
if ((pc->frame_type == KEY_FRAME) ||
pc->refresh_golden_frame || pc->refresh_alt_ref_frame)
{
diff --git a/vp8/decoder/dequantize.c b/vp8/decoder/dequantize.c
index f5d576ac7..84a9fd943 100644
--- a/vp8/decoder/dequantize.c
+++ b/vp8/decoder/dequantize.c
@@ -45,7 +45,7 @@ void vp8_dequant_idct_add_c(short *input, short *dq, unsigned char *pred,
input[i] = dq[i] * input[i];
}
- // the idct halves ( >> 1) the pitch
+ /* the idct halves ( >> 1) the pitch */
vp8_short_idct4x4llm_c(input, output, 4 << 1);
vpx_memset(input, 0, 32);
@@ -87,7 +87,7 @@ void vp8_dequant_dc_idct_add_c(short *input, short *dq, unsigned char *pred,
input[i] = dq[i] * input[i];
}
- // the idct halves ( >> 1) the pitch
+ /* the idct halves ( >> 1) the pitch */
vp8_short_idct4x4llm_c(input, output, 4 << 1);
vpx_memset(input, 0, 32);
diff --git a/vp8/decoder/detokenize.c b/vp8/decoder/detokenize.c
index 65c7d5370..7d013d240 100644
--- a/vp8/decoder/detokenize.c
+++ b/vp8/decoder/detokenize.c
@@ -44,18 +44,18 @@ typedef struct
DECLARE_ALIGNED(16, static const TOKENEXTRABITS, vp8d_token_extra_bits2[MAX_ENTROPY_TOKENS]) =
{
- { 0, -1, { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 } }, //ZERO_TOKEN
- { 1, 0, { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 } }, //ONE_TOKEN
- { 2, 0, { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 } }, //TWO_TOKEN
- { 3, 0, { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 } }, //THREE_TOKEN
- { 4, 0, { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 } }, //FOUR_TOKEN
- { 5, 0, { 159, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 } }, //DCT_VAL_CATEGORY1
- { 7, 1, { 145, 165, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 } }, //DCT_VAL_CATEGORY2
- { 11, 2, { 140, 148, 173, 0, 0, 0, 0, 0, 0, 0, 0, 0 } }, //DCT_VAL_CATEGORY3
- { 19, 3, { 135, 140, 155, 176, 0, 0, 0, 0, 0, 0, 0, 0 } }, //DCT_VAL_CATEGORY4
- { 35, 4, { 130, 134, 141, 157, 180, 0, 0, 0, 0, 0, 0, 0 } }, //DCT_VAL_CATEGORY5
- { 67, 10, { 129, 130, 133, 140, 153, 177, 196, 230, 243, 254, 254, 0 } }, //DCT_VAL_CATEGORY6
- { 0, -1, { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 } }, // EOB TOKEN
+ { 0, -1, { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 } }, /* ZERO_TOKEN */
+ { 1, 0, { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 } }, /* ONE_TOKEN */
+ { 2, 0, { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 } }, /* TWO_TOKEN */
+ { 3, 0, { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 } }, /* THREE_TOKEN */
+ { 4, 0, { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 } }, /* FOUR_TOKEN */
+ { 5, 0, { 159, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 } }, /* DCT_VAL_CATEGORY1 */
+ { 7, 1, { 145, 165, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 } }, /* DCT_VAL_CATEGORY2 */
+ { 11, 2, { 140, 148, 173, 0, 0, 0, 0, 0, 0, 0, 0, 0 } }, /* DCT_VAL_CATEGORY3 */
+ { 19, 3, { 135, 140, 155, 176, 0, 0, 0, 0, 0, 0, 0, 0 } }, /* DCT_VAL_CATEGORY4 */
+ { 35, 4, { 130, 134, 141, 157, 180, 0, 0, 0, 0, 0, 0, 0 } }, /* DCT_VAL_CATEGORY5 */
+ { 67, 10, { 129, 130, 133, 140, 153, 177, 196, 230, 243, 254, 254, 0 } }, /* DCT_VAL_CATEGORY6 */
+ { 0, -1, { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 } }, /* EOB TOKEN */
};
@@ -75,13 +75,14 @@ void vp8_reset_mb_tokens_context(MACROBLOCKD *x)
}
#if CONFIG_ARM_ASM_DETOK
-// mashup of vp8_block2left and vp8_block2above so we only need one pointer
-// for the assembly version.
+/* mashup of vp8_block2left and vp8_block2above so we only need one pointer
+ * for the assembly version.
+ */
DECLARE_ALIGNED(16, const UINT8, vp8_block2leftabove[25*2]) =
{
- //vp8_block2left
+ /* vp8_block2left */
0, 0, 0, 0, 1, 1, 1, 1, 2, 2, 2, 2, 3, 3, 3, 3, 4, 4, 5, 5, 6, 6, 7, 7, 8,
- //vp8_block2above
+ /* vp8_block2above */
0, 1, 2, 3, 0, 1, 2, 3, 0, 1, 2, 3, 0, 1, 2, 3, 4, 5, 4, 5, 6, 7, 6, 7, 8
};
@@ -297,7 +298,7 @@ BLOCK_LOOP:
c = (INT16)(!type);
-// Dest = ((A)!=0) + ((B)!=0);
+ /*Dest = ((A)!=0) + ((B)!=0);*/
VP8_COMBINEENTROPYCONTEXTS(v, *a, *l);
Prob = coef_probs;
Prob += v * ENTROPY_NODES;
@@ -387,7 +388,7 @@ ONE_CONTEXT_NODE_0_:
qcoeff_ptr [ scan[15] ] = (INT16) v;
BLOCK_FINISHED:
- *a = *l = ((eobs[i] = c) != !type); // any nonzero data?
+ *a = *l = ((eobs[i] = c) != !type); /* any nonzero data? */
eobtotal += c;
qcoeff_ptr += 16;
@@ -422,4 +423,4 @@ BLOCK_FINISHED:
return eobtotal;
}
-#endif //!CONFIG_ASM_DETOK
+#endif /*!CONFIG_ASM_DETOK*/
diff --git a/vp8/decoder/generic/dsystemdependent.c b/vp8/decoder/generic/dsystemdependent.c
index 84de7af43..2e284729b 100644
--- a/vp8/decoder/generic/dsystemdependent.c
+++ b/vp8/decoder/generic/dsystemdependent.c
@@ -18,7 +18,7 @@ extern void vp8_arch_arm_decode_init(VP8D_COMP *pbi);
void vp8_dmachine_specific_config(VP8D_COMP *pbi)
{
- // Pure C:
+ /* Pure C: */
#if CONFIG_RUNTIME_CPU_DETECT
pbi->mb.rtcd = &pbi->common.rtcd;
pbi->dequant.block = vp8_dequantize_b_c;
@@ -29,7 +29,7 @@ void vp8_dmachine_specific_config(VP8D_COMP *pbi)
pbi->dequant.idct_add_uv_block = vp8_dequant_idct_add_uv_block_c;
pbi->dboolhuff.start = vp8dx_start_decode_c;
pbi->dboolhuff.fill = vp8dx_bool_decoder_fill_c;
-#if 0 //For use with RTCD, when implemented
+#if 0 /*For use with RTCD, when implemented*/
pbi->dboolhuff.debool = vp8dx_decode_bool_c;
pbi->dboolhuff.devalue = vp8dx_decode_value_c;
#endif
diff --git a/vp8/decoder/onyxd_if.c b/vp8/decoder/onyxd_if.c
index b5a6e3e85..6eda45e4a 100644
--- a/vp8/decoder/onyxd_if.c
+++ b/vp8/decoder/onyxd_if.c
@@ -113,12 +113,13 @@ VP8D_PTR vp8dx_create_decompressor(VP8D_CONFIG *oxcf)
pbi->common.current_video_frame = 0;
pbi->ready_for_new_data = 1;
- pbi->CPUFreq = 0; //vp8_get_processor_freq();
+ pbi->CPUFreq = 0; /*vp8_get_processor_freq();*/
pbi->max_threads = oxcf->max_threads;
vp8_decoder_create_threads(pbi);
- //vp8cx_init_de_quantizer() is first called here. Add check in frame_init_dequantizer() to avoid
- // unnecessary calling of vp8cx_init_de_quantizer() for every frame.
+ /* vp8cx_init_de_quantizer() is first called here. Add check in frame_init_dequantizer() to avoid
+ * unnecessary calling of vp8cx_init_de_quantizer() for every frame.
+ */
vp8cx_init_de_quantizer(pbi);
{
@@ -223,7 +224,7 @@ int vp8dx_set_reference(VP8D_PTR ptr, VP8_REFFRAME ref_frame_flag, YV12_BUFFER_C
return 0;
}
-//For ARM NEON, d8-d15 are callee-saved registers, and need to be saved by us.
+/*For ARM NEON, d8-d15 are callee-saved registers, and need to be saved by us.*/
#if HAVE_ARMV7
extern void vp8_push_neon(INT64 *store);
extern void vp8_pop_neon(INT64 *store);
@@ -250,7 +251,7 @@ static void ref_cnt_fb (int *buf, int *idx, int new_idx)
buf[new_idx]++;
}
-// If any buffer copy / swapping is signalled it should be done here.
+/* If any buffer copy / swapping is signalled it should be done here. */
static int swap_frame_buffers (VP8_COMMON *cm)
{
int fb_to_update_with, err = 0;
@@ -260,10 +261,11 @@ static int swap_frame_buffers (VP8_COMMON *cm)
else
fb_to_update_with = cm->new_fb_idx;
- // The alternate reference frame or golden frame can be updated
- // using the new, last, or golden/alt ref frame. If it
- // is updated using the newly decoded frame it is a refresh.
- // An update using the last or golden/alt ref frame is a copy.
+ /* The alternate reference frame or golden frame can be updated
+ * using the new, last, or golden/alt ref frame. If it
+ * is updated using the newly decoded frame it is a refresh.
+ * An update using the last or golden/alt ref frame is a copy.
+ */
if (cm->copy_buffer_to_arf)
{
int new_fb = 0;
@@ -322,8 +324,8 @@ int vp8dx_receive_compressed_data(VP8D_PTR ptr, unsigned long size, const unsign
int retcode = 0;
struct vpx_usec_timer timer;
-// if(pbi->ready_for_new_data == 0)
-// return -1;
+ /*if(pbi->ready_for_new_data == 0)
+ return -1;*/
if (ptr == 0)
{
@@ -363,7 +365,7 @@ int vp8dx_receive_compressed_data(VP8D_PTR ptr, unsigned long size, const unsign
vpx_usec_timer_start(&timer);
- //cm->current_video_frame++;
+ /*cm->current_video_frame++;*/
pbi->Source = source;
pbi->source_sz = size;
@@ -423,7 +425,7 @@ int vp8dx_receive_compressed_data(VP8D_PTR ptr, unsigned long size, const unsign
{
struct vpx_usec_timer lpftimer;
vpx_usec_timer_start(&lpftimer);
- // Apply the loop filter if appropriate.
+ /* Apply the loop filter if appropriate. */
vp8_loop_filter_frame(cm, &pbi->mb, cm->filter_level);
@@ -438,8 +440,8 @@ int vp8dx_receive_compressed_data(VP8D_PTR ptr, unsigned long size, const unsign
}
#if 0
- // DEBUG code
- //vp8_recon_write_yuv_frame("recon.yuv", cm->frame_to_show);
+ /* DEBUG code */
+ /*vp8_recon_write_yuv_frame("recon.yuv", cm->frame_to_show);*/
if (cm->current_video_frame <= 5)
write_dx_frame_to_file(cm->frame_to_show, cm->current_video_frame);
#endif
@@ -451,7 +453,7 @@ int vp8dx_receive_compressed_data(VP8D_PTR ptr, unsigned long size, const unsign
pbi->time_decoding += pbi->decode_microseconds;
-// vp8_print_modes_and_motion_vectors( cm->mi, cm->mb_rows,cm->mb_cols, cm->current_video_frame);
+ /*vp8_print_modes_and_motion_vectors( cm->mi, cm->mb_rows,cm->mb_cols, cm->current_video_frame);*/
if (cm->show_frame)
cm->current_video_frame++;
@@ -512,7 +514,7 @@ int vp8dx_get_raw_frame(VP8D_PTR ptr, YV12_BUFFER_CONFIG *sd, INT64 *time_stamp,
if (pbi->ready_for_new_data == 1)
return ret;
- // ie no raw frame to show!!!
+ /* ie no raw frame to show!!! */
if (pbi->common.show_frame == 0)
return ret;
@@ -538,7 +540,7 @@ int vp8dx_get_raw_frame(VP8D_PTR ptr, YV12_BUFFER_CONFIG *sd, INT64 *time_stamp,
ret = -1;
}
-#endif //!CONFIG_POSTPROC
+#endif /*!CONFIG_POSTPROC*/
vp8_clear_system_state();
return ret;
}
diff --git a/vp8/decoder/onyxd_int.h b/vp8/decoder/onyxd_int.h
index 522ac22d2..7593edf27 100644
--- a/vp8/decoder/onyxd_int.h
+++ b/vp8/decoder/onyxd_int.h
@@ -93,18 +93,18 @@ typedef struct VP8Decompressor
int decoding_thread_count;
int allocated_decoding_thread_count;
- // variable for threading
+ /* variable for threading */
#if CONFIG_MULTITHREAD
int mt_baseline_filter_level[MAX_MB_SEGMENTS];
int sync_range;
- int *mt_current_mb_col; // Each row remembers its already decoded column.
+ int *mt_current_mb_col; /* Each row remembers its already decoded column. */
- unsigned char **mt_yabove_row; // mb_rows x width
+ unsigned char **mt_yabove_row; /* mb_rows x width */
unsigned char **mt_uabove_row;
unsigned char **mt_vabove_row;
- unsigned char **mt_yleft_col; // mb_rows x 16
- unsigned char **mt_uleft_col; // mb_rows x 8
- unsigned char **mt_vleft_col; // mb_rows x 8
+ unsigned char **mt_yleft_col; /* mb_rows x 16 */
+ unsigned char **mt_uleft_col; /* mb_rows x 8 */
+ unsigned char **mt_vleft_col; /* mb_rows x 8 */
MB_ROW_DEC *mb_row_di;
DECODETHREAD_DATA *de_thread_data;
@@ -112,7 +112,7 @@ typedef struct VP8Decompressor
pthread_t *h_decoding_thread;
sem_t *h_event_start_decoding;
sem_t h_event_end_decoding;
- // end of threading data
+ /* end of threading data */
#endif
vp8_reader *mbc;
diff --git a/vp8/decoder/reconintra_mt.c b/vp8/decoder/reconintra_mt.c
index 4d395629d..ad4324b27 100644
--- a/vp8/decoder/reconintra_mt.c
+++ b/vp8/decoder/reconintra_mt.c
@@ -15,16 +15,17 @@
#include "vpx_mem/vpx_mem.h"
#include "onyxd_int.h"
-// For skip_recon_mb(), add vp8_build_intra_predictors_mby_s(MACROBLOCKD *x) and
-// vp8_build_intra_predictors_mbuv_s(MACROBLOCKD *x).
+/* For skip_recon_mb(), add vp8_build_intra_predictors_mby_s(MACROBLOCKD *x) and
+ * vp8_build_intra_predictors_mbuv_s(MACROBLOCKD *x).
+ */
void vp8mt_build_intra_predictors_mby(VP8D_COMP *pbi, MACROBLOCKD *x, int mb_row, int mb_col)
{
#if CONFIG_MULTITHREAD
- unsigned char *yabove_row; // = x->dst.y_buffer - x->dst.y_stride;
+ unsigned char *yabove_row; /* = x->dst.y_buffer - x->dst.y_stride; */
unsigned char *yleft_col;
unsigned char yleft_buf[16];
- unsigned char ytop_left; // = yabove_row[-1];
+ unsigned char ytop_left; /* = yabove_row[-1]; */
unsigned char *ypred_ptr = x->predictor;
int r, c, i;
@@ -43,7 +44,7 @@ void vp8mt_build_intra_predictors_mby(VP8D_COMP *pbi, MACROBLOCKD *x, int mb_row
ytop_left = yabove_row[-1];
- // for Y
+ /* for Y */
switch (x->mode_info_context->mbmi.mode)
{
case DC_PRED:
@@ -156,15 +157,15 @@ void vp8mt_build_intra_predictors_mby(VP8D_COMP *pbi, MACROBLOCKD *x, int mb_row
void vp8mt_build_intra_predictors_mby_s(VP8D_COMP *pbi, MACROBLOCKD *x, int mb_row, int mb_col)
{
#if CONFIG_MULTITHREAD
- unsigned char *yabove_row; // = x->dst.y_buffer - x->dst.y_stride;
+ unsigned char *yabove_row; /* = x->dst.y_buffer - x->dst.y_stride; */
unsigned char *yleft_col;
unsigned char yleft_buf[16];
- unsigned char ytop_left; // = yabove_row[-1];
+ unsigned char ytop_left; /* = yabove_row[-1]; */
unsigned char *ypred_ptr = x->predictor;
int r, c, i;
int y_stride = x->dst.y_stride;
- ypred_ptr = x->dst.y_buffer; //x->predictor;
+ ypred_ptr = x->dst.y_buffer; /*x->predictor;*/
if (pbi->common.filter_level)
{
@@ -181,7 +182,7 @@ void vp8mt_build_intra_predictors_mby_s(VP8D_COMP *pbi, MACROBLOCKD *x, int mb_r
ytop_left = yabove_row[-1];
- // for Y
+ /* for Y */
switch (x->mode_info_context->mbmi.mode)
{
case DC_PRED:
@@ -222,11 +223,11 @@ void vp8mt_build_intra_predictors_mby_s(VP8D_COMP *pbi, MACROBLOCKD *x, int mb_r
expected_dc = 128;
}
- //vpx_memset(ypred_ptr, expected_dc, 256);
+ /*vpx_memset(ypred_ptr, expected_dc, 256);*/
for (r = 0; r < 16; r++)
{
vpx_memset(ypred_ptr, expected_dc, 16);
- ypred_ptr += y_stride; //16;
+ ypred_ptr += y_stride; /*16;*/
}
}
break;
@@ -240,7 +241,7 @@ void vp8mt_build_intra_predictors_mby_s(VP8D_COMP *pbi, MACROBLOCKD *x, int mb_r
((int *)ypred_ptr)[1] = ((int *)yabove_row)[1];
((int *)ypred_ptr)[2] = ((int *)yabove_row)[2];
((int *)ypred_ptr)[3] = ((int *)yabove_row)[3];
- ypred_ptr += y_stride; //16;
+ ypred_ptr += y_stride; /*16;*/
}
}
break;
@@ -251,7 +252,7 @@ void vp8mt_build_intra_predictors_mby_s(VP8D_COMP *pbi, MACROBLOCKD *x, int mb_r
{
vpx_memset(ypred_ptr, yleft_col[r], 16);
- ypred_ptr += y_stride; //16;
+ ypred_ptr += y_stride; /*16;*/
}
}
@@ -274,7 +275,7 @@ void vp8mt_build_intra_predictors_mby_s(VP8D_COMP *pbi, MACROBLOCKD *x, int mb_r
ypred_ptr[c] = pred;
}
- ypred_ptr += y_stride; //16;
+ ypred_ptr += y_stride; /*16;*/
}
}
@@ -299,14 +300,14 @@ void vp8mt_build_intra_predictors_mby_s(VP8D_COMP *pbi, MACROBLOCKD *x, int mb_r
void vp8mt_build_intra_predictors_mbuv(VP8D_COMP *pbi, MACROBLOCKD *x, int mb_row, int mb_col)
{
#if CONFIG_MULTITHREAD
- unsigned char *uabove_row; // = x->dst.u_buffer - x->dst.uv_stride;
- unsigned char *uleft_col; //[16];
+ unsigned char *uabove_row; /* = x->dst.u_buffer - x->dst.uv_stride; */
+ unsigned char *uleft_col; /*[16];*/
unsigned char uleft_buf[8];
- unsigned char utop_left; // = uabove_row[-1];
- unsigned char *vabove_row; // = x->dst.v_buffer - x->dst.uv_stride;
- unsigned char *vleft_col; //[20];
+ unsigned char utop_left; /* = uabove_row[-1]; */
+ unsigned char *vabove_row; /* = x->dst.v_buffer - x->dst.uv_stride; */
+ unsigned char *vleft_col; /*[20];*/
unsigned char vleft_buf[8];
- unsigned char vtop_left; // = vabove_row[-1];
+ unsigned char vtop_left; /* = vabove_row[-1]; */
unsigned char *upred_ptr = &x->predictor[256];
unsigned char *vpred_ptr = &x->predictor[320];
int i, j;
@@ -462,16 +463,16 @@ void vp8mt_build_intra_predictors_mbuv(VP8D_COMP *pbi, MACROBLOCKD *x, int mb_ro
void vp8mt_build_intra_predictors_mbuv_s(VP8D_COMP *pbi, MACROBLOCKD *x, int mb_row, int mb_col)
{
#if CONFIG_MULTITHREAD
- unsigned char *uabove_row; // = x->dst.u_buffer - x->dst.uv_stride;
- unsigned char *uleft_col; //[16];
+ unsigned char *uabove_row; /* = x->dst.u_buffer - x->dst.uv_stride; */
+ unsigned char *uleft_col; /*[16];*/
unsigned char uleft_buf[8];
- unsigned char utop_left; // = uabove_row[-1];
- unsigned char *vabove_row; // = x->dst.v_buffer - x->dst.uv_stride;
- unsigned char *vleft_col; //[20];
+ unsigned char utop_left; /* = uabove_row[-1]; */
+ unsigned char *vabove_row; /* = x->dst.v_buffer - x->dst.uv_stride; */
+ unsigned char *vleft_col; /*[20];*/
unsigned char vleft_buf[8];
- unsigned char vtop_left; // = vabove_row[-1];
- unsigned char *upred_ptr = x->dst.u_buffer; //&x->predictor[256];
- unsigned char *vpred_ptr = x->dst.v_buffer; //&x->predictor[320];
+ unsigned char vtop_left; /* = vabove_row[-1]; */
+ unsigned char *upred_ptr = x->dst.u_buffer; /*&x->predictor[256];*/
+ unsigned char *vpred_ptr = x->dst.v_buffer; /*&x->predictor[320];*/
int uv_stride = x->dst.uv_stride;
int i, j;
@@ -539,14 +540,14 @@ void vp8mt_build_intra_predictors_mbuv_s(VP8D_COMP *pbi, MACROBLOCKD *x, int mb_
}
- //vpx_memset(upred_ptr,expected_udc,64);
- //vpx_memset(vpred_ptr,expected_vdc,64);
+ /*vpx_memset(upred_ptr,expected_udc,64);
+ vpx_memset(vpred_ptr,expected_vdc,64);*/
for (i = 0; i < 8; i++)
{
vpx_memset(upred_ptr, expected_udc, 8);
vpx_memset(vpred_ptr, expected_vdc, 8);
- upred_ptr += uv_stride; //8;
- vpred_ptr += uv_stride; //8;
+ upred_ptr += uv_stride; /*8;*/
+ vpred_ptr += uv_stride; /*8;*/
}
}
break;
@@ -558,8 +559,8 @@ void vp8mt_build_intra_predictors_mbuv_s(VP8D_COMP *pbi, MACROBLOCKD *x, int mb_
{
vpx_memcpy(upred_ptr, uabove_row, 8);
vpx_memcpy(vpred_ptr, vabove_row, 8);
- upred_ptr += uv_stride; //8;
- vpred_ptr += uv_stride; //8;
+ upred_ptr += uv_stride; /*8;*/
+ vpred_ptr += uv_stride; /*8;*/
}
}
@@ -572,8 +573,8 @@ void vp8mt_build_intra_predictors_mbuv_s(VP8D_COMP *pbi, MACROBLOCKD *x, int mb_
{
vpx_memset(upred_ptr, uleft_col[i], 8);
vpx_memset(vpred_ptr, vleft_col[i], 8);
- upred_ptr += uv_stride; //8;
- vpred_ptr += uv_stride; //8;
+ upred_ptr += uv_stride; /*8;*/
+ vpred_ptr += uv_stride; /*8;*/
}
}
@@ -605,8 +606,8 @@ void vp8mt_build_intra_predictors_mbuv_s(VP8D_COMP *pbi, MACROBLOCKD *x, int mb_
vpred_ptr[j] = predv;
}
- upred_ptr += uv_stride; //8;
- vpred_ptr += uv_stride; //8;
+ upred_ptr += uv_stride; /*8;*/
+ vpred_ptr += uv_stride; /*8;*/
}
}
@@ -640,13 +641,13 @@ void vp8mt_predict_intra4x4(VP8D_COMP *pbi,
#if CONFIG_MULTITHREAD
int i, r, c;
- unsigned char *Above; // = *(x->base_dst) + x->dst - x->dst_stride;
+ unsigned char *Above; /* = *(x->base_dst) + x->dst - x->dst_stride; */
unsigned char Left[4];
- unsigned char top_left; // = Above[-1];
+ unsigned char top_left; /* = Above[-1]; */
BLOCKD *x = &xd->block[num];
- //Caution: For some b_mode, it needs 8 pixels (4 above + 4 above-right).
+ /*Caution: For some b_mode, it needs 8 pixels (4 above + 4 above-right).*/
if (num < 4 && pbi->common.filter_level)
Above = pbi->mt_yabove_row[mb_row] + mb_col*16 + num*4 + 32;
else
@@ -696,7 +697,7 @@ void vp8mt_predict_intra4x4(VP8D_COMP *pbi,
break;
case B_TM_PRED:
{
- // prediction similar to true_motion prediction
+ /* prediction similar to true_motion prediction */
for (r = 0; r < 4; r++)
{
for (c = 0; c < 4; c++)
@@ -945,12 +946,13 @@ void vp8mt_predict_intra4x4(VP8D_COMP *pbi,
#endif
}
-// copy 4 bytes from the above right down so that the 4x4 prediction modes using pixels above and
-// to the right prediction have filled in pixels to use.
+/* copy 4 bytes from the above right down so that the 4x4 prediction modes using pixels above and
+ * to the right prediction have filled in pixels to use.
+ */
void vp8mt_intra_prediction_down_copy(VP8D_COMP *pbi, MACROBLOCKD *x, int mb_row, int mb_col)
{
#if CONFIG_MULTITHREAD
- unsigned char *above_right; // = *(x->block[0].base_dst) + x->block[0].dst - x->block[0].dst_stride + 16;
+ unsigned char *above_right; /* = *(x->block[0].base_dst) + x->block[0].dst - x->block[0].dst_stride + 16; */
unsigned int *src_ptr;
unsigned int *dst_ptr0;
unsigned int *dst_ptr1;
@@ -962,9 +964,9 @@ void vp8mt_intra_prediction_down_copy(VP8D_COMP *pbi, MACROBLOCKD *x, int mb_row
above_right = *(x->block[0].base_dst) + x->block[0].dst - x->block[0].dst_stride + 16;
src_ptr = (unsigned int *)above_right;
- //dst_ptr0 = (unsigned int *)(above_right + 4 * x->block[0].dst_stride);
- //dst_ptr1 = (unsigned int *)(above_right + 8 * x->block[0].dst_stride);
- //dst_ptr2 = (unsigned int *)(above_right + 12 * x->block[0].dst_stride);
+ /*dst_ptr0 = (unsigned int *)(above_right + 4 * x->block[0].dst_stride);
+ dst_ptr1 = (unsigned int *)(above_right + 8 * x->block[0].dst_stride);
+ dst_ptr2 = (unsigned int *)(above_right + 12 * x->block[0].dst_stride);*/
dst_ptr0 = (unsigned int *)(*(x->block[0].base_dst) + x->block[0].dst + 16 + 3 * x->block[0].dst_stride);
dst_ptr1 = (unsigned int *)(*(x->block[0].base_dst) + x->block[0].dst + 16 + 7 * x->block[0].dst_stride);
dst_ptr2 = (unsigned int *)(*(x->block[0].base_dst) + x->block[0].dst + 16 + 11 * x->block[0].dst_stride);
diff --git a/vp8/decoder/reconintra_mt.h b/vp8/decoder/reconintra_mt.h
index 5c42f819f..d401295b2 100644
--- a/vp8/decoder/reconintra_mt.h
+++ b/vp8/decoder/reconintra_mt.h
@@ -12,7 +12,7 @@
#ifndef __INC_RECONINTRA_MT_H
#define __INC_RECONINTRA_MT_H
-// reconintra functions used in multi-threaded decoder
+/* reconintra functions used in multi-threaded decoder */
#if CONFIG_MULTITHREAD
extern void vp8mt_build_intra_predictors_mby(VP8D_COMP *pbi, MACROBLOCKD *x, int mb_row, int mb_col);
extern void vp8mt_build_intra_predictors_mby_s(VP8D_COMP *pbi, MACROBLOCKD *x, int mb_row, int mb_col);
diff --git a/vp8/decoder/threading.c b/vp8/decoder/threading.c
index 2d7f7b9b8..fc2fad516 100644
--- a/vp8/decoder/threading.c
+++ b/vp8/decoder/threading.c
@@ -69,12 +69,12 @@ void vp8_setup_decoding_thread_data(VP8D_COMP *pbi, MACROBLOCKD *xd, MB_ROW_DEC
mbd->mb_segement_abs_delta = xd->mb_segement_abs_delta;
vpx_memcpy(mbd->segment_feature_data, xd->segment_feature_data, sizeof(xd->segment_feature_data));
- //signed char ref_lf_deltas[MAX_REF_LF_DELTAS];
+ /*signed char ref_lf_deltas[MAX_REF_LF_DELTAS];*/
vpx_memcpy(mbd->ref_lf_deltas, xd->ref_lf_deltas, sizeof(xd->ref_lf_deltas));
- //signed char mode_lf_deltas[MAX_MODE_LF_DELTAS];
+ /*signed char mode_lf_deltas[MAX_MODE_LF_DELTAS];*/
vpx_memcpy(mbd->mode_lf_deltas, xd->mode_lf_deltas, sizeof(xd->mode_lf_deltas));
- //unsigned char mode_ref_lf_delta_enabled;
- //unsigned char mode_ref_lf_delta_update;
+ /*unsigned char mode_ref_lf_delta_enabled;
+ unsigned char mode_ref_lf_delta_update;*/
mbd->mode_ref_lf_delta_enabled = xd->mode_ref_lf_delta_enabled;
mbd->mode_ref_lf_delta_update = xd->mode_ref_lf_delta_update;
@@ -113,7 +113,7 @@ void vp8mt_decode_macroblock(VP8D_COMP *pbi, MACROBLOCKD *xd, int mb_row, int mb
eobtotal = vp8_decode_mb_tokens(pbi, xd);
}
- // Perform temporary clamping of the MV to be used for prediction
+ /* Perform temporary clamping of the MV to be used for prediction */
if (do_clamp)
{
clamp_mvs(xd);
@@ -125,7 +125,7 @@ void vp8mt_decode_macroblock(VP8D_COMP *pbi, MACROBLOCKD *xd, int mb_row, int mb
{
xd->mode_info_context->mbmi.dc_diff = 0;
- //mt_skip_recon_mb(pbi, xd, mb_row, mb_col);
+ /*mt_skip_recon_mb(pbi, xd, mb_row, mb_col);*/
if (xd->frame_type == KEY_FRAME || xd->mode_info_context->mbmi.ref_frame == INTRA_FRAME)
{
vp8mt_build_intra_predictors_mbuv_s(pbi, xd, mb_row, mb_col);
@@ -141,7 +141,7 @@ void vp8mt_decode_macroblock(VP8D_COMP *pbi, MACROBLOCKD *xd, int mb_row, int mb
if (xd->segmentation_enabled)
mb_init_dequantizer(pbi, xd);
- // do prediction
+ /* do prediction */
if (xd->frame_type == KEY_FRAME || xd->mode_info_context->mbmi.ref_frame == INTRA_FRAME)
{
vp8mt_build_intra_predictors_mbuv(pbi, xd, mb_row, mb_col);
@@ -158,13 +158,13 @@ void vp8mt_decode_macroblock(VP8D_COMP *pbi, MACROBLOCKD *xd, int mb_row, int mb
vp8_build_inter_predictors_mb(xd);
}
- // dequantization and idct
+ /* dequantization and idct */
if (xd->mode_info_context->mbmi.mode != B_PRED && xd->mode_info_context->mbmi.mode != SPLITMV)
{
BLOCKD *b = &xd->block[24];
DEQUANT_INVOKE(&pbi->dequant, block)(b);
- // do 2nd order transform on the dc block
+ /* do 2nd order transform on the dc block */
if (xd->eobs[24] > 1)
{
IDCT_INVOKE(RTCD_VTABLE(idct), iwalsh16)(&b->dqcoeff[0], b->diff);
@@ -244,7 +244,7 @@ THREAD_FUNCTION vp8_thread_decoding_proc(void *p_data)
if (pbi->b_multithreaded_rd == 0)
break;
- //if(WaitForSingleObject(pbi->h_event_start_decoding[ithread], INFINITE) == WAIT_OBJECT_0)
+ /*if(WaitForSingleObject(pbi->h_event_start_decoding[ithread], INFINITE) == WAIT_OBJECT_0)*/
if (sem_wait(&pbi->h_event_start_decoding[ithread]) == 0)
{
if (pbi->b_multithreaded_rd == 0)
@@ -281,7 +281,7 @@ THREAD_FUNCTION vp8_thread_decoding_proc(void *p_data)
recon_yoffset = mb_row * recon_y_stride * 16;
recon_uvoffset = mb_row * recon_uv_stride * 8;
- // reset above block coeffs
+ /* reset above block coeffs */
xd->above_context = pc->above_context;
xd->left_context = &mb_row_left_context;
@@ -313,17 +313,19 @@ THREAD_FUNCTION vp8_thread_decoding_proc(void *p_data)
if(pbi->common.filter_level)
{
- //update loopfilter info
+ /*update loopfilter info*/
Segment = (alt_flt_enabled) ? xd->mode_info_context->mbmi.segment_id : 0;
filter_level = pbi->mt_baseline_filter_level[Segment];
- // Distance of Mb to the various image edges.
- // These specified to 8th pel as they are always compared to values that are in 1/8th pel units
- // Apply any context driven MB level adjustment
+ /* Distance of Mb to the various image edges.
+ * These are specified to 8th pel as they are always compared to values that are in 1/8th pel units
+ * Apply any context driven MB level adjustment
+ */
vp8_adjust_mb_lf_value(xd, &filter_level);
}
- // Distance of Mb to the various image edges.
- // These specified to 8th pel as they are always compared to values that are in 1/8th pel units
+ /* Distance of Mb to the various image edges.
+ * These are specified to 8th pel as they are always compared to values that are in 1/8th pel units
+ */
xd->mb_to_left_edge = -((mb_col * 16) << 3);
xd->mb_to_right_edge = ((pc->mb_cols - 1 - mb_col) * 16) << 3;
@@ -333,7 +335,7 @@ THREAD_FUNCTION vp8_thread_decoding_proc(void *p_data)
xd->left_available = (mb_col != 0);
- // Select the appropriate reference frame for this MB
+ /* Select the appropriate reference frame for this MB */
if (xd->mode_info_context->mbmi.ref_frame == LAST_FRAME)
ref_fb_idx = pc->lst_fb_idx;
else if (xd->mode_info_context->mbmi.ref_frame == GOLDEN_FRAME)
@@ -352,13 +354,13 @@ THREAD_FUNCTION vp8_thread_decoding_proc(void *p_data)
{
if( mb_row != pc->mb_rows-1 )
{
- //Save decoded MB last row data for next-row decoding
+ /* Save decoded MB last row data for next-row decoding */
vpx_memcpy((pbi->mt_yabove_row[mb_row + 1] + 32 + mb_col*16), (xd->dst.y_buffer + 15 * recon_y_stride), 16);
vpx_memcpy((pbi->mt_uabove_row[mb_row + 1] + 16 + mb_col*8), (xd->dst.u_buffer + 7 * recon_uv_stride), 8);
vpx_memcpy((pbi->mt_vabove_row[mb_row + 1] + 16 + mb_col*8), (xd->dst.v_buffer + 7 * recon_uv_stride), 8);
}
- //save left_col for next MB decoding
+ /* save left_col for next MB decoding */
if(mb_col != pc->mb_cols-1)
{
MODE_INFO *next = xd->mode_info_context +1;
@@ -375,7 +377,7 @@ THREAD_FUNCTION vp8_thread_decoding_proc(void *p_data)
}
}
- // loopfilter on this macroblock.
+ /* loopfilter on this macroblock. */
if (filter_level)
{
if (mb_col > 0)
@@ -384,7 +386,7 @@ THREAD_FUNCTION vp8_thread_decoding_proc(void *p_data)
if (xd->mode_info_context->mbmi.dc_diff > 0)
pc->lf_bv(xd->dst.y_buffer, xd->dst.u_buffer, xd->dst.v_buffer, recon_y_stride, recon_uv_stride, &lfi[filter_level], pc->simpler_lpf);
- // don't apply across umv border
+ /* don't apply across umv border */
if (mb_row > 0)
pc->lf_mbh(xd->dst.y_buffer, xd->dst.u_buffer, xd->dst.v_buffer, recon_y_stride, recon_uv_stride, &lfi[filter_level], pc->simpler_lpf);
@@ -400,11 +402,11 @@ THREAD_FUNCTION vp8_thread_decoding_proc(void *p_data)
xd->above_context++;
- //pbi->mb_row_di[ithread].current_mb_col = mb_col;
+ /*pbi->mb_row_di[ithread].current_mb_col = mb_col;*/
pbi->mt_current_mb_col[mb_row] = mb_col;
}
- // adjust to the next row of mbs
+ /* adjust to the next row of mbs */
if (pbi->common.filter_level)
{
if(mb_row != pc->mb_rows-1)
@@ -424,15 +426,15 @@ THREAD_FUNCTION vp8_thread_decoding_proc(void *p_data)
++xd->mode_info_context; /* skip prediction column */
- // since we have multithread
+ /* since we have multithread */
xd->mode_info_context += xd->mode_info_stride * pbi->decoding_thread_count;
}
}
}
- // add this to each frame
+ /* add this to each frame */
if ((mbrd->mb_row == pbi->common.mb_rows-1) || ((mbrd->mb_row == pbi->common.mb_rows-2) && (pbi->common.mb_rows % (pbi->decoding_thread_count+1))==1))
{
- //SetEvent(pbi->h_event_end_decoding);
+ /*SetEvent(pbi->h_event_end_decoding);*/
sem_post(&pbi->h_event_end_decoding);
}
}
@@ -502,7 +504,7 @@ void vp8mt_de_alloc_temp_buffers(VP8D_COMP *pbi, int mb_rows)
pbi->mt_current_mb_col = NULL ;
}
- // Free above_row buffers.
+ /* Free above_row buffers. */
if (pbi->mt_yabove_row)
{
for (i=0; i< mb_rows; i++)
@@ -545,7 +547,7 @@ void vp8mt_de_alloc_temp_buffers(VP8D_COMP *pbi, int mb_rows)
pbi->mt_vabove_row = NULL ;
}
- // Free left_col buffers.
+ /* Free left_col buffers. */
if (pbi->mt_yleft_col)
{
for (i=0; i< mb_rows; i++)
@@ -605,7 +607,7 @@ int vp8mt_alloc_temp_buffers(VP8D_COMP *pbi, int width, int prev_mb_rows)
{
vp8mt_de_alloc_temp_buffers(pbi, prev_mb_rows);
- // our internal buffers are always multiples of 16
+ /* our internal buffers are always multiples of 16 */
if ((width & 0xf) != 0)
width += 16 - (width & 0xf);
@@ -616,10 +618,10 @@ int vp8mt_alloc_temp_buffers(VP8D_COMP *pbi, int width, int prev_mb_rows)
uv_width = width >>1;
- // Allocate an int for each mb row.
+ /* Allocate an int for each mb row. */
CHECK_MEM_ERROR(pbi->mt_current_mb_col, vpx_malloc(sizeof(int) * pc->mb_rows));
- // Allocate memory for above_row buffers.
+ /* Allocate memory for above_row buffers. */
CHECK_MEM_ERROR(pbi->mt_yabove_row, vpx_malloc(sizeof(unsigned char *) * pc->mb_rows));
for (i=0; i< pc->mb_rows; i++)
CHECK_MEM_ERROR(pbi->mt_yabove_row[i], vpx_calloc(sizeof(unsigned char) * (width + (VP8BORDERINPIXELS<<1)), 1));
@@ -632,7 +634,7 @@ int vp8mt_alloc_temp_buffers(VP8D_COMP *pbi, int width, int prev_mb_rows)
for (i=0; i< pc->mb_rows; i++)
CHECK_MEM_ERROR(pbi->mt_vabove_row[i], vpx_calloc(sizeof(unsigned char) * (uv_width + VP8BORDERINPIXELS), 1));
- // Allocate memory for left_col buffers.
+ /* Allocate memory for left_col buffers. */
CHECK_MEM_ERROR(pbi->mt_yleft_col, vpx_malloc(sizeof(unsigned char *) * pc->mb_rows));
for (i=0; i< pc->mb_rows; i++)
CHECK_MEM_ERROR(pbi->mt_yleft_col[i], vpx_calloc(sizeof(unsigned char) * 16, 1));
@@ -657,14 +659,14 @@ void vp8_decoder_remove_threads(VP8D_COMP *pbi)
{
#if CONFIG_MULTITHREAD
- //shutdown MB Decoding thread;
+ /* shutdown MB Decoding thread; */
if (pbi->b_multithreaded_rd)
{
int i;
pbi->b_multithreaded_rd = 0;
- // allow all threads to exit
+ /* allow all threads to exit */
for (i = 0; i < pbi->allocated_decoding_thread_count; i++)
{
sem_post(&pbi->h_event_start_decoding[i]);
@@ -713,32 +715,32 @@ void vp8mt_lpf_init( VP8D_COMP *pbi, int default_filt_lvl)
#if CONFIG_MULTITHREAD
VP8_COMMON *cm = &pbi->common;
MACROBLOCKD *mbd = &pbi->mb;
- //YV12_BUFFER_CONFIG *post = &cm->new_frame; //frame_to_show;
+ /*YV12_BUFFER_CONFIG *post = &cm->new_frame;*/ /*frame_to_show;*/
loop_filter_info *lfi = cm->lf_info;
- int frame_type = cm->frame_type;
+ FRAME_TYPE frame_type = cm->frame_type;
- //int mb_row;
- //int mb_col;
- //int baseline_filter_level[MAX_MB_SEGMENTS];
+ /*int mb_row;
+ int mb_col;
+ int baseline_filter_level[MAX_MB_SEGMENTS];*/
int filter_level;
int alt_flt_enabled = mbd->segmentation_enabled;
int i;
- //unsigned char *y_ptr, *u_ptr, *v_ptr;
+ /*unsigned char *y_ptr, *u_ptr, *v_ptr;*/
- // Note the baseline filter values for each segment
+ /* Note the baseline filter values for each segment */
if (alt_flt_enabled)
{
for (i = 0; i < MAX_MB_SEGMENTS; i++)
{
- // Abs value
+ /* Abs value */
if (mbd->mb_segement_abs_delta == SEGMENT_ABSDATA)
pbi->mt_baseline_filter_level[i] = mbd->segment_feature_data[MB_LVL_ALT_LF][i];
- // Delta Value
+ /* Delta Value */
else
{
pbi->mt_baseline_filter_level[i] = default_filt_lvl + mbd->segment_feature_data[MB_LVL_ALT_LF][i];
- pbi->mt_baseline_filter_level[i] = (pbi->mt_baseline_filter_level[i] >= 0) ? ((pbi->mt_baseline_filter_level[i] <= MAX_LOOP_FILTER) ? pbi->mt_baseline_filter_level[i] : MAX_LOOP_FILTER) : 0; // Clamp to valid range
+ pbi->mt_baseline_filter_level[i] = (pbi->mt_baseline_filter_level[i] >= 0) ? ((pbi->mt_baseline_filter_level[i] <= MAX_LOOP_FILTER) ? pbi->mt_baseline_filter_level[i] : MAX_LOOP_FILTER) : 0; /* Clamp to valid range */
}
}
}
@@ -748,7 +750,7 @@ void vp8mt_lpf_init( VP8D_COMP *pbi, int default_filt_lvl)
pbi->mt_baseline_filter_level[i] = default_filt_lvl;
}
- // Initialize the loop filter for this frame.
+ /* Initialize the loop filter for this frame. */
if ((cm->last_filter_type != cm->filter_type) || (cm->last_sharpness_level != cm->sharpness_level))
vp8_init_loop_filter(cm);
else if (frame_type != cm->last_frame_type)
@@ -779,7 +781,7 @@ void vp8mt_decode_mb_rows( VP8D_COMP *pbi, MACROBLOCKD *xd)
if(pbi->common.filter_level)
{
- //Set above_row buffer to 127 for decoding first MB row
+ /* Set above_row buffer to 127 for decoding first MB row */
vpx_memset(pbi->mt_yabove_row[0] + VP8BORDERINPIXELS-1, 127, pc->yv12_fb[pc->lst_fb_idx].y_width + 5);
vpx_memset(pbi->mt_uabove_row[0] + (VP8BORDERINPIXELS>>1)-1, 127, (pc->yv12_fb[pc->lst_fb_idx].y_width>>1) +5);
vpx_memset(pbi->mt_vabove_row[0] + (VP8BORDERINPIXELS>>1)-1, 127, (pc->yv12_fb[pc->lst_fb_idx].y_width>>1) +5);
@@ -791,7 +793,7 @@ void vp8mt_decode_mb_rows( VP8D_COMP *pbi, MACROBLOCKD *xd)
vpx_memset(pbi->mt_vabove_row[i] + (VP8BORDERINPIXELS>>1)-1, (unsigned char)129, 1);
}
- //Set left_col to 129 initially
+ /* Set left_col to 129 initially */
for (i=0; i<pc->mb_rows; i++)
{
vpx_memset(pbi->mt_yleft_col[i], (unsigned char)129, 16);
@@ -812,7 +814,7 @@ void vp8mt_decode_mb_rows( VP8D_COMP *pbi, MACROBLOCKD *xd)
xd->current_bc = &pbi->mbc[mb_row%num_part];
- //vp8_decode_mb_row(pbi, pc, mb_row, xd);
+ /* vp8_decode_mb_row(pbi, pc, mb_row, xd); */
{
int i;
int recon_yoffset, recon_uvoffset;
@@ -822,14 +824,14 @@ void vp8mt_decode_mb_rows( VP8D_COMP *pbi, MACROBLOCKD *xd)
int recon_y_stride = pc->yv12_fb[ref_fb_idx].y_stride;
int recon_uv_stride = pc->yv12_fb[ref_fb_idx].uv_stride;
- // volatile int *last_row_current_mb_col = NULL;
+ /* volatile int *last_row_current_mb_col = NULL; */
if (mb_row > 0)
last_row_current_mb_col = &pbi->mt_current_mb_col[mb_row -1];
vpx_memset(&pc->left_context, 0, sizeof(pc->left_context));
recon_yoffset = mb_row * recon_y_stride * 16;
recon_uvoffset = mb_row * recon_uv_stride * 8;
- // reset above block coeffs
+ /* reset above block coeffs */
xd->above_context = pc->above_context;
xd->up_available = (mb_row != 0);
@@ -858,17 +860,19 @@ void vp8mt_decode_mb_rows( VP8D_COMP *pbi, MACROBLOCKD *xd)
if(pbi->common.filter_level)
{
- //update loopfilter info
+ /* update loopfilter info */
Segment = (alt_flt_enabled) ? xd->mode_info_context->mbmi.segment_id : 0;
filter_level = pbi->mt_baseline_filter_level[Segment];
- // Distance of Mb to the various image edges.
- // These specified to 8th pel as they are always compared to values that are in 1/8th pel units
- // Apply any context driven MB level adjustment
+ /* Distance of Mb to the various image edges.
+ * These are specified to 8th pel as they are always compared to values that are in 1/8th pel units
+ * Apply any context driven MB level adjustment
+ */
vp8_adjust_mb_lf_value(xd, &filter_level);
}
- // Distance of Mb to the various image edges.
- // These specified to 8th pel as they are always compared to values that are in 1/8th pel units
+ /* Distance of Mb to the various image edges.
+ * These are specified to 8th pel as they are always compared to values that are in 1/8th pel units
+ */
xd->mb_to_left_edge = -((mb_col * 16) << 3);
xd->mb_to_right_edge = ((pc->mb_cols - 1 - mb_col) * 16) << 3;
@@ -878,7 +882,7 @@ void vp8mt_decode_mb_rows( VP8D_COMP *pbi, MACROBLOCKD *xd)
xd->left_available = (mb_col != 0);
- // Select the appropriate reference frame for this MB
+ /* Select the appropriate reference frame for this MB */
if (xd->mode_info_context->mbmi.ref_frame == LAST_FRAME)
ref_fb_idx = pc->lst_fb_idx;
else if (xd->mode_info_context->mbmi.ref_frame == GOLDEN_FRAME)
@@ -895,7 +899,7 @@ void vp8mt_decode_mb_rows( VP8D_COMP *pbi, MACROBLOCKD *xd)
if (pbi->common.filter_level)
{
- //Save decoded MB last row data for next-row decoding
+ /* Save decoded MB last row data for next-row decoding */
if(mb_row != pc->mb_rows-1)
{
vpx_memcpy((pbi->mt_yabove_row[mb_row +1] + 32 + mb_col*16), (xd->dst.y_buffer + 15 * recon_y_stride), 16);
@@ -903,7 +907,7 @@ void vp8mt_decode_mb_rows( VP8D_COMP *pbi, MACROBLOCKD *xd)
vpx_memcpy((pbi->mt_vabove_row[mb_row +1] + 16 + mb_col*8), (xd->dst.v_buffer + 7 * recon_uv_stride), 8);
}
- //save left_col for next MB decoding
+ /* save left_col for next MB decoding */
if(mb_col != pc->mb_cols-1)
{
MODE_INFO *next = xd->mode_info_context +1;
@@ -920,7 +924,7 @@ void vp8mt_decode_mb_rows( VP8D_COMP *pbi, MACROBLOCKD *xd)
}
}
- // loopfilter on this macroblock.
+ /* loopfilter on this macroblock. */
if (filter_level)
{
if (mb_col > 0)
@@ -929,7 +933,7 @@ void vp8mt_decode_mb_rows( VP8D_COMP *pbi, MACROBLOCKD *xd)
if (xd->mode_info_context->mbmi.dc_diff > 0)
pc->lf_bv(xd->dst.y_buffer, xd->dst.u_buffer, xd->dst.v_buffer, recon_y_stride, recon_uv_stride, &lfi[filter_level], pc->simpler_lpf);
- // don't apply across umv border
+ /* don't apply across umv border */
if (mb_row > 0)
pc->lf_mbh(xd->dst.y_buffer, xd->dst.u_buffer, xd->dst.v_buffer, recon_y_stride, recon_uv_stride, &lfi[filter_level], pc->simpler_lpf);
@@ -948,7 +952,7 @@ void vp8mt_decode_mb_rows( VP8D_COMP *pbi, MACROBLOCKD *xd)
pbi->mt_current_mb_col[mb_row] = mb_col;
}
- // adjust to the next row of mbs
+ /* adjust to the next row of mbs */
if (pbi->common.filter_level)
{
if(mb_row != pc->mb_rows-1)
@@ -971,7 +975,7 @@ void vp8mt_decode_mb_rows( VP8D_COMP *pbi, MACROBLOCKD *xd)
xd->mode_info_context += xd->mode_info_stride * pbi->decoding_thread_count;
}
- sem_wait(&pbi->h_event_end_decoding); // add back for each frame
+ sem_wait(&pbi->h_event_end_decoding); /* add back for each frame */
#else
(void) pbi;
(void) xd;
diff --git a/vp8/encoder/firstpass.c b/vp8/encoder/firstpass.c
index 691aee0a6..8a94fa369 100644
--- a/vp8/encoder/firstpass.c
+++ b/vp8/encoder/firstpass.c
@@ -291,7 +291,7 @@ void vp8_output_stats(const VP8_COMP *cpi,
fpfile = fopen("fpmotionmap.stt", "a");
- fwrite(cpi->fp_motion_map, 1, cpi->common.MBs, fpfile);
+ if(fwrite(cpi->fp_motion_map, 1, cpi->common.MBs, fpfile));
fclose(fpfile);
}
#endif
@@ -879,7 +879,7 @@ void vp8_first_pass(VP8_COMP *cpi)
else
recon_file = fopen(filename, "ab");
- fwrite(lst_yv12->buffer_alloc, lst_yv12->frame_size, 1, recon_file);
+ if(fwrite(lst_yv12->buffer_alloc, lst_yv12->frame_size, 1, recon_file));
fclose(recon_file);
}
@@ -2586,7 +2586,7 @@ void vp8_find_next_key_frame(VP8_COMP *cpi, FIRSTPASS_STATS *this_frame)
if (0)
{
FILE *f = fopen("Subsamle.stt", "a");
- fprintf(f, " %8d %8d %8d %8d %12.0f %8d %8d %8d\n", cpi->common.current_video_frame, kf_q, cpi->common.horiz_scale, cpi->common.vert_scale, kf_group_err / cpi->frames_to_key, cpi->kf_group_bits / cpi->frames_to_key, new_height, new_width);
+ fprintf(f, " %8d %8d %8d %8d %12.0f %8d %8d %8d\n", cpi->common.current_video_frame, kf_q, cpi->common.horiz_scale, cpi->common.vert_scale, kf_group_err / cpi->frames_to_key, (int)(cpi->kf_group_bits / cpi->frames_to_key), new_height, new_width);
fclose(f);
}
@@ -2644,7 +2644,7 @@ void vp8_find_next_key_frame(VP8_COMP *cpi, FIRSTPASS_STATS *this_frame)
if (0)
{
FILE *f = fopen("Subsamle.stt", "a");
- fprintf(f, "******** %8d %8d %8d %12.0f %8d %8d %8d\n", kf_q, cpi->common.horiz_scale, cpi->common.vert_scale, kf_group_err / cpi->frames_to_key, cpi->kf_group_bits / cpi->frames_to_key, new_height, new_width);
+ fprintf(f, "******** %8d %8d %8d %12.0f %8d %8d %8d\n", kf_q, cpi->common.horiz_scale, cpi->common.vert_scale, kf_group_err / cpi->frames_to_key, (int)(cpi->kf_group_bits / cpi->frames_to_key), new_height, new_width);
fclose(f);
}
}
diff --git a/vp8/vp8_dx_iface.c b/vp8/vp8_dx_iface.c
index f19cb9a30..a85cad1b4 100644
--- a/vp8/vp8_dx_iface.c
+++ b/vp8/vp8_dx_iface.c
@@ -41,7 +41,7 @@ typedef enum
VP8_SEG_ALG_PRIV = 256,
VP8_SEG_MAX
} mem_seg_id_t;
-#define NELEMENTS(x) (sizeof(x)/sizeof(x[0]))
+#define NELEMENTS(x) ((int)(sizeof(x)/sizeof(x[0])))
static unsigned long vp8_priv_sz(const vpx_codec_dec_cfg_t *si, vpx_codec_flags_t);
@@ -170,7 +170,7 @@ static void vp8_init_ctx(vpx_codec_ctx_t *ctx, const vpx_codec_mmap_t *mmap)
}
}
-static void *mmap_lkup(vpx_codec_alg_priv_t *ctx, int id)
+static void *mmap_lkup(vpx_codec_alg_priv_t *ctx, unsigned int id)
{
int i;
@@ -269,14 +269,14 @@ static vpx_codec_err_t vp8_peek_si(const uint8_t *data,
const uint8_t *c = data + 3;
si->is_kf = 1;
- // vet via sync code
+ /* vet via sync code */
if (c[0] != 0x9d || c[1] != 0x01 || c[2] != 0x2a)
res = VPX_CODEC_UNSUP_BITSTREAM;
si->w = swap2(*(const unsigned short *)(c + 3)) & 0x3fff;
si->h = swap2(*(const unsigned short *)(c + 5)) & 0x3fff;
- //printf("w=%d, h=%d\n", si->w, si->h);
+ /*printf("w=%d, h=%d\n", si->w, si->h);*/
if (!(si->h | si->w))
res = VPX_CODEC_UNSUP_BITSTREAM;
}
@@ -670,7 +670,14 @@ CODEC_INTERFACE(vpx_codec_vp8_dx) =
vp8_decode, /* vpx_codec_decode_fn_t decode; */
vp8_get_frame, /* vpx_codec_frame_get_fn_t frame_get; */
},
- {NOT_IMPLEMENTED} /* encoder functions */
+ { /* encoder functions */
+ NOT_IMPLEMENTED,
+ NOT_IMPLEMENTED,
+ NOT_IMPLEMENTED,
+ NOT_IMPLEMENTED,
+ NOT_IMPLEMENTED,
+ NOT_IMPLEMENTED
+ }
};
/*
@@ -693,5 +700,12 @@ vpx_codec_iface_t vpx_codec_vp8_algo =
vp8_decode, /* vpx_codec_decode_fn_t decode; */
vp8_get_frame, /* vpx_codec_frame_get_fn_t frame_get; */
},
- {NOT_IMPLEMENTED} /* encoder functions */
+ { /* encoder functions */
+ NOT_IMPLEMENTED,
+ NOT_IMPLEMENTED,
+ NOT_IMPLEMENTED,
+ NOT_IMPLEMENTED,
+ NOT_IMPLEMENTED,
+ NOT_IMPLEMENTED
+ }
};