Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
A
aom-rav1e
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Service Desk
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Incidents
Environments
Packages & Registries
Packages & Registries
Container Registry
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Xiph.Org
aom-rav1e
Commits
ff3f9363
Commit
ff3f9363
authored
Apr 12, 2013
by
John Koleszar
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Use BLOCK_SIZE_TYPE in foreach_ walker
Change-Id: I655305c9e22bdd9abc893d3c40d4bc6616aa1d35
parent
acfc5981
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
20 additions
and
22 deletions
+20
-22
vp9/common/vp9_blockd.h
vp9/common/vp9_blockd.h
+12
-11
vp9/decoder/vp9_detokenize.c
vp9/decoder/vp9_detokenize.c
+4
-4
vp9/encoder/vp9_tokenize.c
vp9/encoder/vp9_tokenize.c
+4
-7
No files found.
vp9/common/vp9_blockd.h
View file @
ff3f9363
...
...
@@ -801,16 +801,18 @@ static INLINE int old_block_idx_4x4(MACROBLOCKD* const xd, int block_size_b,
}
typedef
void
(
*
foreach_transformed_block_visitor
)(
int
plane
,
int
block
,
int
block_size_b
,
BLOCK_SIZE_TYPE
bsize
,
int
ss_txfrm_size
,
void
*
arg
);
static
INLINE
void
foreach_transformed_block_in_plane
(
const
MACROBLOCKD
*
const
xd
,
int
block_
size
,
int
plane
,
const
MACROBLOCKD
*
const
xd
,
BLOCK_SIZE_TYPE
b
size
,
int
plane
,
int
is_split
,
foreach_transformed_block_visitor
visit
,
void
*
arg
)
{
const
int
bw
=
b_width_log2
(
bsize
),
bh
=
b_height_log2
(
bsize
);
// block and transform sizes, in number of 4x4 blocks log 2 ("*_b")
// 4x4=0, 8x8=2, 16x16=4, 32x32=6, 64x64=8
const
TX_SIZE
tx_size
=
xd
->
mode_info_context
->
mbmi
.
txfm_size
;
const
int
block_size_b
=
b
lock_size
;
const
int
block_size_b
=
b
w
+
bh
;
const
int
txfrm_size_b
=
tx_size
*
2
;
// subsampled size of the block
...
...
@@ -825,20 +827,19 @@ static INLINE void foreach_transformed_block_in_plane(
const
int
ss_txfrm_size
=
txfrm_size_b
>
ss_block_size
||
is_split
?
txfrm_size_b
-
ss_max
*
2
:
txfrm_size_b
;
const
int
step
=
1
<<
ss_txfrm_size
;
// TODO(jkoleszar): 1 may not be correct here with larger chroma planes.
const
int
inc
=
is_split
?
1
:
(
1
<<
ss_txfrm_size
);
int
i
;
assert
(
txfrm_size_b
<=
block_size_b
);
assert
(
ss_txfrm_size
<=
ss_block_size
);
for
(
i
=
0
;
i
<
(
1
<<
ss_block_size
);
i
+=
inc
)
{
visit
(
plane
,
i
,
b
lock_size_b
,
ss_txfrm_size
,
arg
);
for
(
i
=
0
;
i
<
(
1
<<
ss_block_size
);
i
+=
step
)
{
visit
(
plane
,
i
,
b
size
,
ss_txfrm_size
,
arg
);
}
}
static
INLINE
void
foreach_transformed_block
(
const
MACROBLOCKD
*
const
xd
,
int
block_
size
,
const
MACROBLOCKD
*
const
xd
,
BLOCK_SIZE_TYPE
b
size
,
foreach_transformed_block_visitor
visit
,
void
*
arg
)
{
const
MB_PREDICTION_MODE
mode
=
xd
->
mode_info_context
->
mbmi
.
mode
;
const
int
is_split
=
...
...
@@ -850,13 +851,13 @@ static INLINE void foreach_transformed_block(
const
int
is_split_chroma
=
is_split
&&
xd
->
plane
[
plane
].
plane_type
==
PLANE_TYPE_UV
;
foreach_transformed_block_in_plane
(
xd
,
b
lock_
size
,
plane
,
is_split_chroma
,
foreach_transformed_block_in_plane
(
xd
,
bsize
,
plane
,
is_split_chroma
,
visit
,
arg
);
}
}
static
INLINE
void
foreach_transformed_block_uv
(
const
MACROBLOCKD
*
const
xd
,
int
block_
size
,
const
MACROBLOCKD
*
const
xd
,
BLOCK_SIZE_TYPE
b
size
,
foreach_transformed_block_visitor
visit
,
void
*
arg
)
{
const
MB_PREDICTION_MODE
mode
=
xd
->
mode_info_context
->
mbmi
.
mode
;
const
int
is_split
=
...
...
@@ -865,7 +866,7 @@ static INLINE void foreach_transformed_block_uv(
int
plane
;
for
(
plane
=
1
;
plane
<
MAX_MB_PLANE
;
plane
++
)
{
foreach_transformed_block_in_plane
(
xd
,
b
lock_
size
,
plane
,
is_split
,
foreach_transformed_block_in_plane
(
xd
,
bsize
,
plane
,
is_split
,
visit
,
arg
);
}
}
...
...
vp9/decoder/vp9_detokenize.c
View file @
ff3f9363
...
...
@@ -402,11 +402,12 @@ struct decode_block_args {
int
*
eobtotal
;
};
static
void
decode_block
(
int
plane
,
int
block
,
int
block_size_b
,
BLOCK_SIZE_TYPE
bsize
,
int
ss_txfrm_size
,
void
*
argv
)
{
const
struct
decode_block_args
*
const
arg
=
argv
;
const
int
old_block_idx
=
old_block_idx_4x4
(
arg
->
xd
,
block_size_b
,
const
int
bw
=
b_width_log2
(
bsize
),
bh
=
b_height_log2
(
bsize
);
const
int
old_block_idx
=
old_block_idx_4x4
(
arg
->
xd
,
bw
+
bh
,
plane
,
block
);
// find the maximum eob for this transform size, adjusted by segment
...
...
@@ -428,10 +429,9 @@ int vp9_decode_tokens(VP9D_COMP* const pbi,
MACROBLOCKD
*
const
xd
,
BOOL_DECODER
*
const
bc
,
BLOCK_SIZE_TYPE
bsize
)
{
const
int
bwl
=
mb_width_log2
(
bsize
)
+
2
,
bhl
=
mb_height_log2
(
bsize
)
+
2
;
int
eobtotal
=
0
;
struct
decode_block_args
args
=
{
pbi
,
xd
,
bc
,
&
eobtotal
};
foreach_transformed_block
(
xd
,
b
wl
+
bhl
,
decode_block
,
&
args
);
foreach_transformed_block
(
xd
,
b
size
,
decode_block
,
&
args
);
return
eobtotal
;
}
...
...
vp9/encoder/vp9_tokenize.c
View file @
ff3f9363
...
...
@@ -381,32 +381,29 @@ struct is_skippable_args {
int
*
skippable
;
};
static
void
is_skippable
(
int
plane
,
int
block
,
int
block_size_b
,
int
ss_txfrm_size
,
void
*
argv
)
{
BLOCK_SIZE_TYPE
bsize
,
int
ss_txfrm_size
,
void
*
argv
)
{
struct
is_skippable_args
*
args
=
argv
;
args
->
skippable
[
0
]
&=
(
!
args
->
xd
->
plane
[
plane
].
eobs
[
block
]);
}
int
vp9_sb_is_skippable
(
MACROBLOCKD
*
xd
,
BLOCK_SIZE_TYPE
bsize
)
{
const
int
bwl
=
mb_width_log2
(
bsize
)
+
2
,
bhl
=
mb_height_log2
(
bsize
)
+
2
;
int
result
=
1
;
struct
is_skippable_args
args
=
{
xd
,
&
result
};
foreach_transformed_block
(
xd
,
b
wl
+
bhl
,
is_skippable
,
&
args
);
foreach_transformed_block
(
xd
,
b
size
,
is_skippable
,
&
args
);
return
result
;
}
int
vp9_sby_is_skippable
(
MACROBLOCKD
*
xd
,
BLOCK_SIZE_TYPE
bsize
)
{
const
int
bwl
=
mb_width_log2
(
bsize
)
+
2
,
bhl
=
mb_height_log2
(
bsize
)
+
2
;
int
result
=
1
;
struct
is_skippable_args
args
=
{
xd
,
&
result
};
foreach_transformed_block_in_plane
(
xd
,
b
wl
+
bhl
,
0
,
0
,
is_skippable
,
&
args
);
foreach_transformed_block_in_plane
(
xd
,
b
size
,
0
,
0
,
is_skippable
,
&
args
);
return
result
;
}
int
vp9_sbuv_is_skippable
(
MACROBLOCKD
*
xd
,
BLOCK_SIZE_TYPE
bsize
)
{
const
int
bwl
=
mb_width_log2
(
bsize
)
+
2
,
bhl
=
mb_height_log2
(
bsize
)
+
2
;
int
result
=
1
;
struct
is_skippable_args
args
=
{
xd
,
&
result
};
foreach_transformed_block_uv
(
xd
,
b
wl
+
bhl
,
is_skippable
,
&
args
);
foreach_transformed_block_uv
(
xd
,
b
size
,
is_skippable
,
&
args
);
return
result
;
}
...
...
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