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.

H.264 Decoder Output in YUV420

Other Parts Discussed in Thread: OMAP3530

I have omap3530 custom board. And I use dvsdk 4_01_00_09 with "H.264 Baseline Profile Decoder (v2.01) on OMAP3530". Datasheet of the decoder says that "Outputs are available in YUV420 planar and
YUV422 interleaved". But gst-ti-plugin(TIViddec2 element) outputs in YUV422 interleaved. How can I force gst-ti-plugin to output in YUV420 planar(NV12) format?



  • Hi Konstantin,

    The omap3530 supports both data formats YUV422 and YUV420 as you read. About the gst-ti-plugin you could try with "oColorSpace=YUV420P" or "oColorSpace=YUV420I" parameters but can you share your pipe line to clarify the situation?

    You can obtain some additional details from GStreamer pipelines examples at the link:

    http://processors.wiki.ti.com/index.php/Example_GStreamer_Pipelines

    BR

    Tsvetolin Shulev

  • My pipeline:

    gst-launch -v filesrc location=/host/davincieffect_qcif_192kbps.264 ! TIViddec2 codecName=h264dec engineName=codecServer displayBuffer=false ! "video/x-raw-yuv,format=(fourcc)NV12" ! filesink location=/host/test.yuv > /host.gst.out 2>&1

    But it doesn't work.

    This works fine:

    gst-launch -v filesrc location=/host/davincieffect_qcif_192kbps.264 ! TIViddec2 codecName=h264dec engineName=codecServer displayBuffer=false ! "video/x-raw-yuv,format=(fourcc)UYVY" ! filesink location=/host/test.yuv > /host.gst.out 2>&1

    The chunk of TIViddec2 source code:

    <code>

        /* Set up codec parameters depending on device */
        switch(device) {
            case Cpu_Device_DM6467:
                #if defined(Platform_dm6467t)
                params.forceChromaFormat = XDM_YUV_420SP;
                params.maxFrameRate      = 60000;
                params.maxBitRate        = 30000000;
                #else
                params.forceChromaFormat = XDM_YUV_420P;
                #endif
                params.maxWidth          = VideoStd_1080I_WIDTH;
                params.maxHeight         = VideoStd_1080I_HEIGHT + 8;
                colorSpace               = ColorSpace_YUV420PSEMI;
                defaultNumBufs           = 5;
                break;
            #if defined(Platform_dm365)
            case Cpu_Device_DM365:
                params.forceChromaFormat = XDM_YUV_420SP;
                params.maxWidth          = VideoStd_720P_WIDTH;
                params.maxHeight         = VideoStd_720P_HEIGHT;
                colorSpace               = ColorSpace_YUV420PSEMI;
                defaultNumBufs           = 4;
                break;
            #endif
            default:
                params.forceChromaFormat = XDM_YUV_422ILE;
                params.maxWidth          = VideoStd_D1_WIDTH;
                params.maxHeight         = VideoStd_D1_PAL_HEIGHT;
                colorSpace               = ColorSpace_UYVY;
                defaultNumBufs           = 3;
                break;
        }

        GST_LOG("opening video decoder \"%s\"\n", viddec2->codecName);
        viddec2->hVd = Vdec2_create(viddec2->hEngine, (Char*)viddec2->codecName,
                          &params, &dynParams);

        if (viddec2->hVd == NULL) {
            GST_ELEMENT_ERROR(viddec2, STREAM, CODEC_NOT_FOUND,
            ("failed to create video decoder: %s\n", viddec2->codecName), (NULL));
            GST_LOG("closing codec engine\n");
            return FALSE;
        }

    </code>

    if I change marked line to  params.forceChromaFormat = XDM_YUV_420SP; I get error "failed to create video decoder: h264dec".