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
Timothy B. Terriberry
rav1e
Commits
2e7d6700
Commit
2e7d6700
authored
Jun 11, 2019
by
Luca Barbato
Committed by
Thomas Daede
Jun 13, 2019
Browse files
Make all the non-essential API surface private
parent
172a1335
Changes
8
Hide whitespace changes
Inline
Side-by-side
.travis.yml
View file @
2e7d6700
...
...
@@ -55,7 +55,7 @@ jobs:
-
name
:
"
Tests"
script
:
cargo test --verbose --release --features=decode_test -- --ignored
-
name
:
"
Bench"
script
:
cargo bench --verbose
script
:
RUSTFLAGS="--cfg rav1e_bench"
cargo bench --verbose
-
name
:
"
Doc
&
Clippy
(linter):
verifying
code
quality"
script
:
-
cargo doc --verbose --no-deps
...
...
benches/bench.rs
View file @
2e7d6700
...
...
@@ -11,14 +11,15 @@ mod predict;
mod
transform
;
mod
me
;
use
rav1e
::
*
;
use
rav1e
::
cdef
::
cdef_filter_frame
;
use
rav1e
::
context
::
*
;
use
rav1e
::
partition
::
*
;
use
rav1e
::
predict
::
*
;
use
rav1e
::
rdo
::
rdo_cfl_alpha
;
use
rav1e
::
rdo
::
RDOType
;
use
rav1e
::
ec
::
*
;
use
rav1e
::
bench
::
api
::
*
;
use
rav1e
::
bench
::
encoder
::
*
;
use
rav1e
::
bench
::
cdef
::
*
;
use
rav1e
::
bench
::
context
::
*
;
use
rav1e
::
bench
::
ec
::
*
;
use
rav1e
::
bench
::
partition
::
*
;
use
rav1e
::
bench
::
predict
::
*
;
use
rav1e
::
bench
::
rdo
::
*
;
use
crate
::
transform
::
transform
;
use
criterion
::
*
;
...
...
@@ -43,7 +44,7 @@ fn write_b_bench(b: &mut Bencher, tx_size: TxSize, qindex: usize) {
};
let
sequence
=
Sequence
::
new
(
&
Default
::
default
());
let
mut
fi
=
FrameInvariants
::
<
u16
>
::
new
(
config
,
sequence
);
let
mut
w
=
ec
::
WriterEncoder
::
new
();
let
mut
w
=
WriterEncoder
::
new
();
let
mut
fc
=
CDFContext
::
new
(
fi
.base_q_idx
);
let
mut
fb
=
FrameBlocks
::
new
(
fi
.sb_width
*
16
,
fi
.sb_height
*
16
);
let
mut
tb
=
fb
.as_tile_blocks_mut
();
...
...
benches/me.rs
View file @
2e7d6700
...
...
@@ -8,12 +8,12 @@
// PATENTS file, you can obtain it at www.aomedia.org/license/patent.
use
criterion
::
*
;
use
c
ra
te
::
partition
::
*
;
use
c
ra
te
::
partition
::
BlockSize
::
*
;
use
c
ra
te
::
plane
::
*
;
use
ra
v1e
::
bench
::
partition
::
*
;
use
ra
v1e
::
bench
::
partition
::
BlockSize
::
*
;
use
ra
v1e
::
bench
::
plane
::
*
;
use
rand
::{
Rng
,
SeedableRng
};
use
rand_chacha
::
ChaChaRng
;
use
rav1e
::
me
;
use
rav1e
::
bench
::
me
;
use
rav1e
::
Pixel
;
fn
fill_plane
<
T
:
Pixel
>
(
ra
:
&
mut
ChaChaRng
,
plane
:
&
mut
Plane
<
T
>
)
{
...
...
benches/predict.rs
View file @
2e7d6700
...
...
@@ -10,10 +10,10 @@
use
criterion
::
*
;
use
rand
::{
Rng
,
RngCore
,
SeedableRng
};
use
rand_chacha
::
ChaChaRng
;
use
rav1e
::
partition
::
BlockSize
;
use
rav1e
::
predict
::{
Block4x4
,
Intra
};
use
c
ra
te
::
plane
::
*
;
use
c
ra
te
::
util
::
*
;
use
rav1e
::
bench
::
partition
::
BlockSize
;
use
rav1e
::
bench
::
predict
::{
Block4x4
,
Intra
};
use
ra
v1e
::
bench
::
plane
::
*
;
use
ra
v1e
::
bench
::
util
::
*
;
pub
const
BLOCK_SIZE
:
BlockSize
=
BlockSize
::
BLOCK_32X32
;
...
...
benches/transform.rs
View file @
2e7d6700
...
...
@@ -10,7 +10,7 @@
use
criterion
::
*
;
use
rand
::{
Rng
,
SeedableRng
};
use
rand_chacha
::
ChaChaRng
;
use
rav1e
::
transform
;
use
rav1e
::
bench
::
transform
;
fn
bench_idct4
(
b
:
&
mut
Bencher
,
bit_depth
:
&
usize
)
{
let
mut
ra
=
ChaChaRng
::
from_seed
([
0
;
32
]);
...
...
src/lib.rs
View file @
2e7d6700
...
...
@@ -15,43 +15,43 @@
#[macro_use]
extern
crate
pretty_assertions
;
pub
mod
ec
;
pub
mod
partition
;
pub
mod
plane
;
pub
mod
transform
;
pub
mod
quantize
;
pub
mod
predict
;
pub
mod
rdo
;
pub
mod
rdo_tables
;
mod
ec
;
mod
partition
;
mod
plane
;
mod
transform
;
mod
quantize
;
mod
predict
;
mod
rdo
;
mod
rdo_tables
;
#[macro_use]
pub
mod
util
;
pub
mod
context
;
pub
mod
entropymode
;
pub
mod
token_cdfs
;
pub
mod
deblock
;
pub
mod
segmentation
;
pub
mod
cdef
;
pub
mod
lrf
;
pub
mod
encoder
;
pub
mod
mc
;
pub
mod
me
;
pub
mod
metrics
;
pub
mod
scan_order
;
pub
mod
scenechange
;
pub
mod
rate
;
pub
mod
tiling
;
mod
util
;
mod
context
;
mod
entropymode
;
mod
token_cdfs
;
mod
deblock
;
mod
segmentation
;
mod
cdef
;
mod
lrf
;
mod
encoder
;
mod
mc
;
mod
me
;
mod
metrics
;
mod
scan_order
;
mod
scenechange
;
mod
rate
;
mod
tiling
;
mod
api
;
mod
header
;
mod
frame
;
pub
use
crate
::
api
::
*
;
pub
use
crate
::
encoder
::
*
;
pub
use
crate
::
header
::
*
;
pub
use
crate
::
util
::{
CastFromPrimitive
,
Pixel
};
use
crate
::
encoder
::
*
;
pub
use
crate
::
api
::
*
;
pub
use
crate
::
frame
::
Frame
;
pub
use
crate
::
encoder
::
Tune
;
pub
use
crate
::
partition
::
BlockSize
;
pub
use
crate
::
util
::{
CastFromPrimitive
,
Pixel
};
/// Version information
///
...
...
@@ -148,3 +148,18 @@ mod test_encode_decode_aom;
#[cfg(all(test,
feature=
"decode_test_dav1d"
))]
mod
test_encode_decode_dav1d
;
#[cfg(rav1e_bench)]
pub
mod
bench
{
pub
mod
api
{
pub
use
crate
::
api
::
*
;
}
pub
mod
cdef
{
pub
use
crate
::
cdef
::
*
;
}
pub
mod
context
{
pub
use
crate
::
context
::
*
;
}
pub
mod
ec
{
pub
use
crate
::
ec
::
*
;
}
pub
mod
encoder
{
pub
use
crate
::
encoder
::
*
;
}
pub
mod
me
{
pub
use
crate
::
me
::
*
;
}
pub
mod
partition
{
pub
use
crate
::
partition
::
*
;
}
pub
mod
plane
{
pub
use
crate
::
plane
::
*
;
}
pub
mod
predict
{
pub
use
crate
::
predict
::
*
;
}
pub
mod
rdo
{
pub
use
crate
::
rdo
::
*
;
}
pub
mod
transform
{
pub
use
crate
::
transform
::
*
;
}
pub
mod
util
{
pub
use
crate
::
util
::
*
;
}
}
src/tiling/plane_region.rs
View file @
2e7d6700
...
...
@@ -179,7 +179,7 @@ macro_rules! plane_region_common {
///
/// # Example
///
/// ```
/// ```
ignore
/// # use rav1e::tiling::*;
/// # fn f(region: &PlaneRegion<'_, u16>) {
/// // a subregion from (10, 8) to the end of the region
...
...
@@ -187,7 +187,7 @@ macro_rules! plane_region_common {
/// # }
/// ```
///
/// ```
/// ```
ignore
/// # use rav1e::context::*;
/// # use rav1e::tiling::*;
/// # fn f(region: &PlaneRegion<'_, u16>) {
...
...
@@ -313,7 +313,7 @@ impl<'a, T: Pixel> PlaneRegionMut<'a, T> {
///
/// # Example
///
/// ```
/// ```
ignore
/// # use rav1e::tiling::*;
/// # fn f(region: &mut PlaneRegionMut<'_, u16>) {
/// // a mutable subregion from (10, 8) having size (32, 32)
...
...
@@ -321,7 +321,7 @@ impl<'a, T: Pixel> PlaneRegionMut<'a, T> {
/// # }
/// ```
///
/// ```
/// ```
ignore
/// # use rav1e::context::*;
/// # use rav1e::tiling::*;
/// # fn f(region: &mut PlaneRegionMut<'_, u16>) {
...
...
src/util.rs
View file @
2e7d6700
...
...
@@ -27,10 +27,7 @@ pub struct Align32;
/// A 16 byte aligned array.
/// # Examples
/// ```
/// extern crate rav1e;
/// use rav1e::util::*;
///
/// ``` ignore
/// let mut x: AlignedArray<[i16; 64 * 64]> = AlignedArray([0; 64 * 64]);
/// assert!(x.array.as_ptr() as usize % 16 == 0);
///
...
...
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