View Full Version : possible bug report? cropped black bars reappear
odysseus
23rd May 2004, 19:22
I'm doing deinterlacing by dropping one field then halving the horizontal. I assume this is the fastest, least cpu-intensive deinterlace.
Both of the 2 following statements cause previously cropped black bars to reappear but ONLY on the right hand side. The cropped left hand side bar stays away.
#BilinearResize(348,236)
#HorizontalReduceBy2()
The black bars were clipped out in DVD2AVIdg 1.3 and DO NOT APPEAR until I do the horizontal reduction (when I take out the horizontal resizing the squished image with one field removed does not have the right hand black bar, it only re-appears with the resizing).
I clipped right and left bars from the source in DVD2AVI.
I hope this is not a FAQ. I googled for the following with variations.
bilinearresize cropped reappear
bilinearresize "black bars" come back
HorizontalReduceBy2 "black bars" come back
The full script is
LoadPlugin("F:\sams\dvdstuf\dvd2aviDG1.3\MPEG2Dec3dg.dll")
MPEG2Source("MOVIE.d2v")
SeparateFields()
SelectEven()
#BilinearResize(348,236)
#HorizontalReduceBy2()
odysseus
23rd May 2004, 21:39
Some more testing, the issue does not appear to be DVD2AVI
Recalling that with virtualdub the "deinterlace by dropping one field" does not allow you to crop prior to the deinterlace
So I went back re-encoded the DVD2AVI with NO CLIPPING
original size 720x480, and in the AVS
SeparateFields()
SelectOdd()
Crop(12,0,-12,-4) #width mod 4, (mod 8 with reduce)
#HorizontalReduceBy2()
No black bars, vertically squished. 696x236 as expected
uncomment #HorizontalReduceBy2()
black bar (4 pixels) appears on the right, total size 348x236
I'm just at a loss. If HorizontalReduce() never sees the right hand black bar where is the data coming from to regenerate it? Is it just adding the black to come up to some undocumented alignment requirement?
For now the following is taking the bars out.
Crop(12,0,-20,-4) #width mod 4, (mod 8 with reduce)
#BilinearResize(348,236)
HorizontalReduceBy2()
Frame size 344x236.
Losing another 8 (I suppose 16 because of the reduction) pixels is OK for the current capture.
You should have read the doc a bit more before :)
Afik, cropping in dvd2avi is not supposed to do anything
when you load the project saved with mpeg2dec3...
So you have to crop it in the avs, what you did ...
esby
odysseus
24th May 2004, 01:20
I just started experimenting with DVD2AVI with Avisynth again a few days ago, I've done 2 dvds with it so far and for those first 2 DVDs the clipping function from DVD2AVI worked fine. for those first 2 I did not need to do any cropping after the DVD2AVI step.
It's only on the 3rd one that this problem has shown up.
Maybe I was just lucky to get 2 DVDs that the clipping worked on? ...
Originally posted by esby
You should have read the doc a bit more before :)
Afik, cropping in dvd2avi is not supposed to do anything
when you load the project saved with mpeg2dec3...
So you have to crop it in the avs, what you did ...
esby
Guest
24th May 2004, 01:46
Cropping in DGMPGDec (DVD2AVIdg 1.3.0) should work fine. I will look into this and report back.
EDIT: If you insert ConvertToYUY2() before the horizontal resize, there are no black bars. Conclusion: It's a by-16 alignment issue with YV12.
odysseus
24th May 2004, 04:30
moving in size by 4 pixels per step, every other step brings the bar back.
BilinearResize(696,400) # no bar
BilinearResize(692,400) # yes
BilinearResize(688,400) # no
BilinearResize(684,400) # yes
BilinearResize(1004,400) # yes
BilinearResize(1008,400) # no
BilinearResize(1012,400) #yes
Originally posted by neuron2
Cropping in DGMPGDec (DVD2AVIdg 1.3.0) should work fine. I will look into this and report back.
EDIT: If you insert ConvertToYUY2() before the horizontal resize, there are no black bars. Conclusion: It's a by-16 alignment issue with YV12.
Where are the black bars reappearing? I guess in the encoded (MPEG2) video, right? If so, you are probably using CCE and have "DVD compliant" checked. In that case CCE will add black bars (if necessary) to make the video a 720x576/480 DVD compliant resolution. I bet when you play your AVS files in MediaPlayer all is fine.
Guest
24th May 2004, 16:58
No, the bars appear when serving the AVS into VirtualDub.
vBulletin® v3.8.11, Copyright ©2000-2026, vBulletin Solutions Inc.