diff options
author | enselic <enselic@f606c939-3180-4ac9-a4b8-4b8779d57d0a> | 2008-10-03 13:51:04 +0000 |
---|---|---|
committer | enselic <enselic@f606c939-3180-4ac9-a4b8-4b8779d57d0a> | 2008-10-03 13:51:04 +0000 |
commit | 13fb741159a84f876759603dd9ecfdba436c6fd6 (patch) | |
tree | 0ca1c3e308a045d5f64a7b2d9178c52e9bc547ac /recordmydesktop/src/rmd_init_encoder.c | |
parent | 19923f8be8392c76f1ab0d195c07220b5565f7e7 (diff) |
src/rmd_init_encoder.c: Format the code for the initialization of the
theora_info structure to increase readability.
git-svn-id: https://recordmydesktop.svn.sourceforge.net/svnroot/recordmydesktop/trunk@566 f606c939-3180-4ac9-a4b8-4b8779d57d0a
Diffstat (limited to 'recordmydesktop/src/rmd_init_encoder.c')
-rw-r--r-- | recordmydesktop/src/rmd_init_encoder.c | 57 |
1 files changed, 27 insertions, 30 deletions
diff --git a/recordmydesktop/src/rmd_init_encoder.c b/recordmydesktop/src/rmd_init_encoder.c index 72d499d..a41412a 100644 --- a/recordmydesktop/src/rmd_init_encoder.c +++ b/recordmydesktop/src/rmd_init_encoder.c @@ -158,41 +158,38 @@ void InitEncoder(ProgData *pdata,EncData *enc_data_t,int buffer_ready){ ogg_stream_init(&enc_data_t->m_ogg_vs,y2); - theora_info_init(&enc_data_t->m_th_inf); - enc_data_t->m_th_inf.frame_width=(pdata)->brwin.rgeom.width; - enc_data_t->m_th_inf.frame_height=(pdata)->brwin.rgeom.height; - enc_data_t->m_th_inf.width=((enc_data_t->m_th_inf.frame_width+15)>>4)<<4; - enc_data_t->m_th_inf.height=((enc_data_t->m_th_inf.frame_height+15)>>4)<<4; - enc_data_t->m_th_inf.offset_x=((enc_data_t->m_th_inf.width- - enc_data_t->m_th_inf.frame_width)/2)&~1; - enc_data_t->m_th_inf.offset_y=((enc_data_t->m_th_inf.height- - enc_data_t->m_th_inf.frame_height)/2)&~1; - enc_data_t->m_th_inf.fps_numerator=((pdata)->args.fps*100.0); - enc_data_t->m_th_inf.fps_denominator=100; - enc_data_t->m_th_inf.aspect_numerator=1;//(pdata)->brwin.rgeom.width; - enc_data_t->m_th_inf.aspect_denominator=1;//(pdata)->brwin.rgeom.height; - enc_data_t->m_th_inf.colorspace=OC_CS_UNSPECIFIED; - enc_data_t->m_th_inf.pixelformat=OC_PF_420; - enc_data_t->m_th_inf.target_bitrate=(pdata)->args.v_bitrate; - enc_data_t->m_th_inf.quality=(pdata)->args.v_quality; - enc_data_t->m_th_inf.dropframes_p=0; - enc_data_t->m_th_inf.quick_p=1; - enc_data_t->m_th_inf.keyframe_auto_p=1; - enc_data_t->m_th_inf.keyframe_frequency=64; - enc_data_t->m_th_inf.keyframe_frequency_force=64; - enc_data_t->m_th_inf.keyframe_data_target_bitrate= - enc_data_t->m_th_inf.quality*1.5; - - enc_data_t->m_th_inf.keyframe_auto_threshold=80; - enc_data_t->m_th_inf.keyframe_mindistance=8; - enc_data_t->m_th_inf.noise_sensitivity=1; - enc_data_t->m_th_inf.sharpness=2; + enc_data_t->m_th_inf.frame_width = pdata->brwin.rgeom.width; + enc_data_t->m_th_inf.frame_height = pdata->brwin.rgeom.height; + enc_data_t->m_th_inf.width = ((enc_data_t->m_th_inf.frame_width + 15) >> 4) << 4; + enc_data_t->m_th_inf.height = ((enc_data_t->m_th_inf.frame_height + 15) >> 4) << 4; + enc_data_t->m_th_inf.offset_x = 0; + enc_data_t->m_th_inf.offset_y = 0; + + enc_data_t->m_th_inf.fps_numerator = pdata->args.fps * 100.0; + enc_data_t->m_th_inf.fps_denominator = 100; + enc_data_t->m_th_inf.aspect_numerator = 1; + enc_data_t->m_th_inf.aspect_denominator = 1; + + enc_data_t->m_th_inf.colorspace = OC_CS_UNSPECIFIED; + enc_data_t->m_th_inf.pixelformat = OC_PF_420; + + enc_data_t->m_th_inf.target_bitrate = pdata->args.v_bitrate; + enc_data_t->m_th_inf.quality = pdata->args.v_quality; + enc_data_t->m_th_inf.dropframes_p = 0; + enc_data_t->m_th_inf.quick_p = 1; + enc_data_t->m_th_inf.keyframe_auto_p = 1; + enc_data_t->m_th_inf.keyframe_frequency = 64; + enc_data_t->m_th_inf.keyframe_frequency_force = 64; + enc_data_t->m_th_inf.keyframe_data_target_bitrate = enc_data_t->m_th_inf.quality * 1.5; + enc_data_t->m_th_inf.keyframe_auto_threshold = 80; + enc_data_t->m_th_inf.keyframe_mindistance = 8; + enc_data_t->m_th_inf.noise_sensitivity = 1; + enc_data_t->m_th_inf.sharpness = 2; theora_encode_init(&enc_data_t->m_th_st,&enc_data_t->m_th_inf); - if(!pdata->args.nosound){ int ret; vorbis_info_init(&enc_data_t->m_vo_inf); |