As part of
BDtoAVCHD software I developed this plug-in for optimize Blu-Ray 3D to SBS/TAB conversions. Is based on Intel Media SDK 2021 R1 and can be used on all systems (SW acceleration) or on Intel Graphics systems (HW acceleration - Intel Quick Sync). Can decode elementary AVC/MVC both streams combined in the same file or in separated files.
Now I opened this thread so it's can be used for more purposes/applications in addition to original usage.
Current version can also decode 2D HEVC/AVC/VC-1/MPEG2 streams (included UHD 10 bit color for HEVC).
REQUIREMENTS
- Windows 10/8.1/8/7 (32 or 64-bit)
- AviSynth 2.6.0 (32-bit) or AviSynth+ (32/64-bit)
DOWNLOAD
LIMITATIONS- No seek supported. Only strictly linear decoding is allowed.
CHANGELOG
Code:
Version 3.0.3 (06/03/2022)
- Updated compiler to Visual Studio 2022.
Version 3.0.0 (06/11/2021)
- Updated to Intel Media SDK 2021 R1.
Version 2.9.8 (01/02/2021)
- Updated to Intel Media SDK 2020 R1.
Version 2.9.2 (01/24/2020)
- Updated to Intel Media SDK 2019 R1 (API 1.28).
- Updated compiler to Visual Studio 2019.
Version 2.8.6 (03/19/2019)
- Updated to Intel Media SDK 2018 R2.1 (API 1.27).
- Updated compiler to Visual Studio 2017 with Update 9.
Version 2.8.0 (05/12/2018)
- Can also decode HEVC (only in HW mode).
- Updated AviSynth header to support AviSynth+.
- New 64-bit version.
- Added deep color support (10bit) for HEVC decoding (requires AviSynth+).
- Optimized code using SSE2, SSSE3 and AVX2 instructions.
- Updated to Intel Media SDK 2018 R1 (API 1.26).
- Updated compiler to Visual Studio 2017 with Update 6.
Version 2.7.2 (07/19/2017)
- Updated to Intel Media SDK 2017 R1 (API 1.23).
- Updated compiler to Visual Studio 2017.
Version 2.6.4 (10/26/2016)
- Updated compiler to Visual Studio 2015 Update 3.
Version 2.5.8 (07/27/2016)
- Fixed: with some sources hangs using HW mode and recent Intel Graphics Drivers.
Version 2.5.7 (06/28/2016)
- Updated to Intel Media SDK 2016 R2 (API 1.19).
Version 2.5.6 (05/09/2016)
- Fixed: MPEG2 decoding using SW mode.
- Simplified memory allocation scheme.
Version 2.5.1 (11/27/2015)
- Updated to Intel Media SDK 2016 (API 1.17).
Version 2.5.0 (11/12/2015)
- Updated to Intel Media SDK 2015 Update 2.1 (API 1.16).
Version 2.4.6 (09/21/2015)
- Fixed: with parameter output_format = -2 R/L views order gets inverted after minute 45.
- Upgraded to Visual Studio 2015.
Version 2.4.5 (08/17/2015)
- Updated to Intel Media SDK 2015 Update 2 (API 1.15).
Version 2.4.3 (06/13/2015)
- Updated with Avisynth headers v6, due this, older Avisynth versions (2.5.8) are no longer compatible ***is now required Avisynth v2.6.0***.
Version 2.4.0 (03/20/2015)
- Updated to Intel Media SDK 2015 Update 1 (no functional changes).
Version 2.2.4 (11/20/2014)
- Upgraded to Visual Studio 2013 (no functional changes).
Version 2.2.3 (11/07/2014)
- Fixed all Pacific Rim 3D decoding issues (SW mode and HW mode).
- Full compatible with latest Intel HD Graphics driver's series.
- Slightly reduced CPU usage and memory usage (CPU usage downs from 12% to 8% in benchmarks: AVSMeter, HW mode,
latest Intel drivers).
Version 2.2.2 (10/25/2014)
- Fixed: Possible image corruption (artifacts on MVC view) using Quick Sync acceleration and latest Intel
Graphics drivers 15.33.xx.39xx
Version 2.2.1 (10/04/2014)
- Updated to Intel Media SDK 2014 R2.
- Some decoder throughput improvements (both HW and SW decoding).
Version 2.1.3 (03/16/2014)
- Better strategy for detection HW API LEVEL supported by system and chose SW on not supported systems.
Version 2.1.2 (02/26/2014)
- Updated to Intel Media SDK 2014.
- Load libmfxsw32.dll from same folder as MVCsource.dll (no system path required)
- Some code optimizations and speed improvements.
- Workaround to fix corrupted frames in some streams (e.g. Pacific Rim – root cause seems Intel Media SDK bug)
Version 2.0.0 (01/10/2014)
- Also 2D video decoding (AVC, VC-1, MPEG2)
Version 1.9.5 (12/28/2013)
- HW acceleration on Intel HD Graphics systems (Intel Quick Sync Video)
Version 1.9.2 (10/19/2013)
- Support of AVC/MVC on separated input streams.
Version 1.9.0 (08/25/2013)
- First release.
- Decoding of AVC/MVC combined streams only.
PARAMETERS
Code:
MVCsource("X:\path_to_AVC.h264", "X:\path_to_MVC.h264", number_of_frames, output_format)
number_of_frames: number of frames that contains .h264 files
output_format:
0 : AVC frames only
1 : MVC frames only
2 : interleaved AVC-MVC frames (AVC odd)
-2 : interleaved MVC-AVC frames (AVC even)
Notes:
- If number_of_frames specified is lower that actual number of frames in .h264 file, output is trimmed. Also if is greater additional black frames are inserted to complete requested number of frames.
- Output is already YV12 color format, please do not insert ConvertToYV12() in scripts.
- Correct framerate is taken from stream, please do not insert AssumeFPS() in scripts.
- In interleaved left-right direct outputs frame rate is doubled (2x). It's not a bug! That's the functionality that is intended.
- From version 2.0.0 it's also possible to specify a 2D elementary stream (AVC/VC-1/MPEG2) in the first parameter. In this case must leave the empty second parameter "" and output_format = 0.
- NEW: from version 2.8.0 can also decode 2D HEVC elementary stream (only using HW mode).
USAGE EXAMPLES
Simplest script (returns interleaved AVC-MVC frames)
Code:
LoadPlugin("C:\Program Files (x86)\BDtoAVCHD\MVCsource.dll")
MVCsource("X:\path_to_AVC.h264", "X:\path_to_MVC.h264", 178055, 2)
Same on combined AVC + MVC file
Code:
LoadPlugin("C:\Program Files (x86)\BDtoAVCHD\MVCsource.dll")
MVCsource("X:\path_to_MVCCombined.h264", "", 178055, 2)
Half SBS conversion (AVC = left eye)
Code:
LoadPlugin("C:\Program Files (x86)\BDtoAVCHD\MVCsource.dll")
Interleaved = MVCsource("X:\path_to_AVC.h264", "X:\path_to_MVC.h264", 178055, 2)
Right = SelectOdd(Interleaved)
Left = SelectEven(Interleaved)
return StackHorizontal(HorizontalReduceBy2(Left), HorizontalReduceBy2(Right))
Half SBS conversion (AVC = right eye)
Code:
LoadPlugin("C:\Program Files (x86)\BDtoAVCHD\MVCsource.dll")
Interleaved = MVCsource("X:\path_to_AVC.h264", "X:\path_to_MVC.h264", 178055, -2)
Right = SelectOdd(Interleaved)
Left = SelectEven(Interleaved)
return StackHorizontal(HorizontalReduceBy2(Left), HorizontalReduceBy2(Right))
Half TAB conversion (AVC = left eye)
Code:
LoadPlugin("C:\Program Files (x86)\BDtoAVCHD\MVCsource.dll")
Interleaved = MVCsource("X:\path_to_AVC.h264", "X:\path_to_MVC.h264", 178055, 2)
Right = SelectOdd(Interleaved)
Left = SelectEven(Interleaved)
return StackVertical(VerticalReduceBy2(Left), VerticalReduceBy2(Right))
Half TAB conversion (AVC = right eye)
Code:
LoadPlugin("C:\Program Files (x86)\BDtoAVCHD\MVCsource.dll")
Interleaved = MVCsource("X:\path_to_AVC.h264", "X:\path_to_MVC.h264", 178055, -2)
Right = SelectOdd(Interleaved)
Left = SelectEven(Interleaved)
return StackVertical(VerticalReduceBy2(Left), VerticalReduceBy2(Right))
only AVC view
Code:
LoadPlugin("C:\Program Files (x86)\BDtoAVCHD\MVCsource.dll")
MVCsource("X:\path_to_AVC.h264", "X:\path_to_MVC.h264", 178055, 0)
only MVC view
Code:
LoadPlugin("C:\Program Files (x86)\BDtoAVCHD\MVCsource.dll")
MVCsource("X:\path_to_AVC.h264", "X:\path_to_MVC.h264", 178055, 1)
2D decoder (HEVC/AVC/VC-1/MPEG2)
Code:
LoadPlugin("C:\Program Files (x86)\BDtoAVCHD\MVCsource.dll")
MVCsource("X:\path_to_2D_stream.vc1/mpv/h264/hevc", "", 178055, 0)
BENCHMARK (updated to version 2.8.0)
HW decoding on Intel HD Graphics 630 (Kaby Lake) and simplest script (no resize and no stack, only decoding)
SW decoding on Intel i7-7700k and simplest script (no resize and no stack, only decoding)