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
4273a52c
Commit
4273a52c
authored
Jan 20, 2016
by
Yaowu Xu
Browse files
VP9->VPX in border pixel macros
Change-Id: Idaa885f5dfa5150328fdd3bda88e0e6b4323493e
parent
761a7088
Changes
10
Hide whitespace changes
Inline
Side-by-side
vp10/common/postproc.c
View file @
4273a52c
...
...
@@ -665,7 +665,7 @@ int vp10_post_proc_frame(struct VP10Common *cm,
#if CONFIG_VP9_HIGHBITDEPTH
cm
->
use_highbitdepth
,
#endif // CONFIG_VP9_HIGHBITDEPTH
VP
9
_ENC_BORDER_IN_PIXELS
,
VP
X
_ENC_BORDER_IN_PIXELS
,
cm
->
byte_alignment
)
<
0
)
{
vpx_internal_error
(
&
cm
->
error
,
VPX_CODEC_MEM_ERROR
,
"Failed to allocate MFQE framebuffer"
);
...
...
@@ -683,7 +683,7 @@ int vp10_post_proc_frame(struct VP10Common *cm,
#if CONFIG_VP9_HIGHBITDEPTH
cm
->
use_highbitdepth
,
#endif
VP
9
_DEC_BORDER_IN_PIXELS
,
cm
->
byte_alignment
,
VP
X
_DEC_BORDER_IN_PIXELS
,
cm
->
byte_alignment
,
NULL
,
NULL
,
NULL
)
<
0
)
vpx_internal_error
(
&
cm
->
error
,
VPX_CODEC_MEM_ERROR
,
"Failed to allocate post-processing buffer"
);
...
...
vp10/decoder/decodeframe.c
View file @
4273a52c
...
...
@@ -1245,7 +1245,7 @@ static void setup_frame_size(VP10_COMMON *cm, struct vpx_read_bit_buffer *rb) {
#if CONFIG_VP9_HIGHBITDEPTH
cm
->
use_highbitdepth
,
#endif
VP
9
_DEC_BORDER_IN_PIXELS
,
VP
X
_DEC_BORDER_IN_PIXELS
,
cm
->
byte_alignment
,
&
pool
->
frame_bufs
[
cm
->
new_fb_idx
].
raw_frame_buffer
,
pool
->
get_fb_cb
,
pool
->
cb_priv
))
{
...
...
@@ -1339,7 +1339,7 @@ static void setup_frame_size_with_refs(VP10_COMMON *cm,
#if CONFIG_VP9_HIGHBITDEPTH
cm
->
use_highbitdepth
,
#endif
VP
9
_DEC_BORDER_IN_PIXELS
,
VP
X
_DEC_BORDER_IN_PIXELS
,
cm
->
byte_alignment
,
&
pool
->
frame_bufs
[
cm
->
new_fb_idx
].
raw_frame_buffer
,
pool
->
get_fb_cb
,
pool
->
cb_priv
))
{
...
...
vp10/encoder/encoder.c
View file @
4273a52c
...
...
@@ -620,7 +620,7 @@ static void alloc_raw_frame_buffers(VP10_COMP *cpi) {
#if CONFIG_VP9_HIGHBITDEPTH
cm
->
use_highbitdepth
,
#endif
VP
9
_ENC_BORDER_IN_PIXELS
,
cm
->
byte_alignment
,
VP
X
_ENC_BORDER_IN_PIXELS
,
cm
->
byte_alignment
,
NULL
,
NULL
,
NULL
))
vpx_internal_error
(
&
cm
->
error
,
VPX_CODEC_MEM_ERROR
,
"Failed to allocate altref buffer"
);
...
...
@@ -634,7 +634,7 @@ static void alloc_util_frame_buffers(VP10_COMP *cpi) {
#if CONFIG_VP9_HIGHBITDEPTH
cm
->
use_highbitdepth
,
#endif
VP
9
_ENC_BORDER_IN_PIXELS
,
cm
->
byte_alignment
,
VP
X
_ENC_BORDER_IN_PIXELS
,
cm
->
byte_alignment
,
NULL
,
NULL
,
NULL
))
vpx_internal_error
(
&
cm
->
error
,
VPX_CODEC_MEM_ERROR
,
"Failed to allocate last frame buffer"
);
...
...
@@ -645,7 +645,7 @@ static void alloc_util_frame_buffers(VP10_COMP *cpi) {
#if CONFIG_VP9_HIGHBITDEPTH
cm
->
use_highbitdepth
,
#endif
VP
9
_ENC_BORDER_IN_PIXELS
,
cm
->
byte_alignment
,
VP
X
_ENC_BORDER_IN_PIXELS
,
cm
->
byte_alignment
,
NULL
,
NULL
,
NULL
))
vpx_internal_error
(
&
cm
->
error
,
VPX_CODEC_MEM_ERROR
,
"Failed to allocate scaled source buffer"
);
...
...
@@ -656,7 +656,7 @@ static void alloc_util_frame_buffers(VP10_COMP *cpi) {
#if CONFIG_VP9_HIGHBITDEPTH
cm
->
use_highbitdepth
,
#endif
VP
9
_ENC_BORDER_IN_PIXELS
,
cm
->
byte_alignment
,
VP
X
_ENC_BORDER_IN_PIXELS
,
cm
->
byte_alignment
,
NULL
,
NULL
,
NULL
))
vpx_internal_error
(
&
cm
->
error
,
VPX_CODEC_MEM_ERROR
,
"Failed to allocate scaled last source buffer"
);
...
...
@@ -2733,7 +2733,7 @@ void vp10_scale_references(VP10_COMP *cpi) {
cm
->
width
,
cm
->
height
,
cm
->
subsampling_x
,
cm
->
subsampling_y
,
cm
->
use_highbitdepth
,
VP
9
_ENC_BORDER_IN_PIXELS
,
cm
->
byte_alignment
,
VP
X
_ENC_BORDER_IN_PIXELS
,
cm
->
byte_alignment
,
NULL
,
NULL
,
NULL
);
scale_and_extend_frame
(
ref
,
&
new_fb_ptr
->
buf
,
(
int
)
cm
->
bit_depth
);
cpi
->
scaled_ref_idx
[
ref_frame
-
1
]
=
new_fb
;
...
...
@@ -2757,7 +2757,7 @@ void vp10_scale_references(VP10_COMP *cpi) {
vpx_realloc_frame_buffer
(
&
new_fb_ptr
->
buf
,
cm
->
width
,
cm
->
height
,
cm
->
subsampling_x
,
cm
->
subsampling_y
,
VP
9
_ENC_BORDER_IN_PIXELS
,
cm
->
byte_alignment
,
VP
X
_ENC_BORDER_IN_PIXELS
,
cm
->
byte_alignment
,
NULL
,
NULL
,
NULL
);
scale_and_extend_frame
(
ref
,
&
new_fb_ptr
->
buf
);
cpi
->
scaled_ref_idx
[
ref_frame
-
1
]
=
new_fb
;
...
...
@@ -3053,7 +3053,7 @@ static void set_frame_size(VP10_COMP *cpi) {
#if CONFIG_VP9_HIGHBITDEPTH
cm
->
use_highbitdepth
,
#endif
VP
9
_ENC_BORDER_IN_PIXELS
,
cm
->
byte_alignment
,
VP
X
_ENC_BORDER_IN_PIXELS
,
cm
->
byte_alignment
,
NULL
,
NULL
,
NULL
);
alloc_util_frame_buffers
(
cpi
);
...
...
@@ -3800,7 +3800,7 @@ static void setup_denoiser_buffer(VP10_COMP *cpi) {
#if CONFIG_VP9_HIGHBITDEPTH
cm
->
use_highbitdepth
,
#endif
VP
9
_ENC_BORDER_IN_PIXELS
);
VP
X
_ENC_BORDER_IN_PIXELS
);
}
}
#endif
...
...
@@ -4176,7 +4176,7 @@ int vp10_get_compressed_data(VP10_COMP *cpi, unsigned int *frame_flags,
#if CONFIG_VP9_HIGHBITDEPTH
cm
->
use_highbitdepth
,
#endif
VP
9
_ENC_BORDER_IN_PIXELS
,
VP
X
_ENC_BORDER_IN_PIXELS
,
cm
->
byte_alignment
)
<
0
)
{
vpx_internal_error
(
&
cm
->
error
,
VPX_CODEC_MEM_ERROR
,
"Failed to allocate post processing buffer"
);
...
...
vp10/encoder/lookahead.c
View file @
4273a52c
...
...
@@ -77,7 +77,7 @@ struct lookahead_ctx *vp10_lookahead_init(unsigned int width,
#if CONFIG_VP9_HIGHBITDEPTH
use_highbitdepth
,
#endif
VP
9
_ENC_BORDER_IN_PIXELS
,
VP
X
_ENC_BORDER_IN_PIXELS
,
legacy_byte_alignment
))
goto
bail
;
}
...
...
@@ -177,7 +177,7 @@ int vp10_lookahead_push(struct lookahead_ctx *ctx, YV12_BUFFER_CONFIG *src,
#if CONFIG_VP9_HIGHBITDEPTH
use_highbitdepth
,
#endif
VP
9
_ENC_BORDER_IN_PIXELS
,
VP
X
_ENC_BORDER_IN_PIXELS
,
0
))
return
1
;
vpx_free_frame_buffer
(
&
buf
->
img
);
...
...
vp10/encoder/rdopt.c
View file @
4273a52c
...
...
@@ -2405,8 +2405,8 @@ static int discount_newmv_test(const VP10_COMP *cpi,
(
mode_mv
[
NEARMV
][
ref_frame
].
as_int
==
INVALID_MV
)));
}
#define LEFT_TOP_MARGIN ((VP
9
_ENC_BORDER_IN_PIXELS - VPX_INTERP_EXTEND) << 3)
#define RIGHT_BOTTOM_MARGIN ((VP
9
_ENC_BORDER_IN_PIXELS -\
#define LEFT_TOP_MARGIN ((VP
X
_ENC_BORDER_IN_PIXELS - VPX_INTERP_EXTEND) << 3)
#define RIGHT_BOTTOM_MARGIN ((VP
X
_ENC_BORDER_IN_PIXELS -\
VPX_INTERP_EXTEND) << 3)
// TODO(jingning): this mv clamping function should be block size dependent.
...
...
vp10/encoder/skin_detection.c
View file @
4273a52c
...
...
@@ -63,7 +63,7 @@ void vp10_compute_skin_map(VP10_COMP *const cpi, FILE *yuv_skinmap_file) {
memset
(
&
skinmap
,
0
,
sizeof
(
YV12_BUFFER_CONFIG
));
if
(
vpx_alloc_frame_buffer
(
&
skinmap
,
cm
->
width
,
cm
->
height
,
cm
->
subsampling_x
,
cm
->
subsampling_y
,
VP
9
_ENC_BORDER_IN_PIXELS
,
cm
->
byte_alignment
))
{
VP
X
_ENC_BORDER_IN_PIXELS
,
cm
->
byte_alignment
))
{
vpx_free_frame_buffer
(
&
skinmap
);
return
;
}
...
...
vp10/vp10_iface_common.h
View file @
4273a52c
...
...
@@ -40,7 +40,7 @@ static void yuvconfig2image(vpx_image_t *img, const YV12_BUFFER_CONFIG *yv12,
img
->
range
=
yv12
->
color_range
;
img
->
bit_depth
=
8
;
img
->
w
=
yv12
->
y_stride
;
img
->
h
=
ALIGN_POWER_OF_TWO
(
yv12
->
y_height
+
2
*
VP
9
_ENC_BORDER_IN_PIXELS
,
3
);
img
->
h
=
ALIGN_POWER_OF_TWO
(
yv12
->
y_height
+
2
*
VP
X
_ENC_BORDER_IN_PIXELS
,
3
);
img
->
d_w
=
yv12
->
y_crop_width
;
img
->
d_h
=
yv12
->
y_crop_height
;
img
->
r_w
=
yv12
->
render_width
;
...
...
vpx_scale/generic/yv12extend.c
View file @
4273a52c
...
...
@@ -205,8 +205,8 @@ void vpx_extend_frame_borders_c(YV12_BUFFER_CONFIG *ybf) {
}
void
vpx_extend_frame_inner_borders_c
(
YV12_BUFFER_CONFIG
*
ybf
)
{
const
int
inner_bw
=
(
ybf
->
border
>
VP
9
INNERBORDERINPIXELS
)
?
VP
9
INNERBORDERINPIXELS
:
ybf
->
border
;
const
int
inner_bw
=
(
ybf
->
border
>
VP
X
INNERBORDERINPIXELS
)
?
VP
X
INNERBORDERINPIXELS
:
ybf
->
border
;
extend_frame
(
ybf
,
inner_bw
);
}
...
...
vpx_scale/mips/dspr2/yv12extend_dspr2.c
View file @
4273a52c
...
...
@@ -137,8 +137,8 @@ void vpx_extend_frame_borders_dspr2(YV12_BUFFER_CONFIG *ybf) {
}
void
vpx_extend_frame_inner_borders_dspr2
(
YV12_BUFFER_CONFIG
*
ybf
)
{
const
int
inner_bw
=
(
ybf
->
border
>
VP
9
INNERBORDERINPIXELS
)
?
VP
9
INNERBORDERINPIXELS
:
ybf
->
border
;
const
int
inner_bw
=
(
ybf
->
border
>
VP
X
INNERBORDERINPIXELS
)
?
VP
X
INNERBORDERINPIXELS
:
ybf
->
border
;
extend_frame
(
ybf
,
inner_bw
);
}
#endif
vpx_scale/yv12config.h
View file @
4273a52c
...
...
@@ -21,10 +21,10 @@ extern "C" {
#include "vpx/vpx_integer.h"
#define VP8BORDERINPIXELS 32
#define VP
9
INNERBORDERINPIXELS 96
#define VP
X
INNERBORDERINPIXELS 96
#define VPX_INTERP_EXTEND 4
#define VP
9
_ENC_BORDER_IN_PIXELS 160
#define VP
9
_DEC_BORDER_IN_PIXELS 32
#define VP
X
_ENC_BORDER_IN_PIXELS 160
#define VP
X
_DEC_BORDER_IN_PIXELS 32
typedef
struct
yv12_buffer_config
{
int
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