Show
Ignore:
Timestamp:
05/08/08 15:33:27 (7 months ago)
Author:
astrange
Message:

Add VP6A, and some associated fixes for it and ZMBV. Might not work until the decoder is fixed in ffmpeg, but closes #237.

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • trunk/ColorConversions.c

    r868 r876  
    341341#endif 
    342342 
     343void YA420toV408(UInt8* o, unsigned outRB, unsigned width, unsigned height, AVFrame * picture) 
     344{ 
     345        UInt8          *yc = picture->data[0], *u = picture->data[1], *v = picture->data[2], *a = picture->data[3]; 
     346        unsigned       rY = picture->linesize[0], rU = picture->linesize[1], rV = picture->linesize[2], rA = picture->linesize[3], y, x; 
     347         
     348        for (y = 0; y < height; y++) { 
     349                for (x = 0; x < width; x++) { 
     350                        o[x*4] = u[x/2]; 
     351                        o[x*4+1] = yc[x]; 
     352                        o[x*4+2] = v[x/2]; 
     353                        o[x*4+3] = a[x]; 
     354                } 
     355                 
     356                o += outRB; 
     357                yc += rY; 
     358                a += rA; 
     359                if (y & 1) { 
     360                        u += rU; 
     361                        v += rV; 
     362                } 
     363        } 
     364} 
     365 
    343366void BGR24toRGB24(UInt8 *baseAddr, unsigned rowBytes, unsigned width, unsigned height, AVFrame *picture) 
    344367{