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 .
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.
解決済! 解決策の投稿を見る。
could you share more detailed information? what parameter do you use??
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)