Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
What's new
7
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Open sidebar
Xiph.Org
aom-rav1e
Commits
300d428e
Commit
300d428e
authored
Mar 26, 2015
by
Adrian Grange
Committed by
Gerrit Code Review
Mar 26, 2015
Browse files
Options
Browse Files
Download
Plain Diff
Merge "Replace heap with stack memory allocation"
parents
99311109
65df3d13
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
8 additions
and
20 deletions
+8
-20
vp9/encoder/vp9_rdopt.c
vp9/encoder/vp9_rdopt.c
+8
-20
No files found.
vp9/encoder/vp9_rdopt.c
View file @
300d428e
...
...
@@ -1549,13 +1549,6 @@ static void joint_motion_search(VP9_COMP *cpi, MACROBLOCK *x,
mbmi
->
ref_frame
[
1
]
<
0
?
0
:
mbmi
->
ref_frame
[
1
]};
int_mv
ref_mv
[
2
];
int
ite
,
ref
;
// Prediction buffer from second frame.
#if CONFIG_VP9_HIGHBITDEPTH
uint8_t
*
second_pred
;
uint8_t
*
second_pred_alloc
;
#else
uint8_t
*
second_pred
=
vpx_memalign
(
16
,
pw
*
ph
*
sizeof
(
uint8_t
));
#endif // CONFIG_VP9_HIGHBITDEPTH
const
InterpKernel
*
kernel
=
vp9_get_interp_kernel
(
mbmi
->
interp_filter
);
struct
scale_factors
sf
;
...
...
@@ -1566,14 +1559,13 @@ static void joint_motion_search(VP9_COMP *cpi, MACROBLOCK *x,
vp9_get_scaled_ref_frame
(
cpi
,
mbmi
->
ref_frame
[
0
]),
vp9_get_scaled_ref_frame
(
cpi
,
mbmi
->
ref_frame
[
1
])
};
// Prediction buffer from second frame.
#if CONFIG_VP9_HIGHBITDEPTH
if
(
xd
->
cur_buf
->
flags
&
YV12_FLAG_HIGHBITDEPTH
)
{
second_pred_alloc
=
vpx_memalign
(
16
,
pw
*
ph
*
sizeof
(
uint16_t
));
second_pred
=
CONVERT_TO_BYTEPTR
(
second_pred_alloc
);
}
else
{
second_pred_alloc
=
vpx_memalign
(
16
,
pw
*
ph
*
sizeof
(
uint8_t
));
second_pred
=
second_pred_alloc
;
}
DECLARE_ALIGNED_ARRAY
(
16
,
uint16_t
,
second_pred_alloc_16
,
64
*
64
);
uint8_t
*
second_pred
;
#else
DECLARE_ALIGNED_ARRAY
(
16
,
uint8_t
,
second_pred
,
64
*
64
);
#endif // CONFIG_VP9_HIGHBITDEPTH
for
(
ref
=
0
;
ref
<
2
;
++
ref
)
{
...
...
@@ -1628,6 +1620,7 @@ static void joint_motion_search(VP9_COMP *cpi, MACROBLOCK *x,
// Get the prediction block from the 'other' reference frame.
#if CONFIG_VP9_HIGHBITDEPTH
if
(
xd
->
cur_buf
->
flags
&
YV12_FLAG_HIGHBITDEPTH
)
{
second_pred
=
CONVERT_TO_BYTEPTR
(
second_pred_alloc_16
);
vp9_highbd_build_inter_predictor
(
ref_yv12
[
!
id
].
buf
,
ref_yv12
[
!
id
].
stride
,
second_pred
,
pw
,
...
...
@@ -1637,6 +1630,7 @@ static void joint_motion_search(VP9_COMP *cpi, MACROBLOCK *x,
mi_col
*
MI_SIZE
,
mi_row
*
MI_SIZE
,
xd
->
bd
);
}
else
{
second_pred
=
(
uint8_t
*
)
second_pred_alloc_16
;
vp9_build_inter_predictor
(
ref_yv12
[
!
id
].
buf
,
ref_yv12
[
!
id
].
stride
,
second_pred
,
pw
,
...
...
@@ -1722,12 +1716,6 @@ static void joint_motion_search(VP9_COMP *cpi, MACROBLOCK *x,
&
mbmi
->
ref_mvs
[
refs
[
ref
]][
0
].
as_mv
,
x
->
nmvjointcost
,
x
->
mvcost
,
MV_COST_WEIGHT
);
}
#if CONFIG_VP9_HIGHBITDEPTH
vpx_free
(
second_pred_alloc
);
#else
vpx_free
(
second_pred
);
#endif // CONFIG_VP9_HIGHBITDEPTH
}
static
int64_t
rd_pick_best_sub8x8_mode
(
VP9_COMP
*
cpi
,
MACROBLOCK
*
x
,
...
...
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