📄 tcodecsettings.cpp.svn-base
字号:
/* * Copyright (c) 2002-2006 Milan Cutka * * This program is free software; you can redistribute it and/or * modify it under the terms of the GNU General Public License * as published by the Free Software Foundation; either version 2 * of the License, or (at your option) any later version. * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */#include "stdafx.h"#include "ffdshow_constants.h"#include "ffdshow_mediaguids.h"#include "TcodecSettings.h"#include "reg.h"#include "TffProc.h"#include "x264/x264.h"#include "xvid4.h"#include "ffImgfmt.h"#include "Tmuxer.h"#include "libavcodec/avcodec.h"#include "ffmpeg/libavcodec/dvdata.h"const char_t* TcoSettings::aspectModes[]={ _l("Pixel aspect ratio"), _l("Display aspect ratio"), NULL};const char_t* TcoSettings::huffYUVcsps[]={ _l("YUY2"), _l("YV12"), NULL};const char_t* TcoSettings::huffYUVpreds[]={ _l("Left"), _l("Plane"), _l("Median"), NULL};const TcspFcc TcoSettings::ffv1csps[]={ {_l("YV12") ,FOURCC_YV12}, {_l("444P") ,FOURCC_444P}, {_l("422P") ,FOURCC_422P}, {_l("411P") ,FOURCC_411P}, {_l("410P") ,FOURCC_410P}, {_l("RGB32"),FOURCC_RGB3}, NULL};const char_t* TcoSettings::ffv1coders[]={ _l("VLC"), _l("AC"), NULL};const char_t* TcoSettings::x264_me_methods[]={ _l("diamond"), _l("hexagonal"), _l("UMH"), _l("exhaustive"), NULL};TcoSettings::TcoSettings(TintStrColl *Icoll):Toptions(Icoll),options(Icoll){ static const TintOptionT<TcoSettings> iopts[]= { IDFF_numthreads ,&TcoSettings::numthreads ,1, 8,_l(""),1, _l("numthreads"),1, IDFF_enc_mode ,&TcoSettings::mode ,0, 5,_l(""),1, _l("mode"),ENC_MODE::CBR, IDFF_enc_bitrate1000 ,&TcoSettings::bitrate1000,1, 10000,_l(""),1, _l("bitrate1000"),900, IDFF_enc_desiredSize ,&TcoSettings::desiredSize,1,4*1024*1024,_l(""),1, _l("desiredSize"),570000, IDFF_enc_quant ,&TcoSettings::quant ,minQuant,maxQuant,_l(""),1, _l("quant"),2, IDFF_enc_qual ,&TcoSettings::qual ,0, 100,_l(""),1, _l("qual"),85, IDFF_enc_codecId ,&TcoSettings::codecId ,1,10000,_l(""),1, _l("codecId"),CODEC_ID_MPEG4, IDFF_enc_fourcc ,(TintVal)&TcoSettings::fourcc ,1, 1,_l(""),1, _l("fourcc"),FOURCC_XVID, IDFF_enc_max_key_interval,&TcoSettings::max_key_interval,0,500,_l(""),1, _l("max_key_interval"),250, IDFF_enc_min_key_interval,&TcoSettings::min_key_interval,0,500,_l(""),1, _l("min_key_interval"),1, IDFF_enc_keySceneChange ,&TcoSettings::keySceneChange ,0,100,_l(""),1, _l("keySceneChange"),80, IDFF_enc_globalHeader ,&TcoSettings::globalHeader ,0, 0,_l(""),1, _l("globalHeader"),0, IDFF_enc_part ,&TcoSettings::part ,0, 0,_l(""),1, _l("part"),0, IDFF_enc_interlacing ,&TcoSettings::interlacing ,0, 0,_l(""),1, _l("interlacing"),0, IDFF_enc_interlacing_tff ,&TcoSettings::interlacing_tff ,0, 0,_l(""),1, _l("interlacing_tff"),0, IDFF_enc_gray ,&TcoSettings::gray ,0, 0,_l(""),1, _l("gray"),0, IDFF_enc_isBframes ,&TcoSettings::isBframes ,0, 0,_l(""),1, _l("isBframes"),0, IDFF_enc_max_b_frames ,&TcoSettings::max_b_frames ,1, 8,_l(""),1, _l("max_b_frames"),1, IDFF_enc_b_dynamic ,&TcoSettings::b_dynamic ,0, 0,_l(""),1, _l("b_dynamic"),1, IDFF_enc_b_refine ,&TcoSettings::b_refine ,0, 0,_l(""),1, _l("b_refine"),0, IDFF_enc_packedBitstream ,&TcoSettings::packedBitstream ,0, 0,_l(""),1, _l("packedBitstream"),0, IDFF_enc_dx50bvop ,&TcoSettings::dx50bvop ,0, 0,_l(""),1, _l("dx50bvop"),0, IDFF_enc_aspectMode ,&TcoSettings::aspectMode ,0, 1,_l(""),1, _l("aspectMode"),ASPECT_SAR, IDFF_enc_sarX1000 ,&TcoSettings::sarX1000 ,1,255000,_l(""),1, _l("sarX1000"),1000, IDFF_enc_sarY1000 ,&TcoSettings::sarY1000 ,1,255000,_l(""),1, _l("sarY1000"),1000, IDFF_enc_darX1000 ,&TcoSettings::darX1000 ,1,255000,_l(""),1, _l("darX1000"),4000, IDFF_enc_darY1000 ,&TcoSettings::darY1000 ,1,255000,_l(""),1, _l("darY1000"),3000, IDFF_enc_H263Pflags ,&TcoSettings::H263Pflags ,1, 1,_l(""),1, _l("H263Pflags"),0, IDFF_enc_huffyuv_csp ,&TcoSettings::huffyuv_csp ,0,1,_l(""),1, _l("huffyuv_csp"),1, IDFF_enc_huffyuv_pred ,&TcoSettings::huffyuv_pred,0,2,_l(""),1, _l("huffyuv_pred"),1, IDFF_enc_huffyuv_ctx ,&TcoSettings::huffyuv_ctx ,0,1,_l(""),1, _l("huffyuv_ctx"),0, IDFF_enc_ljpeg_csp ,&TcoSettings::ljpeg_csp ,0,0,_l(""),1, _l("ljpeg_csp"),FOURCC_YV12, IDFF_enc_ffv1_coder ,&TcoSettings::ffv1_coder ,0, 1,_l(""),1, _l("ffv1_coder"),0, IDFF_enc_ffv1_context,&TcoSettings::ffv1_context,0,10,_l(""),1, _l("ffv1_context"),0, IDFF_enc_ffv1_csp ,&TcoSettings::ffv1_csp ,1, 1,_l(""),1, _l("ffv1_csp"),FOURCC_YV12, IDFF_enc_dv_profile ,&TcoSettings::dv_profile ,DV_PROFILE_AUTO,countof(dv_profiles)-1,_l(""),1, _l("dv_profile"),DV_PROFILE_AUTO, IDFF_enc_wmv9_kfsecs,&TcoSettings::wmv9_kfsecs,1, 10,_l(""),1, _l("wmv9_kfsecs"),6, IDFF_enc_wmv9_ivtc ,&TcoSettings::wmv9_ivtc ,0, 0,_l(""),1, _l("wmv9_ivtc"),0, IDFF_enc_wmv9_deint ,&TcoSettings::wmv9_deint ,0, 0,_l(""),1, _l("wmv9_deint"),0, IDFF_enc_wmv9_cplx ,&TcoSettings::wmv9_cplx ,0, 10,_l(""),1, _l("wmv9_cplx"),0, IDFF_enc_wmv9_crisp ,&TcoSettings::wmv9_crisp ,0,100,_l(""),1, _l("wmv9_crisp"),80, IDFF_enc_wmv9_aviout,&TcoSettings::wmv9_aviout,0, 0,_l(""),1, _l("wmv9_aviout"),1, IDFF_enc_forceIncsp,&TcoSettings::forceIncsp ,0,0,_l(""),1, _l("forceIncsp"),0, IDFF_enc_incsp ,&TcoSettings::incspFourcc,1,1,_l(""),1, _l("incsp"),FOURCC_YV12, IDFF_enc_isProc ,&TcoSettings::isProc ,0,0,_l(""),1, _l("isProc"),0, IDFF_enc_flip ,&TcoSettings::flip ,0,0,_l(""),1, _l("flip"),0, IDFF_enc_dropFrames,&TcoSettings::dropFrames ,0,0,_l(""),1, _l("dropFrames"),0, IDFF_enc_storeAVI ,&TcoSettings::storeAVI ,0,0,_l(""),1, _l("storeAVI"),1, IDFF_enc_storeExt ,&TcoSettings::storeExt ,0,0,_l(""),1, _l("storeExt"),0, IDFF_enc_muxer ,&TcoSettings::muxer ,0,4,_l(""),1, _l("muxer"),Tmuxer::MUXER_FILE, IDFF_enc_ff1_stats_mode ,&TcoSettings::ff1_stats_mode ,0,3,_l(""),1, _l("ff1_stats_mode"),0, IDFF_enc_isFPSoverride ,&TcoSettings::isFPSoverride ,0,0,_l(""),1, _l("isFPSoverride"),0, IDFF_enc_fpsOverrideNum ,&TcoSettings::fpsOverrideNum,1,200*1000,_l(""),1, _l("fpsOverride1000"),25000, IDFF_enc_fpsOverrideDen ,&TcoSettings::fpsOverrideDen,1,200*1000,_l(""),1, _l("fpsOverrideDen"),1000, IDFF_enc_me_hq ,&TcoSettings::me_hq ,0,2,_l(""),1, _l("me_hq"),1, IDFF_enc_me_4mv ,&TcoSettings::me_4mv ,0,0,_l(""),1, _l("me_4mv"),1, IDFF_enc_me_qpel ,&TcoSettings::me_qpel ,0,0,_l(""),1, _l("me_qpel"),0, IDFF_enc_me_gmc ,&TcoSettings::me_gmc ,0,0,_l(""),1, _l("me_gmc"),0, IDFF_enc_me_mv0 ,&TcoSettings::me_mv0 ,0,0,_l(""),1, _l("me_mv0"),0, IDFF_enc_me_cbp_rd ,&TcoSettings::me_cbp_rd ,0,0,_l(""),1, _l("me_cbp_rd"),0, IDFF_enc_me_cmp ,&TcoSettings::me_cmp ,0,14,_l(""),1, _l("me_cmp"),0, IDFF_enc_me_cmp_chroma ,&TcoSettings::me_cmp_chroma ,0,0,_l(""),1, _l("me_cmp_chroma"),1, IDFF_enc_me_subcmp ,&TcoSettings::me_subcmp ,0,14,_l(""),1, _l("me_subcmp"),0, IDFF_enc_me_subcmp_chroma ,&TcoSettings::me_subcmp_chroma ,0,0,_l(""),1, _l("me_subcmp_chroma"),0, IDFF_enc_mb_cmp ,&TcoSettings::mb_cmp ,0,14,_l(""),1, _l("mb_cmp"),0, IDFF_enc_mb_cmp_chroma ,&TcoSettings::mb_cmp_chroma ,0,0,_l(""),1, _l("mb_cmp_chroma"),0, IDFF_enc_dia_size ,&TcoSettings::dia_size ,0,9,_l(""),1, _l("dia_size"),4, IDFF_enc_me_last_predictor_count,&TcoSettings::me_last_predictor_count,0,99,_l(""),1, _l("me_last_predictor_count"),0, IDFF_enc_me_prepass ,&TcoSettings::me_prepass ,0,2,_l(""),1, _l("me_prepass"),1, IDFF_enc_me_precmp ,&TcoSettings::me_precmp ,0,14,_l(""),1, _l("me_precmp"),0, IDFF_enc_me_precmp_chroma ,&TcoSettings::me_precmp_chroma ,0,0,_l(""),1, _l("me_precmp_chroma"),0, IDFF_enc_dia_size_pre ,&TcoSettings::dia_size_pre ,0,9,_l(""),1, _l("dia_size_pre"),4, IDFF_enc_me_subq ,&TcoSettings::me_subq ,1,8,_l(""),1, _l("me_subq"),8, IDFF_enc_me_nsse_weight ,&TcoSettings::me_nsse_weight ,0,256,_l(""),1, _l("me_nsse_weight"),8, IDFF_enc_me_iterative ,&TcoSettings::me_iterative ,0,0,_l(""),1, _l("me_iterative"),0, IDFF_enc_xvid_motion_search ,&TcoSettings::xvid_motion_search ,0,6,_l(""),1, _l("xvid_motion_search"),5, IDFF_enc_is_xvid_me_custom ,&TcoSettings::is_xvid_me_custom ,0,0,_l(""),1, _l("is_xvid_me_custom"),0,
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -