Skip to content
This repository was archived by the owner on Aug 5, 2022. It is now read-only.
This repository was archived by the owner on Aug 5, 2022. It is now read-only.

H264 decode AV_PIX_FMT_YAMI putsurface error #23

@zackxue

Description

@zackxue

we use the AV_PIX_FMT_YAMI put surface to the window and the code is like below, the decode is ok, but the put surface error.
Decode format 335 (1920, 1080) AV_PIX_FMT_YAMI 335 AV_PIX_FMT_NV12 25
vaPutSurface return 0x14 surface id 67108876
Decode format 335 (1920, 1080) AV_PIX_FMT_YAMI 335 AV_PIX_FMT_NV12 25
vaPutSurface return 0x14 surface id 67108877
Decode format 335 (1920, 1080) AV_PIX_FMT_YAMI 335 AV_PIX_FMT_NV12 25
vaPutSurface return 0x14 surface id 67108878
Decode format 335 (1920, 1080) AV_PIX_FMT_YAMI 335 AV_PIX_FMT_NV12 25
vaPutSurface return 0x14 surface id 67108879
Decode format 335 (1920, 1080) AV_PIX_FMT_YAMI 335 AV_PIX_FMT_NV12 25
vaPutSurface return 0x14 surface id 67108880
Decode format 335 (1920, 1080) AV_PIX_FMT_YAMI 335 AV_PIX_FMT_NV12 25
vaPutSurface return 0x14 surface id 67108881

    AVFrame* pFrame = ph264->decode(raw_media_data, count);
    if (pFrame)
    {
        printf("Decode  format %d (%d, %d) AV_PIX_FMT_YAMI %d AV_PIX_FMT_NV12 %d\n", pFrame->format, pFrame->width, 
            pFrame->height, AV_PIX_FMT_YAMI, AV_PIX_FMT_NV12);
        if (m_pWinHandle)
        {
            VAStatus status = VA_STATUS_SUCCESS;
            YamiImage *pImage = (YamiImage *)pFrame->data[3];

            status = vaPutSurface(pImage->va_display, (VASurfaceID)pImage->output_frame->surface,
                m_pWinHandle, 0, 0, pFrame->width, 
                pFrame->height,  0, 0, m_winw, m_winh,
                NULL, 0, 0);
            if (status != VA_STATUS_SUCCESS) 
            {
                printf("vaPutSurface return 0x%x  surface id %d\n", status, 
                    (VASurfaceID)pImage->output_frame->surface);
            }               
        }

    }

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions