Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
Menu
Open sidebar
VideoLAN
x264
Commits
20e8982e
Commit
20e8982e
authored
Aug 21, 2008
by
Loic Le Loarer
Committed by
Loren Merritt
Aug 21, 2008
Browse files
shut up various gcc warnings
parent
782740d5
Changes
18
Hide whitespace changes
Inline
Side-by-side
common/frame.c
View file @
20e8982e
...
...
@@ -297,7 +297,7 @@ void x264_frame_expand_border_mod16( x264_t *h, x264_frame_t *frame )
/* cavlc + 8x8 transform stores nnz per 16 coeffs for the purpose of
* entropy coding, but per 64 coeffs for the purpose of deblocking */
void
munge_cavlc_nnz_row
(
x264_t
*
h
,
int
mb_y
,
uint8_t
(
*
buf
)[
16
]
)
static
void
munge_cavlc_nnz_row
(
x264_t
*
h
,
int
mb_y
,
uint8_t
(
*
buf
)[
16
]
)
{
uint32_t
(
*
src
)[
6
]
=
(
uint32_t
(
*
)[
6
])
h
->
mb
.
non_zero_count
+
mb_y
*
h
->
sps
->
i_mb_width
;
int8_t
*
transform
=
h
->
mb
.
mb_transform_size
+
mb_y
*
h
->
sps
->
i_mb_width
;
...
...
@@ -770,12 +770,12 @@ void x264_deblock_v8_luma_mmxext( uint8_t *pix, int stride, int alpha, int beta,
void
x264_deblock_h_luma_intra_mmxext
(
uint8_t
*
pix
,
int
stride
,
int
alpha
,
int
beta
);
void
x264_deblock_v8_luma_intra_mmxext
(
uint8_t
*
pix
,
int
stride
,
int
alpha
,
int
beta
);
void
x264_deblock_v_luma_mmxext
(
uint8_t
*
pix
,
int
stride
,
int
alpha
,
int
beta
,
int8_t
*
tc0
)
static
void
x264_deblock_v_luma_mmxext
(
uint8_t
*
pix
,
int
stride
,
int
alpha
,
int
beta
,
int8_t
*
tc0
)
{
x264_deblock_v8_luma_mmxext
(
pix
,
stride
,
alpha
,
beta
,
tc0
);
x264_deblock_v8_luma_mmxext
(
pix
+
8
,
stride
,
alpha
,
beta
,
tc0
+
2
);
}
void
x264_deblock_v_luma_intra_mmxext
(
uint8_t
*
pix
,
int
stride
,
int
alpha
,
int
beta
)
static
void
x264_deblock_v_luma_intra_mmxext
(
uint8_t
*
pix
,
int
stride
,
int
alpha
,
int
beta
)
{
x264_deblock_v8_luma_intra_mmxext
(
pix
,
stride
,
alpha
,
beta
);
x264_deblock_v8_luma_intra_mmxext
(
pix
+
8
,
stride
,
alpha
,
beta
);
...
...
common/mdate.c
View file @
20e8982e
...
...
@@ -26,6 +26,7 @@
#endif
#include <time.h>
#include "common.h"
#include "osdep.h"
int64_t
x264_mdate
(
void
)
...
...
common/quant.c
View file @
20e8982e
...
...
@@ -194,7 +194,7 @@ void x264_mb_dequant_4x4_dc( int16_t dct[4][4], int dequant_mf[6][4][4], int i_q
}
}
void
x264_denoise_dct
(
int16_t
*
dct
,
uint32_t
*
sum
,
uint16_t
*
offset
,
int
size
)
static
void
x264_denoise_dct
(
int16_t
*
dct
,
uint32_t
*
sum
,
uint16_t
*
offset
,
int
size
)
{
int
i
;
for
(
i
=
1
;
i
<
size
;
i
++
)
...
...
common/set.c
View file @
20e8982e
...
...
@@ -195,7 +195,7 @@ void x264_cqm_delete( x264_t *h )
}
}
int
x264_cqm_parse_jmlist
(
x264_t
*
h
,
const
char
*
buf
,
const
char
*
name
,
static
int
x264_cqm_parse_jmlist
(
x264_t
*
h
,
const
char
*
buf
,
const
char
*
name
,
uint8_t
*
cqm
,
const
uint8_t
*
jvt
,
int
length
)
{
char
*
p
;
...
...
common/x86/mc-c.c
View file @
20e8982e
...
...
@@ -27,6 +27,7 @@
#include <string.h>
#include "common/common.h"
#include "mc.h"
/* NASM functions */
extern
void
x264_pixel_avg_16x16_sse2
(
uint8_t
*
,
int
,
uint8_t
*
,
int
);
...
...
@@ -87,7 +88,7 @@ PIXEL_AVG_WALL(cache64_sse2)
PIXEL_AVG_WALL
(
sse2
)
#define AVG_WEIGHT(W,H,name) \
void x264_pixel_avg_weight_ ## W ## x ## H ## _##name( uint8_t *dst, int i_dst, uint8_t *src, int i_src, int i_weight_dst ) \
static
void x264_pixel_avg_weight_ ## W ## x ## H ## _##name( uint8_t *dst, int i_dst, uint8_t *src, int i_src, int i_weight_dst ) \
{ \
x264_pixel_avg_weight_w ## W ## _##name( dst, i_dst, src, i_src, i_weight_dst, H ); \
}
...
...
@@ -143,7 +144,7 @@ static const int hpel_ref0[16] = {0,1,1,1,0,1,1,1,2,3,3,3,0,1,1,1};
static
const
int
hpel_ref1
[
16
]
=
{
0
,
0
,
0
,
0
,
2
,
2
,
3
,
2
,
2
,
2
,
3
,
2
,
2
,
2
,
3
,
2
};
#define MC_LUMA(name,instr1,instr2)\
void mc_luma_##name( uint8_t *dst, int i_dst_stride,\
static
void mc_luma_##name( uint8_t *dst, int i_dst_stride,\
uint8_t *src[4], int i_src_stride,\
int mvx, int mvy,\
int i_width, int i_height )\
...
...
@@ -174,7 +175,7 @@ MC_LUMA(sse2,sse2,sse2)
MC_LUMA
(
cache64_sse2
,
cache64_sse2
,
sse2
)
#define GET_REF(name)\
uint8_t *get_ref_##name( uint8_t *dst, int *i_dst_stride,\
static
uint8_t *get_ref_##name( uint8_t *dst, int *i_dst_stride,\
uint8_t *src[4], int i_src_stride,\
int mvx, int mvy,\
int i_width, int i_height )\
...
...
@@ -210,7 +211,7 @@ void x264_hpel_filter_v_##cpuv( uint8_t *dst, uint8_t *src, int16_t *buf, int st
void x264_hpel_filter_c_##cpuc( uint8_t *dst, int16_t *buf, int width );\
void x264_hpel_filter_h_##cpuh( uint8_t *dst, uint8_t *src, int width );\
void x264_sfence( void );\
void x264_hpel_filter_##cpu( uint8_t *dsth, uint8_t *dstv, uint8_t *dstc, uint8_t *src,\
static
void x264_hpel_filter_##cpu( uint8_t *dsth, uint8_t *dstv, uint8_t *dstc, uint8_t *src,\
int stride, int width, int height )\
{\
int16_t *buf;\
...
...
common/x86/mc.h
View file @
20e8982e
...
...
@@ -26,7 +26,4 @@
void
x264_mc_init_mmx
(
int
cpu
,
x264_mc_functions_t
*
pf
);
void
x264_mc_chroma_mmxext
(
uint8_t
*
src
,
int
i_src_stride
,
uint8_t
*
dst
,
int
i_dst_stride
,
int
dx
,
int
dy
,
int
i_width
,
int
i_height
);
#endif
encoder/cabac.c
View file @
20e8982e
...
...
@@ -1032,7 +1032,7 @@ void x264_macroblock_write_cabac( x264_t *h, x264_cabac_t *cb )
* works on all partition sizes except 16x16
* for sub8x8, call once per 8x8 block
*****************************************************************************/
void
x264_partition_size_cabac
(
x264_t
*
h
,
x264_cabac_t
*
cb
,
int
i8
,
int
i_pixel
)
static
void
x264_partition_size_cabac
(
x264_t
*
h
,
x264_cabac_t
*
cb
,
int
i8
,
int
i_pixel
)
{
const
int
i_mb_type
=
h
->
mb
.
i_type
;
int
j
;
...
...
encoder/cavlc.c
View file @
20e8982e
...
...
@@ -680,7 +680,7 @@ void x264_macroblock_write_cavlc( x264_t *h, bs_t *s )
* works on all partition sizes except 16x16
* for sub8x8, call once per 8x8 block
*****************************************************************************/
int
x264_partition_size_cavlc
(
x264_t
*
h
,
int
i8
,
int
i_pixel
)
static
int
x264_partition_size_cavlc
(
x264_t
*
h
,
int
i8
,
int
i_pixel
)
{
bs_t
s
;
const
int
i_mb_type
=
h
->
mb
.
i_type
;
...
...
encoder/macroblock.c
View file @
20e8982e
...
...
@@ -289,7 +289,7 @@ static void x264_macroblock_encode_skip( x264_t *h )
* x264_macroblock_encode_pskip:
* Encode an already marked skip block
*****************************************************************************/
void
x264_macroblock_encode_pskip
(
x264_t
*
h
)
static
void
x264_macroblock_encode_pskip
(
x264_t
*
h
)
{
const
int
mvx
=
x264_clip3
(
h
->
mb
.
cache
.
mv
[
0
][
x264_scan8
[
0
]][
0
],
h
->
mb
.
mv_min
[
0
],
h
->
mb
.
mv_max
[
0
]
);
...
...
encoder/macroblock.h
View file @
20e8982e
...
...
@@ -29,7 +29,7 @@
extern
const
int
x264_lambda2_tab
[
52
];
extern
const
int
x264_lambda_tab
[
52
];
void
x264_rdo_init
(
);
void
x264_rdo_init
(
void
);
int
x264_macroblock_probe_skip
(
x264_t
*
h
,
int
b_bidir
);
...
...
encoder/ratecontrol.c
View file @
20e8982e
...
...
@@ -149,7 +149,6 @@ static void update_vbv( x264_t *h, int bits );
static
void
update_vbv_plan
(
x264_t
*
h
);
static
double
predict_size
(
predictor_t
*
p
,
double
q
,
double
var
);
static
void
update_predictor
(
predictor_t
*
p
,
double
q
,
double
var
,
double
bits
);
int
x264_rc_analyse_slice
(
x264_t
*
h
);
/* Terminology:
* qp = h.264's quantizer
...
...
@@ -212,7 +211,7 @@ static NOINLINE int ac_energy_mb( x264_t *h, int mb_x, int mb_y, int *satd )
return
var
;
}
void
x264_autosense_aq
(
x264_t
*
h
)
static
void
x264_autosense_aq
(
x264_t
*
h
)
{
double
total
=
0
;
double
n
=
0
;
...
...
@@ -671,7 +670,7 @@ static int parse_zones( x264_t *h )
return
0
;
}
x264_zone_t
*
get_zone
(
x264_t
*
h
,
int
frame_num
)
static
x264_zone_t
*
get_zone
(
x264_t
*
h
,
int
frame_num
)
{
int
i
;
for
(
i
=
h
->
rc
->
i_zones
-
1
;
i
>=
0
;
i
--
)
...
...
@@ -858,7 +857,7 @@ void x264_ratecontrol_start( x264_t *h, int i_force_qp )
x264_autosense_aq
(
h
);
}
double
predict_row_size
(
x264_t
*
h
,
int
y
,
int
qp
)
static
double
predict_row_size
(
x264_t
*
h
,
int
y
,
int
qp
)
{
/* average between two predictors:
* absolute SATD, and scaled bit cost of the colocated row in the previous frame */
...
...
@@ -878,7 +877,7 @@ double predict_row_size( x264_t *h, int y, int qp )
return
(
pred_s
+
pred_t
)
/
2
;
}
double
row_bits_so_far
(
x264_t
*
h
,
int
y
)
static
double
row_bits_so_far
(
x264_t
*
h
,
int
y
)
{
int
i
;
double
bits
=
0
;
...
...
@@ -887,7 +886,7 @@ double row_bits_so_far( x264_t *h, int y )
return
bits
;
}
double
predict_row_size_sum
(
x264_t
*
h
,
int
y
,
int
qp
)
static
double
predict_row_size_sum
(
x264_t
*
h
,
int
y
,
int
qp
)
{
int
i
;
double
bits
=
row_bits_so_far
(
h
,
y
);
...
...
encoder/ratecontrol.h
View file @
20e8982e
...
...
@@ -37,6 +37,7 @@ void x264_ratecontrol_summary( x264_t * );
void
x264_adaptive_quant
(
x264_t
*
);
void
x264_ratecontrol_set_estimated_size
(
x264_t
*
,
int
bits
);
int
x264_ratecontrol_get_estimated_size
(
x264_t
const
*
);
int
x264_rc_analyse_slice
(
x264_t
*
h
);
#endif
encoder/rdo.c
View file @
20e8982e
...
...
@@ -34,7 +34,7 @@ static uint16_t cabac_prefix_size[15][128];
#define bs_write_ue(s,v) ((s)->i_bits_encoded += bs_size_ue(v))
#define bs_write_se(s,v) ((s)->i_bits_encoded += bs_size_se(v))
#define bs_write_te(s,v,l) ((s)->i_bits_encoded += bs_size_te(v,l))
#define x264_macroblock_write_cavlc x264_macroblock_size_cavlc
#define x264_macroblock_write_cavlc
static
x264_macroblock_size_cavlc
#include "cavlc.c"
/* CABAC: not exactly the same. x264_cabac_size_decision() keeps track of
...
...
@@ -45,7 +45,7 @@ static uint16_t cabac_prefix_size[15][128];
#define x264_cabac_encode_bypass(c,v) ((c)->f8_bits_encoded += 256)
#define x264_cabac_encode_ue_bypass(c,e,v) ((c)->f8_bits_encoded += (bs_size_ue_big(v+(1<<e)-1)-e)<<8)
#define x264_cabac_encode_flush(h,c)
#define x264_macroblock_write_cabac x264_macroblock_size_cabac
#define x264_macroblock_write_cabac
static
x264_macroblock_size_cabac
#include "cabac.c"
#define COPY_CABAC h->mc.memcpy_aligned( &cabac_tmp.f8_bits_encoded, &h->cabac.f8_bits_encoded, \
...
...
@@ -140,7 +140,7 @@ uint64_t x264_rd_cost_part( x264_t *h, int i_lambda2, int i8, int i_pixel )
return
(
i_ssd
<<
8
)
+
i_bits
;
}
uint64_t
x264_rd_cost_i8x8
(
x264_t
*
h
,
int
i_lambda2
,
int
i8
,
int
i_mode
)
static
uint64_t
x264_rd_cost_i8x8
(
x264_t
*
h
,
int
i_lambda2
,
int
i8
,
int
i_mode
)
{
uint64_t
i_ssd
,
i_bits
;
...
...
@@ -162,7 +162,7 @@ uint64_t x264_rd_cost_i8x8( x264_t *h, int i_lambda2, int i8, int i_mode )
return
(
i_ssd
<<
8
)
+
i_bits
;
}
uint64_t
x264_rd_cost_i4x4
(
x264_t
*
h
,
int
i_lambda2
,
int
i4
,
int
i_mode
)
static
uint64_t
x264_rd_cost_i4x4
(
x264_t
*
h
,
int
i_lambda2
,
int
i4
,
int
i_mode
)
{
uint64_t
i_ssd
,
i_bits
;
...
...
@@ -184,7 +184,7 @@ uint64_t x264_rd_cost_i4x4( x264_t *h, int i_lambda2, int i4, int i_mode )
return
(
i_ssd
<<
8
)
+
i_bits
;
}
uint64_t
x264_rd_cost_i8x8_chroma
(
x264_t
*
h
,
int
i_lambda2
,
int
i_mode
,
int
b_dct
)
static
uint64_t
x264_rd_cost_i8x8_chroma
(
x264_t
*
h
,
int
i_lambda2
,
int
i_mode
,
int
b_dct
)
{
uint64_t
i_ssd
,
i_bits
;
...
...
@@ -219,7 +219,7 @@ uint64_t x264_rd_cost_i8x8_chroma( x264_t *h, int i_lambda2, int i_mode, int b_d
#define LAMBDA_BITS 4
/* precalculate the cost of coding abs_level_m1 */
void
x264_rdo_init
(
)
void
x264_rdo_init
(
void
)
{
int
i_prefix
;
int
i_ctx
;
...
...
encoder/set.c
View file @
20e8982e
...
...
@@ -27,6 +27,7 @@
#ifndef _MSC_VER
#include "config.h"
#endif
#include "set.h"
#define bs_write_ue bs_write_ue_big
...
...
encoder/slicetype.c
View file @
20e8982e
...
...
@@ -37,7 +37,7 @@ static void x264_lowres_context_init( x264_t *h, x264_mb_analysis_t *a )
h
->
mb
.
b_chroma_me
=
0
;
}
int
x264_slicetype_mb_cost
(
x264_t
*
h
,
x264_mb_analysis_t
*
a
,
static
int
x264_slicetype_mb_cost
(
x264_t
*
h
,
x264_mb_analysis_t
*
a
,
x264_frame_t
**
frames
,
int
p0
,
int
p1
,
int
b
,
int
dist_scale_factor
)
{
...
...
@@ -238,7 +238,7 @@ lowres_intra_mb:
#undef TRY_BIDIR
#undef SAVE_MVS
int
x264_slicetype_frame_cost
(
x264_t
*
h
,
x264_mb_analysis_t
*
a
,
static
int
x264_slicetype_frame_cost
(
x264_t
*
h
,
x264_mb_analysis_t
*
a
,
x264_frame_t
**
frames
,
int
p0
,
int
p1
,
int
b
,
int
b_intra_penalty
)
{
...
...
@@ -353,7 +353,7 @@ static int scenecut( x264_t *h, x264_frame_t *frame, int pdist )
return
res
;
}
void
x264_slicetype_analyse
(
x264_t
*
h
)
static
void
x264_slicetype_analyse
(
x264_t
*
h
)
{
x264_mb_analysis_t
a
;
x264_frame_t
*
frames
[
X264_BFRAME_MAX
+
3
]
=
{
NULL
,
};
...
...
matroska.c
View file @
20e8982e
...
...
@@ -407,7 +407,7 @@ static int mk_closeCluster(mk_Writer *w) {
return
0
;
}
int
mk_flushFrame
(
mk_Writer
*
w
)
{
static
int
mk_flushFrame
(
mk_Writer
*
w
)
{
int64_t
delta
,
ref
=
0
;
unsigned
fsize
,
bgsize
;
unsigned
char
c_delta_flags
[
3
];
...
...
muxers.c
View file @
20e8982e
...
...
@@ -461,7 +461,7 @@ int get_frame_total_thread( hnd_t handle )
return
h
->
frame_total
;
}
void
read_frame_thread_int
(
thread_input_arg_t
*
i
)
static
void
read_frame_thread_int
(
thread_input_arg_t
*
i
)
{
i
->
status
=
i
->
h
->
p_read_frame
(
i
->
pic
,
i
->
h
->
p_handle
,
i
->
i_frame
);
}
...
...
@@ -568,7 +568,7 @@ typedef struct
}
mp4_t
;
void
recompute_bitrate_mp4
(
GF_ISOFile
*
p_file
,
int
i_track
)
static
void
recompute_bitrate_mp4
(
GF_ISOFile
*
p_file
,
int
i_track
)
{
u32
i
,
count
,
di
,
timescale
,
time_wnd
,
rate
;
u64
offset
;
...
...
@@ -811,7 +811,7 @@ typedef struct
char
b_writing_frame
;
}
mkv_t
;
int
write_header_mkv
(
mkv_t
*
p_mkv
)
static
int
write_header_mkv
(
mkv_t
*
p_mkv
)
{
int
ret
;
uint8_t
*
avcC
;
...
...
tools/checkasm.c
View file @
20e8982e
...
...
@@ -100,12 +100,12 @@ static bench_t* get_bench( const char *name, int cpu )
return
&
benchs
[
i
].
vers
[
j
];
}
int
cmp_nop
(
const
void
*
a
,
const
void
*
b
)
static
int
cmp_nop
(
const
void
*
a
,
const
void
*
b
)
{
return
*
(
uint16_t
*
)
a
-
*
(
uint16_t
*
)
b
;
}
int
cmp_bench
(
const
void
*
a
,
const
void
*
b
)
static
int
cmp_bench
(
const
void
*
a
,
const
void
*
b
)
{
// asciibetical sort except preserving numbers
const
char
*
sa
=
((
bench_func_t
*
)
a
)
->
name
;
...
...
@@ -1199,7 +1199,7 @@ static int check_cabac( int cpu_ref, int cpu_new )
return
ret
;
}
int
check_all_funcs
(
int
cpu_ref
,
int
cpu_new
)
static
int
check_all_funcs
(
int
cpu_ref
,
int
cpu_new
)
{
return
check_pixel
(
cpu_ref
,
cpu_new
)
+
check_dct
(
cpu_ref
,
cpu_new
)
...
...
@@ -1210,7 +1210,7 @@ int check_all_funcs( int cpu_ref, int cpu_new )
+
check_cabac
(
cpu_ref
,
cpu_new
);
}
int
add_flags
(
int
*
cpu_ref
,
int
*
cpu_new
,
int
flags
,
const
char
*
name
)
static
int
add_flags
(
int
*
cpu_ref
,
int
*
cpu_new
,
int
flags
,
const
char
*
name
)
{
*
cpu_ref
=
*
cpu_new
;
*
cpu_new
|=
flags
;
...
...
@@ -1221,7 +1221,7 @@ int add_flags( int *cpu_ref, int *cpu_new, int flags, const char *name )
return
check_all_funcs
(
*
cpu_ref
,
*
cpu_new
);
}
int
check_all_flags
(
void
)
static
int
check_all_flags
(
void
)
{
int
ret
=
0
;
int
cpu0
=
0
,
cpu1
=
0
;
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment