[Theora-dev] Directshow filters 0.64.7923

illiminable ogg at illiminable.com
Sat Oct 9 12:10:07 PDT 2004

----- Original Message ----- 
From: "Timothy B. Terriberry" <tterribe at vt.edu>
To: "illiminable" <ogg at illiminable.com>
Cc: <theora-dev at xiph.org>
Sent: Sunday, October 10, 2004 2:23 AM
Subject: Re: [Theora-dev] Directshow filters 0.64.7923

>> I followed the code in example_player... which centralises the offsets... 
>> if there will be x_offset at the left and right and y_offset at the top 
>> and bottom.
>>  frame_x_offset=(video_x-frame_x)/2;
>>  frame_y_offset=(video_y-frame_y)/2;
> Does the example_encoder still do this? It should instead always make the 
> offsets even, otherwise you suffer a half-pixel shift in the chroma 
> components.

I don't think they can ever be odd... since i'm fairly sure that all video 
in directshow needs multiple of 4 sizes in order to use the directX 
renderers (but don't quote me on that... i'll check it out though). And 
since the frames are multiples of 16... the half the difference should 
always be even.

I think i previously tried just putting it at the top or the bottom and it 
didn't work, that's why i centred it. Maybe it's just a product of the files 
i tested on... perhaps a flag that indicates what the offset represents 
might be an idea ? Though i guess once things are finalised, it doesn't 
matter... though there's still the problem of the videos that are already 
floating around.

>> So in the example shown above... i think 4 is correct... Are you sure the 
>> offset values are being correctly propagated to the decoder ?
> I just checked the reference code: the value specified in the theora_info 
> struct is stored directly into the bitstream, and read directly back. 
> Therefore, it should be the offset from the _bottom_ of the frame, not the 
> top. Personally, I think the API should use the offset from the top, even 
> though the offset from the bottom is what is in the bitstream, because the 
> rest of the API uses a left-handed coordinate system where Y increases 
> from top to bottom. This is the way it is set up in the experimental 
> encoder/decoder.

Directshow always uses (0,0) at the bottom left for all YUV types, with y 
increasing upwards... biHeight is always absolutised by the renderer...



More information about the Theora-dev mailing list