yuv420转bmp的源代码(要delphi的)
我只有c的,我翻译过来始终不对,帮忙翻译可运行也可
代码直接发我邮箱即可[email protected]
解决就给分

解决方案 »

  1.   

    执行程序:
    http://www.chinaavs.com/bbs/viewtopic.php?t=449&view=previous&sid=7b33a55e7992cb006bb862cc2a32e8ae
      

  2.   

    把你的c码发到[email protected],看看能否帮忙
      

  3.   

    http://www.fourcc.org/index.php?http%3A//www.fourcc.org/
    这个不错
      

  4.   

    void ConvertYVY22YUV12(unsigned char *src, unsigned char *dst, int width, int height, int stride)
    {
    unsigned char *in,*out_y,*out_y1,*out_u,*out_v;
    int width2 = width*2;
    in = src;out_y = dst;
    out_y1 = dst+width;
    out_u = dst + width*height;
    out_v = dst + width*height + (width*height)/4;for (int i=0;i<height/2;i++) {
    for (int j=0;j<width/2;j++) {
    *out_y++ = *in;
    *out_y1++ = *(in+width2);
    in++;
    *out_u++ = (*in + *(in+width2)) >> 1;
    in++;*out_y++ = *in;
    *out_y1++ = *(in+width2);
    in++;
    *out_v++ = (*in + *(in+width2)) >> 1;
    in++;
    }
    in += width2;
    out_y1 += width;
    out_y += width;
    }
    }
    void ConvertUYVY2YUV12(unsigned char *src, unsigned char *dst, int width, int height, int stride)
    {
    unsigned char *in,*out_y,*out_y1,*out_u,*out_v;
    int width2 = width*2;
    in = src;out_y = dst;
    out_y1 = dst+width;
    out_u = dst + width*height;
    out_v = dst + width*height + (width*height)/4;for (int i=0;i<height/2;i++) {
    for (int j=0;j<width/2;j++) {
    *out_u++ = (*in + *(in+width2)) >> 1;
    in++;
    *out_y++ = *in;
    *out_y1++ = *(in+width2);
    in++;*out_v++ = (*in + *(in+width2)) >> 1;
    in++;
    *out_y++ = *in;
    *out_y1++ = *(in+width2);
    in++;
    }
    in += width2;
    out_y1 += width;
    out_y += width;
    }
    }
    帮忙翻译一下