<br><br><div class="gmail_quote">On Wed, Nov 12, 2008 at 4:28 PM, Ralph Giles <span dir="ltr"><<a href="mailto:giles@xiph.org">giles@xiph.org</a>></span> wrote:<br><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
<div class="Ih2E3d">On Wed, Nov 12, 2008 at 2:50 AM, salsaman <<a href="mailto:salsaman@gmail.com">salsaman@gmail.com</a>> wrote:<br>
<br>
> I would like to know if theora uses clamped or unclamped YUV.<br>
<br>
</div>I don't know what you mean by that. Theora supports two calibrated<br>
colour spaces, one equivalent to NTSC and one equivalent to PAL. Most<br>
videos I've seen use the 'uncalibrated' option when allows full range<br>
in all three 8-bit Y'CrCb channels, and doesn't say how that should be<br>
converted to RGB.<br>
<br>
These are TH_CS_ITU_REC_470M, TH_CS_ITU_REC_470BG, and<br>
TH_CS_UNSPECIFIED, respectively, set/read through the colorspace<br>
element of the th_info struct.<br>
<br>
Is that what you meant?<br>
<font color="#888888"><br>
-r<br>
</font></blockquote></div><br><br>Ah OK, I read the spec. The YUV extension is given as {219,224,224} which means "clamped" to me. (Unclamped would be {255,255,255} ).<br><br><br><br><br>One final (I hope) question:<br>
<br>suppose I start decoding from a page with granulepos (kframe=x, frame =y) and I continue decoding in sequence until I reach the next page with a non-negative granulepos (kframe=a, frame=b). Is it possible that there could be another keyframe between x and a ? In other words, do "hidden" keyframes exist in the ogg stream, or is it safe to assume that every keyframe has at least one (non-negative) granulepos ?<br>
<br><br>Let me give an example. Suppose I am seeking for frame 20. I find a granulepos of (18,22). Good, so I know that the keyframe is 18 + an offset of 2. So now I seek again to find the largest granulepos before 18. I find (10,12). Great.<br>
So I start decoding from (10,12) and I reach a keyframe. Can I assume this keyframe is 18, and then just decode two more frames ? Or is it possible that 13,14,15,16 or 17 could also be keyframes ? (The former is the case if and only if encoding a new keyframe forces and end-of-page and non-negative granulepos to be written.)<br>
<br><br><br>Also,<br>I don't fully understand this negative-granulepos setting. For example, I have a video file where the first 10 or so pages have negative gpos, and then I get a page with (keyframe=1, frame=5). So what happened to (1,1) (1,2) (1,3) and (1,4) ? Surely it cannot be the case that all 5 frames are produced on the last page ?<br>
<br>Then the next page is (1,6) so why is this on a page on its own, without any continuation ?<br><br><br>Regards,<br>Gabriel.<br><a href="http://lives.sourceforge.net">http://lives.sourceforge.net</a><br><br><br><br>