Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
What's new
10
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Open sidebar
Xiph.Org
aom-rav1e
Commits
de9089f5
Commit
de9089f5
authored
Aug 12, 2016
by
Yaowu Xu
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Rename MI_BLOCK_SIZE and MI_MASK macros
Cherry picked from libvpx:
511da8cb
Change-Id: I4f4132235495adcd445690d8f060f607b755cacd
parent
6885324b
Changes
15
Hide whitespace changes
Inline
Side-by-side
Showing
15 changed files
with
148 additions
and
140 deletions
+148
-140
av1/common/clpf.c
av1/common/clpf.c
+3
-3
av1/common/dering.c
av1/common/dering.c
+24
-25
av1/common/enums.h
av1/common/enums.h
+9
-4
av1/common/loopfilter.c
av1/common/loopfilter.c
+30
-30
av1/common/onyxc_int.h
av1/common/onyxc_int.h
+6
-4
av1/common/thread_common.c
av1/common/thread_common.c
+16
-16
av1/common/tile_common.c
av1/common/tile_common.c
+3
-3
av1/decoder/decodeframe.c
av1/decoder/decodeframe.c
+11
-9
av1/decoder/decodemv.c
av1/decoder/decodemv.c
+1
-1
av1/encoder/aq_cyclicrefresh.c
av1/encoder/aq_cyclicrefresh.c
+4
-4
av1/encoder/bitstream.c
av1/encoder/bitstream.c
+2
-2
av1/encoder/clpf_rdo.c
av1/encoder/clpf_rdo.c
+4
-4
av1/encoder/encodeframe.c
av1/encoder/encodeframe.c
+16
-16
av1/encoder/pickdering.c
av1/encoder/pickdering.c
+17
-17
av1/encoder/rdopt.c
av1/encoder/rdopt.c
+2
-2
No files found.
av1/common/clpf.c
View file @
de9089f5
...
...
@@ -12,9 +12,9 @@
#include "aom_dsp/aom_dsp_common.h"
int
av1_clpf_maxbits
(
const
AV1_COMMON
*
cm
)
{
return
get_msb
(
ALIGN_POWER_OF_TWO
(
cm
->
mi_cols
*
M
I_BLOCK
_SIZE
,
return
get_msb
(
ALIGN_POWER_OF_TWO
(
cm
->
mi_cols
*
M
AX_MIB
_SIZE
,
cm
->
clpf_size
+
4
)
*
ALIGN_POWER_OF_TWO
(
cm
->
mi_rows
*
M
I_BLOCK
_SIZE
,
ALIGN_POWER_OF_TWO
(
cm
->
mi_rows
*
M
AX_MIB
_SIZE
,
cm
->
clpf_size
+
4
)
>>
(
cm
->
clpf_size
*
2
+
8
))
+
1
;
...
...
@@ -63,7 +63,7 @@ int av1_clpf_frame(const YV12_BUFFER_CONFIG *dst, const YV12_BUFFER_CONFIG *rec,
int
xpos
,
ypos
;
int
stride_y
=
rec
->
y_stride
;
int
stride_c
=
rec
->
uv_stride
;
const
int
bs
=
M
I_BLOCK
_SIZE
;
const
int
bs
=
M
AX_MIB
_SIZE
;
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
block_index
=
0
;
...
...
av1/common/dering.c
View file @
de9089f5
...
...
@@ -33,8 +33,8 @@ int sb_all_skip(const AV1_COMMON *const cm, int mi_row, int mi_col) {
int
skip
=
1
;
maxc
=
cm
->
mi_cols
-
mi_col
;
maxr
=
cm
->
mi_rows
-
mi_row
;
if
(
maxr
>
M
I_BLOCK
_SIZE
)
maxr
=
M
I_BLOCK
_SIZE
;
if
(
maxc
>
M
I_BLOCK
_SIZE
)
maxc
=
M
I_BLOCK
_SIZE
;
if
(
maxr
>
M
AX_MIB
_SIZE
)
maxr
=
M
AX_MIB
_SIZE
;
if
(
maxc
>
M
AX_MIB
_SIZE
)
maxc
=
M
AX_MIB
_SIZE
;
for
(
r
=
0
;
r
<
maxr
;
r
++
)
{
for
(
c
=
0
;
c
<
maxc
;
c
++
)
{
skip
=
skip
&&
...
...
@@ -58,8 +58,8 @@ void av1_dering_frame(YV12_BUFFER_CONFIG *frame, AV1_COMMON *cm,
int
dec
[
3
];
int
pli
;
int
coeff_shift
=
AOMMAX
(
cm
->
bit_depth
-
8
,
0
);
nvsb
=
(
cm
->
mi_rows
+
M
I_BLOCK
_SIZE
-
1
)
/
M
I_BLOCK
_SIZE
;
nhsb
=
(
cm
->
mi_cols
+
M
I_BLOCK
_SIZE
-
1
)
/
M
I_BLOCK
_SIZE
;
nvsb
=
(
cm
->
mi_rows
+
M
AX_MIB
_SIZE
-
1
)
/
M
AX_MIB
_SIZE
;
nhsb
=
(
cm
->
mi_cols
+
M
AX_MIB
_SIZE
-
1
)
/
M
AX_MIB
_SIZE
;
bskip
=
aom_malloc
(
sizeof
(
*
bskip
)
*
cm
->
mi_rows
*
cm
->
mi_cols
);
av1_setup_dst_planes
(
xd
->
plane
,
frame
,
0
,
0
);
for
(
pli
=
0
;
pli
<
3
;
pli
++
)
{
...
...
@@ -96,16 +96,16 @@ void av1_dering_frame(YV12_BUFFER_CONFIG *frame, AV1_COMMON *cm,
for
(
sbc
=
0
;
sbc
<
nhsb
;
sbc
++
)
{
int
level
;
int
nhb
,
nvb
;
nhb
=
AOMMIN
(
M
I_BLOCK
_SIZE
,
cm
->
mi_cols
-
M
I_BLOCK
_SIZE
*
sbc
);
nvb
=
AOMMIN
(
M
I_BLOCK
_SIZE
,
cm
->
mi_rows
-
M
I_BLOCK
_SIZE
*
sbr
);
nhb
=
AOMMIN
(
M
AX_MIB
_SIZE
,
cm
->
mi_cols
-
M
AX_MIB
_SIZE
*
sbc
);
nvb
=
AOMMIN
(
M
AX_MIB
_SIZE
,
cm
->
mi_rows
-
M
AX_MIB
_SIZE
*
sbr
);
for
(
pli
=
0
;
pli
<
3
;
pli
++
)
{
int16_t
dst
[
M
I_BLOCK
_SIZE
*
M
I_BLOCK
_SIZE
*
8
*
8
];
int16_t
dst
[
M
AX_MIB
_SIZE
*
M
AX_MIB
_SIZE
*
8
*
8
];
int
threshold
;
#if DERING_REFINEMENT
level
=
compute_level_from_index
(
global_level
,
cm
->
mi_grid_visible
[
M
I_BLOCK
_SIZE
*
sbr
*
cm
->
mi_stride
+
M
I_BLOCK
_SIZE
*
sbc
]
cm
->
mi_grid_visible
[
M
AX_MIB
_SIZE
*
sbr
*
cm
->
mi_stride
+
M
AX_MIB
_SIZE
*
sbc
]
->
mbmi
.
dering_gain
);
#else
level
=
global_level
;
...
...
@@ -113,31 +113,30 @@ void av1_dering_frame(YV12_BUFFER_CONFIG *frame, AV1_COMMON *cm,
/* FIXME: This is a temporary hack that uses more conservative
deringing for chroma. */
if
(
pli
)
level
=
(
level
*
5
+
4
)
>>
3
;
if
(
sb_all_skip
(
cm
,
sbr
*
M
I_BLOCK
_SIZE
,
sbc
*
M
I_BLOCK
_SIZE
))
continue
;
if
(
sb_all_skip
(
cm
,
sbr
*
M
AX_MIB
_SIZE
,
sbc
*
M
AX_MIB
_SIZE
))
continue
;
threshold
=
level
<<
coeff_shift
;
od_dering
(
&
OD_DERING_VTBL_C
,
dst
,
MI_BLOCK_SIZE
*
bsize
[
pli
],
&
src
[
pli
][
sbr
*
stride
*
bsize
[
pli
]
*
M
I_BLOCK
_SIZE
+
sbc
*
bsize
[
pli
]
*
MI_BLOCK_SIZE
]
,
stride
,
nhb
,
nvb
,
sbc
,
sbr
,
nhsb
,
nvsb
,
dec
[
pli
],
dir
,
pli
,
&
bskip
[
MI_BLOCK_SIZE
*
sbr
*
cm
->
mi_cols
+
MI_BLOCK_SIZE
*
sbc
]
,
cm
->
mi_cols
,
threshold
,
OD_DERING_NO_CHECK_OVERLAP
,
coeff_shift
);
od_dering
(
&
OD_DERING_VTBL_C
,
dst
,
MAX_MIB_SIZE
*
bsize
[
pli
],
&
src
[
pli
][
sbr
*
stride
*
bsize
[
pli
]
*
MAX_MIB_SIZE
+
sbc
*
bsize
[
pli
]
*
M
AX_MIB
_SIZE
],
stride
,
nhb
,
nvb
,
sbc
,
sbr
,
nhsb
,
nvsb
,
dec
[
pli
],
dir
,
pli
,
&
bskip
[
MAX_MIB_SIZE
*
sbr
*
cm
->
mi_cols
+
MAX_MIB_SIZE
*
sbc
]
,
cm
->
mi_cols
,
threshold
,
OD_DERING_NO_CHECK_OVERLAP
,
coeff_shift
);
for
(
r
=
0
;
r
<
bsize
[
pli
]
*
nvb
;
++
r
)
{
for
(
c
=
0
;
c
<
bsize
[
pli
]
*
nhb
;
++
c
)
{
#if CONFIG_AOM_HIGHBITDEPTH
if
(
cm
->
use_highbitdepth
)
{
CONVERT_TO_SHORTPTR
(
xd
->
plane
[
pli
].
dst
.
buf
)
[
xd
->
plane
[
pli
].
dst
.
stride
*
(
bsize
[
pli
]
*
M
I_BLOCK
_SIZE
*
sbr
+
r
)
+
sbc
*
bsize
[
pli
]
*
M
I_BLOCK
_SIZE
+
c
]
=
dst
[
r
*
M
I_BLOCK
_SIZE
*
bsize
[
pli
]
+
c
];
(
bsize
[
pli
]
*
M
AX_MIB
_SIZE
*
sbr
+
r
)
+
sbc
*
bsize
[
pli
]
*
M
AX_MIB
_SIZE
+
c
]
=
dst
[
r
*
M
AX_MIB
_SIZE
*
bsize
[
pli
]
+
c
];
}
else
{
#endif
xd
->
plane
[
pli
]
.
dst
.
buf
[
xd
->
plane
[
pli
].
dst
.
stride
*
(
bsize
[
pli
]
*
MI_BLOCK_SIZE
*
sbr
+
r
)
+
sbc
*
bsize
[
pli
]
*
MI_BLOCK_SIZE
+
c
]
=
dst
[
r
*
MI_BLOCK_SIZE
*
bsize
[
pli
]
+
c
];
xd
->
plane
[
pli
].
dst
.
buf
[
xd
->
plane
[
pli
].
dst
.
stride
*
(
bsize
[
pli
]
*
MAX_MIB_SIZE
*
sbr
+
r
)
+
sbc
*
bsize
[
pli
]
*
MAX_MIB_SIZE
+
c
]
=
dst
[
r
*
MAX_MIB_SIZE
*
bsize
[
pli
]
+
c
];
#if CONFIG_AOM_HIGHBITDEPTH
}
#endif
...
...
av1/common/enums.h
View file @
de9089f5
...
...
@@ -20,17 +20,22 @@ extern "C" {
#endif
#undef MAX_SB_SIZE
// Pixels per max superblock size
#define MAX_SB_SIZE_LOG2 6
#define MAX_SB_SIZE (1 << MAX_SB_SIZE_LOG2)
#define MAX_SB_SQUARE (MAX_SB_SIZE * MAX_SB_SIZE)
// Pixels per Mode Info (MI) unit
#define MI_SIZE_LOG2 3
#define MI_
BLOCK_SIZE_LOG2 (MAX_SB_SIZE_LOG2 -
MI_SIZE_LOG2)
// 64 = 2^6
#define MI_
SIZE (1 <<
MI_SIZE_LOG2)
#define MI_SIZE (1 << MI_SIZE_LOG2) // pixels per mi-unit
#define MI_BLOCK_SIZE (1 << MI_BLOCK_SIZE_LOG2) // mi-units per max block
// MI-units per max superblock (MI Block - MIB)
#define MAX_MIB_SIZE_LOG2 (MAX_SB_SIZE_LOG2 - MI_SIZE_LOG2)
#define MAX_MIB_SIZE (1 << MAX_MIB_SIZE_LOG2)
#define MI_MASK (MI_BLOCK_SIZE - 1)
// Mask to extract MI offset within max MIB
#define MAX_MIB_MASK (MAX_MIB_SIZE - 1)
// Bitstream profiles indicated by 2-3 bits in the uncompressed header.
// 00: Profile 0. 8-bit 4:2:0 only.
...
...
av1/common/loopfilter.c
View file @
de9089f5
...
...
@@ -854,11 +854,11 @@ void av1_setup_mask(AV1_COMMON *const cm, const int mi_row, const int mi_col,
const
int
shift_16_uv
[]
=
{
0
,
1
,
4
,
5
};
int
i
;
const
int
max_rows
=
(
mi_row
+
M
I_BLOCK
_SIZE
>
cm
->
mi_rows
?
cm
->
mi_rows
-
mi_row
:
M
I_BLOCK
_SIZE
);
(
mi_row
+
M
AX_MIB
_SIZE
>
cm
->
mi_rows
?
cm
->
mi_rows
-
mi_row
:
M
AX_MIB
_SIZE
);
const
int
max_cols
=
(
mi_col
+
M
I_BLOCK
_SIZE
>
cm
->
mi_cols
?
cm
->
mi_cols
-
mi_col
:
M
I_BLOCK
_SIZE
);
(
mi_col
+
M
AX_MIB
_SIZE
>
cm
->
mi_cols
?
cm
->
mi_cols
-
mi_col
:
M
AX_MIB
_SIZE
);
av1_zero
(
*
lfm
);
assert
(
mip
[
0
]
!=
NULL
);
...
...
@@ -982,7 +982,7 @@ void av1_setup_mask(AV1_COMMON *const cm, const int mi_row, const int mi_col,
lfm
->
above_uv
[
TX_4X4
]
&=
~
above_border_uv
;
// We do some special edge handling.
if
(
mi_row
+
M
I_BLOCK
_SIZE
>
cm
->
mi_rows
)
{
if
(
mi_row
+
M
AX_MIB
_SIZE
>
cm
->
mi_rows
)
{
const
uint64_t
rows
=
cm
->
mi_rows
-
mi_row
;
// Each pixel inside the border gets a 1,
...
...
@@ -1015,7 +1015,7 @@ void av1_setup_mask(AV1_COMMON *const cm, const int mi_row, const int mi_col,
}
}
if
(
mi_col
+
M
I_BLOCK
_SIZE
>
cm
->
mi_cols
)
{
if
(
mi_col
+
M
AX_MIB
_SIZE
>
cm
->
mi_cols
)
{
const
uint64_t
columns
=
cm
->
mi_cols
-
mi_col
;
// Each pixel inside the border gets a 1, the multiply copies the border
...
...
@@ -1165,21 +1165,21 @@ void av1_filter_block_plane_non420_ver(AV1_COMMON *cm,
const
int
row_step_stride
=
cm
->
mi_stride
*
row_step
;
struct
buf_2d
*
const
dst
=
&
plane
->
dst
;
uint8_t
*
const
dst0
=
dst
->
buf
;
unsigned
int
mask_16x16
[
M
I_BLOCK
_SIZE
]
=
{
0
};
unsigned
int
mask_8x8
[
M
I_BLOCK
_SIZE
]
=
{
0
};
unsigned
int
mask_4x4
[
M
I_BLOCK
_SIZE
]
=
{
0
};
unsigned
int
mask_4x4_int
[
M
I_BLOCK
_SIZE
]
=
{
0
};
uint8_t
lfl
[
M
I_BLOCK
_SIZE
*
M
I_BLOCK
_SIZE
];
unsigned
int
mask_16x16
[
M
AX_MIB
_SIZE
]
=
{
0
};
unsigned
int
mask_8x8
[
M
AX_MIB
_SIZE
]
=
{
0
};
unsigned
int
mask_4x4
[
M
AX_MIB
_SIZE
]
=
{
0
};
unsigned
int
mask_4x4_int
[
M
AX_MIB
_SIZE
]
=
{
0
};
uint8_t
lfl
[
M
AX_MIB
_SIZE
*
M
AX_MIB
_SIZE
];
int
r
,
c
;
for
(
r
=
0
;
r
<
M
I_BLOCK
_SIZE
&&
mi_row
+
r
<
cm
->
mi_rows
;
r
+=
row_step
)
{
for
(
r
=
0
;
r
<
M
AX_MIB
_SIZE
&&
mi_row
+
r
<
cm
->
mi_rows
;
r
+=
row_step
)
{
unsigned
int
mask_16x16_c
=
0
;
unsigned
int
mask_8x8_c
=
0
;
unsigned
int
mask_4x4_c
=
0
;
unsigned
int
border_mask
;
// Determine the vertical edges that need filtering
for
(
c
=
0
;
c
<
M
I_BLOCK
_SIZE
&&
mi_col
+
c
<
cm
->
mi_cols
;
c
+=
col_step
)
{
for
(
c
=
0
;
c
<
M
AX_MIB
_SIZE
&&
mi_col
+
c
<
cm
->
mi_cols
;
c
+=
col_step
)
{
const
MODE_INFO
*
mi
=
mi_8x8
[
c
];
const
BLOCK_SIZE
sb_type
=
mi
[
0
].
mbmi
.
sb_type
;
const
int
skip_this
=
mi
[
0
].
mbmi
.
skip
&&
is_inter_block
(
&
mi
[
0
].
mbmi
);
...
...
@@ -1289,14 +1289,14 @@ void av1_filter_block_plane_non420_hor(AV1_COMMON *cm,
const
int
row_step
=
1
<<
ss_y
;
struct
buf_2d
*
const
dst
=
&
plane
->
dst
;
uint8_t
*
const
dst0
=
dst
->
buf
;
unsigned
int
mask_16x16
[
M
I_BLOCK
_SIZE
]
=
{
0
};
unsigned
int
mask_8x8
[
M
I_BLOCK
_SIZE
]
=
{
0
};
unsigned
int
mask_4x4
[
M
I_BLOCK
_SIZE
]
=
{
0
};
unsigned
int
mask_4x4_int
[
M
I_BLOCK
_SIZE
]
=
{
0
};
uint8_t
lfl
[
M
I_BLOCK
_SIZE
*
M
I_BLOCK
_SIZE
];
unsigned
int
mask_16x16
[
M
AX_MIB
_SIZE
]
=
{
0
};
unsigned
int
mask_8x8
[
M
AX_MIB
_SIZE
]
=
{
0
};
unsigned
int
mask_4x4
[
M
AX_MIB
_SIZE
]
=
{
0
};
unsigned
int
mask_4x4_int
[
M
AX_MIB
_SIZE
]
=
{
0
};
uint8_t
lfl
[
M
AX_MIB
_SIZE
*
M
AX_MIB
_SIZE
];
int
r
;
for
(
r
=
0
;
r
<
M
I_BLOCK
_SIZE
&&
mi_row
+
r
<
cm
->
mi_rows
;
r
+=
row_step
)
{
for
(
r
=
0
;
r
<
M
AX_MIB
_SIZE
&&
mi_row
+
r
<
cm
->
mi_rows
;
r
+=
row_step
)
{
const
int
skip_border_4x4_r
=
ss_y
&&
mi_row
+
r
==
cm
->
mi_rows
-
1
;
const
unsigned
int
mask_4x4_int_r
=
skip_border_4x4_r
?
0
:
mask_4x4_int
[
r
];
...
...
@@ -1350,7 +1350,7 @@ void av1_filter_block_plane_ss00_ver(AV1_COMMON *const cm,
assert
(
plane
->
subsampling_x
==
0
&&
plane
->
subsampling_y
==
0
);
// Vertical pass: do 2 rows at one time
for
(
r
=
0
;
r
<
M
I_BLOCK
_SIZE
&&
mi_row
+
r
<
cm
->
mi_rows
;
r
+=
2
)
{
for
(
r
=
0
;
r
<
M
AX_MIB
_SIZE
&&
mi_row
+
r
<
cm
->
mi_rows
;
r
+=
2
)
{
unsigned
int
mask_16x16_l
=
mask_16x16
&
0xffff
;
unsigned
int
mask_8x8_l
=
mask_8x8
&
0xffff
;
unsigned
int
mask_4x4_l
=
mask_4x4
&
0xffff
;
...
...
@@ -1396,7 +1396,7 @@ void av1_filter_block_plane_ss00_hor(AV1_COMMON *const cm,
assert
(
plane
->
subsampling_x
==
0
&&
plane
->
subsampling_y
==
0
);
for
(
r
=
0
;
r
<
M
I_BLOCK
_SIZE
&&
mi_row
+
r
<
cm
->
mi_rows
;
r
++
)
{
for
(
r
=
0
;
r
<
M
AX_MIB
_SIZE
&&
mi_row
+
r
<
cm
->
mi_rows
;
r
++
)
{
unsigned
int
mask_16x16_r
;
unsigned
int
mask_8x8_r
;
unsigned
int
mask_4x4_r
;
...
...
@@ -1458,9 +1458,9 @@ void av1_filter_block_plane_ss11_ver(AV1_COMMON *const cm,
assert
(
plane
->
subsampling_x
==
1
&&
plane
->
subsampling_y
==
1
);
// Vertical pass: do 2 rows at one time
for
(
r
=
0
;
r
<
M
I_BLOCK
_SIZE
&&
mi_row
+
r
<
cm
->
mi_rows
;
r
+=
4
)
{
for
(
r
=
0
;
r
<
M
AX_MIB
_SIZE
&&
mi_row
+
r
<
cm
->
mi_rows
;
r
+=
4
)
{
if
(
plane
->
plane_type
==
1
)
{
for
(
c
=
0
;
c
<
(
M
I_BLOCK
_SIZE
>>
1
);
c
++
)
{
for
(
c
=
0
;
c
<
(
M
AX_MIB
_SIZE
>>
1
);
c
++
)
{
lfm
->
lfl_uv
[(
r
<<
1
)
+
c
]
=
lfm
->
lfl_y
[(
r
<<
3
)
+
(
c
<<
1
)];
lfm
->
lfl_uv
[((
r
+
2
)
<<
1
)
+
c
]
=
lfm
->
lfl_y
[((
r
+
2
)
<<
3
)
+
(
c
<<
1
)];
}
...
...
@@ -1520,7 +1520,7 @@ void av1_filter_block_plane_ss11_hor(AV1_COMMON *const cm,
assert
(
plane
->
subsampling_x
==
1
&&
plane
->
subsampling_y
==
1
);
for
(
r
=
0
;
r
<
M
I_BLOCK
_SIZE
&&
mi_row
+
r
<
cm
->
mi_rows
;
r
+=
2
)
{
for
(
r
=
0
;
r
<
M
AX_MIB
_SIZE
&&
mi_row
+
r
<
cm
->
mi_rows
;
r
+=
2
)
{
const
int
skip_border_4x4_r
=
mi_row
+
r
==
cm
->
mi_rows
-
1
;
const
unsigned
int
mask_4x4_int_r
=
skip_border_4x4_r
?
0
:
(
mask_4x4_int
&
0xf
);
...
...
@@ -1585,10 +1585,10 @@ void av1_loop_filter_rows(YV12_BUFFER_CONFIG *frame_buffer, AV1_COMMON *cm,
#if CONFIG_PARALLEL_DEBLOCKING
// Filter all the vertical edges in the whole frame
for
(
mi_row
=
start
;
mi_row
<
stop
;
mi_row
+=
M
I_BLOCK
_SIZE
)
{
for
(
mi_row
=
start
;
mi_row
<
stop
;
mi_row
+=
M
AX_MIB
_SIZE
)
{
MODE_INFO
**
mi
=
cm
->
mi_grid_visible
+
mi_row
*
cm
->
mi_stride
;
for
(
mi_col
=
0
;
mi_col
<
cm
->
mi_cols
;
mi_col
+=
M
I_BLOCK
_SIZE
)
{
for
(
mi_col
=
0
;
mi_col
<
cm
->
mi_cols
;
mi_col
+=
M
AX_MIB
_SIZE
)
{
int
plane
;
av1_setup_dst_planes
(
planes
,
frame_buffer
,
mi_row
,
mi_col
);
...
...
@@ -1613,10 +1613,10 @@ void av1_loop_filter_rows(YV12_BUFFER_CONFIG *frame_buffer, AV1_COMMON *cm,
}
// Filter all the horizontal edges in the whole frame
for
(
mi_row
=
start
;
mi_row
<
stop
;
mi_row
+=
M
I_BLOCK
_SIZE
)
{
for
(
mi_row
=
start
;
mi_row
<
stop
;
mi_row
+=
M
AX_MIB
_SIZE
)
{
MODE_INFO
**
mi
=
cm
->
mi_grid_visible
+
mi_row
*
cm
->
mi_stride
;
for
(
mi_col
=
0
;
mi_col
<
cm
->
mi_cols
;
mi_col
+=
M
I_BLOCK
_SIZE
)
{
for
(
mi_col
=
0
;
mi_col
<
cm
->
mi_cols
;
mi_col
+=
M
AX_MIB
_SIZE
)
{
int
plane
;
av1_setup_dst_planes
(
planes
,
frame_buffer
,
mi_row
,
mi_col
);
...
...
@@ -1639,10 +1639,10 @@ void av1_loop_filter_rows(YV12_BUFFER_CONFIG *frame_buffer, AV1_COMMON *cm,
}
}
#else // CONFIG_PARALLEL_DEBLOCKING
for
(
mi_row
=
start
;
mi_row
<
stop
;
mi_row
+=
M
I_BLOCK
_SIZE
)
{
for
(
mi_row
=
start
;
mi_row
<
stop
;
mi_row
+=
M
AX_MIB
_SIZE
)
{
MODE_INFO
**
mi
=
cm
->
mi_grid_visible
+
mi_row
*
cm
->
mi_stride
;
for
(
mi_col
=
0
;
mi_col
<
cm
->
mi_cols
;
mi_col
+=
M
I_BLOCK
_SIZE
)
{
for
(
mi_col
=
0
;
mi_col
<
cm
->
mi_cols
;
mi_col
+=
M
AX_MIB
_SIZE
)
{
int
plane
;
av1_setup_dst_planes
(
planes
,
frame_buffer
,
mi_row
,
mi_col
);
...
...
av1/common/onyxc_int.h
View file @
de9089f5
...
...
@@ -399,7 +399,7 @@ static INLINE void ref_cnt_fb(RefCntBuffer *bufs, int *idx, int new_idx) {
}
static
INLINE
int
mi_cols_aligned_to_sb
(
int
n_mis
)
{
return
ALIGN_POWER_OF_TWO
(
n_mis
,
M
I_BLOCK
_SIZE_LOG2
);
return
ALIGN_POWER_OF_TWO
(
n_mis
,
M
AX_MIB
_SIZE_LOG2
);
}
static
INLINE
int
frame_is_intra_only
(
const
AV1_COMMON
*
const
cm
)
{
...
...
@@ -449,7 +449,7 @@ static INLINE void set_skip_context(MACROBLOCKD *xd, int mi_row, int mi_col) {
static
INLINE
int
calc_mi_size
(
int
len
)
{
// len is in mi units.
return
len
+
M
I_BLOCK
_SIZE
;
return
len
+
M
AX_MIB
_SIZE
;
}
static
void
set_plane_n4
(
MACROBLOCKD
*
const
xd
,
int
bw
,
int
bh
,
int
bwl
,
...
...
@@ -519,7 +519,8 @@ static INLINE void update_partition_context(MACROBLOCKD *xd, int mi_row,
int
mi_col
,
BLOCK_SIZE
subsize
,
BLOCK_SIZE
bsize
)
{
PARTITION_CONTEXT
*
const
above_ctx
=
xd
->
above_seg_context
+
mi_col
;
PARTITION_CONTEXT
*
const
left_ctx
=
xd
->
left_seg_context
+
(
mi_row
&
MI_MASK
);
PARTITION_CONTEXT
*
const
left_ctx
=
xd
->
left_seg_context
+
(
mi_row
&
MAX_MIB_MASK
);
// num_4x4_blocks_wide_lookup[bsize] / 2
const
int
bs
=
num_8x8_blocks_wide_lookup
[
bsize
];
...
...
@@ -534,7 +535,8 @@ static INLINE void update_partition_context(MACROBLOCKD *xd, int mi_row,
static
INLINE
int
partition_plane_context
(
const
MACROBLOCKD
*
xd
,
int
mi_row
,
int
mi_col
,
BLOCK_SIZE
bsize
)
{
const
PARTITION_CONTEXT
*
above_ctx
=
xd
->
above_seg_context
+
mi_col
;
const
PARTITION_CONTEXT
*
left_ctx
=
xd
->
left_seg_context
+
(
mi_row
&
MI_MASK
);
const
PARTITION_CONTEXT
*
left_ctx
=
xd
->
left_seg_context
+
(
mi_row
&
MAX_MIB_MASK
);
const
int
bsl
=
mi_width_log2_lookup
[
bsize
];
int
above
=
(
*
above_ctx
>>
bsl
)
&
1
,
left
=
(
*
left_ctx
>>
bsl
)
&
1
;
...
...
av1/common/thread_common.c
View file @
de9089f5
...
...
@@ -148,11 +148,11 @@ static int loop_filter_ver_row_worker(AV1LfSync *const lf_sync,
enum
lf_path
path
=
get_loop_filter_path
(
lf_data
->
y_only
,
lf_data
->
planes
);
for
(
mi_row
=
lf_data
->
start
;
mi_row
<
lf_data
->
stop
;
mi_row
+=
lf_sync
->
num_workers
*
M
I_BLOCK
_SIZE
)
{
mi_row
+=
lf_sync
->
num_workers
*
M
AX_MIB
_SIZE
)
{
MODE_INFO
**
const
mi
=
lf_data
->
cm
->
mi_grid_visible
+
mi_row
*
lf_data
->
cm
->
mi_stride
;
for
(
mi_col
=
0
;
mi_col
<
lf_data
->
cm
->
mi_cols
;
mi_col
+=
M
I_BLOCK
_SIZE
)
{
for
(
mi_col
=
0
;
mi_col
<
lf_data
->
cm
->
mi_cols
;
mi_col
+=
M
AX_MIB
_SIZE
)
{
LOOP_FILTER_MASK
lfm
;
int
plane
;
...
...
@@ -173,18 +173,18 @@ static int loop_filter_hor_row_worker(AV1LfSync *const lf_sync,
LFWorkerData
*
const
lf_data
)
{
const
int
num_planes
=
lf_data
->
y_only
?
1
:
MAX_MB_PLANE
;
const
int
sb_cols
=
mi_cols_aligned_to_sb
(
lf_data
->
cm
->
mi_cols
)
>>
M
I_BLOCK
_SIZE_LOG2
;
mi_cols_aligned_to_sb
(
lf_data
->
cm
->
mi_cols
)
>>
M
AX_MIB
_SIZE_LOG2
;
int
mi_row
,
mi_col
;
enum
lf_path
path
=
get_loop_filter_path
(
lf_data
->
y_only
,
lf_data
->
planes
);
for
(
mi_row
=
lf_data
->
start
;
mi_row
<
lf_data
->
stop
;
mi_row
+=
lf_sync
->
num_workers
*
M
I_BLOCK
_SIZE
)
{
mi_row
+=
lf_sync
->
num_workers
*
M
AX_MIB
_SIZE
)
{
MODE_INFO
**
const
mi
=
lf_data
->
cm
->
mi_grid_visible
+
mi_row
*
lf_data
->
cm
->
mi_stride
;
for
(
mi_col
=
0
;
mi_col
<
lf_data
->
cm
->
mi_cols
;
mi_col
+=
M
I_BLOCK
_SIZE
)
{
const
int
r
=
mi_row
>>
M
I_BLOCK
_SIZE_LOG2
;
const
int
c
=
mi_col
>>
M
I_BLOCK
_SIZE_LOG2
;
for
(
mi_col
=
0
;
mi_col
<
lf_data
->
cm
->
mi_cols
;
mi_col
+=
M
AX_MIB
_SIZE
)
{
const
int
r
=
mi_row
>>
M
AX_MIB
_SIZE_LOG2
;
const
int
c
=
mi_col
>>
M
AX_MIB
_SIZE_LOG2
;
LOOP_FILTER_MASK
lfm
;
int
plane
;
...
...
@@ -211,18 +211,18 @@ static int loop_filter_row_worker(AV1LfSync *const lf_sync,
LFWorkerData
*
const
lf_data
)
{
const
int
num_planes
=
lf_data
->
y_only
?
1
:
MAX_MB_PLANE
;
const
int
sb_cols
=
mi_cols_aligned_to_sb
(
lf_data
->
cm
->
mi_cols
)
>>
M
I_BLOCK
_SIZE_LOG2
;
mi_cols_aligned_to_sb
(
lf_data
->
cm
->
mi_cols
)
>>
M
AX_MIB
_SIZE_LOG2
;
int
mi_row
,
mi_col
;
enum
lf_path
path
=
get_loop_filter_path
(
lf_data
->
y_only
,
lf_data
->
planes
);
for
(
mi_row
=
lf_data
->
start
;
mi_row
<
lf_data
->
stop
;
mi_row
+=
lf_sync
->
num_workers
*
M
I_BLOCK
_SIZE
)
{
mi_row
+=
lf_sync
->
num_workers
*
M
AX_MIB
_SIZE
)
{
MODE_INFO
**
const
mi
=
lf_data
->
cm
->
mi_grid_visible
+
mi_row
*
lf_data
->
cm
->
mi_stride
;
for
(
mi_col
=
0
;
mi_col
<
lf_data
->
cm
->
mi_cols
;
mi_col
+=
M
I_BLOCK
_SIZE
)
{
const
int
r
=
mi_row
>>
M
I_BLOCK
_SIZE_LOG2
;
const
int
c
=
mi_col
>>
M
I_BLOCK
_SIZE_LOG2
;
for
(
mi_col
=
0
;
mi_col
<
lf_data
->
cm
->
mi_cols
;
mi_col
+=
M
AX_MIB
_SIZE
)
{
const
int
r
=
mi_row
>>
M
AX_MIB
_SIZE_LOG2
;
const
int
c
=
mi_col
>>
M
AX_MIB
_SIZE_LOG2
;
LOOP_FILTER_MASK
lfm
;
int
plane
;
...
...
@@ -254,7 +254,7 @@ static void loop_filter_rows_mt(YV12_BUFFER_CONFIG *frame, AV1_COMMON *cm,
AV1LfSync
*
lf_sync
)
{
const
AVxWorkerInterface
*
const
winterface
=
aom_get_worker_interface
();
// Number of superblock rows and cols
const
int
sb_rows
=
mi_cols_aligned_to_sb
(
cm
->
mi_rows
)
>>
M
I_BLOCK
_SIZE_LOG2
;
const
int
sb_rows
=
mi_cols_aligned_to_sb
(
cm
->
mi_rows
)
>>
M
AX_MIB
_SIZE_LOG2
;
// Decoder may allocate more threads than number of tiles based on user's
// input.
const
int
tile_cols
=
1
<<
cm
->
log2_tile_cols
;
...
...
@@ -291,7 +291,7 @@ static void loop_filter_rows_mt(YV12_BUFFER_CONFIG *frame, AV1_COMMON *cm,
// Loopfilter data
av1_loop_filter_data_reset
(
lf_data
,
frame
,
cm
,
planes
);
lf_data
->
start
=
start
+
i
*
M
I_BLOCK
_SIZE
;
lf_data
->
start
=
start
+
i
*
M
AX_MIB
_SIZE
;
lf_data
->
stop
=
stop
;
lf_data
->
y_only
=
y_only
;
...
...
@@ -320,7 +320,7 @@ static void loop_filter_rows_mt(YV12_BUFFER_CONFIG *frame, AV1_COMMON *cm,
// Loopfilter data
av1_loop_filter_data_reset
(
lf_data
,
frame
,
cm
,
planes
);
lf_data
->
start
=
start
+
i
*
M
I_BLOCK
_SIZE
;
lf_data
->
start
=
start
+
i
*
M
AX_MIB
_SIZE
;
lf_data
->
stop
=
stop
;
lf_data
->
y_only
=
y_only
;
...
...
@@ -350,7 +350,7 @@ static void loop_filter_rows_mt(YV12_BUFFER_CONFIG *frame, AV1_COMMON *cm,
// Loopfilter data
av1_loop_filter_data_reset
(
lf_data
,
frame
,
cm
,
planes
);
lf_data
->
start
=
start
+
i
*
M
I_BLOCK
_SIZE
;
lf_data
->
start
=
start
+
i
*
M
AX_MIB
_SIZE
;
lf_data
->
stop
=
stop
;
lf_data
->
y_only
=
y_only
;
...
...
av1/common/tile_common.c
View file @
de9089f5
...
...
@@ -17,8 +17,8 @@
#define MAX_TILE_WIDTH_B64 64
static
int
get_tile_offset
(
int
idx
,
int
mis
,
int
log2
)
{
const
int
sb_cols
=
mi_cols_aligned_to_sb
(
mis
)
>>
M
I_BLOCK
_SIZE_LOG2
;
const
int
offset
=
((
idx
*
sb_cols
)
>>
log2
)
<<
M
I_BLOCK
_SIZE_LOG2
;
const
int
sb_cols
=
mi_cols_aligned_to_sb
(
mis
)
>>
M
AX_MIB
_SIZE_LOG2
;
const
int
offset
=
((
idx
*
sb_cols
)
>>
log2
)
<<
M
AX_MIB
_SIZE_LOG2
;
return
AOMMIN
(
offset
,
mis
);
}
...
...
@@ -51,7 +51,7 @@ static int get_max_log2_tile_cols(const int sb64_cols) {
void
av1_get_tile_n_bits
(
int
mi_cols
,
int
*
min_log2_tile_cols
,
int
*
max_log2_tile_cols
)
{
const
int
sb64_cols
=
mi_cols_aligned_to_sb
(
mi_cols
)
>>
M
I_BLOCK
_SIZE_LOG2
;
const
int
sb64_cols
=
mi_cols_aligned_to_sb
(
mi_cols
)
>>
M
AX_MIB
_SIZE_LOG2
;
*
min_log2_tile_cols
=
get_min_log2_tile_cols
(
sb64_cols
);
*
max_log2_tile_cols
=
get_max_log2_tile_cols
(
sb64_cols
);
assert
(
*
min_log2_tile_cols
<=
*
max_log2_tile_cols
);
...
...
av1/decoder/decodeframe.c
View file @
de9089f5
...
...
@@ -566,7 +566,8 @@ static void decode_block(AV1Decoder *const pbi, MACROBLOCKD *const xd,
static
INLINE
int
dec_partition_plane_context
(
const
MACROBLOCKD
*
xd
,
int
mi_row
,
int
mi_col
,
int
bsl
)
{
const
PARTITION_CONTEXT
*
above_ctx
=
xd
->
above_seg_context
+
mi_col
;
const
PARTITION_CONTEXT
*
left_ctx
=
xd
->
left_seg_context
+
(
mi_row
&
MI_MASK
);
const
PARTITION_CONTEXT
*
left_ctx
=
xd
->
left_seg_context
+
(
mi_row
&
MAX_MIB_MASK
);
int
above
=
(
*
above_ctx
>>
bsl
)
&
1
,
left
=
(
*
left_ctx
>>
bsl
)
&
1
;
// assert(bsl >= 0);
...
...
@@ -578,7 +579,8 @@ static INLINE void dec_update_partition_context(MACROBLOCKD *xd, int mi_row,
int
mi_col
,
BLOCK_SIZE
subsize
,
int
bw
)
{
PARTITION_CONTEXT
*
const
above_ctx
=
xd
->
above_seg_context
+
mi_col
;
PARTITION_CONTEXT
*
const
left_ctx
=
xd
->
left_seg_context
+
(
mi_row
&
MI_MASK
);
PARTITION_CONTEXT
*
const
left_ctx
=
xd
->
left_seg_context
+
(
mi_row
&
MAX_MIB_MASK
);
// update the partition context at the end notes. set partition bits
// of block sizes larger than the current one to be one, and partition
...
...
@@ -1287,7 +1289,7 @@ static const uint8_t *decode_tiles(AV1Decoder *pbi, const uint8_t *data,
TileInfo
tile
;
av1_tile_set_row
(
&
tile
,
cm
,
tile_row
);
for
(
mi_row
=
tile
.
mi_row_start
;
mi_row
<
tile
.
mi_row_end
;
mi_row
+=
M
I_BLOCK
_SIZE
)
{
mi_row
+=
M
AX_MIB
_SIZE
)
{
for
(
tile_col
=
0
;
tile_col
<
tile_cols
;
++
tile_col
)
{
const
int
col
=
pbi
->
inv_tile_order
?
tile_cols
-
tile_col
-
1
:
tile_col
;
...
...
@@ -1296,7 +1298,7 @@ static const uint8_t *decode_tiles(AV1Decoder *pbi, const uint8_t *data,
av1_zero
(
tile_data
->
xd
.
left_context
);
av1_zero
(
tile_data
->
xd
.
left_seg_context
);
for
(
mi_col
=
tile
.
mi_col_start
;
mi_col
<
tile
.
mi_col_end
;
mi_col
+=
M
I_BLOCK
_SIZE
)
{
mi_col
+=
M
AX_MIB
_SIZE
)
{
decode_partition
(
pbi
,
&
tile_data
->
xd
,
mi_row
,
mi_col
,
&
tile_data
->
bit_reader
,
BLOCK_64X64
,
4
);
}
...
...
@@ -1307,14 +1309,14 @@ static const uint8_t *decode_tiles(AV1Decoder *pbi, const uint8_t *data,
}
// Loopfilter one row.
if
(
cm
->
lf
.
filter_level
&&
!
cm
->
skip_loop_filter
)
{
const
int
lf_start
=
mi_row
-
M
I_BLOCK
_SIZE
;
const
int
lf_start
=
mi_row
-
M
AX_MIB
_SIZE
;
LFWorkerData
*
const
lf_data
=
(
LFWorkerData
*
)
pbi
->
lf_worker
.
data1
;
// delay the loopfilter by 1 macroblock row.
if
(
lf_start
<
0
)
continue
;
// decoding has completed: finish up the loop filter in this thread.
if
(
mi_row
+
M
I_BLOCK
_SIZE
>=
cm
->
mi_rows
)
continue
;
if
(
mi_row
+
M
AX_MIB
_SIZE
>=
cm
->
mi_rows
)
continue
;
winterface
->
sync
(
&
pbi
->
lf_worker
);
lf_data
->
start
=
lf_start
;
...
...
@@ -1329,7 +1331,7 @@ static const uint8_t *decode_tiles(AV1Decoder *pbi, const uint8_t *data,
// still be changed by the longest loopfilter of the next superblock
// row.
if
(
cm
->
frame_parallel_decode
)
av1_frameworker_broadcast
(
pbi
->
cur_buf
,
mi_row
<<
M
I_BLOCK
_SIZE_LOG2
);
av1_frameworker_broadcast
(
pbi
->
cur_buf
,
mi_row
<<
M
AX_MIB
_SIZE_LOG2
);
}
}
...
...
@@ -1368,11 +1370,11 @@ static int tile_worker_hook(TileWorkerData *const tile_data,
tile_data
->
xd
.
error_info
=
&
tile_data
->
error_info
;
for
(
mi_row
=
tile
->
mi_row_start
;
mi_row
<
tile
->
mi_row_end
;
mi_row
+=
M
I_BLOCK
_SIZE
)
{
mi_row
+=
M
AX_MIB
_SIZE
)
{
av1_zero
(
tile_data
->
xd
.
left_context
);
av1_zero
(
tile_data
->
xd
.
left_seg_context
);
for
(
mi_col
=
tile
->
mi_col_start
;
mi_col
<
tile
->
mi_col_end
;
mi_col
+=
M
I_BLOCK
_SIZE
)
{
mi_col
+=
M
AX_MIB
_SIZE
)
{
decode_partition
(
tile_data
->
pbi
,
&
tile_data
->
xd
,
mi_row
,
mi_col
,
&
tile_data
->
bit_reader
,
BLOCK_64X64
,
4
);
}
...
...
av1/decoder/decodemv.c
View file @
de9089f5
...
...
@@ -745,7 +745,7 @@ static int read_is_inter_block(AV1_COMMON *const cm, MACROBLOCKD *const xd,
static
void
fpm_sync
(
void
*
const
data
,
int
mi_row
)
{
AV1Decoder
*
const
pbi
=
(
AV1Decoder
*
)
data
;
av1_frameworker_wait
(
pbi
->
frame_worker_owner
,
pbi
->
common
.
prev_frame
,
mi_row
<<
M
I_BLOCK
_SIZE_LOG2
);
mi_row
<<
M
AX_MIB
_SIZE_LOG2
);
}
static
void
read_inter_block_mode_info
(
AV1Decoder
*
const
pbi
,
...
...
av1/encoder/aq_cyclicrefresh.c
View file @
de9089f5
...
...
@@ -391,8 +391,8 @@ static void cyclic_refresh_update_map(AV1_COMP *const cpi) {
int
i
,
block_count
,
bl_index
,
sb_rows
,
sb_cols
,
sbs_in_frame
;
int
xmis
,
ymis
,
x
,
y
;
memset
(
seg_map
,
CR_SEGMENT_ID_BASE
,
cm
->
mi_rows
*
cm
->
mi_cols
);
sb_cols
=
(
cm
->
mi_cols
+
M
I_BLOCK
_SIZE
-
1
)
/
M
I_BLOCK
_SIZE
;
sb_rows
=
(
cm
->
mi_rows
+
M
I_BLOCK
_SIZE
-
1
)
/
M
I_BLOCK
_SIZE
;
sb_cols
=
(
cm
->
mi_cols
+
M
AX_MIB
_SIZE
-
1
)
/
M
AX_MIB
_SIZE
;
sb_rows
=
(
cm
->
mi_rows
+
M
AX_MIB
_SIZE
-
1
)
/
M
AX_MIB
_SIZE
;
sbs_in_frame
=
sb_cols
*
sb_rows
;
// Number of target blocks to get the q delta (segment 1).
block_count
=
cr
->
percent_refresh
*
cm
->
mi_rows
*
cm
->
mi_cols
/
100
;
...
...
@@ -407,8 +407,8 @@ static void cyclic_refresh_update_map(AV1_COMP *const cpi) {
// Get the mi_row/mi_col corresponding to superblock index i.
int
sb_row_index
=
(
i
/
sb_cols
);
int
sb_col_index
=
i
-
sb_row_index
*
sb_cols
;
int
mi_row
=
sb_row_index
*
M
I_BLOCK
_SIZE
;
int
mi_col
=
sb_col_index
*
M
I_BLOCK
_SIZE
;
int
mi_row
=
sb_row_index
*
M
AX_MIB
_SIZE
;
int
mi_col
=
sb_col_index
*
M
AX_MIB
_SIZE
;
int
qindex_thresh
=
cpi
->
oxcf
.
content
==
AOM_CONTENT_SCREEN
?
av1_get_qindex
(
&
cm
->
seg
,
CR_SEGMENT_ID_BOOST2
,
cm
->
base_qindex
)
...
...
av1/encoder/bitstream.c
View file @
de9089f5
...
...
@@ -926,10 +926,10 @@ static void write_modes(AV1_COMP *cpi, const TileInfo *const tile,
int
mi_row
,
mi_col
;
for
(
mi_row
=
tile
->
mi_row_start
;
mi_row
<
tile
->
mi_row_end
;
mi_row
+=
M
I_BLOCK
_SIZE
)
{
mi_row
+=
M
AX_MIB
_SIZE
)
{
av1_zero
(
xd
->
left_seg_context
);
for
(
mi_col
=
tile
->
mi_col_start
;
mi_col
<
tile
->
mi_col_end
;
mi_col
+=
M
I_BLOCK
_SIZE
)
mi_col
+=
M
AX_MIB
_SIZE
)
write_modes_sb
(
cpi
,
tile
,
w
,
tok
,
tok_end
,
mi_row
,
mi_col
,
BLOCK_64X64
);
}
}
...
...
av1/encoder/clpf_rdo.c
View file @
de9089f5
...
...
@@ -74,7 +74,7 @@ int av1_clpf_decision(int k, int l, const YV12_BUFFER_CONFIG *rec,
for
(
n
=
0
;
n
<
w
;
n
++
)
{
int
xpos
=
(
l
<<
fb_size_log2
)
+
n
*
block_size
;
int
ypos
=
(
k
<<
fb_size_log2
)
+
m
*
block_size
;
const
int
bs
=
M
I_BLOCK
_SIZE
;
const
int
bs
=
M
AX_MIB
_SIZE
;
if
(
!
cm
->
mi_grid_visible
[
ypos
/
bs
*
cm
->
mi_stride
+
xpos
/
bs
]
->
mbmi
.
skip
)
detect_clpf
(
rec
->
y_buffer
,
org
->
y_buffer
,
xpos
,
ypos
,
rec
->
y_crop_width
,
...
...
@@ -141,8 +141,8 @@ static int clpf_rdo(int y, int x, const YV12_BUFFER_CONFIG *rec,
for
(
n
=
0
;
n
<
w
;
n
++
)
{