Skip to content

hifi-decoder: Use SharedMemory for better multi processing, Fix 8mm, Fix Windows CTRL-C#191

Merged
harrypm merged 18 commits intooyvindln:vhs_decodefrom
eshaz:hifi-decode-processes
Feb 11, 2025
Merged

hifi-decoder: Use SharedMemory for better multi processing, Fix 8mm, Fix Windows CTRL-C#191
harrypm merged 18 commits intooyvindln:vhs_decodefrom
eshaz:hifi-decode-processes

Conversation

@eshaz
Copy link

@eshaz eshaz commented Feb 9, 2025

  • Move all data transfers between processes to shared memory. Results in huge speed ups on multi core machines.
  • Stream audio data in --preview mode to prevent skips for a good real-time rf monitoring experience.
  • Add --head_switching_interpolation [on/off] option to turn this noise reduction feature on or off.
  • Fix 8mm decoding by putting the RF low-pass filter back in. It's needed to filter out the video signals from 8mm capture data.
    • This is also re-enabled for VHS. In some cases this can help filter out noise for a minor performance impact.
  • Fix Windows issue with CTRL-C causing an InterruptedException rather than cleaning up gracefully.

Benchmarks

Piping in from flac

flac -d -c --force-raw-format --endian little --sign signed hifi_rf.flac - | ~/git/vhs-decode/hifi-decode -t 16 -n -f 20MHz --auto_fine_tune off --audio_rate 48000 - hifi_decoded.flac

  • Dell Laptop with 16 cores circa 2021, running 16 threads (Linux)
    • 11th Gen Intel(R) Core(TM) i9-11980HK @ 2.60GHz
- Decoding speed: 48988 kFrames/s (1.22x), 16 running processes
- Input position: 0:03:48.780
- Audio position: 0:03:40.416
- Wall time     : 0:03:06.805
  • Dell Laptop with 16 cores circa 2021, running 16 threads (Windows 11)
    • 11th Gen Intel(R) Core(TM) i9-11980HK @ 2.60GHz
Decoding speed: 31265 kFrames/s (0.78x), 15 running processes
- Input position: 0:08:22.332
- Audio position: 0:08:14.460
- Wall time     : 0:10:42.668
  • AMD Desktop circa 2015, running 4 threads
    • AMD A10-7860K Radeon R7, 12 Compute Cores 4C+8G
Decoding speed: 8362 kFrames/s (0.21x), 4 running processes
- Input position: 0:00:49.692
- Audio position: 0:00:46.248
- Wall time     : 0:03:57.707
  • Old i7 sandybridge laptop circa 2010, running 8 threads
    • Intel(R) Core(TM) i7-2960XM CPU @ 2.70GHz
Decoding speed: 10053 kFrames/s (0.25x), 8 running processes
- Input position: 0:00:23.616
- Audio position: 0:00:18.696
- Wall time     : 0:01:33.961
  • Core2 Duo machine circa ~2008, running 2 threads:
    • Intel(R) Core(TM)2 Extreme CPU X9000 @ 2.80GHz
Decoding speed: 1405 kFrames/s (0.04x), 2 running processes
- Input position: 0:00:14.760
- Audio position: 0:00:12.792
- Wall time     : 0:07:00.142

Piping in from ffmpeg

ffmpeg -i hifi_rf.flac -f s16le -acodec pcm_s16le - | ~/git/vhs-decode/hifi-decode -t 64 -n -f 20MHz --auto_fine_tune off --audio_rate 48000 - hifi_decoded.flac

  • Large server with 192 cores circa 2018, running 64 threads:
    • Dell Poweredge R930 Server, 4x Intel(R) Xeon(R) CPU E7-8890 v4 @ 2.20GHz
- Decoding speed: 102333 kFrames/s (2.56x), 52 running processes
- Input position: 0:29:28.402
- Audio position: 0:29:28.740
- Wall time     : 0:11:31.233

Screenshot from 2025-02-08 21-36-41

@eshaz eshaz marked this pull request as ready for review February 9, 2025 04:21
@eshaz eshaz changed the title hifi-decoder: Use SharedMemory for better multi processing hifi-decoder: Use SharedMemory for better multi processing, Fix 8mm, Fix Windows CTRL-C Feb 9, 2025
@eshaz eshaz marked this pull request as draft February 10, 2025 22:49
@eshaz eshaz marked this pull request as ready for review February 11, 2025 06:49
@harrypm harrypm merged commit 87cd35b into oyvindln:vhs_decode Feb 11, 2025
@eshaz eshaz deleted the hifi-decode-processes branch March 8, 2025 16:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants