Re: Gray scale video output from theora

"janaka priyadarshana" <[email protected]>
Newsgroups gmane.comp.multimedia.ogg.theora.devel
Message-ID <[email protected]>
thanks very much for your help

So I already tried to remove the U & V components from the stream..

But unfortunately I was unable to do it successfully

*what I did is.......*

Changed some code segments in theora_encode_YUVin() which is in
theencoder_toplevel.c


  for ( i = 0; i < yuv->uv_height; i++ ){
    memcpy( LocalDataPtr, InputDataPtr, yuv->uv_width );
    LocalDataPtr -= yuv->uv_width;
    InputDataPtr += yuv->uv_stride;
  }


the above code segment is use to copy the U data into the LocalDataPtr

So i just avoid this input U component (copy the value zero into the
LocalDataPtr
) as follow

int temp = 0;
  for ( i = 0; i < yuv->uv_height; i++ ){
    memset( LocalDataPtr, &temp, yuv->uv_width );
    LocalDataPtr -= yuv->uv_width;
    InputDataPtr += yuv->uv_stride;
  }

The same thing was done for the V component also

But the result was differ from my expectations and at the same time the
result was differ from each other when I get encoded the same stream at
different time.

These videos looks like it is lay over a colored mist on top of the video.

I have attached two snapshots of the resulted video and the original video.


*Please can I know that *

what I have done is correct or not...?

if this way is not the correct way, please help me to do this...



On Feb 17, 2008 12:32 AM, Ralph Giles <[email protected]> wrote:

> On 16-Feb-08, at 5:33 AM, janaka priyadarshana wrote:
>
> *If the above is true.....(*theora use YUV color space*)*
>
>
> Yes, Theora always encodes video in a YUV colour space.
>
> it is possible that get a gray scale video output by just considering only
> the Y component of the video (ignore the U and V components)
>
>
> Using just the Y plane is a reasonable way to convert a YUV image to a
> monochrome one.
>
>  -r
>
>


-- 
-----------
Regards,
Janaka Priyadarshana

_______________________________________________
theora-dev mailing list
[email protected]
http://lists.xiph.org/mailman/listinfo/theora-dev
Original.jpg (image/jpeg, 10.8 KB) - not displayed
test1.jpg (image/jpeg, 9.4 KB) - not displayed
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.