[vlc-devel] [PATCH] Fix snapshot chroma/size mismach bug
basos g
noxelia at gmail.com
Sat Dec 13 13:50:55 CET 2008
All the above mess if for vlc-1.0.0 .
I leave this issue for later investigation. what's for sure is that
fmt_out pict->format are a bit messed in trunk right now..
I 've tested things for vlc-0.9.8 and things are more consistent.Sizes
and chroma for vout->fmt_in and p_pic->format match. Haven't tested
for aspect yet.
Reports
VLC-0.9.8 LINUX
I420 Video. Resized X Window.
Please igore ar 0:0 at [snapshot] logs. They are not implemented yet.
---------- from libvlc user
[00000343] x11 video output debug: x11 image size 306x230 (0,0,306x230)
[00000343] main video output debug: waiting for thread initialization
[00000343] main video output debug: got 2 direct buffer(s)
[00000343] main video output debug: picture in 192x144 (0,0,192x144),
chroma I420, ar 4:3, sar 1:1
[00000343] main video output debug: picture user 192x144
(0,0,192x144), chroma I420, ar 4:3, sar 1:1
[00000343] main video output debug: picture out 306x230 (0,0,306x230),
chroma RV32, ar 574747:432000, sar 1:1
----------snapshot from video filter
[00000343] main video output debug: [snapshot] vout fmt out 306x230
(0,0,306x230), chroma RV32, ar 0:0, sar 1:1
[00000343] main video output debug: [snapshot] pic 192x144
(0,0,192x144), chroma I420, ar 0:0, sar 0:0
[00000343] main video output debug: [snapshot] vout fmt in 192x144
(0,0,192x144), chroma I420, ar 0:0, sar 1:1
-------- from vlc
[00000409] x11 video output debug: x11 image size 192x144 (0,0,192x144)
[00000409] main video output debug: waiting for thread initialization
[00000409] main video output debug: got 2 direct buffer(s)
[00000409] main video output debug: picture in 192x144 (0,0,192x144),
chroma I420, ar 4:3, sar 1:1
[00000409] main video output debug: picture user 192x144
(0,0,192x144), chroma I420, ar 4:3, sar 1:1
[00000409] main video output debug: picture out 192x144 (0,0,192x144),
chroma RV32, ar 4:3, sar 1:1
-------- snapshot from "snapshot" gui button
[00000409] main video output debug: [snapshot] vout fmt out 192x144
(0,0,192x144), chroma RV32, ar 0:0, sar 1:1
[00000409] main video output debug: [snapshot] pic 192x144
(0,0,192x144), chroma I420, ar 0:0, sar 0:0
[00000409] main video output debug: [snapshot] vout fmt in 192x144
(0,0,192x144), chroma I420, ar 0:0, sar 1:1
-- now resize video output
[00000420] main chroma debug: removing module "i420_rgb_mmx"
[00000409] x11 video output debug: x11 image size 346x260 (0,0,346x260)
[00000421] main chroma debug: looking for video filter2 module: 16 candidates
[00000421] i420_rgb_mmx chroma debug: RGB pixel format is A8R8G8B8
[00000421] main chroma debug: using video filter2 module "i420_rgb_mmx"
--------- snapshot from "snapshot" gui button
[00000377] main video output debug: [snapshot] vout fmt out 408x306
(0,0,408x306), chroma RV32, ar 0:0, sar 1:1
[00000377] main video output debug: [snapshot] pic 192x144
(0,0,192x144), chroma I420, ar 0:0, sar 0:0
[00000377] main video output debug: [snapshot] vout fmt in 192x144
(0,0,192x144), chroma I420, ar 0:0, sar 1:1
Results ::
We test 2 cases. Snapshot from a library user and snapshot from vlc
gui in a resized x11 window udner LINUX:
vout fmt_out has the output window size and chroma.
p_pic->format has the original size and chroma.
Thus in vout_Snapshot the apropriate initializer for fmt_in is
p_pic->format. or vout->fmt_in
********************************************************************************************
vlc 0.9.8 WINDOWS
------- vlc video
vout_directx debug: NewPictureVec overlay:yes chroma:YV12
vout_directx debug: YUV overlay created successfully
vout_directx debug: End NewPictureVec (succeeded)
main debug: got 1 direct buffer(s)
main debug: picture in 352x240 (0,0,352x240), chroma I420, ar 22:15, sar 1:1
main debug: picture user 352x240 (0,0,352x240), chroma I420, ar 22:15, sar 1:1
main debug: picture out 352x240 (0,0,352x240), chroma I420, ar 22:15, sar 1:1
------- snapshot from "snapshot" gui button
main debug: [snapshot] vout fmt out 352x240 (0,0,352x240), chroma
I420, ar 0:0, sar 1:1
main debug: [snapshot] pic 352x240 (0,0,352x240), chroma I420, ar 0:0, sar 0:0
main debug: [snapshot] vout fmt in 352x240 (0,0,352x240), chroma I420,
ar 0:0, sar 1:1
--- video output resized
------- snapshot from "snapshot" gui button
main debug: [snapshot] vout fmt out 352x240 (0,0,352x240), chroma
I420, ar 0:0, sar 1:1
main debug: [snapshot] pic 352x240 (0,0,352x240), chroma I420, ar 0:0, sar 0:0
main debug: [snapshot] vout fmt in 352x240 (0,0,352x240), chroma I420,
ar 0:0, sar 1:1
Result:
In all cases sizes and chroma matched.
So at vout_Snapshot we you initialize fmt_in with vout->fmt_in
vout->fmt_out or p_pic->format
I'd prefer the last one as this is the picture meta data from the real picture
PS: i attach a patch for the logging on vout_Snapshot
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0008-Added-debug-logs-to-vout_Snapshot.patch
Type: text/x-diff
Size: 2700 bytes
Desc: not available
URL: <http://mailman.videolan.org/pipermail/vlc-devel/attachments/20081213/ca040e30/attachment.patch>
More information about the vlc-devel
mailing list