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.

Artefacts by H.264 HP encoder for C66x

Hi,

I am using latest H.264 HP encoder for c66x (H264 High Profile Encoder Version 01.00.00.01).

I prepared demo that shows video artefacts.

The demo generates green image for 25 frames and then violet image for 25 frames and repeats infinitely.

If you run it you can see artefacts in output.h264 file (artifacts1.png, artifacts2.png, output_with_artifacts.h264 attached to the post):



If you change configuration slightly artefacts will disappear and output image will be clean green and violet frames.
To do so change in H264HighProfileEncoder.c following line:

encoder->params.videnc2Params.rateControlPreset = IVIDEO_USER_DEFINED;
encoder->params.rateControlParams.rateControlParamsPreset = IH264HP_RATECONTROLPARAMS_USERDEFINED;

to

encoder->params.videnc2Params.rateControlPreset = IVIDEO_LOW_DELAY;
encoder->params.rateControlParams.rateControlParamsPreset = IH264HP_RATECONTROLPARAMS_DEFAULT;

Technical details:
- L2 64k cache is enabled
- No buffer manager. Input YUV buffers once allocated never released.
- Input is generated - green changed with violet each 25 frames
- Output goes to output.h264 file

You can find demo project attached to the post.

I am not sure is it problem in encoder or in application. Can you please explain this artefacts?

Regards,
Andrey Lisnevich

artifacts.zip
  • Hi Andrey,

    I could not reproduce the issue with the test application as part of the release package(H264E HP 01.00.00.01) with your configuration settings mentioned in the function H264HighProfileEncoder_configure (inside H264HighProfileEncoder.c file). Could you please try to reproduce the issue with the test application provided with codec release?

    (I could not build your application as build error was there inside app_pe66.cfg file which is yet to be resolved).

    Thanks & regards

    Sudheesh

  • Hi Sudheesh,

    No. I can reproduce it only in my application. It has few differences from demo. For example it does not call wbInvAll before process.

    I double checked all the code: algorithm creation, shared memory mamangement, etc. Everything looks correct. Also the  fact that slight change to encoder configuration fixes the issue is strange.

    What error do you get? I can help you with compilation. It is rather standard project.

    Regards,

    Andrey Lisnevich

  • Hi Andrey,

    I could able to reproduce the issue with your test application after fixing errors in compilation. I will give more info after finding the root cause of the issue.

    Regards

    Sudheesh

  • Hi Sudheesh,

    Is there any results in your investigation? Basically I want to know is it something in my code/configuration, or in encoder, or is it something that should be so?

    Regards,

    Andrey Lisnevich

  • Hi Andrey,

    It is low qp(if QpP < 4) related chroma issue with P pictures, internal to the codec. IH264HP_RATECONTROLPARAMS_DEFAULT params will set qpMinP to 10 which is above QpP = 4. 

    Thanks and regards

    Sudheesh

  • Hi Andrey,

    It is CAVLC level code overflow issue at very low QP with some configs. Here it is seen at interMBs in P pictures. Since the workaround at the block level for saturating this value will affect the performance, it is desirable to set qpMinP to 4.

    In HP mode, CABAC will work without any issue for low QpP.

    Regards

    Sudheesh