[theora] theora simple encoder stages

digital design developer.fpga at gmail.com
Wed Mar 16 06:28:03 PDT 2011


Good day!
I use theoralib and want understand how to create simple encoder.Now i do:

1) create frame (640x480 pixels 4:2:0) and init yuv_buffer variable:
yuv.uv_height = 240;
yuv.uv_width = 320;
yuv.y_height = 480;
yuv.y_width = 640;
yuv.uv_stride = 320;
yuv.y_stride = 640;
yuv.u = (unsigned char*)Cb_chroma;
yuv.v = (unsigned char*)Cr_chroma;
yuv.y = (unsigned char*)Y_luma;
2) create th_enc_ctx variable:
    ti.frame_height = 480;
ti.frame_width = 640;
ti.pic_height = 480;
ti.pic_width = 640;
ti.pic_x = 0;
ti.pic_y = 0;
ti.colorspace = TH_CS_ITU_REC_470M;
ti.pixel_fmt = TH_PF_420;
ti.target_bitrate = 1;
ti.quality = 50;
ti.keyframe_granule_shift = 0;
td=th_encode_alloc(&ti);

What is the next steps? I need only write to external file 1 theora frame
and see it in VLC player.
Thank you!
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.xiph.org/pipermail/theora/attachments/20110316/3bf618be/attachment.htm 


More information about the theora mailing list