>> How did you get a source stream with 480 lines and NTSC framerate,
 >>  but with PAL sample aspect ratio (59:54) ??
 >
 >      You know - that caught my eye too - it didn't feel right (should be
 >      11:10, right?).

Yep.  (Well, 10:11 actually.)
And this is what triggered the segfault problem....

All the calculations regarding ratios use actual ratios --- a datatype with
 an int for numerator and int for denominator.  The weird SAR caused all the
 ratios to get funky; common factors which usually cancel out didn't:

   INFO: [y4mscaler] === TARGET parameters: =================
   INFO: [y4mscaler] > stream:
   INFO: [y4mscaler] >   640x480, SAR 1:1, bottom-field-first
   INFO: [y4mscaler] <   chroma subsampling:  420_jpeg
   INFO: [y4mscaler] > active region:
   INFO: [y4mscaler] >   640x-20 at 0,32  (bg Y'CbCr: 128,240,108)
   INFO: [y4mscaler] > X ratio:  88/89
   INFO: [y4mscaler] > Y ratio:  4752/5251

Note the ridiculous scaling ratios.

See that "-20" in the active region size?  That's because of overflow in
 the numerator and/or denominator...


(Admittedly this is not a graceful failure mode for y4m_ratio_t (which is
 implemented in the yuv4mpeg library, not y4mscaler (but it was implemented
 by me, so I guess it is my fault anyway)).  I'm not sure what to do about
 it.  Switch to int64_t's instead of int's?  :)


 >      So, if 59:54 is wrong then it's a smilutils bug.  That would make
 >      3 bugs found on the day - did I enter a contest without knowing it? ;)
 
Congratulations, YOU HAVE ALREADY WON!

In 6-8 weeks, you will receive the grand prize, this lovely lump of coal.

(But in a couple of days, I'll put some fixed up code on-line.  That may
 be worth even more to you.)

-matt m.



-------------------------------------------------------
This sf.net email is sponsored by:ThinkGeek
Welcome to geek heaven.
http://thinkgeek.com/sf
_______________________________________________
Mjpeg-users mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/mjpeg-users

Reply via email to