@@ -308,7 +308,11 @@ 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 (
312
+ tx,
313
+ self . args . set_thread_affinity ,
314
+ self . args . ignore_frame_mismatch
315
+ ) ;
312
316
} ) ;
313
317
314
318
// Queue::encoding_loop only sends a message if there was an error (meaning a chunk crashed)
@@ -348,11 +352,25 @@ impl Av1anContext {
348
352
}
349
353
350
354
if let Some ( ref tq) = self . args . target_quality {
355
+ let mut temp_res = tq. vmaf_res . to_string ( ) ;
356
+ if tq. vmaf_res == "inputres" {
357
+ let inputres = self . args . input . resolution ( ) ?;
358
+ temp_res. push_str ( & format ! (
359
+ "{}x{}" ,
360
+ & inputres. 0 . to_string( ) ,
361
+ & inputres. 1 . to_string( )
362
+ ) ) ;
363
+ temp_res. to_string ( ) ;
364
+ } else {
365
+ temp_res = tq. vmaf_res . to_string ( ) ;
366
+ }
367
+
351
368
if let Err ( e) = vmaf:: plot (
352
369
self . args . output_file . as_ref ( ) ,
353
370
& self . args . input ,
354
371
tq. model . as_deref ( ) ,
355
- tq. vmaf_res . as_str ( ) ,
372
+ temp_res. as_str ( ) ,
373
+ tq. vmaf_scaler . as_str ( ) ,
356
374
1 ,
357
375
tq. vmaf_filter . as_deref ( ) ,
358
376
tq. vmaf_threads ,
@@ -400,6 +418,7 @@ impl Av1anContext {
400
418
current_pass : u8 ,
401
419
worker_id : usize ,
402
420
padding : usize ,
421
+ ignore_frame_mismatch : bool ,
403
422
) -> Result < ( ) , ( Box < EncoderCrash > , u64 ) > {
404
423
update_mp_chunk ( worker_id, chunk. index , padding) ;
405
424
@@ -618,11 +637,13 @@ impl Av1anContext {
618
637
let encoded_frames = num_frames ( chunk. output ( ) . as_ref ( ) ) ;
619
638
620
639
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
- ) ) ,
640
+ Ok ( encoded_frames) if !ignore_frame_mismatch && encoded_frames != chunk. frames ( ) => {
641
+ Some ( format ! (
642
+ "FRAME MISMATCH: chunk {}: {encoded_frames}/{} (actual/expected frames)" ,
643
+ chunk. index,
644
+ chunk. frames( )
645
+ ) )
646
+ }
626
647
Err ( error) => Some ( format ! (
627
648
"FAILED TO COUNT FRAMES: chunk {}: {error}" ,
628
649
chunk. index
@@ -689,6 +710,7 @@ impl Av1anContext {
689
710
self . frames ,
690
711
self . args . min_scene_len ,
691
712
self . args . verbosity ,
713
+ self . args . scaler . as_str ( ) ,
692
714
self . args . sc_pix_format ,
693
715
self . args . sc_method ,
694
716
self . args . sc_downscale_height ,
0 commit comments