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
Xiph.Org
aom-rav1e
Commits
347ad7ff
Commit
347ad7ff
authored
Apr 30, 2013
by
Dmitry Kovalev
Committed by
Gerrit Code Review
Apr 30, 2013
Browse files
Merge "Adding vp9_update_frame_size function." into experimental
parents
be9cf215
15b5e465
Changes
4
Hide whitespace changes
Inline
Side-by-side
vp9/common/vp9_alloccommon.c
View file @
347ad7ff
...
...
@@ -223,3 +223,28 @@ void vp9_initialize_common() {
vp9_entropy_mode_init
();
vp9_entropy_mv_init
();
}
void
vp9_update_frame_size
(
VP9_COMMON
*
cm
)
{
const
int
aligned_width
=
multiple16
(
cm
->
width
);
const
int
aligned_height
=
multiple16
(
cm
->
height
);
cm
->
mb_rows
=
aligned_height
>>
4
;
cm
->
mb_cols
=
aligned_width
>>
4
;
cm
->
mi_rows
=
aligned_height
>>
LOG2_MI_SIZE
;
cm
->
mi_cols
=
aligned_width
>>
LOG2_MI_SIZE
;
cm
->
MBs
=
cm
->
mb_rows
*
cm
->
mb_cols
;
cm
->
mode_info_stride
=
cm
->
mi_cols
+
1
;
cm
->
mi
=
cm
->
mip
+
cm
->
mode_info_stride
+
1
;
cm
->
prev_mi
=
cm
->
prev_mip
+
cm
->
mode_info_stride
+
1
;
memset
(
cm
->
mip
,
0
,
cm
->
mode_info_stride
*
(
cm
->
mi_rows
+
1
)
*
sizeof
(
MODE_INFO
));
vp9_update_mode_info_border
(
cm
,
cm
->
mip
);
vp9_update_mode_info_in_image
(
cm
,
cm
->
mi
);
vp9_update_mode_info_border
(
cm
,
cm
->
prev_mip
);
vp9_update_mode_info_in_image
(
cm
,
cm
->
prev_mi
);
}
vp9/common/vp9_alloccommon.h
View file @
347ad7ff
...
...
@@ -25,4 +25,6 @@ void vp9_free_frame_buffers(VP9_COMMON *oci);
void
vp9_setup_version
(
VP9_COMMON
*
oci
);
void
vp9_update_frame_size
(
VP9_COMMON
*
cm
);
#endif // VP9_COMMON_VP9_ALLOCCOMMON_H_
vp9/decoder/vp9_decodframe.c
View file @
347ad7ff
...
...
@@ -896,29 +896,6 @@ static void read_coef_probs(VP9D_COMP *pbi, vp9_reader *r) {
read_coef_probs_common
(
fc
->
coef_probs_32x32
,
TX_32X32
,
r
);
}
static
void
update_frame_size
(
VP9D_COMP
*
pbi
)
{
VP9_COMMON
*
cm
=
&
pbi
->
common
;
const
int
width
=
multiple16
(
cm
->
width
);
const
int
height
=
multiple16
(
cm
->
height
);
cm
->
mb_rows
=
height
/
16
;
cm
->
mi_rows
=
height
>>
LOG2_MI_SIZE
;
cm
->
mb_cols
=
width
/
16
;
cm
->
mi_cols
=
width
>>
LOG2_MI_SIZE
;
cm
->
MBs
=
cm
->
mb_rows
*
cm
->
mb_cols
;
cm
->
mode_info_stride
=
cm
->
mi_cols
+
1
;
memset
(
cm
->
mip
,
0
,
cm
->
mode_info_stride
*
(
cm
->
mi_rows
+
1
)
*
sizeof
(
MODE_INFO
));
vp9_update_mode_info_border
(
cm
,
cm
->
mip
);
vp9_update_mode_info_border
(
cm
,
cm
->
prev_mip
);
cm
->
mi
=
cm
->
mip
+
cm
->
mode_info_stride
+
1
;
cm
->
prev_mi
=
cm
->
prev_mip
+
cm
->
mode_info_stride
+
1
;
vp9_update_mode_info_in_image
(
cm
,
cm
->
mi
);
vp9_update_mode_info_in_image
(
cm
,
cm
->
prev_mi
);
}
static
void
setup_segmentation
(
VP9_COMMON
*
pc
,
MACROBLOCKD
*
xd
,
vp9_reader
*
r
)
{
int
i
,
j
;
...
...
@@ -1110,7 +1087,7 @@ static const uint8_t *setup_frame_size(VP9D_COMP *pbi, int scaling_active,
pc
->
display_width
=
scaling_active
?
display_width
:
width
;
pc
->
display_height
=
scaling_active
?
display_height
:
height
;
update_frame_size
(
p
bi
);
vp9_
update_frame_size
(
p
c
);
}
return
data
;
...
...
vp9/encoder/vp9_onyx_if.c
View file @
347ad7ff
...
...
@@ -982,22 +982,7 @@ void vp9_alloc_compressor_data(VP9_COMP *cpi) {
static
void
update_frame_size
(
VP9_COMP
*
cpi
)
{
VP9_COMMON
*
cm
=
&
cpi
->
common
;
const
int
aligned_width
=
multiple16
(
cm
->
width
);
const
int
aligned_height
=
multiple16
(
cm
->
height
);
cm
->
mb_rows
=
aligned_height
>>
4
;
cm
->
mi_rows
=
aligned_height
>>
LOG2_MI_SIZE
;
cm
->
mb_cols
=
aligned_width
>>
4
;
cm
->
mi_cols
=
aligned_width
>>
LOG2_MI_SIZE
;
cm
->
MBs
=
cm
->
mb_rows
*
cm
->
mb_cols
;
cm
->
mode_info_stride
=
cm
->
mi_cols
+
1
;
memset
(
cm
->
mip
,
0
,
cm
->
mode_info_stride
*
(
cm
->
mi_rows
+
1
)
*
sizeof
(
MODE_INFO
));
vp9_update_mode_info_border
(
cm
,
cm
->
mip
);
cm
->
mi
=
cm
->
mip
+
cm
->
mode_info_stride
+
1
;
cm
->
prev_mi
=
cm
->
prev_mip
+
cm
->
mode_info_stride
+
1
;
vp9_update_mode_info_in_image
(
cm
,
cm
->
mi
);
vp9_update_frame_size
(
cm
);
// Update size of buffers local to this frame
if
(
vp8_yv12_realloc_frame_buffer
(
&
cpi
->
last_frame_uf
,
...
...
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