Mercurial > mplayer.hg
comparison libmpcodecs/ve_xvid4.c @ 16515:1218c5859ce8
10l: fully working DXN profile support require XviD 1.1.x. Earlier version will work but will lack VBV support
author | gpoirier |
---|---|
date | Sun, 18 Sep 2005 17:22:04 +0000 |
parents | beebfccc00f1 |
children | 4626c4d13e2a |
comparison
equal
deleted
inserted
replaced
16514:2543bee2d752 | 16515:1218c5859ce8 |
---|---|
799 } | 799 } |
800 } | 800 } |
801 else | 801 else |
802 create->max_bframes = 0; | 802 create->max_bframes = 0; |
803 | 803 |
804 #if XVID_API >= XVID_MAKE_API(4,1) | |
804 /* dxn: always write divx5 userdata */ | 805 /* dxn: always write divx5 userdata */ |
805 if(selected_profile->flags & PROFILE_DXN) | 806 if(selected_profile->flags & PROFILE_DXN) |
806 create->global |= XVID_GLOBAL_DIVX5_USERDATA; | 807 create->global |= XVID_GLOBAL_DIVX5_USERDATA; |
808 #endif | |
807 | 809 |
808 create->max_key_interval = xvidenc_max_key_interval; | 810 create->max_key_interval = xvidenc_max_key_interval; |
809 create->frame_drop_ratio = xvidenc_frame_drop_ratio; | 811 create->frame_drop_ratio = xvidenc_frame_drop_ratio; |
810 create->min_quant[0] = xvidenc_min_quant[0]; | 812 create->min_quant[0] = xvidenc_min_quant[0]; |
811 create->min_quant[1] = xvidenc_min_quant[1]; | 813 create->min_quant[1] = xvidenc_min_quant[1]; |
839 pass2->kfthreshold = xvidenc_vbr_kfthreshold; | 841 pass2->kfthreshold = xvidenc_vbr_kfthreshold; |
840 pass2->container_frame_overhead = xvidenc_vbr_container_frame_overhead; | 842 pass2->container_frame_overhead = xvidenc_vbr_container_frame_overhead; |
841 | 843 |
842 /* VBV */ | 844 /* VBV */ |
843 | 845 |
846 #if XVID_API >= XVID_MAKE_API(4,1) | |
844 pass2->vbv_size = selected_profile->max_vbv_size; | 847 pass2->vbv_size = selected_profile->max_vbv_size; |
845 pass2->vbv_initial = (selected_profile->max_vbv_size*3)>>2; /* 75% */ | 848 pass2->vbv_initial = (selected_profile->max_vbv_size*3)>>2; /* 75% */ |
846 pass2->vbv_maxrate = selected_profile->max_bitrate; | 849 pass2->vbv_maxrate = selected_profile->max_bitrate; |
847 pass2->vbv_peakrate = selected_profile->vbv_peakrate*3; | 850 pass2->vbv_peakrate = selected_profile->vbv_peakrate*3; |
851 #endif | |
848 // XXX: xvidcore currently provides a "peak bits over 3 seconds" constraint. | 852 // XXX: xvidcore currently provides a "peak bits over 3 seconds" constraint. |
849 // according to the latest dxn literature, a 1 second constraint is now used | 853 // according to the latest dxn literature, a 1 second constraint is now used |
850 | 854 |
851 create->profile = selected_profile->id; | 855 create->profile = selected_profile->id; |
852 | 856 |