[RESOLVED] Pulldown Flags

Support forum for DGDecNV
Post Reply
DAE avatar
winston
Posts: 9
Joined: Wed Nov 02, 2011 12:00 am

[RESOLVED] Pulldown Flags

Post by winston »

I just recently switched service providers and found that they seem to use an abundance of pulldown flags on their 720p 60fps channels in which the content is not purely 60fps. This seems to create an issue using DGDecNV. When honoring the pulldown flags (fieldop=0), the video appears to be interlaced (which is very weird) and the avisynth output is missing many frames. I tried different fieldop settings and got different results but all still yielded missing frames. The only solution that I've found thus far is to use the old DGMPGDec; with it, all the frames are present and not interlaced. Below is a list of the number of output frames with their corresponding indexing program used and fps.

DGDecNV:
fieldop=0 yields 112713 frames @ 59.94fps and frames appear interlaced
fieldop=1 yields 90564 frames @ 47.95fps and frames do not appear interlaced
fieldop=2 yields 92545 frames @ 59.94 fps and frames do not appear interlaced
----> avisynth script used --> dgsource("index.dgi", fieldop= )

DGMPGDec:
w/ default settings yields 154057 frames (correct #) @ 59.94 fps with no interlacing
----> avisynth script used --> mpeg2source("index.d2v")

DGIndexNV log:

Code: Select all

Stream Type: Program
Video Type: MPEG2
Profile: main@high
Coded Size: 1280x720
Display Size: [not specified]
Aspect Ratio: 16:9 [3]
Frame Rate: 59.940060 fps
Colorimetry: BT.709 [1]*
Frame Structure: 
Frame Type: 
Coded Number: 92545
Playback Number: 154057
Frame Repeats: 61512
Field Repeats: 0
Bitrate: 
Bitrate (Avg): 
Bitrate (Max): 
Audio Stream: 80: AC3 3/2 48 384
Elapsed: 0:00:18
Remain: 0:00:00
FPS: 
Info: Finished!
DGIndex log:

Code: Select all

Stream Type: MPEG2 Program
Profile: main@high
Frame Size: 1280x720
Display Size: [not specified]
Aspect Ratio: 16:9 [3]
Frame Rate: 59.940060 fps
Video Type: Video 57.04%
Frame Type: Progressive
Coding Type: B
Colorimetry: BT.709*
Frame Structure: Frame
Field Order: 
Coded Number: 92545
Playback Number: 2
Frame Repeats: 0
Field Repeats: 0
VOB ID: 
Cell ID: 
Bitrate: 
Bitrate (Avg): 
Bitrate (Max): 
Audio Stream: 80: AC3 3/2 384
Timestamp: 0:42:49
Elapsed: 0:00:26
Remain: FINISH
FPS: 
Info: 
Thanks for the help. I hope I'm just making a dumb mistake.
User avatar
admin
Posts: 4551
Joined: Thu Sep 09, 2010 3:08 pm

Re: Pulldown Flags

Post by admin »

Please post a link to an unprocessed source sample that shows the issue. You can cut it with DGIndexNV: set a range using [ and ] and then do Save Project and Demux Video. Upload the resulting M2V file to mediafire.com and post the link here.
DAE avatar
winston
Posts: 9
Joined: Wed Nov 02, 2011 12:00 am

Re: Pulldown Flags

Post by winston »

User avatar
admin
Posts: 4551
Joined: Thu Sep 09, 2010 3:08 pm

Re: Pulldown Flags

Post by admin »

Thanks, winston, for pointing this out. I have found and fixed the issue and will release it tonight.

I will post again here after I release it.
DAE avatar
winston
Posts: 9
Joined: Wed Nov 02, 2011 12:00 am

Re: Pulldown Flags

Post by winston »

awesome! will the details be in the change log?
User avatar
admin
Posts: 4551
Joined: Thu Sep 09, 2010 3:08 pm

Re: Pulldown Flags

Post by admin »

You mean the technical reason for the problem? No. But I will give it to you here:

In earlier versions of MSVC++ a bool defined in a structure takes 4 bytes. So if you do an sscanf(line, "%d", &bool) everything would be fine. In later versions, a bool in a structure takes only 1 byte. So the sscanf %d writes 4 and overwrites memory. The memory overwritten in this case was the progressive_sequence flag and its corruption causes the pulldown to be interpreted wrongly as field pulldown instead of frame pulldown, hence the combing. My original code was developed on the earlier MSVC++ and ported later, at which point I was unaware of the bool issue. The fix is to use int instead of bool for structure members that need to loaded with sscanf (from the DGI file).
DAE avatar
winston
Posts: 9
Joined: Wed Nov 02, 2011 12:00 am

Re: Pulldown Flags

Post by winston »

Great thanks! very interesting
User avatar
admin
Posts: 4551
Joined: Thu Sep 09, 2010 3:08 pm

Re: Pulldown Flags

Post by admin »

The fix is slipstreamed into 2041 now. Just re-download and update both DGIndexNV and DGDecodeNV.
Post Reply