1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
//! VP8 codec implementation.
//!
//! This module provides a pure Rust VP8 decoder based on RFC 6386.
//! VP8 is a royalty-free video codec developed by Google as part of
//! the `WebM` project.
//!
//! # Features
//!
//! - Boolean arithmetic decoder for entropy coding
//! - Frame header parsing for keyframes and inter frames
//! - Reference frame management (last, golden, altref)
//! - 4x4 DCT/IDCT transforms
//! - Intra prediction (DC, V, H, TM modes)
//! - Inter prediction with sub-pixel motion compensation
//! - Loop filter (deblocking)
//!
//! # Codec Details
//!
//! VP8 always outputs YUV 4:2:0 planar format (`Yuv420p`).
//! It supports two frame types:
//! - Keyframes: Can be decoded independently
//! - Inter frames: Use motion compensation from reference frames
//!
//! # Architecture
//!
//! VP8 operates on 16x16 macroblocks which can use:
//! - Intra prediction: I16 (16x16) or I4 (4x4) modes
//! - Inter prediction: Motion compensation with quarter-pixel precision
//! - Transform: 4x4 DCT or WHT for DC coefficients
//! - Loop filter: Deblocking filter at macroblock boundaries
//!
//! # Examples
//!
//! ```
//! use oximedia_codec::vp8::{Vp8Decoder, FrameHeader, FrameType};
//! use oximedia_codec::traits::{VideoDecoder, DecoderConfig};
//!
//! # fn main() -> Result<(), Box<dyn std::error::Error>> {
//! // Create a decoder
//! let config = DecoderConfig::default();
//! let mut decoder = Vp8Decoder::new(config)?;
//!
//! // Parse a frame header directly
//! let header_data = [
//! 0x10, 0x00, 0x00, // frame tag
//! 0x9D, 0x01, 0x2A, // sync code
//! 0x40, 0x01, 0xF0, 0x00, // 320x240
//! ];
//! let header = FrameHeader::parse(&header_data)?;
//! assert!(header.is_keyframe());
//! assert_eq!(header.width, 320);
//! assert_eq!(header.height, 240);
//!
//! // Decode a frame
//! decoder.send_packet(&header_data, 0)?;
//! if let Some(frame) = decoder.receive_frame()? {
//! assert_eq!(frame.width, 320);
//! assert_eq!(frame.height, 240);
//! }
//! # Ok(())
//! # }
//! ```
//!
//! # References
//!
//! - [RFC 6386: VP8 Data Format and Decoding Guide](https://tools.ietf.org/html/rfc6386)
//! - [WebM Project](https://www.webmproject.org/)
pub use BoolDecoder;
pub use ;
pub use Vp8Decoder;
pub use ;
pub use ;
pub use ;
pub use ;
pub use ;
pub use ;