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.

264 transcode, expanded edge encoded

i'm using dvrrdk4.0 to do h264 transcode, transcode is done by dec link+enc link, the origin of decoded picture in buffer is not (0,0), but the encoder treats the picture's origin as (0,0), so the expanded edge by decoder is encoded, how to fix it ? thaks!

  • Hi huang jack,

    The required encoding can be done by following method-

    1). Give InputWidth & InputHeight as the exact width and height you wanted to encode.

    2). Give Capture Width and Capture height as the full frame Width & Height (i.e Including padding Width and Height)

    Regards

    Gajanan

    1). Give Capture Width and Height as a Full frame width and height with 

    2). Then Give the exact location of the Frame Width and Height as a InputWidth & InputHeight

  • Hi,Gajanan

    the encoded width and height is correct, but the origin is not correct. the transcode chain is bitoutHLOS->bitinRTOS->Dec->Enc->bitoutRTOS->bitinHLOS, there is no capture, i don't know how to notify enc link the origin of video frame, because the origin of video frame from dec link is not (0,0).

  • Hi Huang jack,

               Lets take an example of your sequence. the output resolution of the decoder consider 384x320.

    But you want to encode the stream with 352x288 which starting from the origin you mentioned in the image. So update the input params as per below - 

    Capture Width & Height 384x320

    Input Width & Height 352x288

    So the rest 32 top and 32 left pixels will be ignored.

    Regards

    Gajanan

  • Hi,Gajanan
    as you said, the origin of 352x288 in 384x320, maybe [0,0],[16,16],[32,32],...,which parameter stands for the origin?
  • Hi Huang Jack,

    The below are the example parameters to use to get the behaviour of origin as you said - 

    captureWidth   = 384     # Image capture width
    captureHeight = 320    # Image capture height

    inputWidth       = 352    # width of image
    inputHeight     = 288    # Height of image

                Codec internally calculate the difference (i.e Width (384 - 352), Height (320 - 288)). So the origin of the frame will be (32x32) which no need to specify and codec will take of this.

    Regards

    Gajanan 

              

  • Hi, Gajanan

    thanks!