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
b00c0902
Commit
b00c0902
authored
Mar 22, 2016
by
Alex Converse
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Wrap write_modes functions with macros to avoid ifdefs at all the callsites.
Change-Id: I5a960bf63ec404f0fbfe6a404f436ef4122a219d
parent
9d380d88
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
61 additions
and
99 deletions
+61
-99
vp10/encoder/bitstream.c
vp10/encoder/bitstream.c
+61
-99
No files found.
vp10/encoder/bitstream.c
View file @
b00c0902
...
...
@@ -1451,6 +1451,25 @@ static void write_mb_modes_kf(const VP10_COMMON *cm, const MACROBLOCKD *xd,
#endif // CONFIG_EXT_INTRA
}
#if CONFIG_ANS && CONFIG_SUPERTX
#define write_modes_b_wrapper(cpi, tile, w, ans, tok, tok_end, \
supertx_enabled, mi_row, mi_col) \
write_modes_b(cpi, tile, w, ans, tok, tok_end, supertx_enabled, mi_row, \
mi_col)
#elif CONFIG_SUPERTX
#define write_modes_b_wrapper(cpi, tile, w, ans, tok, tok_end, \
supertx_enabled, mi_row, mi_col) \
write_modes_b(cpi, tile, w, tok, tok_end, supertx_enabled, mi_row, mi_col)
#elif CONFIG_ANS
#define write_modes_b_wrapper(cpi, tile, w, ans, tok, tok_end, \
supertx_enabled, mi_row, mi_col) \
write_modes_b(cpi, tile, w, ans, tok, tok_end, mi_row, mi_col)
#else
#define write_modes_b_wrapper(cpi, tile, w, ans, tok, tok_end, \
supertx_enabled, mi_row, mi_col) \
write_modes_b(cpi, tile, w, tok, tok_end, mi_row, mi_col)
#endif // CONFIG_ANS && CONFIG_SUPERTX
static
void
write_modes_b
(
VP10_COMP
*
cpi
,
const
TileInfo
*
const
tile
,
vpx_writer
*
w
,
#if CONFIG_ANS
...
...
@@ -1590,6 +1609,26 @@ static void write_partition(const VP10_COMMON *const cm,
}
}
#if CONFIG_ANS && CONFIG_SUPERTX
#define write_modes_sb_wrapper(cpi, tile, w, ans, tok, tok_end, \
supertx_enabled, mi_row, mi_col, bsize) \
write_modes_sb(cpi, tile, w, ans, tok, tok_end, supertx_enabled, mi_row, \
mi_col, bsize)
#elif CONFIG_SUPERTX
#define write_modes_sb_wrapper(cpi, tile, w, ans, tok, tok_end, \
supertx_enabled, mi_row, mi_col, bsize) \
write_modes_sb(cpi, tile, w, tok, tok_end, supertx_enabled, mi_row, mi_col, \
bsize)
#elif CONFIG_ANS
#define write_modes_sb_wrapper(cpi, tile, w, ans, tok, tok_end, \
supertx_enabled, mi_row, mi_col, bsize) \
write_modes_sb(cpi, tile, w, ans, tok, tok_end, mi_row, mi_col, bsize)
#else
#define write_modes_sb_wrapper(cpi, tile, w, ans, tok, tok_end, \
supertx_enabled, mi_row, mi_col, bsize) \
write_modes_sb(cpi, tile, w, tok, tok_end, mi_row, mi_col, bsize)
#endif // CONFIG_ANS && CONFIG_SUPERTX
static
void
write_modes_sb
(
VP10_COMP
*
cpi
,
const
TileInfo
*
const
tile
,
vpx_writer
*
w
,
#if CONFIG_ANS
...
...
@@ -1663,107 +1702,37 @@ static void write_modes_sb(VP10_COMP *cpi, const TileInfo *const tile,
}
#endif // CONFIG_SUPERTX
if
(
subsize
<
BLOCK_8X8
)
{
write_modes_b
(
cpi
,
tile
,
w
,
#if CONFIG_ANS
ans
,
#endif // CONFIG_ANS
tok
,
tok_end
,
#if CONFIG_SUPERTX
supertx_enabled
,
#endif // CONFIG_SUPERTX
mi_row
,
mi_col
);
write_modes_b_wrapper
(
cpi
,
tile
,
w
,
ans
,
tok
,
tok_end
,
supertx_enabled
,
mi_row
,
mi_col
);
}
else
{
switch
(
partition
)
{
case
PARTITION_NONE
:
write_modes_b
(
cpi
,
tile
,
w
,
#if CONFIG_ANS
ans
,
#endif // CONFIG_ANS
tok
,
tok_end
,
#if CONFIG_SUPERTX
supertx_enabled
,
#endif // CONFIG_SUPERTX
mi_row
,
mi_col
);
write_modes_b_wrapper
(
cpi
,
tile
,
w
,
ans
,
tok
,
tok_end
,
supertx_enabled
,
mi_row
,
mi_col
);
break
;
case
PARTITION_HORZ
:
write_modes_b
(
cpi
,
tile
,
w
,
#if CONFIG_ANS
ans
,
#endif // CONFIG_ANS
tok
,
tok_end
,
#if CONFIG_SUPERTX
supertx_enabled
,
#endif // CONFIG_SUPERTX
mi_row
,
mi_col
);
write_modes_b_wrapper
(
cpi
,
tile
,
w
,
ans
,
tok
,
tok_end
,
supertx_enabled
,
mi_row
,
mi_col
);
if
(
mi_row
+
bs
<
cm
->
mi_rows
)
write_modes_b
(
cpi
,
tile
,
w
,
#if CONFIG_ANS
ans
,
#endif // CONFIG_ANS
tok
,
tok_end
,
#if CONFIG_SUPERTX
supertx_enabled
,
#endif // CONFIG_SUPERTX
mi_row
+
bs
,
mi_col
);
write_modes_b_wrapper
(
cpi
,
tile
,
w
,
ans
,
tok
,
tok_end
,
supertx_enabled
,
mi_row
+
bs
,
mi_col
);
break
;
case
PARTITION_VERT
:
write_modes_b
(
cpi
,
tile
,
w
,
#if CONFIG_ANS
ans
,
#endif // CONFIG_ANS
tok
,
tok_end
,
#if CONFIG_SUPERTX
supertx_enabled
,
#endif // CONFIG_SUPERTX
mi_row
,
mi_col
);
write_modes_b_wrapper
(
cpi
,
tile
,
w
,
ans
,
tok
,
tok_end
,
supertx_enabled
,
mi_row
,
mi_col
);
if
(
mi_col
+
bs
<
cm
->
mi_cols
)
write_modes_b
(
cpi
,
tile
,
w
,
#if CONFIG_ANS
ans
,
#endif // CONFIG_ANS
tok
,
tok_end
,
#if CONFIG_SUPERTX
supertx_enabled
,
#endif // CONFIG_SUPERTX
mi_row
,
mi_col
+
bs
);
write_modes_b_wrapper
(
cpi
,
tile
,
w
,
ans
,
tok
,
tok_end
,
supertx_enabled
,
mi_row
,
mi_col
+
bs
);
break
;
case
PARTITION_SPLIT
:
write_modes_sb
(
cpi
,
tile
,
w
,
#if CONFIG_ANS
ans
,
#endif // CONFIG_ANS
tok
,
tok_end
,
#if CONFIG_SUPERTX
supertx_enabled
,
#endif // CONFIG_SUPERTX
mi_row
,
mi_col
,
subsize
);
write_modes_sb
(
cpi
,
tile
,
w
,
#if CONFIG_ANS
ans
,
#endif // CONFIG_ANS
tok
,
tok_end
,
#if CONFIG_SUPERTX
supertx_enabled
,
#endif // CONFIG_SUPERTX
mi_row
,
mi_col
+
bs
,
subsize
);
write_modes_sb
(
cpi
,
tile
,
w
,
#if CONFIG_ANS
ans
,
#endif // CONFIG_ANS
tok
,
tok_end
,
#if CONFIG_SUPERTX
supertx_enabled
,
#endif // CONFIG_SUPERTX
mi_row
+
bs
,
mi_col
,
subsize
);
write_modes_sb
(
cpi
,
tile
,
w
,
#if CONFIG_ANS
ans
,
#endif // CONFIG_ANS
tok
,
tok_end
,
#if CONFIG_SUPERTX
supertx_enabled
,
#endif // CONFIG_SUPERTX
mi_row
+
bs
,
mi_col
+
bs
,
subsize
);
write_modes_sb_wrapper
(
cpi
,
tile
,
w
,
ans
,
tok
,
tok_end
,
supertx_enabled
,
mi_row
,
mi_col
,
subsize
);
write_modes_sb_wrapper
(
cpi
,
tile
,
w
,
ans
,
tok
,
tok_end
,
supertx_enabled
,
mi_row
,
mi_col
+
bs
,
subsize
);
write_modes_sb_wrapper
(
cpi
,
tile
,
w
,
ans
,
tok
,
tok_end
,
supertx_enabled
,
mi_row
+
bs
,
mi_col
,
subsize
);
write_modes_sb_wrapper
(
cpi
,
tile
,
w
,
ans
,
tok
,
tok_end
,
supertx_enabled
,
mi_row
+
bs
,
mi_col
+
bs
,
subsize
);
break
;
default:
assert
(
0
);
...
...
@@ -1817,15 +1786,8 @@ static void write_modes(VP10_COMP *cpi, const TileInfo *const tile,
vp10_zero_left_context
(
xd
);
for
(
mi_col
=
tile
->
mi_col_start
;
mi_col
<
tile
->
mi_col_end
;
mi_col
+=
MI_BLOCK_SIZE
)
write_modes_sb
(
cpi
,
tile
,
w
,
#if CONFIG_ANS
ans
,
#endif // CONFIG_ANS
tok
,
tok_end
,
#if CONFIG_SUPERTX
0
,
#endif
mi_row
,
mi_col
,
BLOCK_64X64
);
write_modes_sb_wrapper
(
cpi
,
tile
,
w
,
ans
,
tok
,
tok_end
,
0
,
mi_row
,
mi_col
,
BLOCK_64X64
);
}
}
...
...
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