imx6s H.264 Encoding

取消
显示结果 
显示  仅  | 搜索替代 
您的意思是: 
已解决

imx6s H.264 Encoding

跳至解决方案
777 次查看
505053487
Contributor I

         I refer to the VPU Example Application and wirte an application program to encode streams  from camera captured data. VPU example application is located under Yocto Project build tmp work tree in imx-test/*/test/mxc_vpu_test.

          Then I get a video file named ”my.h264". But when I play the video file .  Video quality is not good .

`YEDLVSX}XA2`ZJ%RAB}`{U.jpg

     What does this problem produce?  I think my parameter setting is not good . But I donnot know how to modify. Help,thank you. By the way,my English is really terrible.

标签 (3)
0 项奖励
回复
1 解答
533 次查看
joanxie
NXP TechSupport
NXP TechSupport

could you share more detailed information? what parameter do you use??

在原帖中查看解决方案

0 项奖励
回复
2 回复数
534 次查看
joanxie
NXP TechSupport
NXP TechSupport

could you share more detailed information? what parameter do you use??

0 项奖励
回复
533 次查看
505053487
Contributor I

Too many lines of codes.  The source camera data is YUV420p format in memory.

For example:

  /* Fill up parameters for encoding */

  encop.bitstreamFormat     = STD_AVC;

  encop.mapType                =  0;          //where 0 = Linear frame map; 1 = Frame tiled map; 2 = Field tiled map

  encop.linear2TiledEnable  = 0;                 

  encop.frameRateInfo = 20;

  encop.bitRate = 0;      

  encop.gopSize = 1;       // where 0 = only first picture is I, 1 = all I pictures, 2 = IPIP, 3 = IPPIPP, and so on.

  encop.slicemode.sliceMode = 0;   /* 0: 1 slice per picture; 1: Multiple slices per picture */

  encop.slicemode.sliceSizeMode = 0; /* 0: silceSize defined by bits; 1: sliceSize defined by MB number*/

  encop.slicemode.sliceSize = 4000;  /

    encop.IntraCostWeight = 0;

    encop.MEUseZeroPmv  = 0;

    /* (3: 16x16, 2:32x16, 1:64x32, 0:128x64, H.263(Short Header : always 3) */

    encop.MESearchRange = 3;

    encop.userGamma = (Uint32)(0.75*32768);         /*  (0*32768 <= gamma <= 1*32768) */

    encop.RcIntervalMode= 1;        /* 0:normal, 1:frame_level, 2:slice_level, 3: user defined Mb_level */

    //encop.RcIntervalMode= 0;

    encop.MbInterval = 0;

    encop.avcIntra16x16OnlyModeEnable = 0;

    encop.ringBufferEnable = enc->ringBufferEnable;   

    encop.dynamicAllocEnable = 0;

    encop.chromaInterleave = 0;                        // CbCr interleaved , default is interleave(1)

0 项奖励
回复