diff --git a/flake.lock b/flake.lock index d412d80..802f7a8 100644 --- a/flake.lock +++ b/flake.lock @@ -20,11 +20,11 @@ }, "nixpkgs": { "locked": { - "lastModified": 1755020227, - "narHash": "sha256-gGmm+h0t6rY88RPTaIm3su95QvQIVjAJx558YUG4Id8=", + "lastModified": 1762482733, + "narHash": "sha256-g/da4FzvckvbiZT075Sb1/YDNDr+tGQgh4N8i5ceYMg=", "owner": "NixOS", "repo": "nixpkgs", - "rev": "695d5db1b8b20b73292501683a524e0bd79074fb", + "rev": "e1ebeec86b771e9d387dd02d82ffdc77ac753abc", "type": "github" }, "original": { @@ -62,11 +62,11 @@ "nixpkgs": "nixpkgs_2" }, "locked": { - "lastModified": 1755052812, - "narHash": "sha256-Tjw2YP7Hz8+ibE8wJ+Ps65vh1lzAe5ozmoo9sdQ7rGg=", + "lastModified": 1762828736, + "narHash": "sha256-RxtFHWZpKwVcWHhx88E2NhWuBbgYVqIoIDynGs5FoJs=", "owner": "oxalica", "repo": "rust-overlay", - "rev": "433023cba5f4fa66b8b0fdbb8f91d420c9cc2527", + "rev": "8d5baa5628f6dbd7ce6beca3c299bae27755204c", "type": "github" }, "original": { diff --git a/flake.nix b/flake.nix index 01f3d8f..3a9278f 100644 --- a/flake.nix +++ b/flake.nix @@ -5,102 +5,100 @@ rust-overlay.url = "github:oxalica/rust-overlay"; }; - outputs = - { - self, - nixpkgs, - rust-overlay, - flake-utils, - ... - }: + outputs = { + self, + nixpkgs, + rust-overlay, + flake-utils, + ... + }: flake-utils.lib.eachDefaultSystem ( - system: - let + system: let pkgs = import nixpkgs { inherit system; - overlays = [ rust-overlay.overlays.default ]; + overlays = [rust-overlay.overlays.default]; config.allowUnfree = true; }; rustshell = pkgs.mkShell.override { - stdenv = pkgs.gccStdenv; + stdenv = pkgs.gccStdenv; }; rustbin = pkgs.rust-bin.selectLatestNightlyWith ( toolchain: - toolchain.default.override { - extensions = [ - "rust-src" - "clippy" - "rustfmt" - "miri" - "rust-analyzer" - ]; - } + toolchain.default.override { + extensions = [ + "rust-src" + "clippy" + "rustfmt" + "miri" + "rust-analyzer" + ]; + } ); - in - { + in { formatter = pkgs.alejandra; devShells.default = rustshell { - packages = [ - rustbin - ] - ++ (with pkgs; [ - llvmPackages_21.clangWithLibcAndBasicRtAndLibcxx - pkg-config - cmake - vcpkg - lldb - rustPlatform.bindgenHook - xmlstarlet - opencv - alsa-lib - systemdLibs - cmake - fontconfig - linuxHeaders - v4l-utils - libv4l - pipewire - rustup - gcc - ffmpeg-full - nasm - libGL - flite - quirc - lcevcdec - xz - celt - opencore-amr - snappy - codec2 - gsm - ilbc - lame - libtheora - libogg - twolame - vo-amrwbenc - vvenc - xavs - xvidcore - soxr - libvdpau - jetbrains.rust-rover - ]); + packages = + [ + rustbin + ] + ++ (with pkgs; [ + llvmPackages_21.clangWithLibcAndBasicRtAndLibcxx + pkg-config + cmake + vcpkg + lldb + rustPlatform.bindgenHook + xmlstarlet + opencv + alsa-lib + systemdLibs + cmake + fontconfig + linuxHeaders + v4l-utils + libv4l + pipewire + rustup + gcc + ffmpeg_8-full + nasm + libGL + flite + quirc + lcevcdec + xz + celt + opencore-amr + snappy + codec2 + gsm + ilbc + lame + libtheora + libogg + twolame + vo-amrwbenc + vvenc + xavs + xvidcore + soxr + libvdpau + gmp + openapv + svt-av1 + ]); env.RUST_SRC_PATH = "${rustbin}/lib/rustlib/src/rust/library"; env.LIBCLANG_PATH = "${pkgs.llvmPackages.libclang.lib}/lib"; - shellHook = - let - pathToRustProject = "/project/component[@name='RustProjectSettings']"; - in - '' - echo "WONDERHOOOOOY!!!!" - xmlstarlet edit --inplace --update "${pathToRustProject}/option[@name='explicitPathToStdlib']/@value" --value "${rustbin}/lib/rustlib/src/rust/library" .idea/workspace.xml - xmlstarlet edit --inplace --update "${pathToRustProject}/option[@name='toolchainHomeDirectory']/@value" --value "${rustbin}/bin" .idea/workspace.xml - ''; + shellHook = let + pathToRustProject = "/project/component[@name='RustProjectSettings']"; + in '' + echo "WONDERHOOOOOY!!!!" + xmlstarlet edit --inplace --update "${pathToRustProject}/option[@name='explicitPathToStdlib']/@value" --value "${rustbin}/lib/rustlib/src/rust/library" .idea/workspace.xml + xmlstarlet edit --inplace --update "${pathToRustProject}/option[@name='toolchainHomeDirectory']/@value" --value "${rustbin}/bin" .idea/workspace.xml + ''; }; } ); diff --git a/nokhwa-core/src/codec.rs b/nokhwa-core/src/codec.rs index 1d87887..ff8ea0a 100644 --- a/nokhwa-core/src/codec.rs +++ b/nokhwa-core/src/codec.rs @@ -47,7 +47,7 @@ pub trait CodecAsync: Codec { async fn set_format_async(&self, format: CameraFormat) -> Result<(), NokhwaError>; fn set_config_async(&mut self, config: Self::Config) -> Result<(), NokhwaError> { - self.set_config(config) + self.set_config(&config) } fn send_item_async(&mut self, input: Self::Input<'_>) -> Result<(), NokhwaError>; diff --git a/nokhwa-core/src/error.rs b/nokhwa-core/src/error.rs index 66cf753..1fa35b1 100644 --- a/nokhwa-core/src/error.rs +++ b/nokhwa-core/src/error.rs @@ -14,10 +14,10 @@ * limitations under the License. */ use crate::frame_format::{CustomFrameFormat, FrameFormat}; -use std::fmt::Debug; -use thiserror::Error; use crate::pixel_destination::PixelDestination; use crate::types::Backends; +use std::fmt::Debug; +use thiserror::Error; pub type NokhwaResult = Result; @@ -85,7 +85,19 @@ pub enum NokhwaError { DecoderDestinationHintRequired, #[error("Decoder already deinitialized. Unusable, please make a new decoder.")] DecoderAlreadyDeinitialized, + #[error( + "Decoder requires more data to process - not actual error - please send more data to decode: {0}" + )] + DecoderNeedsMoreData(String), } + +impl NokhwaError { + #[must_use] + pub fn is_needs_more(&self) -> bool { + matches!(self, NokhwaError::DecoderNeedsMoreData(_)) + } +} + // // pub enum InitializeError {} // diff --git a/nokhwa-core/src/frame_buffer.rs b/nokhwa-core/src/frame_buffer.rs index e493659..3b0ad9b 100644 --- a/nokhwa-core/src/frame_buffer.rs +++ b/nokhwa-core/src/frame_buffer.rs @@ -90,11 +90,31 @@ pub struct FrameBuffer<'a> { impl<'a> FrameBuffer<'a> { /// Creates a new buffer with a [`&[u8]`]. #[must_use] - #[inline] pub fn new(buffer: Cow<'a, [u8]>, metadata: Option) -> Self { Self { buffer, metadata } } + #[must_use] + pub fn from_buffer(buffer: &'a [u8], metadata: Option) -> Self { + FrameBuffer { + buffer: Cow::Borrowed(buffer), + metadata, + } + } + + #[must_use] + pub fn from_cow(buffer: Cow<'a, [u8]>, metadata: Option) -> Self { + FrameBuffer { buffer, metadata } + } + + #[must_use] + pub fn from_vec(buffer: Vec, metadata: Option) -> Self { + FrameBuffer { + buffer: Cow::Owned(buffer), + metadata, + } + } + /// Get the data of this buffer. #[must_use] pub fn buffer(&'a self) -> &'a [u8] { @@ -147,22 +167,28 @@ impl Deref for FrameBuffer<'_> { } } -impl From> for FrameBuffer<'_> { - fn from(value: Vec) -> Self { - let buffer = Cow::Owned(value); - - FrameBuffer { - buffer, - metadata: None, - } - } -} - impl<'a> From<&'a [u8]> for FrameBuffer<'a> { fn from(value: &'a [u8]) -> Self { - let buffer = Cow::Borrowed(value); FrameBuffer { - buffer, + buffer: Cow::Borrowed(value), + metadata: None, + } + } +} + +impl From> for FrameBuffer<'static> { + fn from(value: Vec) -> Self { + FrameBuffer { + buffer: Cow::Owned(value), + metadata: None, + } + } +} + +impl<'a> From> for FrameBuffer<'a> { + fn from(value: Cow<'a, [u8]>) -> Self { + FrameBuffer { + buffer: value, metadata: None, } } diff --git a/nokhwa-decoders/Cargo.toml b/nokhwa-decoders/Cargo.toml index e68897e..c50dcb4 100644 --- a/nokhwa-decoders/Cargo.toml +++ b/nokhwa-decoders/Cargo.toml @@ -1,14 +1,14 @@ [package] -name = "nokhwa-decoders" +name = "nokhwa-decoders" version = "0.1.0" edition = "2024" [features] -ffmpeg = [ "ffmpeg-the-third" ] -yuyv = [ "dcv-color-primitives", "yuv" ] -mjpeg = [ "zune-jpeg", "zune-core" ] -luma = [ "nokhwa-iter-extensions", "itermore" ] -# static = ["ffmpeg-the-third/static"] +ffmpeg = ["ffmpeg-the-third"] +yuyv = ["dcv-color-primitives", "yuv"] +mjpeg = ["zune-jpeg", "zune-core"] +luma = ["nokhwa-iter-extensions", "itermore"] +static = ["ffmpeg-the-third/static"] #async = [] [dependencies] @@ -16,38 +16,38 @@ bytemuck = "1.23" [dependencies.nokhwa-core] version = "0.2" -path = "../nokhwa-core" +path = "../nokhwa-core" [dependencies.ffmpeg-the-third] -version = "4.0.0" +version = "4.0.0" optional = true [dependencies.yuv] -version = "0.8" +version = "0.8" optional = true [dependencies.dcv-color-primitives] -version = "0.7" +version = "0.7" optional = true [dependencies.zune-jpeg] -version = "0.5.0-rc9" +version = "0.5.0-rc9" optional = true [dependencies.zune-core] -version = "0.5.0-rc2" +version = "0.5.0-rc2" optional = true [dependencies.itermore] -version = "0.8" -features = [ "array_chunks" ] +version = "0.8" +features = ["array_chunks"] optional = true [dependencies.nokhwa-iter-extensions] -version = "0.1" -path = "../nokhwa-iter-extensions" +version = "0.1" +path = "../nokhwa-iter-extensions" optional = true [dev-dependencies.image] workspace = true -features = [ "png", "jpeg", "avif" ] +features = ["png", "jpeg", "avif"] diff --git a/nokhwa-decoders/src/ffmpeg.rs b/nokhwa-decoders/src/ffmpeg.rs index 8d98712..78db23a 100644 --- a/nokhwa-decoders/src/ffmpeg.rs +++ b/nokhwa-decoders/src/ffmpeg.rs @@ -3,8 +3,8 @@ use ffmpeg_the_third::codec::{Context, Id}; use ffmpeg_the_third::color::{Range, Space}; use ffmpeg_the_third::decoder::{Video, find}; use ffmpeg_the_third::ffi::{ - AVCodecID, AVCodecParameters, AVPacketSideData, AVPixelFormat, av_frame_alloc, - av_image_fill_arrays, av_packet_side_data_free, avcodec_parameters_alloc, + AVCodecID, AVCodecParameters, AVMediaType, AVPacketSideData, AVPixelFormat, AVRational, + av_frame_alloc, av_image_fill_arrays, av_packet_side_data_free, avcodec_parameters_alloc, avcodec_parameters_free, }; use ffmpeg_the_third::format::Pixel as FfmpegPixel; @@ -53,8 +53,20 @@ fn create_video(config: &FfmpegConfig) -> Result { )) })?; + let frame_rate = AVRational { + num: config.frame_rate.numerator(), + den: config.frame_rate.denominator(), + }; + let codec_i32 = unsafe { transmute::(AVCodecID::from(id)) }; + let intermediate_config = IntermediateDecoderConfig { + config: config.ffmpeg_codec_low_level.clone(), + resolution: config.resolution, + frame_rate, + format: codec_i32, + }; + video - .set_parameters(config.ffmpeg_codec_low_level.clone()) + .set_parameters(intermediate_config) .map_err(|why| NokhwaError::DecoderInvalidConfiguration(why.to_string()))?; let threading_kind = config.parallelism.behavior; @@ -120,12 +132,8 @@ pub struct FfmpegOutputMeta<'a> { pub timestamp: Option, pub pts: Option, - pub is_key: bool, pub is_corrupt: bool, pub is_empty: bool, - pub is_top_first: bool, - pub is_interlaced: bool, - pub has_palatte_changed: bool, pub color_space: Space, pub color_range: Range, @@ -144,19 +152,25 @@ pub struct FfmpegDecoder { decoder: Video, sws: ScalerContext, config: FfmpegConfig, - last_used_format: FfmpegPixel, + last_used_out_format: FfmpegPixel, + last_used_in_format: FfmpegPixel, } impl FfmpegDecoder { pub fn new(config: FfmpegConfig) -> Result { let decoder = create_video(&config)?; - let sws = create_sws(&config, decoder.format(), decoder.format())?; - let last_used_format = decoder.format(); + let last_used_in_format = match decoder.format() { + FfmpegPixel::None => FfmpegPixel::RGB24, + px => px, + }; + let last_used_out_format = FfmpegPixel::RGB24; + let sws = create_sws(&config, last_used_in_format, last_used_out_format)?; Ok(FfmpegDecoder { decoder, sws, config, - last_used_format, + last_used_out_format, + last_used_in_format, }) } @@ -187,8 +201,12 @@ impl Decoder for FfmpegDecoder { fn set_config(&mut self, config: Self::Config) -> Result<(), NokhwaError> { self.decoder = create_video(&config)?; - self.sws = create_sws(&config, self.decoder.format(), self.last_used_format)?; - + let last_used_in_format = match self.decoder.format() { + FfmpegPixel::None => FfmpegPixel::RGB24, + px => px, + }; + self.sws = create_sws(&config, last_used_in_format, self.last_used_out_format)?; + self.last_used_in_format = last_used_in_format; self.config = config; Ok(()) } @@ -202,9 +220,6 @@ impl Decoder for FfmpegDecoder { let buffer = buffer.as_mut(); let dest_as_ffmpeg = convert_destination_pixel_format_to_av_pxfmt(destination_format); - if self.last_used_format != dest_as_ffmpeg { - self.sws = create_sws(&self.config, self.decoder.format(), self.last_used_format)?; - } let packet = Packet::borrow(to_decode.buffer()); self.decoder @@ -216,9 +231,14 @@ impl Decoder for FfmpegDecoder { self.decoder.width(), self.decoder.width(), ); - self.decoder - .receive_frame(&mut frame) - .map_err(|why| NokhwaError::Decoder(why.to_string()))?; + + if let Err(why) = self.decoder.receive_frame(&mut frame) { + if let ffmpeg_the_third::util::error::Error::Other { errno: 11 } = why { + return Err(NokhwaError::DecoderNeedsMoreData(why.to_string())); + } else { + return Err(NokhwaError::Decoder(why.to_string())); + } + } let receiver_avframe = unsafe { av_frame_alloc() }; let dest_resolution = self @@ -226,10 +246,10 @@ impl Decoder for FfmpegDecoder { .ffmpeg_scaler_low_level .destionation_resolution .unwrap_or(self.config.resolution); + let av_pixel_format: AVPixelFormat = dest_as_ffmpeg.into(); unsafe { (*receiver_avframe).width = dest_resolution.width() as i32; (*receiver_avframe).height = dest_resolution.height() as i32; - let av_pixel_format: AVPixelFormat = dest_as_ffmpeg.into(); (*receiver_avframe).format = av_pixel_format as i32; } let imgbuf = unsafe { @@ -237,7 +257,7 @@ impl Decoder for FfmpegDecoder { (&mut (*receiver_avframe).data) as *mut *mut u8, (&mut (*receiver_avframe).linesize) as *mut i32, buffer.as_ptr(), - self.decoder.format().into(), + av_pixel_format, dest_resolution.width() as i32, dest_resolution.height() as i32, 1, @@ -250,19 +270,31 @@ impl Decoder for FfmpegDecoder { } let mut receiver_frame = unsafe { frame::Video::wrap(receiver_avframe) }; + // remake swscontext in case we are being gooned + let new_in_format = match frame.format() { + FfmpegPixel::None => { + return Err(NokhwaError::Decoder( + "Received None format from ffmpeg buffer. Invalid - cannot use sws".to_string(), + )); + } + fmt => fmt, + }; + + if new_in_format != self.last_used_in_format + || receiver_frame.format() != self.last_used_out_format + { + self.sws = create_sws(&self.config, new_in_format, receiver_frame.format())?; + self.last_used_in_format = new_in_format; + self.last_used_out_format = receiver_frame.format(); + } self.sws .run(&frame, &mut receiver_frame) .map_err(|why| NokhwaError::Decoder(why.to_string()))?; - let metadata = receiver_frame.metadata().to_owned(); let timestamp = receiver_frame.timestamp(); let pts = receiver_frame.pts(); - let is_key = receiver_frame.is_key(); let is_corrupt = receiver_frame.is_corrupt(); let is_empty = unsafe { receiver_frame.is_empty() }; - let is_top_first = receiver_frame.is_top_first(); - let is_interlaced = receiver_frame.is_interlaced(); - let has_palatte_changed = receiver_frame.has_palette_changed(); let color_space = receiver_frame.color_space(); let color_range = receiver_frame.color_range(); let color_primaries = receiver_frame.color_primaries(); @@ -278,12 +310,8 @@ impl Decoder for FfmpegDecoder { metadata, timestamp, pts, - is_key, is_corrupt, is_empty, - is_top_first, - is_interlaced, - has_palatte_changed, color_space, color_range, color_primaries, @@ -408,6 +436,7 @@ where #[derive(Clone, Debug, Default)] pub struct FfmpegDecoderConfig { + pub codec_tag: Option, pub bit_rate: Option, pub profile: Option, pub level: Option, @@ -425,53 +454,71 @@ pub struct FfmpegDecoderConfig { pub extra_data: Option>, } -impl AsPtr for FfmpegDecoderConfig { +#[derive(Clone, Debug)] +struct IntermediateDecoderConfig { + pub(crate) config: FfmpegDecoderConfig, + pub(crate) resolution: Resolution, + pub(crate) frame_rate: AVRational, + pub(crate) format: i32, +} + +impl AsPtr for IntermediateDecoderConfig { fn as_ptr(&self) -> *const AVCodecParameters { let parameters = unsafe { avcodec_parameters_alloc() }; unsafe { - if let Some(bit_rate) = self.bit_rate { + (*parameters).width = self.resolution.width() as i32; + (*parameters).height = self.resolution.height() as i32; + (*parameters).format = self.format; + (*parameters).codec_type = AVMediaType::AVMEDIA_TYPE_VIDEO; + (*parameters).framerate = self.frame_rate; + + if let Some(codec_tag) = self.config.codec_tag { + (*parameters).codec_tag = codec_tag; + } + + if let Some(bit_rate) = self.config.bit_rate { (*parameters).bit_rate = bit_rate; } - if let Some(profile) = self.profile { + if let Some(profile) = self.config.profile { (*parameters).profile = profile; } - if let Some(level) = self.level { + if let Some(level) = self.config.level { (*parameters).level = level; } - if let Some(aspect_ratio) = self.aspect_ratio { + if let Some(aspect_ratio) = self.config.aspect_ratio { (*parameters).sample_aspect_ratio = aspect_ratio.into(); } - if let Some(field_order) = self.field_order { + if let Some(field_order) = self.config.field_order { (*parameters).field_order = field_order.into(); } - if let Some(color_range) = self.color_range { + if let Some(color_range) = self.config.color_range { (*parameters).color_range = color_range.into(); } - if let Some(color_primaries) = self.color_primaries { + if let Some(color_primaries) = self.config.color_primaries { (*parameters).color_primaries = color_primaries.into(); } - if let Some(color_transfer) = self.color_transfer_characteristics { + if let Some(color_transfer) = self.config.color_transfer_characteristics { (*parameters).color_trc = color_transfer.into(); } - if let Some(chroma_location) = self.chroma_location { + if let Some(chroma_location) = self.config.chroma_location { (*parameters).chroma_location = chroma_location.into(); } - if let Some(coded_side_data) = self.coded_side_data { + if let Some(coded_side_data) = self.config.coded_side_data { (*parameters).coded_side_data = coded_side_data.pointer.as_ptr(); (*parameters).nb_coded_side_data = coded_side_data.length as i32; } - if let Some(extra_data) = self.extra_data { + if let Some(extra_data) = self.config.extra_data { (*parameters).extradata = extra_data.pointer.as_ptr(); (*parameters).extradata_size = extra_data.length as i32; } @@ -604,4 +651,146 @@ const fn is_little_endian() -> bool { } #[cfg(test)] -mod test {} +mod test { + use ffmpeg_the_third::{codec::Context, format::input, media::Type, threading::Config}; + use image::{ImageFormat, Rgb}; + use nokhwa_core::{ + decoder::Decoder, + frame_buffer::FrameBuffer, + frame_format::FrameFormat, + types::{FrameRate, Resolution}, + }; + + use crate::ffmpeg::{ + FfmpegConfig, FfmpegDecoder, FfmpegDecoderConfig, FfmpegScalerConfig, Parallelism, + }; + + #[test] + pub fn test_h264() { + ffmpeg_the_third::init().unwrap(); + + let file = "test_images/ffmpeg/h264/test.h264"; + let output_dir = "test_images/ffmpeg/h264/out"; + + let decoder_cfg = FfmpegConfig { + custom_frame_format_map: None, + frame_format: FrameFormat::AVC1, + resolution: Resolution::new(498, 348), + frame_rate: FrameRate::from_fps(30), + parallelism: Parallelism::default(), + ffmpeg_codec_low_level: FfmpegDecoderConfig::default(), + ffmpeg_scaler_low_level: FfmpegScalerConfig::default(), + side_data_check_list: Vec::default(), + }; + + let mut decoder = FfmpegDecoder::new(decoder_cfg).unwrap(); + + let mut ictx = input(file).unwrap(); + for maybe_frame in ictx.packets() { + let (_stream, packet) = maybe_frame.unwrap(); + let decoded = + decoder.decode::>(FrameBuffer::from_buffer(packet.data().unwrap(), None)); + match decoded { + Ok(decoded) => { + let index = packet.position(); + decoded + .save_with_format(format!("{output_dir}/{index}.png"), ImageFormat::Png) + .unwrap(); + } + Err(why) => { + if why.is_needs_more() { + continue; + } else { + panic!("aaa {why}"); + } + } + } + } + } + + #[test] + pub fn test_h265() { + ffmpeg_the_third::init().unwrap(); + + let file = "test_images/ffmpeg/h265/out.h265"; + let output_dir = "test_images/ffmpeg/h265/out"; + + let decoder_cfg = FfmpegConfig { + custom_frame_format_map: None, + frame_format: FrameFormat::H265, + resolution: Resolution::new(498, 348), + frame_rate: FrameRate::from_fps(30), + parallelism: Parallelism::default(), + ffmpeg_codec_low_level: FfmpegDecoderConfig::default(), + ffmpeg_scaler_low_level: FfmpegScalerConfig::default(), + side_data_check_list: Vec::default(), + }; + + let mut decoder = FfmpegDecoder::new(decoder_cfg).unwrap(); + + let mut ictx = input(file).unwrap(); + for maybe_frame in ictx.packets() { + let (_stream, packet) = maybe_frame.unwrap(); + let decoded = + decoder.decode::>(FrameBuffer::from_buffer(packet.data().unwrap(), None)); + match decoded { + Ok(decoded) => { + let index = packet.position(); + decoded + .save_with_format(format!("{output_dir}/{index}.png"), ImageFormat::Png) + .unwrap(); + } + Err(why) => { + if why.is_needs_more() { + continue; + } else { + panic!("aaa {why}"); + } + } + } + } + } + + #[test] + pub fn test_av1() { + ffmpeg_the_third::init().unwrap(); + + let file = "test_images/ffmpeg/av1/test.ivf"; + let output_dir = "test_images/ffmpeg/av1/out"; + + let decoder_cfg = FfmpegConfig { + custom_frame_format_map: None, + frame_format: FrameFormat::AV1, + resolution: Resolution::new(320, 320), + frame_rate: FrameRate::from_fps(10), + parallelism: Parallelism::default(), + ffmpeg_codec_low_level: FfmpegDecoderConfig::default(), + ffmpeg_scaler_low_level: FfmpegScalerConfig::default(), + side_data_check_list: Vec::default(), + }; + + let mut decoder = FfmpegDecoder::new(decoder_cfg).unwrap(); + + let mut ictx = input(file).unwrap(); + for maybe_frame in ictx.packets() { + let (_stream, packet) = maybe_frame.unwrap(); + let decoded = + decoder.decode::>(FrameBuffer::from_buffer(packet.data().unwrap(), None)); + match decoded { + Ok(decoded) => { + let index = packet.position(); + decoded + .save_with_format(format!("{output_dir}/{index}.png"), ImageFormat::Png) + .unwrap(); + } + Err(why) => { + if why.is_needs_more() { + continue; + } else { + panic!("aaa {why}"); + } + } + } + } + } +} diff --git a/nokhwa-decoders/src/lib.rs b/nokhwa-decoders/src/lib.rs index 7a9206e..824831d 100644 --- a/nokhwa-decoders/src/lib.rs +++ b/nokhwa-decoders/src/lib.rs @@ -1,8 +1,8 @@ #[cfg(feature = "ffmpeg")] pub mod ffmpeg; +#[cfg(feature = "luma")] +pub mod luma; #[cfg(feature = "mjpeg")] pub mod mjpeg; #[cfg(feature = "yuyv")] pub mod yuv; -#[cfg(feature = "luma")] -pub mod luma; diff --git a/nokhwa-decoders/test_images/ffmpeg/av1/av1_test.mkv b/nokhwa-decoders/test_images/ffmpeg/av1/av1_test.mkv new file mode 100644 index 0000000..4850922 Binary files /dev/null and b/nokhwa-decoders/test_images/ffmpeg/av1/av1_test.mkv differ diff --git a/nokhwa-decoders/test_images/ffmpeg/av1/out/19452.png b/nokhwa-decoders/test_images/ffmpeg/av1/out/19452.png new file mode 100644 index 0000000..87ffb35 Binary files /dev/null and b/nokhwa-decoders/test_images/ffmpeg/av1/out/19452.png differ diff --git a/nokhwa-decoders/test_images/ffmpeg/av1/out/24791.png b/nokhwa-decoders/test_images/ffmpeg/av1/out/24791.png new file mode 100644 index 0000000..3662444 Binary files /dev/null and b/nokhwa-decoders/test_images/ffmpeg/av1/out/24791.png differ diff --git a/nokhwa-decoders/test_images/ffmpeg/av1/out/24808.png b/nokhwa-decoders/test_images/ffmpeg/av1/out/24808.png new file mode 100644 index 0000000..73442e6 Binary files /dev/null and b/nokhwa-decoders/test_images/ffmpeg/av1/out/24808.png differ diff --git a/nokhwa-decoders/test_images/ffmpeg/av1/out/24959.png b/nokhwa-decoders/test_images/ffmpeg/av1/out/24959.png new file mode 100644 index 0000000..329db35 Binary files /dev/null and b/nokhwa-decoders/test_images/ffmpeg/av1/out/24959.png differ diff --git a/nokhwa-decoders/test_images/ffmpeg/av1/out/24976.png b/nokhwa-decoders/test_images/ffmpeg/av1/out/24976.png new file mode 100644 index 0000000..47882e9 Binary files /dev/null and b/nokhwa-decoders/test_images/ffmpeg/av1/out/24976.png differ diff --git a/nokhwa-decoders/test_images/ffmpeg/av1/out/27176.png b/nokhwa-decoders/test_images/ffmpeg/av1/out/27176.png new file mode 100644 index 0000000..232d3c4 Binary files /dev/null and b/nokhwa-decoders/test_images/ffmpeg/av1/out/27176.png differ diff --git a/nokhwa-decoders/test_images/ffmpeg/av1/out/27193.png b/nokhwa-decoders/test_images/ffmpeg/av1/out/27193.png new file mode 100644 index 0000000..fac6117 Binary files /dev/null and b/nokhwa-decoders/test_images/ffmpeg/av1/out/27193.png differ diff --git a/nokhwa-decoders/test_images/ffmpeg/av1/out/27348.png b/nokhwa-decoders/test_images/ffmpeg/av1/out/27348.png new file mode 100644 index 0000000..e038a85 Binary files /dev/null and b/nokhwa-decoders/test_images/ffmpeg/av1/out/27348.png differ diff --git a/nokhwa-decoders/test_images/ffmpeg/av1/out/27365.png b/nokhwa-decoders/test_images/ffmpeg/av1/out/27365.png new file mode 100644 index 0000000..686587a Binary files /dev/null and b/nokhwa-decoders/test_images/ffmpeg/av1/out/27365.png differ diff --git a/nokhwa-decoders/test_images/ffmpeg/av1/out/29812.png b/nokhwa-decoders/test_images/ffmpeg/av1/out/29812.png new file mode 100644 index 0000000..830cb47 Binary files /dev/null and b/nokhwa-decoders/test_images/ffmpeg/av1/out/29812.png differ diff --git a/nokhwa-decoders/test_images/ffmpeg/av1/out/29829.png b/nokhwa-decoders/test_images/ffmpeg/av1/out/29829.png new file mode 100644 index 0000000..894466c Binary files /dev/null and b/nokhwa-decoders/test_images/ffmpeg/av1/out/29829.png differ diff --git a/nokhwa-decoders/test_images/ffmpeg/av1/out/29977.png b/nokhwa-decoders/test_images/ffmpeg/av1/out/29977.png new file mode 100644 index 0000000..6dc0af8 Binary files /dev/null and b/nokhwa-decoders/test_images/ffmpeg/av1/out/29977.png differ diff --git a/nokhwa-decoders/test_images/ffmpeg/av1/out/29994.png b/nokhwa-decoders/test_images/ffmpeg/av1/out/29994.png new file mode 100644 index 0000000..8b85fdb Binary files /dev/null and b/nokhwa-decoders/test_images/ffmpeg/av1/out/29994.png differ diff --git a/nokhwa-decoders/test_images/ffmpeg/av1/out/31327.png b/nokhwa-decoders/test_images/ffmpeg/av1/out/31327.png new file mode 100644 index 0000000..8257760 Binary files /dev/null and b/nokhwa-decoders/test_images/ffmpeg/av1/out/31327.png differ diff --git a/nokhwa-decoders/test_images/ffmpeg/av1/out/31344.png b/nokhwa-decoders/test_images/ffmpeg/av1/out/31344.png new file mode 100644 index 0000000..a562638 Binary files /dev/null and b/nokhwa-decoders/test_images/ffmpeg/av1/out/31344.png differ diff --git a/nokhwa-decoders/test_images/ffmpeg/av1/out/31487.png b/nokhwa-decoders/test_images/ffmpeg/av1/out/31487.png new file mode 100644 index 0000000..512102c Binary files /dev/null and b/nokhwa-decoders/test_images/ffmpeg/av1/out/31487.png differ diff --git a/nokhwa-decoders/test_images/ffmpeg/av1/out/31504.png b/nokhwa-decoders/test_images/ffmpeg/av1/out/31504.png new file mode 100644 index 0000000..dfb32c9 Binary files /dev/null and b/nokhwa-decoders/test_images/ffmpeg/av1/out/31504.png differ diff --git a/nokhwa-decoders/test_images/ffmpeg/av1/out/32.png b/nokhwa-decoders/test_images/ffmpeg/av1/out/32.png new file mode 100644 index 0000000..7d60e35 Binary files /dev/null and b/nokhwa-decoders/test_images/ffmpeg/av1/out/32.png differ diff --git a/nokhwa-decoders/test_images/ffmpeg/av1/out/35860.png b/nokhwa-decoders/test_images/ffmpeg/av1/out/35860.png new file mode 100644 index 0000000..f96f211 Binary files /dev/null and b/nokhwa-decoders/test_images/ffmpeg/av1/out/35860.png differ diff --git a/nokhwa-decoders/test_images/ffmpeg/av1/out/35877.png b/nokhwa-decoders/test_images/ffmpeg/av1/out/35877.png new file mode 100644 index 0000000..a505dd5 Binary files /dev/null and b/nokhwa-decoders/test_images/ffmpeg/av1/out/35877.png differ diff --git a/nokhwa-decoders/test_images/ffmpeg/av1/out/36030.png b/nokhwa-decoders/test_images/ffmpeg/av1/out/36030.png new file mode 100644 index 0000000..2d08aec Binary files /dev/null and b/nokhwa-decoders/test_images/ffmpeg/av1/out/36030.png differ diff --git a/nokhwa-decoders/test_images/ffmpeg/av1/out/36047.png b/nokhwa-decoders/test_images/ffmpeg/av1/out/36047.png new file mode 100644 index 0000000..fc90bc7 Binary files /dev/null and b/nokhwa-decoders/test_images/ffmpeg/av1/out/36047.png differ diff --git a/nokhwa-decoders/test_images/ffmpeg/av1/out/37182.png b/nokhwa-decoders/test_images/ffmpeg/av1/out/37182.png new file mode 100644 index 0000000..8ecb833 Binary files /dev/null and b/nokhwa-decoders/test_images/ffmpeg/av1/out/37182.png differ diff --git a/nokhwa-decoders/test_images/ffmpeg/av1/out/37199.png b/nokhwa-decoders/test_images/ffmpeg/av1/out/37199.png new file mode 100644 index 0000000..8fbc427 Binary files /dev/null and b/nokhwa-decoders/test_images/ffmpeg/av1/out/37199.png differ diff --git a/nokhwa-decoders/test_images/ffmpeg/av1/out/37237.png b/nokhwa-decoders/test_images/ffmpeg/av1/out/37237.png new file mode 100644 index 0000000..ed9c4bb Binary files /dev/null and b/nokhwa-decoders/test_images/ffmpeg/av1/out/37237.png differ diff --git a/nokhwa-decoders/test_images/ffmpeg/av1/out/37254.png b/nokhwa-decoders/test_images/ffmpeg/av1/out/37254.png new file mode 100644 index 0000000..b4eec83 Binary files /dev/null and b/nokhwa-decoders/test_images/ffmpeg/av1/out/37254.png differ diff --git a/nokhwa-decoders/test_images/ffmpeg/av1/out/39610.png b/nokhwa-decoders/test_images/ffmpeg/av1/out/39610.png new file mode 100644 index 0000000..8515c87 Binary files /dev/null and b/nokhwa-decoders/test_images/ffmpeg/av1/out/39610.png differ diff --git a/nokhwa-decoders/test_images/ffmpeg/av1/out/39627.png b/nokhwa-decoders/test_images/ffmpeg/av1/out/39627.png new file mode 100644 index 0000000..4c2e746 Binary files /dev/null and b/nokhwa-decoders/test_images/ffmpeg/av1/out/39627.png differ diff --git a/nokhwa-decoders/test_images/ffmpeg/av1/out/39779.png b/nokhwa-decoders/test_images/ffmpeg/av1/out/39779.png new file mode 100644 index 0000000..a9f95b1 Binary files /dev/null and b/nokhwa-decoders/test_images/ffmpeg/av1/out/39779.png differ diff --git a/nokhwa-decoders/test_images/ffmpeg/av1/out/39796.png b/nokhwa-decoders/test_images/ffmpeg/av1/out/39796.png new file mode 100644 index 0000000..ee944c9 Binary files /dev/null and b/nokhwa-decoders/test_images/ffmpeg/av1/out/39796.png differ diff --git a/nokhwa-decoders/test_images/ffmpeg/av1/out/41275.png b/nokhwa-decoders/test_images/ffmpeg/av1/out/41275.png new file mode 100644 index 0000000..f536be3 Binary files /dev/null and b/nokhwa-decoders/test_images/ffmpeg/av1/out/41275.png differ diff --git a/nokhwa-decoders/test_images/ffmpeg/av1/out/41292.png b/nokhwa-decoders/test_images/ffmpeg/av1/out/41292.png new file mode 100644 index 0000000..4b46d66 Binary files /dev/null and b/nokhwa-decoders/test_images/ffmpeg/av1/out/41292.png differ diff --git a/nokhwa-decoders/test_images/ffmpeg/av1/out/41449.png b/nokhwa-decoders/test_images/ffmpeg/av1/out/41449.png new file mode 100644 index 0000000..10c3e09 Binary files /dev/null and b/nokhwa-decoders/test_images/ffmpeg/av1/out/41449.png differ diff --git a/nokhwa-decoders/test_images/ffmpeg/av1/out/41466.png b/nokhwa-decoders/test_images/ffmpeg/av1/out/41466.png new file mode 100644 index 0000000..9ed5637 Binary files /dev/null and b/nokhwa-decoders/test_images/ffmpeg/av1/out/41466.png differ diff --git a/nokhwa-decoders/test_images/ffmpeg/av1/out/46202.png b/nokhwa-decoders/test_images/ffmpeg/av1/out/46202.png new file mode 100644 index 0000000..5fca0f7 Binary files /dev/null and b/nokhwa-decoders/test_images/ffmpeg/av1/out/46202.png differ diff --git a/nokhwa-decoders/test_images/ffmpeg/av1/out/46219.png b/nokhwa-decoders/test_images/ffmpeg/av1/out/46219.png new file mode 100644 index 0000000..1ce3f0c Binary files /dev/null and b/nokhwa-decoders/test_images/ffmpeg/av1/out/46219.png differ diff --git a/nokhwa-decoders/test_images/ffmpeg/av1/out/46362.png b/nokhwa-decoders/test_images/ffmpeg/av1/out/46362.png new file mode 100644 index 0000000..f910941 Binary files /dev/null and b/nokhwa-decoders/test_images/ffmpeg/av1/out/46362.png differ diff --git a/nokhwa-decoders/test_images/ffmpeg/av1/out/46379.png b/nokhwa-decoders/test_images/ffmpeg/av1/out/46379.png new file mode 100644 index 0000000..48a6d1f Binary files /dev/null and b/nokhwa-decoders/test_images/ffmpeg/av1/out/46379.png differ diff --git a/nokhwa-decoders/test_images/ffmpeg/av1/out/48663.png b/nokhwa-decoders/test_images/ffmpeg/av1/out/48663.png new file mode 100644 index 0000000..a9778e9 Binary files /dev/null and b/nokhwa-decoders/test_images/ffmpeg/av1/out/48663.png differ diff --git a/nokhwa-decoders/test_images/ffmpeg/av1/out/48680.png b/nokhwa-decoders/test_images/ffmpeg/av1/out/48680.png new file mode 100644 index 0000000..893619d Binary files /dev/null and b/nokhwa-decoders/test_images/ffmpeg/av1/out/48680.png differ diff --git a/nokhwa-decoders/test_images/ffmpeg/av1/out/48719.png b/nokhwa-decoders/test_images/ffmpeg/av1/out/48719.png new file mode 100644 index 0000000..e4e6d30 Binary files /dev/null and b/nokhwa-decoders/test_images/ffmpeg/av1/out/48719.png differ diff --git a/nokhwa-decoders/test_images/ffmpeg/av1/out/48736.png b/nokhwa-decoders/test_images/ffmpeg/av1/out/48736.png new file mode 100644 index 0000000..8cef6d8 Binary files /dev/null and b/nokhwa-decoders/test_images/ffmpeg/av1/out/48736.png differ diff --git a/nokhwa-decoders/test_images/ffmpeg/av1/out/50403.png b/nokhwa-decoders/test_images/ffmpeg/av1/out/50403.png new file mode 100644 index 0000000..5cbe665 Binary files /dev/null and b/nokhwa-decoders/test_images/ffmpeg/av1/out/50403.png differ diff --git a/nokhwa-decoders/test_images/ffmpeg/av1/out/50420.png b/nokhwa-decoders/test_images/ffmpeg/av1/out/50420.png new file mode 100644 index 0000000..295ea22 Binary files /dev/null and b/nokhwa-decoders/test_images/ffmpeg/av1/out/50420.png differ diff --git a/nokhwa-decoders/test_images/ffmpeg/av1/out/50456.png b/nokhwa-decoders/test_images/ffmpeg/av1/out/50456.png new file mode 100644 index 0000000..168642e Binary files /dev/null and b/nokhwa-decoders/test_images/ffmpeg/av1/out/50456.png differ diff --git a/nokhwa-decoders/test_images/ffmpeg/av1/out/50473.png b/nokhwa-decoders/test_images/ffmpeg/av1/out/50473.png new file mode 100644 index 0000000..206857b Binary files /dev/null and b/nokhwa-decoders/test_images/ffmpeg/av1/out/50473.png differ diff --git a/nokhwa-decoders/test_images/ffmpeg/av1/out/51897.png b/nokhwa-decoders/test_images/ffmpeg/av1/out/51897.png new file mode 100644 index 0000000..26a0dec Binary files /dev/null and b/nokhwa-decoders/test_images/ffmpeg/av1/out/51897.png differ diff --git a/nokhwa-decoders/test_images/ffmpeg/av1/out/51914.png b/nokhwa-decoders/test_images/ffmpeg/av1/out/51914.png new file mode 100644 index 0000000..1fadcac Binary files /dev/null and b/nokhwa-decoders/test_images/ffmpeg/av1/out/51914.png differ diff --git a/nokhwa-decoders/test_images/ffmpeg/av1/out/52067.png b/nokhwa-decoders/test_images/ffmpeg/av1/out/52067.png new file mode 100644 index 0000000..708064e Binary files /dev/null and b/nokhwa-decoders/test_images/ffmpeg/av1/out/52067.png differ diff --git a/nokhwa-decoders/test_images/ffmpeg/av1/out/52084.png b/nokhwa-decoders/test_images/ffmpeg/av1/out/52084.png new file mode 100644 index 0000000..e168525 Binary files /dev/null and b/nokhwa-decoders/test_images/ffmpeg/av1/out/52084.png differ diff --git a/nokhwa-decoders/test_images/ffmpeg/av1/out/53486.png b/nokhwa-decoders/test_images/ffmpeg/av1/out/53486.png new file mode 100644 index 0000000..fdb50b2 Binary files /dev/null and b/nokhwa-decoders/test_images/ffmpeg/av1/out/53486.png differ diff --git a/nokhwa-decoders/test_images/ffmpeg/av1/out/53503.png b/nokhwa-decoders/test_images/ffmpeg/av1/out/53503.png new file mode 100644 index 0000000..685e029 Binary files /dev/null and b/nokhwa-decoders/test_images/ffmpeg/av1/out/53503.png differ diff --git a/nokhwa-decoders/test_images/ffmpeg/av1/test.ivf b/nokhwa-decoders/test_images/ffmpeg/av1/test.ivf new file mode 100644 index 0000000..bddd403 Binary files /dev/null and b/nokhwa-decoders/test_images/ffmpeg/av1/test.ivf differ diff --git a/nokhwa-decoders/test_images/ffmpeg/h264/i-have-your-baby-.mp4 b/nokhwa-decoders/test_images/ffmpeg/h264/i-have-your-baby-.mp4 new file mode 100644 index 0000000..970e070 Binary files /dev/null and b/nokhwa-decoders/test_images/ffmpeg/h264/i-have-your-baby-.mp4 differ diff --git a/nokhwa-decoders/test_images/ffmpeg/h264/out/103425.png b/nokhwa-decoders/test_images/ffmpeg/h264/out/103425.png new file mode 100644 index 0000000..4614c0e Binary files /dev/null and b/nokhwa-decoders/test_images/ffmpeg/h264/out/103425.png differ diff --git a/nokhwa-decoders/test_images/ffmpeg/h264/out/105031.png b/nokhwa-decoders/test_images/ffmpeg/h264/out/105031.png new file mode 100644 index 0000000..f817c2c Binary files /dev/null and b/nokhwa-decoders/test_images/ffmpeg/h264/out/105031.png differ diff --git a/nokhwa-decoders/test_images/ffmpeg/h264/out/106242.png b/nokhwa-decoders/test_images/ffmpeg/h264/out/106242.png new file mode 100644 index 0000000..48e569c Binary files /dev/null and b/nokhwa-decoders/test_images/ffmpeg/h264/out/106242.png differ diff --git a/nokhwa-decoders/test_images/ffmpeg/h264/out/106554.png b/nokhwa-decoders/test_images/ffmpeg/h264/out/106554.png new file mode 100644 index 0000000..d026c75 Binary files /dev/null and b/nokhwa-decoders/test_images/ffmpeg/h264/out/106554.png differ diff --git a/nokhwa-decoders/test_images/ffmpeg/h264/out/108429.png b/nokhwa-decoders/test_images/ffmpeg/h264/out/108429.png new file mode 100644 index 0000000..261a859 Binary files /dev/null and b/nokhwa-decoders/test_images/ffmpeg/h264/out/108429.png differ diff --git a/nokhwa-decoders/test_images/ffmpeg/h264/out/110291.png b/nokhwa-decoders/test_images/ffmpeg/h264/out/110291.png new file mode 100644 index 0000000..079e59a Binary files /dev/null and b/nokhwa-decoders/test_images/ffmpeg/h264/out/110291.png differ diff --git a/nokhwa-decoders/test_images/ffmpeg/h264/out/110619.png b/nokhwa-decoders/test_images/ffmpeg/h264/out/110619.png new file mode 100644 index 0000000..7c1a1d1 Binary files /dev/null and b/nokhwa-decoders/test_images/ffmpeg/h264/out/110619.png differ diff --git a/nokhwa-decoders/test_images/ffmpeg/h264/out/113095.png b/nokhwa-decoders/test_images/ffmpeg/h264/out/113095.png new file mode 100644 index 0000000..ad92e88 Binary files /dev/null and b/nokhwa-decoders/test_images/ffmpeg/h264/out/113095.png differ diff --git a/nokhwa-decoders/test_images/ffmpeg/h264/out/113434.png b/nokhwa-decoders/test_images/ffmpeg/h264/out/113434.png new file mode 100644 index 0000000..c457a67 Binary files /dev/null and b/nokhwa-decoders/test_images/ffmpeg/h264/out/113434.png differ diff --git a/nokhwa-decoders/test_images/ffmpeg/h264/out/120702.png b/nokhwa-decoders/test_images/ffmpeg/h264/out/120702.png new file mode 100644 index 0000000..d46053e Binary files /dev/null and b/nokhwa-decoders/test_images/ffmpeg/h264/out/120702.png differ diff --git a/nokhwa-decoders/test_images/ffmpeg/h264/out/121034.png b/nokhwa-decoders/test_images/ffmpeg/h264/out/121034.png new file mode 100644 index 0000000..dde136a Binary files /dev/null and b/nokhwa-decoders/test_images/ffmpeg/h264/out/121034.png differ diff --git a/nokhwa-decoders/test_images/ffmpeg/h264/out/121546.png b/nokhwa-decoders/test_images/ffmpeg/h264/out/121546.png new file mode 100644 index 0000000..bc3ac16 Binary files /dev/null and b/nokhwa-decoders/test_images/ffmpeg/h264/out/121546.png differ diff --git a/nokhwa-decoders/test_images/ffmpeg/h264/out/121646.png b/nokhwa-decoders/test_images/ffmpeg/h264/out/121646.png new file mode 100644 index 0000000..3e7abfb Binary files /dev/null and b/nokhwa-decoders/test_images/ffmpeg/h264/out/121646.png differ diff --git a/nokhwa-decoders/test_images/ffmpeg/h264/out/128663.png b/nokhwa-decoders/test_images/ffmpeg/h264/out/128663.png new file mode 100644 index 0000000..0d59525 Binary files /dev/null and b/nokhwa-decoders/test_images/ffmpeg/h264/out/128663.png differ diff --git a/nokhwa-decoders/test_images/ffmpeg/h264/out/132107.png b/nokhwa-decoders/test_images/ffmpeg/h264/out/132107.png new file mode 100644 index 0000000..f70fd42 Binary files /dev/null and b/nokhwa-decoders/test_images/ffmpeg/h264/out/132107.png differ diff --git a/nokhwa-decoders/test_images/ffmpeg/h264/out/132259.png b/nokhwa-decoders/test_images/ffmpeg/h264/out/132259.png new file mode 100644 index 0000000..8b6ed12 Binary files /dev/null and b/nokhwa-decoders/test_images/ffmpeg/h264/out/132259.png differ diff --git a/nokhwa-decoders/test_images/ffmpeg/h264/out/132479.png b/nokhwa-decoders/test_images/ffmpeg/h264/out/132479.png new file mode 100644 index 0000000..4fa9744 Binary files /dev/null and b/nokhwa-decoders/test_images/ffmpeg/h264/out/132479.png differ diff --git a/nokhwa-decoders/test_images/ffmpeg/h264/out/143239.png b/nokhwa-decoders/test_images/ffmpeg/h264/out/143239.png new file mode 100644 index 0000000..e9634c7 Binary files /dev/null and b/nokhwa-decoders/test_images/ffmpeg/h264/out/143239.png differ diff --git a/nokhwa-decoders/test_images/ffmpeg/h264/out/145851.png b/nokhwa-decoders/test_images/ffmpeg/h264/out/145851.png new file mode 100644 index 0000000..0d50040 Binary files /dev/null and b/nokhwa-decoders/test_images/ffmpeg/h264/out/145851.png differ diff --git a/nokhwa-decoders/test_images/ffmpeg/h264/out/146300.png b/nokhwa-decoders/test_images/ffmpeg/h264/out/146300.png new file mode 100644 index 0000000..afd70d2 Binary files /dev/null and b/nokhwa-decoders/test_images/ffmpeg/h264/out/146300.png differ diff --git a/nokhwa-decoders/test_images/ffmpeg/h264/out/151833.png b/nokhwa-decoders/test_images/ffmpeg/h264/out/151833.png new file mode 100644 index 0000000..0dd4c71 Binary files /dev/null and b/nokhwa-decoders/test_images/ffmpeg/h264/out/151833.png differ diff --git a/nokhwa-decoders/test_images/ffmpeg/h264/out/157093.png b/nokhwa-decoders/test_images/ffmpeg/h264/out/157093.png new file mode 100644 index 0000000..96cb859 Binary files /dev/null and b/nokhwa-decoders/test_images/ffmpeg/h264/out/157093.png differ diff --git a/nokhwa-decoders/test_images/ffmpeg/h264/out/167042.png b/nokhwa-decoders/test_images/ffmpeg/h264/out/167042.png new file mode 100644 index 0000000..1cef302 Binary files /dev/null and b/nokhwa-decoders/test_images/ffmpeg/h264/out/167042.png differ diff --git a/nokhwa-decoders/test_images/ffmpeg/h264/out/188174.png b/nokhwa-decoders/test_images/ffmpeg/h264/out/188174.png new file mode 100644 index 0000000..da58028 Binary files /dev/null and b/nokhwa-decoders/test_images/ffmpeg/h264/out/188174.png differ diff --git a/nokhwa-decoders/test_images/ffmpeg/h264/out/198360.png b/nokhwa-decoders/test_images/ffmpeg/h264/out/198360.png new file mode 100644 index 0000000..4d58fec Binary files /dev/null and b/nokhwa-decoders/test_images/ffmpeg/h264/out/198360.png differ diff --git a/nokhwa-decoders/test_images/ffmpeg/h264/out/208549.png b/nokhwa-decoders/test_images/ffmpeg/h264/out/208549.png new file mode 100644 index 0000000..f526cb8 Binary files /dev/null and b/nokhwa-decoders/test_images/ffmpeg/h264/out/208549.png differ diff --git a/nokhwa-decoders/test_images/ffmpeg/h264/out/213077.png b/nokhwa-decoders/test_images/ffmpeg/h264/out/213077.png new file mode 100644 index 0000000..6a02244 Binary files /dev/null and b/nokhwa-decoders/test_images/ffmpeg/h264/out/213077.png differ diff --git a/nokhwa-decoders/test_images/ffmpeg/h264/out/215692.png b/nokhwa-decoders/test_images/ffmpeg/h264/out/215692.png new file mode 100644 index 0000000..deb31fa Binary files /dev/null and b/nokhwa-decoders/test_images/ffmpeg/h264/out/215692.png differ diff --git a/nokhwa-decoders/test_images/ffmpeg/h264/out/226272.png b/nokhwa-decoders/test_images/ffmpeg/h264/out/226272.png new file mode 100644 index 0000000..c8ab055 Binary files /dev/null and b/nokhwa-decoders/test_images/ffmpeg/h264/out/226272.png differ diff --git a/nokhwa-decoders/test_images/ffmpeg/h264/out/233232.png b/nokhwa-decoders/test_images/ffmpeg/h264/out/233232.png new file mode 100644 index 0000000..3e74174 Binary files /dev/null and b/nokhwa-decoders/test_images/ffmpeg/h264/out/233232.png differ diff --git a/nokhwa-decoders/test_images/ffmpeg/h264/out/237591.png b/nokhwa-decoders/test_images/ffmpeg/h264/out/237591.png new file mode 100644 index 0000000..953efe8 Binary files /dev/null and b/nokhwa-decoders/test_images/ffmpeg/h264/out/237591.png differ diff --git a/nokhwa-decoders/test_images/ffmpeg/h264/out/243253.png b/nokhwa-decoders/test_images/ffmpeg/h264/out/243253.png new file mode 100644 index 0000000..c0642f7 Binary files /dev/null and b/nokhwa-decoders/test_images/ffmpeg/h264/out/243253.png differ diff --git a/nokhwa-decoders/test_images/ffmpeg/h264/out/25490.png b/nokhwa-decoders/test_images/ffmpeg/h264/out/25490.png new file mode 100644 index 0000000..fa21505 Binary files /dev/null and b/nokhwa-decoders/test_images/ffmpeg/h264/out/25490.png differ diff --git a/nokhwa-decoders/test_images/ffmpeg/h264/out/25550.png b/nokhwa-decoders/test_images/ffmpeg/h264/out/25550.png new file mode 100644 index 0000000..f0127d4 Binary files /dev/null and b/nokhwa-decoders/test_images/ffmpeg/h264/out/25550.png differ diff --git a/nokhwa-decoders/test_images/ffmpeg/h264/out/25596.png b/nokhwa-decoders/test_images/ffmpeg/h264/out/25596.png new file mode 100644 index 0000000..f831cf2 Binary files /dev/null and b/nokhwa-decoders/test_images/ffmpeg/h264/out/25596.png differ diff --git a/nokhwa-decoders/test_images/ffmpeg/h264/out/25621.png b/nokhwa-decoders/test_images/ffmpeg/h264/out/25621.png new file mode 100644 index 0000000..6c02e17 Binary files /dev/null and b/nokhwa-decoders/test_images/ffmpeg/h264/out/25621.png differ diff --git a/nokhwa-decoders/test_images/ffmpeg/h264/out/256621.png b/nokhwa-decoders/test_images/ffmpeg/h264/out/256621.png new file mode 100644 index 0000000..a2cd53b Binary files /dev/null and b/nokhwa-decoders/test_images/ffmpeg/h264/out/256621.png differ diff --git a/nokhwa-decoders/test_images/ffmpeg/h264/out/266865.png b/nokhwa-decoders/test_images/ffmpeg/h264/out/266865.png new file mode 100644 index 0000000..0ab57e9 Binary files /dev/null and b/nokhwa-decoders/test_images/ffmpeg/h264/out/266865.png differ diff --git a/nokhwa-decoders/test_images/ffmpeg/h264/out/26906.png b/nokhwa-decoders/test_images/ffmpeg/h264/out/26906.png new file mode 100644 index 0000000..c786c4b Binary files /dev/null and b/nokhwa-decoders/test_images/ffmpeg/h264/out/26906.png differ diff --git a/nokhwa-decoders/test_images/ffmpeg/h264/out/27011.png b/nokhwa-decoders/test_images/ffmpeg/h264/out/27011.png new file mode 100644 index 0000000..e02f24e Binary files /dev/null and b/nokhwa-decoders/test_images/ffmpeg/h264/out/27011.png differ diff --git a/nokhwa-decoders/test_images/ffmpeg/h264/out/27060.png b/nokhwa-decoders/test_images/ffmpeg/h264/out/27060.png new file mode 100644 index 0000000..3eb0b77 Binary files /dev/null and b/nokhwa-decoders/test_images/ffmpeg/h264/out/27060.png differ diff --git a/nokhwa-decoders/test_images/ffmpeg/h264/out/27076.png b/nokhwa-decoders/test_images/ffmpeg/h264/out/27076.png new file mode 100644 index 0000000..4feecfb Binary files /dev/null and b/nokhwa-decoders/test_images/ffmpeg/h264/out/27076.png differ diff --git a/nokhwa-decoders/test_images/ffmpeg/h264/out/272927.png b/nokhwa-decoders/test_images/ffmpeg/h264/out/272927.png new file mode 100644 index 0000000..510f7f8 Binary files /dev/null and b/nokhwa-decoders/test_images/ffmpeg/h264/out/272927.png differ diff --git a/nokhwa-decoders/test_images/ffmpeg/h264/out/273272.png b/nokhwa-decoders/test_images/ffmpeg/h264/out/273272.png new file mode 100644 index 0000000..73b52d7 Binary files /dev/null and b/nokhwa-decoders/test_images/ffmpeg/h264/out/273272.png differ diff --git a/nokhwa-decoders/test_images/ffmpeg/h264/out/28595.png b/nokhwa-decoders/test_images/ffmpeg/h264/out/28595.png new file mode 100644 index 0000000..75fd686 Binary files /dev/null and b/nokhwa-decoders/test_images/ffmpeg/h264/out/28595.png differ diff --git a/nokhwa-decoders/test_images/ffmpeg/h264/out/286033.png b/nokhwa-decoders/test_images/ffmpeg/h264/out/286033.png new file mode 100644 index 0000000..bd0abed Binary files /dev/null and b/nokhwa-decoders/test_images/ffmpeg/h264/out/286033.png differ diff --git a/nokhwa-decoders/test_images/ffmpeg/h264/out/28688.png b/nokhwa-decoders/test_images/ffmpeg/h264/out/28688.png new file mode 100644 index 0000000..f4774af Binary files /dev/null and b/nokhwa-decoders/test_images/ffmpeg/h264/out/28688.png differ diff --git a/nokhwa-decoders/test_images/ffmpeg/h264/out/28710.png b/nokhwa-decoders/test_images/ffmpeg/h264/out/28710.png new file mode 100644 index 0000000..23c1646 Binary files /dev/null and b/nokhwa-decoders/test_images/ffmpeg/h264/out/28710.png differ diff --git a/nokhwa-decoders/test_images/ffmpeg/h264/out/290536.png b/nokhwa-decoders/test_images/ffmpeg/h264/out/290536.png new file mode 100644 index 0000000..614dc83 Binary files /dev/null and b/nokhwa-decoders/test_images/ffmpeg/h264/out/290536.png differ diff --git a/nokhwa-decoders/test_images/ffmpeg/h264/out/293928.png b/nokhwa-decoders/test_images/ffmpeg/h264/out/293928.png new file mode 100644 index 0000000..76ba76a Binary files /dev/null and b/nokhwa-decoders/test_images/ffmpeg/h264/out/293928.png differ diff --git a/nokhwa-decoders/test_images/ffmpeg/h264/out/294220.png b/nokhwa-decoders/test_images/ffmpeg/h264/out/294220.png new file mode 100644 index 0000000..b41ba32 Binary files /dev/null and b/nokhwa-decoders/test_images/ffmpeg/h264/out/294220.png differ diff --git a/nokhwa-decoders/test_images/ffmpeg/h264/out/30280.png b/nokhwa-decoders/test_images/ffmpeg/h264/out/30280.png new file mode 100644 index 0000000..c8c7fe8 Binary files /dev/null and b/nokhwa-decoders/test_images/ffmpeg/h264/out/30280.png differ diff --git a/nokhwa-decoders/test_images/ffmpeg/h264/out/30397.png b/nokhwa-decoders/test_images/ffmpeg/h264/out/30397.png new file mode 100644 index 0000000..0f17b7f Binary files /dev/null and b/nokhwa-decoders/test_images/ffmpeg/h264/out/30397.png differ diff --git a/nokhwa-decoders/test_images/ffmpeg/h264/out/30451.png b/nokhwa-decoders/test_images/ffmpeg/h264/out/30451.png new file mode 100644 index 0000000..60eab80 Binary files /dev/null and b/nokhwa-decoders/test_images/ffmpeg/h264/out/30451.png differ diff --git a/nokhwa-decoders/test_images/ffmpeg/h264/out/30500.png b/nokhwa-decoders/test_images/ffmpeg/h264/out/30500.png new file mode 100644 index 0000000..f61d165 Binary files /dev/null and b/nokhwa-decoders/test_images/ffmpeg/h264/out/30500.png differ diff --git a/nokhwa-decoders/test_images/ffmpeg/h264/out/308528.png b/nokhwa-decoders/test_images/ffmpeg/h264/out/308528.png new file mode 100644 index 0000000..865aeec Binary files /dev/null and b/nokhwa-decoders/test_images/ffmpeg/h264/out/308528.png differ diff --git a/nokhwa-decoders/test_images/ffmpeg/h264/out/315684.png b/nokhwa-decoders/test_images/ffmpeg/h264/out/315684.png new file mode 100644 index 0000000..f2d83e9 Binary files /dev/null and b/nokhwa-decoders/test_images/ffmpeg/h264/out/315684.png differ diff --git a/nokhwa-decoders/test_images/ffmpeg/h264/out/318052.png b/nokhwa-decoders/test_images/ffmpeg/h264/out/318052.png new file mode 100644 index 0000000..ad4d33f Binary files /dev/null and b/nokhwa-decoders/test_images/ffmpeg/h264/out/318052.png differ diff --git a/nokhwa-decoders/test_images/ffmpeg/h264/out/320148.png b/nokhwa-decoders/test_images/ffmpeg/h264/out/320148.png new file mode 100644 index 0000000..63e4d56 Binary files /dev/null and b/nokhwa-decoders/test_images/ffmpeg/h264/out/320148.png differ diff --git a/nokhwa-decoders/test_images/ffmpeg/h264/out/32053.png b/nokhwa-decoders/test_images/ffmpeg/h264/out/32053.png new file mode 100644 index 0000000..3e37c10 Binary files /dev/null and b/nokhwa-decoders/test_images/ffmpeg/h264/out/32053.png differ diff --git a/nokhwa-decoders/test_images/ffmpeg/h264/out/32110.png b/nokhwa-decoders/test_images/ffmpeg/h264/out/32110.png new file mode 100644 index 0000000..c642e03 Binary files /dev/null and b/nokhwa-decoders/test_images/ffmpeg/h264/out/32110.png differ diff --git a/nokhwa-decoders/test_images/ffmpeg/h264/out/32154.png b/nokhwa-decoders/test_images/ffmpeg/h264/out/32154.png new file mode 100644 index 0000000..e693b43 Binary files /dev/null and b/nokhwa-decoders/test_images/ffmpeg/h264/out/32154.png differ diff --git a/nokhwa-decoders/test_images/ffmpeg/h264/out/33412.png b/nokhwa-decoders/test_images/ffmpeg/h264/out/33412.png new file mode 100644 index 0000000..1d4b7b9 Binary files /dev/null and b/nokhwa-decoders/test_images/ffmpeg/h264/out/33412.png differ diff --git a/nokhwa-decoders/test_images/ffmpeg/h264/out/334613.png b/nokhwa-decoders/test_images/ffmpeg/h264/out/334613.png new file mode 100644 index 0000000..4d8283f Binary files /dev/null and b/nokhwa-decoders/test_images/ffmpeg/h264/out/334613.png differ diff --git a/nokhwa-decoders/test_images/ffmpeg/h264/out/33550.png b/nokhwa-decoders/test_images/ffmpeg/h264/out/33550.png new file mode 100644 index 0000000..9b2abe8 Binary files /dev/null and b/nokhwa-decoders/test_images/ffmpeg/h264/out/33550.png differ diff --git a/nokhwa-decoders/test_images/ffmpeg/h264/out/33569.png b/nokhwa-decoders/test_images/ffmpeg/h264/out/33569.png new file mode 100644 index 0000000..556ebc1 Binary files /dev/null and b/nokhwa-decoders/test_images/ffmpeg/h264/out/33569.png differ diff --git a/nokhwa-decoders/test_images/ffmpeg/h264/out/33592.png b/nokhwa-decoders/test_images/ffmpeg/h264/out/33592.png new file mode 100644 index 0000000..ec82ad1 Binary files /dev/null and b/nokhwa-decoders/test_images/ffmpeg/h264/out/33592.png differ diff --git a/nokhwa-decoders/test_images/ffmpeg/h264/out/341110.png b/nokhwa-decoders/test_images/ffmpeg/h264/out/341110.png new file mode 100644 index 0000000..ae1d013 Binary files /dev/null and b/nokhwa-decoders/test_images/ffmpeg/h264/out/341110.png differ diff --git a/nokhwa-decoders/test_images/ffmpeg/h264/out/341344.png b/nokhwa-decoders/test_images/ffmpeg/h264/out/341344.png new file mode 100644 index 0000000..cc0fae9 Binary files /dev/null and b/nokhwa-decoders/test_images/ffmpeg/h264/out/341344.png differ diff --git a/nokhwa-decoders/test_images/ffmpeg/h264/out/34470.png b/nokhwa-decoders/test_images/ffmpeg/h264/out/34470.png new file mode 100644 index 0000000..e045094 Binary files /dev/null and b/nokhwa-decoders/test_images/ffmpeg/h264/out/34470.png differ diff --git a/nokhwa-decoders/test_images/ffmpeg/h264/out/344891.png b/nokhwa-decoders/test_images/ffmpeg/h264/out/344891.png new file mode 100644 index 0000000..3ab0139 Binary files /dev/null and b/nokhwa-decoders/test_images/ffmpeg/h264/out/344891.png differ diff --git a/nokhwa-decoders/test_images/ffmpeg/h264/out/34561.png b/nokhwa-decoders/test_images/ffmpeg/h264/out/34561.png new file mode 100644 index 0000000..b5ff79b Binary files /dev/null and b/nokhwa-decoders/test_images/ffmpeg/h264/out/34561.png differ diff --git a/nokhwa-decoders/test_images/ffmpeg/h264/out/34584.png b/nokhwa-decoders/test_images/ffmpeg/h264/out/34584.png new file mode 100644 index 0000000..00bfad4 Binary files /dev/null and b/nokhwa-decoders/test_images/ffmpeg/h264/out/34584.png differ diff --git a/nokhwa-decoders/test_images/ffmpeg/h264/out/34610.png b/nokhwa-decoders/test_images/ffmpeg/h264/out/34610.png new file mode 100644 index 0000000..6e31a5a Binary files /dev/null and b/nokhwa-decoders/test_images/ffmpeg/h264/out/34610.png differ diff --git a/nokhwa-decoders/test_images/ffmpeg/h264/out/355196.png b/nokhwa-decoders/test_images/ffmpeg/h264/out/355196.png new file mode 100644 index 0000000..14b9323 Binary files /dev/null and b/nokhwa-decoders/test_images/ffmpeg/h264/out/355196.png differ diff --git a/nokhwa-decoders/test_images/ffmpeg/h264/out/357883.png b/nokhwa-decoders/test_images/ffmpeg/h264/out/357883.png new file mode 100644 index 0000000..cf2f2af Binary files /dev/null and b/nokhwa-decoders/test_images/ffmpeg/h264/out/357883.png differ diff --git a/nokhwa-decoders/test_images/ffmpeg/h264/out/358137.png b/nokhwa-decoders/test_images/ffmpeg/h264/out/358137.png new file mode 100644 index 0000000..6f4b385 Binary files /dev/null and b/nokhwa-decoders/test_images/ffmpeg/h264/out/358137.png differ diff --git a/nokhwa-decoders/test_images/ffmpeg/h264/out/359601.png b/nokhwa-decoders/test_images/ffmpeg/h264/out/359601.png new file mode 100644 index 0000000..08387f9 Binary files /dev/null and b/nokhwa-decoders/test_images/ffmpeg/h264/out/359601.png differ diff --git a/nokhwa-decoders/test_images/ffmpeg/h264/out/36281.png b/nokhwa-decoders/test_images/ffmpeg/h264/out/36281.png new file mode 100644 index 0000000..e208bad Binary files /dev/null and b/nokhwa-decoders/test_images/ffmpeg/h264/out/36281.png differ diff --git a/nokhwa-decoders/test_images/ffmpeg/h264/out/36345.png b/nokhwa-decoders/test_images/ffmpeg/h264/out/36345.png new file mode 100644 index 0000000..08e6d43 Binary files /dev/null and b/nokhwa-decoders/test_images/ffmpeg/h264/out/36345.png differ diff --git a/nokhwa-decoders/test_images/ffmpeg/h264/out/36387.png b/nokhwa-decoders/test_images/ffmpeg/h264/out/36387.png new file mode 100644 index 0000000..6e611ec Binary files /dev/null and b/nokhwa-decoders/test_images/ffmpeg/h264/out/36387.png differ diff --git a/nokhwa-decoders/test_images/ffmpeg/h264/out/372427.png b/nokhwa-decoders/test_images/ffmpeg/h264/out/372427.png new file mode 100644 index 0000000..d8fa08a Binary files /dev/null and b/nokhwa-decoders/test_images/ffmpeg/h264/out/372427.png differ diff --git a/nokhwa-decoders/test_images/ffmpeg/h264/out/37255.png b/nokhwa-decoders/test_images/ffmpeg/h264/out/37255.png new file mode 100644 index 0000000..06f4851 Binary files /dev/null and b/nokhwa-decoders/test_images/ffmpeg/h264/out/37255.png differ diff --git a/nokhwa-decoders/test_images/ffmpeg/h264/out/37346.png b/nokhwa-decoders/test_images/ffmpeg/h264/out/37346.png new file mode 100644 index 0000000..2e65e1b Binary files /dev/null and b/nokhwa-decoders/test_images/ffmpeg/h264/out/37346.png differ diff --git a/nokhwa-decoders/test_images/ffmpeg/h264/out/37383.png b/nokhwa-decoders/test_images/ffmpeg/h264/out/37383.png new file mode 100644 index 0000000..e3ed5ed Binary files /dev/null and b/nokhwa-decoders/test_images/ffmpeg/h264/out/37383.png differ diff --git a/nokhwa-decoders/test_images/ffmpeg/h264/out/37408.png b/nokhwa-decoders/test_images/ffmpeg/h264/out/37408.png new file mode 100644 index 0000000..409c2ac Binary files /dev/null and b/nokhwa-decoders/test_images/ffmpeg/h264/out/37408.png differ diff --git a/nokhwa-decoders/test_images/ffmpeg/h264/out/379241.png b/nokhwa-decoders/test_images/ffmpeg/h264/out/379241.png new file mode 100644 index 0000000..f3ce02c Binary files /dev/null and b/nokhwa-decoders/test_images/ffmpeg/h264/out/379241.png differ diff --git a/nokhwa-decoders/test_images/ffmpeg/h264/out/38071.png b/nokhwa-decoders/test_images/ffmpeg/h264/out/38071.png new file mode 100644 index 0000000..11fa1d6 Binary files /dev/null and b/nokhwa-decoders/test_images/ffmpeg/h264/out/38071.png differ diff --git a/nokhwa-decoders/test_images/ffmpeg/h264/out/380772.png b/nokhwa-decoders/test_images/ffmpeg/h264/out/380772.png new file mode 100644 index 0000000..beb0579 Binary files /dev/null and b/nokhwa-decoders/test_images/ffmpeg/h264/out/380772.png differ diff --git a/nokhwa-decoders/test_images/ffmpeg/h264/out/38116.png b/nokhwa-decoders/test_images/ffmpeg/h264/out/38116.png new file mode 100644 index 0000000..917f936 Binary files /dev/null and b/nokhwa-decoders/test_images/ffmpeg/h264/out/38116.png differ diff --git a/nokhwa-decoders/test_images/ffmpeg/h264/out/38165.png b/nokhwa-decoders/test_images/ffmpeg/h264/out/38165.png new file mode 100644 index 0000000..008a928 Binary files /dev/null and b/nokhwa-decoders/test_images/ffmpeg/h264/out/38165.png differ diff --git a/nokhwa-decoders/test_images/ffmpeg/h264/out/382648.png b/nokhwa-decoders/test_images/ffmpeg/h264/out/382648.png new file mode 100644 index 0000000..ce89f98 Binary files /dev/null and b/nokhwa-decoders/test_images/ffmpeg/h264/out/382648.png differ diff --git a/nokhwa-decoders/test_images/ffmpeg/h264/out/394651.png b/nokhwa-decoders/test_images/ffmpeg/h264/out/394651.png new file mode 100644 index 0000000..dbcfa8c Binary files /dev/null and b/nokhwa-decoders/test_images/ffmpeg/h264/out/394651.png differ diff --git a/nokhwa-decoders/test_images/ffmpeg/h264/out/400749.png b/nokhwa-decoders/test_images/ffmpeg/h264/out/400749.png new file mode 100644 index 0000000..899aee6 Binary files /dev/null and b/nokhwa-decoders/test_images/ffmpeg/h264/out/400749.png differ diff --git a/nokhwa-decoders/test_images/ffmpeg/h264/out/401778.png b/nokhwa-decoders/test_images/ffmpeg/h264/out/401778.png new file mode 100644 index 0000000..b9c3c1a Binary files /dev/null and b/nokhwa-decoders/test_images/ffmpeg/h264/out/401778.png differ diff --git a/nokhwa-decoders/test_images/ffmpeg/h264/out/402752.png b/nokhwa-decoders/test_images/ffmpeg/h264/out/402752.png new file mode 100644 index 0000000..41b63d9 Binary files /dev/null and b/nokhwa-decoders/test_images/ffmpeg/h264/out/402752.png differ diff --git a/nokhwa-decoders/test_images/ffmpeg/h264/out/411518.png b/nokhwa-decoders/test_images/ffmpeg/h264/out/411518.png new file mode 100644 index 0000000..5a2c71b Binary files /dev/null and b/nokhwa-decoders/test_images/ffmpeg/h264/out/411518.png differ diff --git a/nokhwa-decoders/test_images/ffmpeg/h264/out/412945.png b/nokhwa-decoders/test_images/ffmpeg/h264/out/412945.png new file mode 100644 index 0000000..2ae1190 Binary files /dev/null and b/nokhwa-decoders/test_images/ffmpeg/h264/out/412945.png differ diff --git a/nokhwa-decoders/test_images/ffmpeg/h264/out/413126.png b/nokhwa-decoders/test_images/ffmpeg/h264/out/413126.png new file mode 100644 index 0000000..0ecdd79 Binary files /dev/null and b/nokhwa-decoders/test_images/ffmpeg/h264/out/413126.png differ diff --git a/nokhwa-decoders/test_images/ffmpeg/h264/out/414601.png b/nokhwa-decoders/test_images/ffmpeg/h264/out/414601.png new file mode 100644 index 0000000..812790d Binary files /dev/null and b/nokhwa-decoders/test_images/ffmpeg/h264/out/414601.png differ diff --git a/nokhwa-decoders/test_images/ffmpeg/h264/out/41643.png b/nokhwa-decoders/test_images/ffmpeg/h264/out/41643.png new file mode 100644 index 0000000..7a525b3 Binary files /dev/null and b/nokhwa-decoders/test_images/ffmpeg/h264/out/41643.png differ diff --git a/nokhwa-decoders/test_images/ffmpeg/h264/out/425950.png b/nokhwa-decoders/test_images/ffmpeg/h264/out/425950.png new file mode 100644 index 0000000..2e84dc3 Binary files /dev/null and b/nokhwa-decoders/test_images/ffmpeg/h264/out/425950.png differ diff --git a/nokhwa-decoders/test_images/ffmpeg/h264/out/431536.png b/nokhwa-decoders/test_images/ffmpeg/h264/out/431536.png new file mode 100644 index 0000000..51c2310 Binary files /dev/null and b/nokhwa-decoders/test_images/ffmpeg/h264/out/431536.png differ diff --git a/nokhwa-decoders/test_images/ffmpeg/h264/out/431753.png b/nokhwa-decoders/test_images/ffmpeg/h264/out/431753.png new file mode 100644 index 0000000..341f86a Binary files /dev/null and b/nokhwa-decoders/test_images/ffmpeg/h264/out/431753.png differ diff --git a/nokhwa-decoders/test_images/ffmpeg/h264/out/432658.png b/nokhwa-decoders/test_images/ffmpeg/h264/out/432658.png new file mode 100644 index 0000000..424bfe6 Binary files /dev/null and b/nokhwa-decoders/test_images/ffmpeg/h264/out/432658.png differ diff --git a/nokhwa-decoders/test_images/ffmpeg/h264/out/440548.png b/nokhwa-decoders/test_images/ffmpeg/h264/out/440548.png new file mode 100644 index 0000000..b3b6485 Binary files /dev/null and b/nokhwa-decoders/test_images/ffmpeg/h264/out/440548.png differ diff --git a/nokhwa-decoders/test_images/ffmpeg/h264/out/441574.png b/nokhwa-decoders/test_images/ffmpeg/h264/out/441574.png new file mode 100644 index 0000000..2c2f6df Binary files /dev/null and b/nokhwa-decoders/test_images/ffmpeg/h264/out/441574.png differ diff --git a/nokhwa-decoders/test_images/ffmpeg/h264/out/442222.png b/nokhwa-decoders/test_images/ffmpeg/h264/out/442222.png new file mode 100644 index 0000000..3f0599e Binary files /dev/null and b/nokhwa-decoders/test_images/ffmpeg/h264/out/442222.png differ diff --git a/nokhwa-decoders/test_images/ffmpeg/h264/out/442416.png b/nokhwa-decoders/test_images/ffmpeg/h264/out/442416.png new file mode 100644 index 0000000..6b089a5 Binary files /dev/null and b/nokhwa-decoders/test_images/ffmpeg/h264/out/442416.png differ diff --git a/nokhwa-decoders/test_images/ffmpeg/h264/out/452067.png b/nokhwa-decoders/test_images/ffmpeg/h264/out/452067.png new file mode 100644 index 0000000..5ac28a9 Binary files /dev/null and b/nokhwa-decoders/test_images/ffmpeg/h264/out/452067.png differ diff --git a/nokhwa-decoders/test_images/ffmpeg/h264/out/456724.png b/nokhwa-decoders/test_images/ffmpeg/h264/out/456724.png new file mode 100644 index 0000000..2b5dcae Binary files /dev/null and b/nokhwa-decoders/test_images/ffmpeg/h264/out/456724.png differ diff --git a/nokhwa-decoders/test_images/ffmpeg/h264/out/457946.png b/nokhwa-decoders/test_images/ffmpeg/h264/out/457946.png new file mode 100644 index 0000000..01e9ca6 Binary files /dev/null and b/nokhwa-decoders/test_images/ffmpeg/h264/out/457946.png differ diff --git a/nokhwa-decoders/test_images/ffmpeg/h264/out/467826.png b/nokhwa-decoders/test_images/ffmpeg/h264/out/467826.png new file mode 100644 index 0000000..5c7e23e Binary files /dev/null and b/nokhwa-decoders/test_images/ffmpeg/h264/out/467826.png differ diff --git a/nokhwa-decoders/test_images/ffmpeg/h264/out/473239.png b/nokhwa-decoders/test_images/ffmpeg/h264/out/473239.png new file mode 100644 index 0000000..98c71f9 Binary files /dev/null and b/nokhwa-decoders/test_images/ffmpeg/h264/out/473239.png differ diff --git a/nokhwa-decoders/test_images/ffmpeg/h264/out/473717.png b/nokhwa-decoders/test_images/ffmpeg/h264/out/473717.png new file mode 100644 index 0000000..d56c007 Binary files /dev/null and b/nokhwa-decoders/test_images/ffmpeg/h264/out/473717.png differ diff --git a/nokhwa-decoders/test_images/ffmpeg/h264/out/474230.png b/nokhwa-decoders/test_images/ffmpeg/h264/out/474230.png new file mode 100644 index 0000000..f1222bb Binary files /dev/null and b/nokhwa-decoders/test_images/ffmpeg/h264/out/474230.png differ diff --git a/nokhwa-decoders/test_images/ffmpeg/h264/out/47584.png b/nokhwa-decoders/test_images/ffmpeg/h264/out/47584.png new file mode 100644 index 0000000..d39409a Binary files /dev/null and b/nokhwa-decoders/test_images/ffmpeg/h264/out/47584.png differ diff --git a/nokhwa-decoders/test_images/ffmpeg/h264/out/484139.png b/nokhwa-decoders/test_images/ffmpeg/h264/out/484139.png new file mode 100644 index 0000000..07584d2 Binary files /dev/null and b/nokhwa-decoders/test_images/ffmpeg/h264/out/484139.png differ diff --git a/nokhwa-decoders/test_images/ffmpeg/h264/out/485593.png b/nokhwa-decoders/test_images/ffmpeg/h264/out/485593.png new file mode 100644 index 0000000..6c57e05 Binary files /dev/null and b/nokhwa-decoders/test_images/ffmpeg/h264/out/485593.png differ diff --git a/nokhwa-decoders/test_images/ffmpeg/h264/out/485698.png b/nokhwa-decoders/test_images/ffmpeg/h264/out/485698.png new file mode 100644 index 0000000..b673912 Binary files /dev/null and b/nokhwa-decoders/test_images/ffmpeg/h264/out/485698.png differ diff --git a/nokhwa-decoders/test_images/ffmpeg/h264/out/488820.png b/nokhwa-decoders/test_images/ffmpeg/h264/out/488820.png new file mode 100644 index 0000000..5f1e8c3 Binary files /dev/null and b/nokhwa-decoders/test_images/ffmpeg/h264/out/488820.png differ diff --git a/nokhwa-decoders/test_images/ffmpeg/h264/out/495462.png b/nokhwa-decoders/test_images/ffmpeg/h264/out/495462.png new file mode 100644 index 0000000..aa5bcb9 Binary files /dev/null and b/nokhwa-decoders/test_images/ffmpeg/h264/out/495462.png differ diff --git a/nokhwa-decoders/test_images/ffmpeg/h264/out/496462.png b/nokhwa-decoders/test_images/ffmpeg/h264/out/496462.png new file mode 100644 index 0000000..7c266db Binary files /dev/null and b/nokhwa-decoders/test_images/ffmpeg/h264/out/496462.png differ diff --git a/nokhwa-decoders/test_images/ffmpeg/h264/out/496651.png b/nokhwa-decoders/test_images/ffmpeg/h264/out/496651.png new file mode 100644 index 0000000..8a67dc5 Binary files /dev/null and b/nokhwa-decoders/test_images/ffmpeg/h264/out/496651.png differ diff --git a/nokhwa-decoders/test_images/ffmpeg/h264/out/496902.png b/nokhwa-decoders/test_images/ffmpeg/h264/out/496902.png new file mode 100644 index 0000000..2bc21fb Binary files /dev/null and b/nokhwa-decoders/test_images/ffmpeg/h264/out/496902.png differ diff --git a/nokhwa-decoders/test_images/ffmpeg/h264/out/49715.png b/nokhwa-decoders/test_images/ffmpeg/h264/out/49715.png new file mode 100644 index 0000000..c255009 Binary files /dev/null and b/nokhwa-decoders/test_images/ffmpeg/h264/out/49715.png differ diff --git a/nokhwa-decoders/test_images/ffmpeg/h264/out/501659.png b/nokhwa-decoders/test_images/ffmpeg/h264/out/501659.png new file mode 100644 index 0000000..10f9764 Binary files /dev/null and b/nokhwa-decoders/test_images/ffmpeg/h264/out/501659.png differ diff --git a/nokhwa-decoders/test_images/ffmpeg/h264/out/504852.png b/nokhwa-decoders/test_images/ffmpeg/h264/out/504852.png new file mode 100644 index 0000000..25fe30b Binary files /dev/null and b/nokhwa-decoders/test_images/ffmpeg/h264/out/504852.png differ diff --git a/nokhwa-decoders/test_images/ffmpeg/h264/out/505068.png b/nokhwa-decoders/test_images/ffmpeg/h264/out/505068.png new file mode 100644 index 0000000..2ff4b1a Binary files /dev/null and b/nokhwa-decoders/test_images/ffmpeg/h264/out/505068.png differ diff --git a/nokhwa-decoders/test_images/ffmpeg/h264/out/50793.png b/nokhwa-decoders/test_images/ffmpeg/h264/out/50793.png new file mode 100644 index 0000000..6b043a0 Binary files /dev/null and b/nokhwa-decoders/test_images/ffmpeg/h264/out/50793.png differ diff --git a/nokhwa-decoders/test_images/ffmpeg/h264/out/51946.png b/nokhwa-decoders/test_images/ffmpeg/h264/out/51946.png new file mode 100644 index 0000000..308ebe2 Binary files /dev/null and b/nokhwa-decoders/test_images/ffmpeg/h264/out/51946.png differ diff --git a/nokhwa-decoders/test_images/ffmpeg/h264/out/57504.png b/nokhwa-decoders/test_images/ffmpeg/h264/out/57504.png new file mode 100644 index 0000000..3005aa2 Binary files /dev/null and b/nokhwa-decoders/test_images/ffmpeg/h264/out/57504.png differ diff --git a/nokhwa-decoders/test_images/ffmpeg/h264/out/59059.png b/nokhwa-decoders/test_images/ffmpeg/h264/out/59059.png new file mode 100644 index 0000000..83b3e7e Binary files /dev/null and b/nokhwa-decoders/test_images/ffmpeg/h264/out/59059.png differ diff --git a/nokhwa-decoders/test_images/ffmpeg/h264/out/65700.png b/nokhwa-decoders/test_images/ffmpeg/h264/out/65700.png new file mode 100644 index 0000000..6a5b3c2 Binary files /dev/null and b/nokhwa-decoders/test_images/ffmpeg/h264/out/65700.png differ diff --git a/nokhwa-decoders/test_images/ffmpeg/h264/out/67768.png b/nokhwa-decoders/test_images/ffmpeg/h264/out/67768.png new file mode 100644 index 0000000..b2fc1ed Binary files /dev/null and b/nokhwa-decoders/test_images/ffmpeg/h264/out/67768.png differ diff --git a/nokhwa-decoders/test_images/ffmpeg/h264/out/69340.png b/nokhwa-decoders/test_images/ffmpeg/h264/out/69340.png new file mode 100644 index 0000000..563e1e1 Binary files /dev/null and b/nokhwa-decoders/test_images/ffmpeg/h264/out/69340.png differ diff --git a/nokhwa-decoders/test_images/ffmpeg/h264/out/73823.png b/nokhwa-decoders/test_images/ffmpeg/h264/out/73823.png new file mode 100644 index 0000000..a4dc2ef Binary files /dev/null and b/nokhwa-decoders/test_images/ffmpeg/h264/out/73823.png differ diff --git a/nokhwa-decoders/test_images/ffmpeg/h264/out/80130.png b/nokhwa-decoders/test_images/ffmpeg/h264/out/80130.png new file mode 100644 index 0000000..f440b6a Binary files /dev/null and b/nokhwa-decoders/test_images/ffmpeg/h264/out/80130.png differ diff --git a/nokhwa-decoders/test_images/ffmpeg/h264/out/89092.png b/nokhwa-decoders/test_images/ffmpeg/h264/out/89092.png new file mode 100644 index 0000000..90611c8 Binary files /dev/null and b/nokhwa-decoders/test_images/ffmpeg/h264/out/89092.png differ diff --git a/nokhwa-decoders/test_images/ffmpeg/h264/out/90427.png b/nokhwa-decoders/test_images/ffmpeg/h264/out/90427.png new file mode 100644 index 0000000..9e13e32 Binary files /dev/null and b/nokhwa-decoders/test_images/ffmpeg/h264/out/90427.png differ diff --git a/nokhwa-decoders/test_images/ffmpeg/h264/out/91095.png b/nokhwa-decoders/test_images/ffmpeg/h264/out/91095.png new file mode 100644 index 0000000..36a2119 Binary files /dev/null and b/nokhwa-decoders/test_images/ffmpeg/h264/out/91095.png differ diff --git a/nokhwa-decoders/test_images/ffmpeg/h264/out/92029.png b/nokhwa-decoders/test_images/ffmpeg/h264/out/92029.png new file mode 100644 index 0000000..1dc7067 Binary files /dev/null and b/nokhwa-decoders/test_images/ffmpeg/h264/out/92029.png differ diff --git a/nokhwa-decoders/test_images/ffmpeg/h264/test.h264 b/nokhwa-decoders/test_images/ffmpeg/h264/test.h264 new file mode 100644 index 0000000..9221b17 Binary files /dev/null and b/nokhwa-decoders/test_images/ffmpeg/h264/test.h264 differ diff --git a/nokhwa-decoders/test_images/ffmpeg/h265/i-have-your-baby-.mp4 b/nokhwa-decoders/test_images/ffmpeg/h265/i-have-your-baby-.mp4 new file mode 100644 index 0000000..970e070 Binary files /dev/null and b/nokhwa-decoders/test_images/ffmpeg/h265/i-have-your-baby-.mp4 differ diff --git a/nokhwa-decoders/test_images/ffmpeg/h265/out.h265 b/nokhwa-decoders/test_images/ffmpeg/h265/out.h265 new file mode 100644 index 0000000..38913f9 Binary files /dev/null and b/nokhwa-decoders/test_images/ffmpeg/h265/out.h265 differ diff --git a/nokhwa-decoders/test_images/ffmpeg/h265/output.mp4 b/nokhwa-decoders/test_images/ffmpeg/h265/output.mp4 new file mode 100644 index 0000000..5a83f3f Binary files /dev/null and b/nokhwa-decoders/test_images/ffmpeg/h265/output.mp4 differ diff --git a/nokhwa-decoders/test_images/ffmpeg/h265/testh265.mkv b/nokhwa-decoders/test_images/ffmpeg/h265/testh265.mkv new file mode 100644 index 0000000..b192850 Binary files /dev/null and b/nokhwa-decoders/test_images/ffmpeg/h265/testh265.mkv differ diff --git a/nokhwa-decoders/test_images/notes.txt b/nokhwa-decoders/test_images/notes.txt index 8d0f932..fede93b 100644 --- a/nokhwa-decoders/test_images/notes.txt +++ b/nokhwa-decoders/test_images/notes.txt @@ -4,4 +4,14 @@ ffmpeg -i crimeandsekai.png -pix_fmt nv12 -f rawvideo crimeandsekai.yuv ffmpeg -s 1024x1520 -pix_fmt nv12 -i crimeandsekai.yuv -f image2 -pix_fmt rgb24 crimeandsekai.nv12.png -AYUV will fail on BE machines :D \ No newline at end of file +AYUV will fail on BE machines :D + +ffmpeg -i input.mp4 -c:v libx265 -vtag hvc1 output.mp4 + + +ffmpeg -i in.mkv -c:v copy -bsf hevc_mp4toannexb out.h265 +ffmpeg -i in.mkv -c:v copy -bsf h264_mp4toannexb out.h264 + + +ffmpeg -i input.mkv -pix_fmt yuv420p10le -f yuv4mpegpipe -strict -1 - | SvtAv1EncApp -i stdin --preset 2 --keyint 240 +--input-depth 10 --crf 30 --film-grain 20 --output test.ivf \ No newline at end of file