Skip to content
GitLab
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
rav1e
Commits
0ec864a4
Commit
0ec864a4
authored
Dec 08, 2018
by
Luca Barbato
Committed by
Luca Barbato
Jun 25, 2019
Browse files
crav1e: wip: Unbreak
parent
7c789c47
Changes
1
Hide whitespace changes
Inline
Side-by-side
src/capi.rs
View file @
0ec864a4
...
...
@@ -69,8 +69,9 @@ pub struct Packet {
type
ChromaSamplePosition
=
rav1e
::
ChromaSamplePosition
;
type
ChromaSampling
=
rav1e
::
ChromaSampling
;
type
ColorDescription
=
rav1e
::
ColorDescription
;
type
EncoderConfig
=
rav1e
::
EncoderConfig
;
/* type MatrixCoefficients=rav1e::MatrixCoefficients;
type ColorPrimaries=rav1e::ColorPrimaries;
type TransferCharacteristics=rav1e::TransferCharacteristics; */
type
Rational
=
rav1e
::
Rational
;
#[no_mangle]
...
...
@@ -80,12 +81,8 @@ pub unsafe extern "C" fn rav1e_config_default(
bit_depth
:
u8
,
chroma_sampling
:
ChromaSampling
,
chroma_sample_position
:
ChromaSamplePosition
,
color_description
:
Option
<
ColorDescription
>
,
timebase
:
Rational
,
)
->
*
mut
Config
{
let
mut
enc
:
EncoderConfig
=
Default
::
default
();
enc
.color_description
=
color_description
;
let
cfg
=
rav1e
::
Config
{
frame_info
:
rav1e
::
FrameInfo
{
width
:
width
as
usize
,
...
...
@@ -95,7 +92,7 @@ pub unsafe extern "C" fn rav1e_config_default(
chroma_sample_position
,
},
timebase
,
enc
,
enc
:
Default
::
default
()
,
};
let
c
=
Box
::
new
(
Config
{
...
...
@@ -106,6 +103,21 @@ pub unsafe extern "C" fn rav1e_config_default(
Box
::
into_raw
(
c
)
}
/*
#[no_mangle]
pub unsafe extern "C" fn rav1e_config_set_color_description(cfg: *mut Config,
matrix: MatrixCoefficients,
primaries: ColorPrimaries,
transfer: TransferCharacteristics)
{
(*cfg).cfg.enc.color_description = Some(rav1e::ColorDescription {
matrix_coefficients: matrix,
color_primaries: primaries,
transfer_characteristics: transfer,
});
}
*/
#[no_mangle]
pub
unsafe
extern
"C"
fn
rav1e_config_unref
(
cfg
:
*
mut
Config
)
{
let
_
=
Box
::
from_raw
(
cfg
);
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new 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