This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

DM6467 h264编码在windows下测试时分辨率的问题



请教专家:

      我在 software-dl.ti.com/.../index_FDS.html 下载了windows 下的

H.264 Encoder, Version 1.20.02.00 H.264 Encoder BP/MP/HP@Level 4.0 Max:720p@30/1920x540@30 frames per second

按照里面的user_guide已经可以运行了,但是在设置分辨率时出了点问题,

使用默认的176*144是没问题的,我又换了352*288, 640*480,720*480都没有问题,但是720*576, 1280*720就出错了,

在这个函数下出错了,

if( H264VENC_control(
handle, /* Instance Handle */
XDM_SETPARAMS, /* Command */
&dynamicparams,/* Pointer to Dynamic structure-Input */
&status /*Pointer to status structure-Output */
) < 0 )
{
printf("Error in control... exiting with error code: %d\n",\
status.videncStatus.extendedError);
exit(0);
}

单步进去看也看不出什么原因,因为最终处理函数是封装起来的看不到,只是返回了错误码 -1.

感觉应该还是配置文件里的配置没有设置好吧(如下),但是不清楚怎么改了,请专家指导下,或者还有其他什么地方需要修改的,谢谢~~~

##########################################################################################
# Parameters
##########################################################################################
InputFile = ..\\..\\Test\\TestVecs\\Input\\davincieffect_qcif.yuv
EncodedFile = ..\\..\\Test\\TestVecs\\Output\\davincieffect_qcif.264
ReconFile = ..\\..\\Test\\TestVecs\\Reference\\davincieffect_qcif_ref.yuv
ImageWidth = 720 # Image width in Pels, must be multiple of 16      //改了这里,原值为176
ImageHeight = 576 # Image height in Pels, must be multiple of 16   //改了这里,原值为144
FrameRate = 25000 # Frame Rate per second*1000 (1-100)             //y改了这里,原值为 30000
BitRate = 2000000 # Bitrate(bps) #if ZERO=>> RC is OFF                     //改了这里,原值为400000       就改了这四处地方,其他不知道就没乱动
ChromaFormat = 1 # 1 => XMI_YUV_420P only supported
IntraPeriod = 30 # Period of I-Frames
FramesToEncode = 5 # Number of frames to be coded
RC_PRESET = 2 #1=>IVIDEO_LOW_DELAY 2=>IVIDEO_STORAGE 4=>IVIDEO_NONE
ENC_PRESET = 0 #Not supported : Default-0
ME_PRESET = 2 # 0 => FULL_SEARCH_ME, 1=> LOW_POWER_ME, 2=>HYBRID_ME
SCALING_MAT = 0 # 0 => AUTO, 1=> LOW, 2=> MEDIUM, 3=>HIGH, 4=>NO
PRC_SCALINGFACTOR = 0 # Can take 0(AUTO),1, 2, 4

##########################################################################################
# Encoder Control
##########################################################################################
ProfileIDC = 100 # Profile IDC (66=baseline, 77=main, 100=high)
LevelIDC = 30 # Level IDC (e.g. 20 = level 2.0)
QPISlice = 44 # Quant. param for I Slices (0-51)
QPSlice = 20 # Quant. param for non - I slices (0-51)
ChromaQPOffset = 0 # Chroma QP offset (-12..12)
SecChromaQPOffset = 0 # Second Chroma QP offset (-12..12)
EntropyCodingMode = 0 # CAVLC = 0 , CABAC = 1
RateCtrlQpMax = 45 # Qp range max for Rate Control (Max: 51)
RateCtrlQpMin = 5 # Qp range min for Rate Control(Min: 0)
NumRowsInSlice = 0 #Number of rows in a Slice (0...Max no. of rows in the frame)

##########################################################################################
# Loop filter parameters
##########################################################################################
LoopFilterDisable = 0 # Disable loop filter in slice header (0=Filter, 1=No Filter, 2= Disable filter across slice boundary)
LoopFilterAlphaC0Offset = 0 # Alpha & C0 offset div. 2, {-6, -5, ... 0, +1, .. +6}
LoopFilterBetaOffset = 0 # Beta offset div. 2, {-6, -5, ... 0, +1, .. +6}

  • 你好,

    请查看一下packages\ti\sdo\codecs\h264enc\app\Client\Test\Src\H264EncoderApp.c里面 maxHeight和maxWidth的配置是否大于你编码的图像高,宽。

    Int H264VENC_setinitparams(H264VENC_Params *params)
    {

         /*--------------------------------------------------------------------*/
         /*                       Set common parameters                           */
         /*--------------------------------------------------------------------*/
         params->videncParams.encodingPreset        = 0;
         params->videncParams.maxBitRate            = 20000000;
         params->videncParams.maxFrameRate          = 30000;
         params->videncParams.maxHeight             = 720;
         params->videncParams.maxWidth              = 1920;//176;

  • 我的也是这个参数:这个没改,怕改了编码就不对了。

    我设置的分辨率最大是1280*720(宽*高),比这个小,

     H.264 Encoder BP/MP/HP@Level 4.0 Max:720p@30/1920x540@30 frames per second  

    这个是那个包的说明,应该最大大支持720P的啊,下面有一个动态参数设置的,我改了也没用,还是那个地方报错

  • 有知道是怎么设置的吗?求教,谢谢~~

  • 目前这个问题你解决了么?能否和我联系下。

  • 没解决,目前我用的就是640*480,

    不知有谁知道怎么解决的没,分享下吧,谢谢~