Re: further debugging of my ogg/theora decoder
salsaman <[email protected]>
| Newsgroups | gmane.comp.multimedia.ogg.theora.devel |
|---|---|
| Message-ID | <[email protected]> |
On Wed, Nov 12, 2008 at 4:28 PM, Ralph Giles <[email protected]> wrote: > On Wed, Nov 12, 2008 at 2:50 AM, salsaman <[email protected]> wrote: > > > I would like to know if theora uses clamped or unclamped YUV. > > I don't know what you mean by that. Theora supports two calibrated > colour spaces, one equivalent to NTSC and one equivalent to PAL. Most > videos I've seen use the 'uncalibrated' option when allows full range > in all three 8-bit Y'CrCb channels, and doesn't say how that should be > converted to RGB. > > These are TH_CS_ITU_REC_470M, TH_CS_ITU_REC_470BG, and > TH_CS_UNSPECIFIED, respectively, set/read through the colorspace > element of the th_info struct. > > Is that what you meant? > > -r > 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} ). One final (I hope) question: 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 ? 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. 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.) Also, 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 ? Then the next page is (1,6) so why is this on a page on its own, without any continuation ? Regards, Gabriel. http://lives.sourceforge.net _______________________________________________ theora-dev mailing list [email protected] http://lists.xiph.org/mailman/listinfo/theora-dev