@@ -308,7 +308,7 @@ impl Av1anContext {
308
308
309
309
let ( tx, rx) = mpsc:: channel ( ) ;
310
310
let handle = s. spawn ( |_| {
311
- broker. encoding_loop ( tx, self . args . set_thread_affinity ) ;
311
+ broker. encoding_loop ( tx, self . args . set_thread_affinity , self . args . ignore_frame_mismatch ) ;
312
312
} ) ;
313
313
314
314
// Queue::encoding_loop only sends a message if there was an error (meaning a chunk crashed)
@@ -348,11 +348,25 @@ impl Av1anContext {
348
348
}
349
349
350
350
if let Some ( ref tq) = self . args . target_quality {
351
+ let mut temp_res = tq. vmaf_res . to_string ( ) ;
352
+ if tq. vmaf_res == "inputres" {
353
+ let inputres = self . args . input . resolution ( ) ?;
354
+ temp_res. push_str ( & format ! (
355
+ "{}x{}" ,
356
+ & inputres. 0 . to_string( ) ,
357
+ & inputres. 1 . to_string( )
358
+ ) ) ;
359
+ temp_res. to_string ( ) ;
360
+ } else {
361
+ temp_res = tq. vmaf_res . to_string ( ) ;
362
+ }
363
+
351
364
if let Err ( e) = vmaf:: plot (
352
365
self . args . output_file . as_ref ( ) ,
353
366
& self . args . input ,
354
367
tq. model . as_deref ( ) ,
355
- tq. vmaf_res . as_str ( ) ,
368
+ temp_res. as_str ( ) ,
369
+ tq. vmaf_scaler . as_str ( ) ,
356
370
1 ,
357
371
tq. vmaf_filter . as_deref ( ) ,
358
372
tq. vmaf_threads ,
@@ -400,6 +414,7 @@ impl Av1anContext {
400
414
current_pass : u8 ,
401
415
worker_id : usize ,
402
416
padding : usize ,
417
+ ignore_frame_mismatch : bool ,
403
418
) -> Result < ( ) , ( Box < EncoderCrash > , u64 ) > {
404
419
update_mp_chunk ( worker_id, chunk. index , padding) ;
405
420
@@ -618,11 +633,13 @@ impl Av1anContext {
618
633
let encoded_frames = num_frames ( chunk. output ( ) . as_ref ( ) ) ;
619
634
620
635
let err_str = match encoded_frames {
621
- Ok ( encoded_frames) if encoded_frames != chunk. frames ( ) => Some ( format ! (
622
- "FRAME MISMATCH: chunk {}: {encoded_frames}/{} (actual/expected frames)" ,
623
- chunk. index,
624
- chunk. frames( )
625
- ) ) ,
636
+ Ok ( encoded_frames) if !ignore_frame_mismatch && encoded_frames != chunk. frames ( ) => {
637
+ Some ( format ! (
638
+ "FRAME MISMATCH: chunk {}: {encoded_frames}/{} (actual/expected frames)" ,
639
+ chunk. index,
640
+ chunk. frames( )
641
+ ) )
642
+ }
626
643
Err ( error) => Some ( format ! (
627
644
"FAILED TO COUNT FRAMES: chunk {}: {error}" ,
628
645
chunk. index
@@ -689,6 +706,7 @@ impl Av1anContext {
689
706
self . frames ,
690
707
self . args . min_scene_len ,
691
708
self . args . verbosity ,
709
+ self . args . scaler . as_str ( ) ,
692
710
self . args . sc_pix_format ,
693
711
self . args . sc_method ,
694
712
self . args . sc_downscale_height ,
0 commit comments