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.

DM 368:: How to remove blockiness and improve encoding quality at low bit rates (less than 512 kbps) for VGA

Hi

        I'm  developing video phone on DM 368 based custom board.i'm  using 4_02_06 sdk and h264 encoder production build (version dm365_h264enc_02_30_00_04_production). so i need to have a good quality image at lower bit rates such as <=512 kbps. The encoded image quality is ok when bit rate is configured to 1Mbps where as the quality of the image is poor when configured to 412 kbps. since it is a real time video calling there is a constraint on the bandwidth that i can use for encoding.

      After going through the encoder user guide, i tried to tune the encoder base and dynamic parameters but there is no considerable improvement in quality. I tried by  sending IDR frames for every 30 p frames still there is no improvement.. I could see little improvement if i encode in HIGH profile but i want the same quality in BASE line profile for interoperability with other devices. I've attached the encoder output dump. The encoded file is  VGA resolution encoded at 412 kbps. I've also attached the encoder settings

4848.encoder_out_dump_vga_412kbps_blockiness.txt

1220.encoder_settings.txt

regards

pradeep

  • Hi,

                    I tired to skip the frames by configuring the rcAlgo = 0 and target frame rate to 15000 and refFramerate to 15000. The frames are not skipped instead the encoded bit rate became doubled i,,e if configure to encoder at 412 kbps its encoding at 840 kbps. if configure the target frame rate and ref frame rate to 30000, then the encoded bit rate falls back to 412kbps.

                   does DM368 supports frame skipping by itself or the application should take care of it ?

    regards

    pradeep

  • Hi

                    Can  Any TI employee help me out in quantifying on the encoding quality that can be achieved at 412 kbps with VGA resolution and at H264 Base line profile ?

    Regards

    pradeep

  • Hi,

    The video quality doesn't seem to be bad for the kind of content (lot camera motion, hand movement and noisy input) you shared given that bit rate is 412Kbps.

    You can experiment by increasing "sEncExtendedcDynmaicParams.videncDynamicParams.intraFrameInterval   = 30" to 150 and see if there is any change. At lower bitrates it is suggested to have as many less I/IDR frames as possible as I-frames consumes lot of bits. While doing this experiment you have to change below part of your code as well accordingly.

    if(no_of_p_frames ==30)
    sEncExtendedcDynmaicParams.videncDynamicParams.forceFrame = IVIDEO_IDR_FRAME;
    else
    sEncExtendedcDynmaicParams.videncDynamicParams.forceFrame = IVIDEO_NA_FRAME;

    If you see any improvement in video quality with above experiment, then try again with "sEncExtendedcDynmaicParams.videncDynamicParams.intraFrameInterval" set to  0 which means only first frame of the sequence is I frame and all others are P frames. Again you need to change your forceframe code accordingly.

    Hope this helps.

    Regards, RSV

  • Hi Pradeep,

    The test you are subjecting is pretty harsh and with BP, what you are getting may be what we could achieve. You can try what Rsv said. hat will gve more bits for P frame. But note that the random motion is introducing lot if intras in the frames. Not sure if Video conferecing really needs such harsh setup.

    regards

    Yashwant