Commit 87909f1e authored by Thomas Daede's avatar Thomas Daede Committed by Thomas Daede

Update to libaom v1.0.0.

parent 064ddd74
......@@ -6,7 +6,7 @@ The fastest and safest AV1 encoder.
rav1e is an experimental AV1 video encoder. It is designed to eventually cover all use cases, though in its current form it is most suitable for cases where libaom (the reference encoder) is too slow.
AV1 is now frozen, though rav1e is not quite caught up with the release version. For this reason, you must use the libaom in the submodule. rav1e also temporarily uses libaom's transforms and CDF initialization tables.
rav1e temporarily uses libaom's transforms and CDF initialization tables, but is otherwise an independent implementation.
# Features
......
Subproject commit 2e5c84cd9375d906f53e8f7ed32b68dc28f46498
Subproject commit 76d7f5da327b209a4b936bfea7ad450e6cc157ab
......@@ -446,7 +446,7 @@ const INTRA_INTER_CONTEXTS: usize = 4;
// Level Map
const TXB_SKIP_CONTEXTS: usize = 13;
const EOB_COEF_CONTEXTS: usize = 22;
const EOB_COEF_CONTEXTS: usize = 9;
const SIG_COEF_CONTEXTS_2D: usize = 26;
const SIG_COEF_CONTEXTS_1D: usize = 16;
......@@ -2230,7 +2230,7 @@ impl ContextWriter {
self,
w,
bit,
&mut self.fc.eob_extra_cdf[txs_ctx][plane_type][eob_pt as usize]
&mut self.fc.eob_extra_cdf[txs_ctx][plane_type][(eob_pt - 3) as usize]
);
for i in 1..eob_offset_bits {
eob_shift = eob_offset_bits as u16 - 1 - i as u16;
......
......@@ -617,13 +617,14 @@ impl<'a> UncompressedHeader for BitWriter<'a, BE> {
fn write_sequence_header_obu(&mut self, seq: &mut Sequence, fi: &FrameInvariants)
-> Result<(), std::io::Error> {
self.write(3, seq.profile)?; // profile 0, 3 bits
self.write_bit(false)?; // still_picture
//self.write_bit(false)?; // reduced_still_picture
self.write(1, 0)?; // still_picture
self.write(1, 0)?; // reduced_still_picture
self.write_bit(false)?; // display model present
self.write_bit(false)?; // no timing info present
self.write(5, 0)?; // one operating point
self.write(12,0)?; // idc
self.write(4, 0)?; // level
self.write_bit(false)?; // no rate model
self.write(5, 0)?; // level
//self.write_bit(false)?; // no rate model
if seq.reduced_still_picture_hdr {
assert!(false);
} else {
......@@ -660,9 +661,11 @@ impl<'a> UncompressedHeader for BitWriter<'a, BE> {
self.write_bitdepth_colorspace_sampling();
self.write_bit(false)?; // separate uv delta q
self.write_bit(false)?; // no timing info present
self.write(1,0)?; // separate uv delta q
//self.write_bit(false)?; // no decoder model present
//self.write_color_config(seq)?;
//self.write_sequence_header2(seq, fi);
self.write_bit(seq.film_grain_params_present)?;
......@@ -1318,7 +1321,9 @@ fn write_uncompressed_header(packet: &mut Write,
if fi.frame_type == FrameType::KEY || fi.frame_type == FrameType::INTRA_ONLY {
assert!(fi.intra_only);
}
bw.write_bit(fi.error_resilient)?; // error resilient
if fi.frame_type != FrameType::KEY {
bw.write_bit(fi.error_resilient)?; // error resilient
}
if fi.intra_only {
// bw.write_bit(true)?; // disable_intra_edge_filter = true
}
......@@ -2175,7 +2180,7 @@ mod test_encode_decode {
let mut corrupted_count = 0;
unsafe {
println!("Decoding frame {}", fi.number);
let ret = aom_codec_decode(&mut dec.dec, packet.as_ptr(), packet.len() as u32, ptr::null_mut());
let ret = aom_codec_decode(&mut dec.dec, packet.as_ptr(), packet.len(), ptr::null_mut());
println!("Decoded. -> {}", ret);
if ret != 0 {
use std::ffi::CStr;
......
......@@ -18,22 +18,6 @@ use partition::TxType;
// understand what's going on here you should first understand the Perl code
// in libaom that generates these function bindings.
#[repr(C)]
struct TxfmParam {
// for both forward and inverse transforms
tx_type: TxType,
tx_size: TxSize,
lossless: libc::c_int,
bd: libc::c_int,
// are the pixel buffers octets or shorts? This should collapse to
// bd==8 implies !is_hbd, but that's not certain right now.
is_hbd: libc::c_int,
//tx_set_type: TxSetType,
tx_set_type: libc::c_int, // hack: I don't know why we need set type?
// for inverse transforms only
eob: libc::c_int
}
extern {
fn av1_fwd_txfm2d_4x4_c(
input: *const i16, output: *mut i32, stride: libc::c_int,
......@@ -43,6 +27,14 @@ extern {
input: *const i16, output: *mut i32, stride: libc::c_int,
tx_type: libc::c_int, bd: libc::c_int
);
fn av1_fwd_txfm2d_16x16_c(
input: *const i16, output: *mut i32, stride: libc::c_int,
tx_type: libc::c_int, bd: libc::c_int
);
fn av1_fwd_txfm2d_32x32_c(
input: *const i16, output: *mut i32, stride: libc::c_int,
tx_type: libc::c_int, bd: libc::c_int
);
}
extern "C" {
......@@ -74,12 +66,6 @@ extern "C" {
tx_type: libc::c_int,
bd: libc::c_int
) -> ();
fn av1_fht16x16_c(
input: *const i16,
output: *mut i32,
stride: libc::c_int,
txfm_param: *mut TxfmParam
);
static av1_inv_txfm2d_add_16x16: extern fn(
input: *const i32,
output: *mut u16,
......@@ -91,12 +77,6 @@ extern "C" {
input: *const i32, output: *mut u16, stride: libc::c_int,
tx_type: libc::c_int, bd: libc::c_int
);
fn av1_fht32x32_sse2(
input: *const i16,
output: *mut i32,
stride: libc::c_int,
txfm_pram: *mut TxfmParam
);
static av1_inv_txfm2d_add_32x32: extern fn(
input: *const i32,
output: *mut u16,
......@@ -220,21 +200,13 @@ fn iht8x8_add(
fn fht16x16(
input: &[i16], output: &mut [i32], stride: usize, tx_type: TxType
) {
let mut p = TxfmParam {
tx_type,
tx_size: TxSize::TX_16X16,
lossless: 0,
bd: 8,
is_hbd: 1,
tx_set_type: 0,
eob: 0
};
unsafe {
av1_fht16x16_c(
av1_fwd_txfm2d_16x16_c(
input.as_ptr(),
output.as_mut_ptr(),
stride as libc::c_int,
&mut p
tx_type as libc::c_int,
8
);
}
}
......@@ -267,21 +239,13 @@ fn iht16x16_add(
fn fht32x32(
input: &[i16], output: &mut [i32], stride: usize, tx_type: TxType
) {
let mut p = TxfmParam {
tx_type,
tx_size: TxSize::TX_32X32,
lossless: 0,
bd: 8,
is_hbd: 1,
tx_set_type: 0,
eob: 0
};
unsafe {
av1_fht32x32_sse2(
av1_fwd_txfm2d_32x32_c(
input.as_ptr(),
output.as_mut_ptr(),
stride as libc::c_int,
&mut p
tx_type as libc::c_int,
8
);
}
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment