What is DGDecodeNV? | Table of Contents |
DGDecodeNV is an Avisynth source filter (AviSynth v2.6 or higher) that decodes and frame-serves AVC (H.264), HEVC (H.265), VC1, and MPEG2 video. It works in conjunction with the indexing tool DGIndexNV.
The "NV" in the name "DGDecodeNV" indicates that this version of the program is designed for use with the GPU decoder on some Nvidia video cards. See here to check whether your video card has a VP2 or greater engine:
Table of Nvidia Graphics Cards SpecificationsYou can get the latest binaries of DGDecodeNV at http://rationalqm.us/dgdecnv/dgdecnv.html.
Filter Syntax | Table of Contents |
DGSource() | Table of Contents |
DGSource(str "dgi", bool i420, int deinterlace, bool use_top_field, bool use_pf, int ct, int cb, int cl, int cr, int rw, int rh, int fieldop, bool show, bool fulldepth)
Important note 1: The cropping values are relative to the original coded size and not relative to the coded display area. For example, if your stream has a coded height of 1088 but a display height of 1080, then if you want to crop off 8 pixels from the 1080 to make 1072, then your crop value will be 16, i.e., 8 to get from 1088 to 1080, and then 8 more to get your desired crop. This is different from what is done by some other applications that do not expose the coded size to the user. If you use the DGIndexNV cropping tool this will be handled for you automatically.
Important note 2: The nVidia driver is currently broken such that mod-2 cropping of the top and left sides is broken, and so the values of ct and cl must be mod-4. Right and bottom cropping may be mod-2. DGDecNV allows you to specify mod-2 values for top and left, however, looking forward to a fix from nVidia.
AVC, MPG, and VC1 video each provide syntax elements that enable a single field of any frame to be repeated automatically during display ("pulled down"). The extra fields do not occupy space in the video stream but are simply created by copying when the stream is decoded and displayed. This facility is most often used to display film rate clips (23.976 fps) at the NTSC rate (29.97 fps), a process called 3:2 pulldown. In practice, however, pulldown in various different patterns is commonly encountered. It can be used, for example, to display 25 fps PAL at the NTSC rate. One way to learn about "telecining" and "3:2 pulldown" is to perform a search for those terms using our friend Google.
Understanding the theory and practice required to properly set this option for a given application is nontrivial. Here we can only define the operations and give some general guidance. There is ample additional material available in existing guides.The fieldop setting allows the user to specify how the pulldown flags are to be handled.
The fieldop is perhaps the most important option to understand when using DGDecNV. Most users should first preview the project and inspect the DGIndexNV Information Panel. If the clip is 29.976fps, and the Field Repeats box in the Information Panel indicates field repeats consistent with 3:2 pulldown, then it is likely that the clip can be treated as 3:2 pulldown material, and so Force Film (fieldop=1) should be selected. Force Film can also be used on hybrid material and will decimate frames as required in video sections to maintain the film rate.
Otherwise, then you should leave fieldop=0 (Honor Pulldown Flags) for generation of the DGI file. If the result is combed (because the source is interlaced, hybrid interlaced/3:2, field blended, etc.), you may want to apply a deinterlacer or inverse telecine (IVTC) filter in your Avisynth script.
Almost invariably, if you know the source is not all 3:2 pulled-down NTSC, you will want to select Honor Pulldown Flags and then post-process as required. Keep in mind that if there are no pulldown flags, there is nothing to honor, so this option just delivers the encoded frames.
fieldop=2 (Ignore Pulldown Flags) should be necessary only for advanced users who want to see just the exact coded pictures in the video stream.
DGDenoise() | Table of Contents |
DGDenoise(clip c, float strength, float blend, bool chroma, int searchw, int device)
DGSharpen() | Table of Contents |
DGSharpen(clip c, float strength, int device)
DGTelecide() | Table of Contents |
DGTelecide(clip c, int mode, float pthresh, float dthresh, bool blend, bool map, bool show, int device)
DGDecimate() | Table of Contents |
DGDecimate(clip c, int cycle, int keep, int device, bool show)
DGBob() | Table of Contents |
DGBob(clip c, int order, int mode, int device)
PVBob() | Table of Contents |
PVBob(clip c, int order, int mode, int device)
Usage Examples | Table of Contents |
AviSynth LoadPlugin() Example | Table of Contents |
LoadPlugin("C:\My Files\DGDecodeNV.dll")Note: This load plugin line can be omitted if DGDecodeNV.dll is in the default AviSynth plug-ins directory, because Avisynth will load it automatically.
DGSource() Examples | Table of Contents |
DGSource("C:\My Files\project.dgi")Note: The path can be omitted if "project.dgi" is in the same directory as your AviSynth (*.avs) script.
DGSource("project.dgi", deinterlace=1)
DGSource("project.dgi", rw=1280, rh=720)
DGSource("project.dgi") DGDenoise(strength=0.15)
DGSource("project.dgi") DGSharpen(strength=0.75)
DGSource("project.dgi") DGTelecide(mode=1, pthresh=3.5) DGDecimate()
DGSource("project.dgi") DGTelecide(mode=2, dthresh=7.5)