Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
Guillaume Martres
aom-rav1e
Commits
def6bc76
Commit
def6bc76
authored
Jun 07, 2013
by
Ronald S. Bultje
Committed by
Gerrit Code Review
Jun 07, 2013
Browse files
Merge "Revert "Align frame size to 8 instead of 16."" into experimental
parents
576c2bb0
e7d306aa
Changes
3
Hide whitespace changes
Inline
Side-by-side
vp9/common/vp9_alloccommon.c
View file @
def6bc76
...
...
@@ -68,8 +68,8 @@ void vp9_free_frame_buffers(VP9_COMMON *oci) {
}
static
void
set_mb_mi
(
VP9_COMMON
*
cm
,
int
aligned_width
,
int
aligned_height
)
{
cm
->
mb_cols
=
(
aligned_width
+
8
)
>>
4
;
cm
->
mb_rows
=
(
aligned_height
+
8
)
>>
4
;
cm
->
mb_cols
=
aligned_width
>>
4
;
cm
->
mb_rows
=
aligned_height
>>
4
;
cm
->
MBs
=
cm
->
mb_rows
*
cm
->
mb_cols
;
cm
->
mi_cols
=
aligned_width
>>
LOG2_MI_SIZE
;
...
...
@@ -95,8 +95,8 @@ int vp9_alloc_frame_buffers(VP9_COMMON *oci, int width, int height) {
int
i
,
mi_cols
;
// Our internal buffers are always multiples of 16
const
int
aligned_width
=
multiple
8
(
width
);
const
int
aligned_height
=
multiple
8
(
height
);
const
int
aligned_width
=
multiple
16
(
width
);
const
int
aligned_height
=
multiple
16
(
height
);
const
int
ss_x
=
oci
->
subsampling_x
;
const
int
ss_y
=
oci
->
subsampling_y
;
...
...
@@ -223,8 +223,8 @@ void vp9_initialize_common() {
}
void
vp9_update_frame_size
(
VP9_COMMON
*
cm
)
{
const
int
aligned_width
=
multiple
8
(
cm
->
width
);
const
int
aligned_height
=
multiple
8
(
cm
->
height
);
const
int
aligned_width
=
multiple
16
(
cm
->
width
);
const
int
aligned_height
=
multiple
16
(
cm
->
height
);
set_mb_mi
(
cm
,
aligned_width
,
aligned_height
);
setup_mi
(
cm
);
...
...
vp9/common/vp9_common.h
View file @
def6bc76
...
...
@@ -56,8 +56,8 @@ static INLINE double fclamp(double value, double low, double high) {
return
value
<
low
?
low
:
(
value
>
high
?
high
:
value
);
}
static
INLINE
int
multiple
8
(
int
value
)
{
return
(
value
+
7
)
&
~
7
;
static
INLINE
int
multiple
16
(
int
value
)
{
return
(
value
+
15
)
&
~
15
;
}
#define SYNC_CODE_0 0x49
...
...
vp9/vp9_iface_common.h
View file @
def6bc76
...
...
@@ -29,7 +29,7 @@ static void yuvconfig2image(vpx_image_t *img, const YV12_BUFFER_CONFIG *yv12,
img
->
fmt
=
VPX_IMG_FMT_I420
;
}
img
->
w
=
yv12
->
y_stride
;
img
->
h
=
multiple
8
(
yv12
->
y_height
+
2
*
VP9BORDERINPIXELS
);
img
->
h
=
multiple
16
(
yv12
->
y_height
+
2
*
VP9BORDERINPIXELS
);
img
->
d_w
=
yv12
->
y_crop_width
;
img
->
d_h
=
yv12
->
y_crop_height
;
img
->
x_chroma_shift
=
yv12
->
uv_width
<
yv12
->
y_width
;
...
...
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