imx6s H.264 Encoding

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

imx6s H.264 Encoding

Jump to solution
724 Views
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.

Labels (3)
0 Kudos
1 Solution
480 Views
joanxie
NXP TechSupport
NXP TechSupport

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

View solution in original post

0 Kudos
2 Replies
481 Views
joanxie
NXP TechSupport
NXP TechSupport

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

0 Kudos
480 Views
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 Kudos