Skip to content
GitLab
Menu
Projects
Groups
Snippets
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
b5e73bdd
Commit
b5e73bdd
authored
Oct 11, 2016
by
Yaowu Xu
Committed by
Gerrit Code Review
Oct 11, 2016
Browse files
Merge "CLPF: Don't assume sb size=64 and w&h multiple of 8 + valgrind fix." into nextgenv2
parents
3b161e14
f4d41e63
Changes
3
Show whitespace changes
Inline
Side-by-side
av1/common/clpf.c
View file @
b5e73bdd
...
@@ -14,9 +14,8 @@
...
@@ -14,9 +14,8 @@
int
av1_clpf_maxbits
(
const
AV1_COMMON
*
cm
)
{
int
av1_clpf_maxbits
(
const
AV1_COMMON
*
cm
)
{
return
get_msb
(
return
get_msb
(
ALIGN_POWER_OF_TWO
(
cm
->
mi_cols
*
MAX_MIB_SIZE
,
cm
->
clpf_size
+
4
)
*
ALIGN_POWER_OF_TWO
(
cm
->
mi_cols
*
MI_SIZE
,
cm
->
clpf_size
+
4
)
*
ALIGN_POWER_OF_TWO
(
cm
->
mi_rows
*
MAX_MIB_SIZE
,
ALIGN_POWER_OF_TWO
(
cm
->
mi_rows
*
MI_SIZE
,
cm
->
clpf_size
+
4
)
>>
cm
->
clpf_size
+
4
)
>>
(
cm
->
clpf_size
*
2
+
8
))
+
(
cm
->
clpf_size
*
2
+
8
))
+
1
;
1
;
}
}
...
@@ -59,11 +58,11 @@ int av1_clpf_frame(const YV12_BUFFER_CONFIG *dst, const YV12_BUFFER_CONFIG *rec,
...
@@ -59,11 +58,11 @@ int av1_clpf_frame(const YV12_BUFFER_CONFIG *dst, const YV12_BUFFER_CONFIG *rec,
unsigned
int
,
unsigned
int
,
uint8_t
*
))
{
unsigned
int
,
unsigned
int
,
uint8_t
*
))
{
/* Constrained low-pass filter (CLPF) */
/* Constrained low-pass filter (CLPF) */
int
c
,
k
,
l
,
m
,
n
;
int
c
,
k
,
l
,
m
,
n
;
int
width
=
rec
->
y_crop_width
;
const
int
bs
=
MI_SIZE
;
int
height
=
rec
->
y_crop_height
;
int
width
=
cm
->
mi_cols
*
bs
;
int
height
=
cm
->
mi_rows
*
bs
;
int
xpos
,
ypos
;
int
xpos
,
ypos
;
int
stride_y
=
rec
->
y_stride
;
int
stride_y
=
rec
->
y_stride
;
const
int
bs
=
MAX_MIB_SIZE
;
int
num_fb_hor
=
(
width
+
(
1
<<
fb_size_log2
)
-
bs
)
>>
fb_size_log2
;
int
num_fb_hor
=
(
width
+
(
1
<<
fb_size_log2
)
-
bs
)
>>
fb_size_log2
;
int
num_fb_ver
=
(
height
+
(
1
<<
fb_size_log2
)
-
bs
)
>>
fb_size_log2
;
int
num_fb_ver
=
(
height
+
(
1
<<
fb_size_log2
)
-
bs
)
>>
fb_size_log2
;
int
block_index
=
0
;
int
block_index
=
0
;
...
...
av1/encoder/bitstream.c
View file @
b5e73bdd
...
@@ -2602,7 +2602,7 @@ static void encode_clpf(const AV1_COMMON *cm, struct aom_write_bit_buffer *wb) {
...
@@ -2602,7 +2602,7 @@ static void encode_clpf(const AV1_COMMON *cm, struct aom_write_bit_buffer *wb) {
// 50% probability, so a more efficient coding is possible.
// 50% probability, so a more efficient coding is possible.
aom_wb_write_literal(wb, cm->clpf_numblocks, av1_clpf_maxbits(cm));
aom_wb_write_literal(wb, cm->clpf_numblocks, av1_clpf_maxbits(cm));
for (i = 0; i < cm->clpf_numblocks; i++) {
for (i = 0; i < cm->clpf_numblocks; i++) {
aom_wb_write_literal
(
wb
,
cm
->
clpf_blocks
[
i
]
,
1
);
aom_wb_write_literal(wb, cm->clpf_blocks
? cm->clpf_blocks[i] : 0
, 1);
}
}
}
}
}
}
...
...
av1/encoder/encoder.c
View file @
b5e73bdd
...
@@ -4733,6 +4733,7 @@ static void encode_frame_to_data_rate(AV1_COMP *cpi, size_t *size,
...
@@ -4733,6 +4733,7 @@ static void encode_frame_to_data_rate(AV1_COMP *cpi, size_t *size,
#if CONFIG_CLPF
#if CONFIG_CLPF
aom_free
(
cm
->
clpf_blocks
);
aom_free
(
cm
->
clpf_blocks
);
cm
->
clpf_blocks
=
0
;
#endif
#endif
if
(
cm
->
seg
.
update_map
)
update_reference_segmentation_map
(
cpi
);
if
(
cm
->
seg
.
update_map
)
update_reference_segmentation_map
(
cpi
);
...
...
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