View Single Post
Old 12-29-11, 06:23 AM   #2
LordSauron
Registered User
 
Join Date: Dec 2011
Posts: 2
Default Re: VDPAU and H264, gray screen

I've fixed the problem.
It was the scaling matrix. Since it was constant it's not sent in the bitstream so the pointers I got were null.

Replacing with this code is enough:
Code:
const uint8_t scaling_list_4x4[6][16]={
    {16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16},
    {16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16},
    {16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16},
    {16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16},
    {16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16},
    {16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16}
};
const uint8_t scaling_list_8x8[2][64]={
    {16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,
    16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,
    16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,
    16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16},
    {16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,
    16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,
    16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,
    16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16}
};

memcpy(vdpPictureInfoH264.scaling_lists_4x4, scaling_list_4x4, sizeof(vdpPictureInfoH264.scaling_lists_4x4));
memcpy(vdpPictureInfoH264.scaling_lists_8x8, scaling_list_8x8, sizeof(vdpPictureInfoH264.scaling_lists_8x8));
Thanks anyway. You can close the thread.
Regards.
LordSauron is offline   Reply With Quote