forge
Explore
Log in

Don't you dare go Hollow

U15: ec-dv drop re-exports nothing outside the crate uses (DvAudio, DvPicture, dv_probe_score, to_video_frame, PROFILE_BYTES, is_dv_header); delete the now-dead is_dv_header

Browse files at this commit

5796a707e56eba1978bffc2f7bf675a7ded7ec32Ahmet Kaan GümüşParent: 3d4a9b7
crates/ec-dv/src/lib.rsmodified+7 -7
@@ -6,11 +6,11 @@
66 //! blocks, macroblocks and video segments, so planes are byte-identical to FFmpeg's native
77 //! `yuv411p` / `yuv420p` / `yuv422p` output.
88 //!
9-//! * [`DvVideoDecoder`] / [`DvPicture`] -- frame in, native planes out (4:1:1 stays 4:1:1).
9+//! * [`DvVideoDecoder`] / `DvPicture` -- frame in, native planes out (4:1:1 stays 4:1:1).
1010 //! * [`DvDecoder`] -- the `ec_core` [`Decoder`](ec_core::registry::Decoder). It widens 4:1:1 to
1111 //! `I422` by exact chroma duplication (ec-core has no `I411`); 4:2:0 -> `I420`; 4:2:2 -> `I422`.
1212 //! * [`extract_audio`] -- the PCM in the audio DIF blocks (16-bit linear and 12-bit non-linear,
13-//! both returned as 16-bit linear) as [`DvAudio`]. No audio `CodecId` is involved: audio leaves
13+//! both returned as 16-bit linear) as `DvAudio`. No audio `CodecId` is involved: audio leaves
1414 //! this crate as PCM, and [`DvDemuxer`] publishes it as `PcmS16Le` streams.
1515 //! * [`DvDemuxer`], [`is_dv`] -- raw `.dv` / `.dif` files.
1616 #![forbid(unsafe_code)]
@@ -24,8 +24,8 @@ mod profile;
2424 mod tables;
2525 mod video;
2626
27-pub use audio::{DvAudio, extract_audio};
28-pub use decoder::{DvDecoder, output_format, to_video_frame};
29-pub use demux::{DvDemuxer, dv_probe_score, is_dv};
30-pub use profile::{Chroma, PROFILES, PROFILE_BYTES, Profile, frame_profile};
31-pub use video::{DvPicture, DvVideoDecoder, is_dv_header};
27+pub use audio::extract_audio;
28+pub use decoder::{DvDecoder, output_format};
29+pub use demux::{DvDemuxer, is_dv};
30+pub use profile::{Chroma, PROFILES, Profile, frame_profile};
31+pub use video::DvVideoDecoder;
crates/ec-dv/src/video.rsmodified+1 -6
@@ -6,7 +6,7 @@ use ec_core::error::{Error, Result};
66 use ec_core::frame::Interlace;
77
88 use crate::idct::{idct248_tile, idct_tile};
9-use crate::profile::{Chroma, PROFILE_BYTES, Profile, WorkChunk, frame_profile, work_chunks};
9+use crate::profile::{Chroma, Profile, WorkChunk, frame_profile, work_chunks};
1010 use crate::tables::*;
1111
1212 const DV_VIDEO_CONTROL: u8 = 0x61;
@@ -669,11 +669,6 @@ fn last_row_field_luma(out: &mut Out, plane: usize, off: usize, stride: usize, b
669669 put_block_8x4(&blocks[3][32..], out, plane, off + 24 + stride, s2);
670670 }
671671
672-/// `true` when `buf` starts a plausible DV frame header (DIF header block of a DV file).
673-pub fn is_dv_header(buf: &[u8]) -> bool {
674- buf.len() >= PROFILE_BYTES && (buf[0] == 0x1f) && buf[1] & 0x07 == 0x07 && buf[2] == 0 && (buf[3] & 0x7f) == 0x3f
675-}
676-
677672 #[cfg(test)]
678673 mod tests {
679674 use super::ZIGZAG;