1#![deny(unsafe_code)]
149#![warn(missing_docs)]
150#![allow(clippy::unused_self)]
151#![allow(clippy::missing_errors_doc)]
152#![allow(clippy::unnecessary_wraps)]
153#![allow(clippy::must_use_candidate)]
154#![allow(clippy::match_same_arms)]
155#![allow(clippy::needless_pass_by_value)]
156#![allow(clippy::doc_markdown)]
157#![allow(clippy::cast_precision_loss)]
158#![allow(clippy::cast_possible_wrap)]
159#![allow(clippy::cast_lossless)]
160#![allow(clippy::trivially_copy_pass_by_ref)]
161#![allow(clippy::unnecessary_cast)]
162#![allow(clippy::struct_field_names)]
163#![allow(clippy::self_assignment)]
164#![allow(clippy::redundant_else)]
165#![allow(clippy::no_effect_underscore_binding)]
166#![allow(clippy::needless_range_loop)]
167#![allow(clippy::missing_panics_doc)]
168#![allow(clippy::map_unwrap_or)]
169#![allow(clippy::manual_div_ceil)]
170#![allow(clippy::if_not_else)]
171#![allow(clippy::derivable_impls)]
172#![allow(clippy::bool_to_int_with_if)]
173#![allow(unused_variables)]
174#![allow(unused_imports)]
175#![allow(clippy::unreadable_literal)]
177#![allow(clippy::cast_possible_truncation)]
178#![allow(clippy::cast_sign_loss)]
179#![allow(clippy::similar_names)]
180#![allow(clippy::many_single_char_names)]
181#![allow(clippy::uninlined_format_args)]
182#![allow(clippy::field_reassign_with_default)]
183#![allow(clippy::manual_range_contains)]
184#![allow(clippy::too_many_arguments)]
185#![allow(clippy::missing_const_for_fn)]
186#![allow(clippy::redundant_closure)]
187#![allow(clippy::wildcard_imports)]
188#![allow(clippy::explicit_iter_loop)]
189#![allow(clippy::implicit_clone)]
190#![allow(clippy::assertions_on_constants)]
191#![allow(clippy::no_effect)]
192#![allow(clippy::unnecessary_operation)]
193#![allow(clippy::collapsible_if)]
194#![allow(clippy::manual_strip)]
195#![allow(clippy::fn_params_excessive_bools)]
196#![allow(clippy::struct_excessive_bools)]
197#![allow(dead_code)]
198#![allow(clippy::missing_fields_in_debug)]
199#![allow(clippy::useless_vec)]
200#![allow(clippy::used_underscore_binding)]
201#![allow(clippy::unnecessary_unwrap)]
202#![allow(clippy::needless_late_init)]
203#![allow(clippy::never_loop)]
204#![allow(clippy::while_let_on_iterator)]
205#![allow(clippy::manual_let_else)]
206#![allow(clippy::clone_on_copy)]
207#![allow(clippy::bool_assert_comparison)]
208#![allow(clippy::overly_complex_bool_expr)]
209#![allow(clippy::double_comparisons)]
210#![allow(clippy::needless_borrow)]
211#![allow(clippy::float_cmp)]
212#![allow(clippy::manual_slice_size_calculation)]
213#![allow(clippy::option_as_ref_deref)]
214#![allow(clippy::single_match_else)]
215#![allow(clippy::cast_abs_to_unsigned)]
216#![allow(clippy::semicolon_if_nothing_returned)]
217#![allow(clippy::range_plus_one)]
218#![allow(clippy::only_used_in_recursion)]
219#![allow(clippy::iter_without_into_iter)]
220#![allow(clippy::collapsible_else_if)]
221#![allow(clippy::naive_bytecount)]
222#![allow(clippy::manual_clamp)]
223#![allow(clippy::unnecessary_literal_unwrap)]
224#![allow(clippy::default_trait_access)]
225#![allow(clippy::return_self_not_must_use)]
226#![allow(clippy::match_wildcard_for_single_variants)]
227#![allow(clippy::unnecessary_filter_map)]
228#![allow(clippy::ref_binding_to_reference)]
229#![allow(clippy::manual_memcpy)]
230#![allow(clippy::borrowed_box)]
231#![allow(clippy::needless_question_mark)]
232#![allow(clippy::type_complexity)]
233#![allow(clippy::bind_instead_of_map)]
234#![allow(clippy::redundant_closure_for_method_calls)]
235#![allow(clippy::ref_option)]
236#![allow(clippy::new_without_default)]
237#![allow(clippy::erasing_op)]
238#![allow(clippy::identity_op)]
239#![allow(clippy::op_ref)]
240#![allow(clippy::manual_flatten)]
241#![allow(clippy::while_let_loop)]
242#![allow(clippy::from_over_into)]
243#![allow(clippy::match_like_matches_macro)]
244#![allow(clippy::collapsible_match)]
245#![allow(clippy::inefficient_to_string)]
246#![allow(clippy::items_after_statements)]
247#![allow(clippy::enum_glob_use)]
248#![allow(clippy::cloned_ref_to_slice_refs)]
249#![allow(clippy::verbose_bit_mask)]
250#![allow(clippy::let_and_return)]
251#![allow(clippy::if_same_then_else)]
252#![allow(clippy::comparison_chain)]
253#![allow(clippy::self_only_used_in_recursion)]
254#![allow(clippy::unnecessary_map_or)]
255
256pub mod av1_obu;
257pub mod avif;
258pub mod bitrate_model;
259pub mod bitstream_filter;
260pub mod bitstream_writer;
261pub mod codec_caps;
262pub mod codec_probe;
263pub mod codec_profile;
264pub mod codec_registry;
265pub mod color_range;
266pub mod container;
268pub mod entropy_coding;
269pub mod entropy_tables;
270pub mod error;
271pub mod error_concealment;
272pub mod features;
273pub mod flac_codec;
274pub mod frame;
275pub mod frame_queue;
276pub mod frame_types;
277pub mod gop_structure;
278pub mod hdr;
279pub mod intra;
280pub mod motion;
281pub mod multipass;
282pub mod multipass_quality;
283pub mod nal_unit;
284pub mod packet_builder;
285pub mod packet_queue;
286pub mod packet_splitter;
287pub mod picture_timing;
288pub mod profile_level;
289pub mod psycho_visual;
290pub mod quality_metrics;
291pub mod rate_control;
292pub mod rate_control_accuracy;
293pub mod reconstruct;
294pub mod reference_frames;
295pub mod scene_change_idr;
296pub mod sei_nal;
297pub mod simd;
298pub mod slice_header;
299pub mod stats;
300pub mod stream_info;
301pub mod tile;
302pub mod tile_encoder;
303pub mod traits;
304pub mod vbr_twopass;
305
306pub mod audio;
308
309pub mod silk;
311
312pub mod celt;
314
315pub mod png;
317
318pub mod apng;
320
321pub mod vorbis;
323pub use vorbis::{
324 SimpleVorbisEncoder, VorbisConfig, VorbisEncConfig, VorbisEncoder, VorbisPacket, VorbisQuality,
325};
326
327pub mod flac;
329
330pub mod pcm;
332
333pub mod gif;
335
336pub mod webp;
338
339#[cfg(feature = "jpegxl")]
341pub mod jpegxl;
342
343#[cfg(feature = "image-io")]
345pub mod image;
346
347#[cfg(feature = "av1")]
348pub mod av1;
349
350#[cfg(feature = "vp9")]
351pub mod vp9;
352
353#[cfg(feature = "vp8")]
354pub mod vp8;
355
356#[cfg(feature = "theora")]
357pub mod theora;
358
359#[cfg(feature = "h263")]
360pub mod h263;
361
362#[cfg(feature = "opus")]
363pub mod opus;
364
365#[cfg(feature = "ffv1")]
366pub mod ffv1;
367
368#[cfg(feature = "mjpeg")]
369pub mod mjpeg;
370
371#[cfg(feature = "apv")]
372pub mod apv;
373
374pub use audio::{AudioFrame, ChannelLayout, SampleFormat};
376pub use error::{CodecError, CodecResult};
377pub use frame::{
378 ColorInfo, ColorPrimaries, FrameType, MatrixCoefficients, Plane, TransferCharacteristics,
379 VideoFrame,
380};
381pub use multipass::{
382 allocation::AllocationStrategy, Allocator, Analyzer, Buffer, BufferConfig, ComplexityStats,
383 EncoderConfig as MultiPassConfig, EncoderError, EncodingResult, FrameAllocation,
384 FrameComplexity, LookaheadAnalysis, LookaheadFrame, MultiPassEncoder, PassStats, PassType,
385 SceneChangeDetector, Stats, VbvStatistics,
386};
387pub use rate_control::{
388 AdaptiveAllocation, AdaptiveQuantization, AllocationResult, AnalysisResult, AqMode,
389 BitrateAllocator, BlockQpMap, BufferModel, CbrController, ComplexityEstimator,
390 ContentAdaptiveAllocator, ContentAnalyzer, ContentMetrics, ContentType, CqpController,
391 CrfController, FrameStats, GopAllocationStatus, GopStats, Lookahead, QpResult, QpSelector,
392 QpStrategy, RateControlMode, RateController, RcConfig, RcOutput,
393 SceneChangeDetector as RcSceneChangeDetector, SceneChangeThreshold, SceneContentType,
394 TextureMetrics, VbrController,
395};
396pub use reconstruct::{
397 BufferPool, CdefApplicator, CdefBlockConfig, CdefFilterResult, ChromaSubsampling,
398 DeblockFilter, DeblockParams, DecoderPipeline, EdgeFilter, FilmGrainParams,
399 FilmGrainSynthesizer, FilterDirection, FilterStrength, FrameBuffer, GrainBlock,
400 LoopFilterPipeline, OutputConfig, OutputFormat, OutputFormatter, PipelineConfig, PipelineStage,
401 PlaneBuffer, PlaneType, ReconstructResult, ReconstructionError, ResidualBuffer, ResidualPlane,
402 StageResult, SuperResConfig, SuperResUpscaler, UpscaleMethod,
403};
404pub use tile::{
405 assemble_tiles, decode_tile_stream, decode_tiles_parallel, HeaderedTileEncodeOp,
406 RawLumaEncodeOp, TileConfig, TileCoord, TileDecodeOp, TileDecodeResult, TileEncodeOp,
407 TileEncodeStats, TileEncoder, TileResult,
408};
409
410pub use pcm::{ByteOrder, PcmConfig, PcmDecoder, PcmEncoder, PcmFormat};
411pub use traits::{
412 BitrateMode, DecoderConfig, EncodedPacket, EncoderConfig, EncoderPreset, VideoDecoder,
413 VideoEncoder,
414};
415
416#[cfg(feature = "av1")]
417pub use av1::{Av1Decoder, Av1Encoder};
418
419#[cfg(feature = "vp9")]
420pub use vp9::{
421 SimpleVp9Encoder, Vp9Decoder, Vp9EncConfig, Vp9Encoder, Vp9EncoderConfig, Vp9Packet, Vp9Profile,
422};
423
424#[cfg(feature = "vp8")]
425pub use vp8::{
426 SimpleVp8Encoder, Vp8Decoder, Vp8EncConfig, Vp8Encoder, Vp8EncoderConfig, Vp8Packet,
427};
428
429#[cfg(feature = "theora")]
430pub use theora::{TheoraConfig, TheoraDecoder, TheoraEncoder};
431
432#[cfg(feature = "h263")]
433pub use h263::{H263Decoder, H263Encoder, PictureFormat};
434
435#[cfg(feature = "opus")]
436pub use opus::{OpusDecoder, OpusEncoder, OpusEncoderConfig};
437
438#[cfg(feature = "ffv1")]
439pub use ffv1::{Ffv1Decoder, Ffv1Encoder};
440
441#[cfg(feature = "mjpeg")]
442pub use mjpeg::{MjpegConfig, MjpegDecoder, MjpegEncoder, MjpegError};
443
444#[cfg(feature = "apv")]
445pub use apv::{ApvConfig, ApvDecoder, ApvEncoder, ApvError};
446
447#[cfg(feature = "image-io")]
448pub use image::{
449 convert_rgb_to_yuv420p, convert_yuv420p_to_rgb, rgb_to_yuv, yuv_to_rgb,
450 EncoderConfig as ImageEncoderConfig, ImageDecoder, ImageEncoder, ImageFormat,
451};
452
453pub use png::{
454 batch_encode as batch_encode_png, best_encoder, decode as decode_png,
455 encode_grayscale as encode_png_grayscale, encode_rgb as encode_png_rgb,
456 encode_rgba as encode_png_rgba, encoder_from_profile, fast_encoder, get_info as png_info,
457 is_png, optimize as optimize_png, transcode as transcode_png, validate as validate_png,
458 Chromaticity, ColorType as PngColorType, CompressionLevel as PngCompressionLevel,
459 DecodedImage as PngImage, EncoderBuilder as PngEncoderBuilder,
460 EncoderConfig as PngEncoderConfig, EncodingProfile, EncodingStats, FilterStrategy, FilterType,
461 ImageHeader as PngHeader, PaletteEntry, PaletteOptimizer, ParallelPngEncoder,
462 PhysicalDimensions, PngDecoder, PngDecoderExtended, PngEncoder, PngEncoderExtended, PngInfo,
463 PngMetadata, SignificantBits, TextChunk,
464};
465
466pub use gif::{
467 is_gif, DisposalMethod, DitheringMethod, GifDecoder, GifEncoder, GifEncoderConfig, GifFrame,
468 GifFrameConfig, GraphicsControlExtension, ImageDescriptor, LogicalScreenDescriptor,
469 QuantizationMethod,
470};
471
472#[cfg(feature = "jpegxl")]
473pub use jpegxl::{
474 AnsDecoder, AnsDistribution, AnsEncoder, BitReader as JxlBitReader, BitWriter as JxlBitWriter,
475 DecodedImage as JxlImage, JxlColorSpace, JxlConfig, JxlDecoder, JxlEncoder, JxlFrameEncoding,
476 JxlHeader, JxlStreamingDecoder, ModularDecoder, ModularEncoder,
477};
478
479pub use avif::{AvifConfig, AvifDecoder, AvifEncoder, AvifImage, AvifProbeResult, YuvFormat};