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.

deinterlacing artifacts while cropping and scalling - VPE

Hi,

EVM: Jacinto-6 running on PSDKLA 7.04.00.03

I am trying to use VPE for Cropping and Scaling.

deinterlacing artifacts are visible while scaling the cropped portion. 

I suspect this artifacts are because of sequence of deinterlacing and scaling in VPE. The artifacts may come when the video is scaled and deinterlaced.

I need to know the sequence of deinterlacing and scaling in VPE and how VPE uses ioctl system call to do the same.

Regards,

Jeyaprabu

  • Hi Jeyakumar,
    Are you observing green artifacts in the bottom field after deinterlacing for SEQ_TB ?
    If yes, it is issue with crop paramters. You need to set height/2(not height) in c.height for VIDIOC_S_CROP ioctl

    For ex: If you are de-interlacing an interlaced h264 stream of 720x480,
    crop.c.top = 24;
    crop.c.left = 32;
    crop.c.width = 720;
    crop.c.height = 240;
    ret = ioctl(fd, VIDIOC_S_CROP, &crop);

    Ram
  • Hi Ram,

    There are no green artifacts. All the parameters and crop values are given properly

    But we can see the artifacts(deinterlace artifacts) in the image above (Both fields doesn't fit well)

    Queries are

    • "How will we know that the field type is SEQ_TB ? why not SEQ_BT?
    • Iva-Decoder only gives the details of field type progressive or interlaced. It doesn't specify SEQ_TB or SEQ_BT
      • How to get this field type from Iva decoder?
    • What is the sequence of scaling and deinterlacing? which happens first?
    • Is it a limitation of VPE?

    Regards,

    Jeyaprabu

  • Hi Jeyaprabhu,
    I am not observing such artifacts with the file based VPE application. CAn you check the behaviour with testvpe application(but this doesn't support input cropping)
    SEQ_TB is the field type for V4L2 field(V4L2_FIELD_SEQ_TB) and second one is V4L2_FIELD_ALTERNATE(data-offset) for de-interlacing interlaced YUV for V4L2 and nothing to do with decoder. Refer the below.
    www.hep.by/.../fieldseq_tb.pdf

    Decoder only gives info progressive or interlaced info from contentType field.

    I am not aware of sequence in vpe for deinterlacing and scaling. Are you not scaling this issue if scaling is avoided or cropping is avoided?
  • Hi Ram,

    From the doc, V4L2 field may be different field type (not only SEQ_TB, V4L2_FIELD_ALTERNATE). Refer below

    https://www.linuxtv.org/downloads/legacy/video4linux/API/V4L2_API/spec-single/v4l2.html#field-order

    We cannot skip scaling and cropping in our application.

    • How (from where) will we know which field type to use?

    Regards,

    Jeyaprabu