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
4f5d9bce
Commit
4f5d9bce
authored
Jun 06, 2010
by
saintdev
Committed by
Fiona Glaser
Jun 09, 2010
Browse files
Deduplicate the ALIGN macro, move it to common.h
parent
e02e3eb5
Changes
3
Hide whitespace changes
Inline
Side-by-side
common/common.h
View file @
4f5d9bce
...
...
@@ -36,6 +36,7 @@
#define XCHG(type,a,b) do{ type t = a; a = b; b = t; } while(0)
#define IS_DISPOSABLE(type) ( type == X264_TYPE_B )
#define FIX8(f) ((int)(f*(1<<8)+.5))
#define ALIGN(x,a) (((x)+((a)-1))&~((a)-1))
#define CHECKED_MALLOC( var, size )\
do {\
...
...
common/frame.c
View file @
4f5d9bce
...
...
@@ -24,8 +24,6 @@
#include
"common.h"
#define ALIGN(x,a) (((x)+((a)-1))&~((a)-1))
x264_frame_t
*
x264_frame_new
(
x264_t
*
h
,
int
b_fdec
)
{
x264_frame_t
*
frame
;
...
...
common/macroblock.c
View file @
4f5d9bce
...
...
@@ -257,7 +257,6 @@ int x264_macroblock_cache_allocate( x264_t *h )
if
(
h
->
param
.
analyse
.
i_weighted_pred
)
{
int
i_padv
=
PADV
<<
h
->
param
.
b_interlaced
;
#define ALIGN(x,a) (((x)+((a)-1))&~((a)-1))
int
align
=
h
->
param
.
cpu
&
X264_CPU_CACHELINE_64
?
64
:
h
->
param
.
cpu
&
X264_CPU_CACHELINE_32
?
32
:
16
;
int
i_stride
,
luma_plane_size
=
0
;
int
numweightbuf
;
...
...
@@ -291,7 +290,6 @@ int x264_macroblock_cache_allocate( x264_t *h )
for
(
int
i
=
0
;
i
<
numweightbuf
;
i
++
)
CHECKED_MALLOC
(
h
->
mb
.
p_weight_buf
[
i
],
luma_plane_size
*
sizeof
(
pixel
)
);
#undef ALIGN
}
return
0
;
...
...
Write
Preview
Supports
Markdown
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