Mercurial > mplayer.hg
comparison libmpcodecs/vd_raw.c @ 5953:1ab2605a9e44
fixed raw i420/iyuv to some extent, so that cb/cr channels are no
longer reversed. this should make it possible for bttv users to
play/record video (-tv outfmt=i420) once again without bogus colors.
author | rfelker |
---|---|
date | Fri, 03 May 2002 19:45:43 +0000 |
parents | a79f46ea2a6a |
children | 7779ad600a71 |
comparison
equal
deleted
inserted
replaced
5952:a9d61459a741 | 5953:1ab2605a9e44 |
---|---|
63 // TODO !!! | 63 // TODO !!! |
64 mpi->planes[0]=data; | 64 mpi->planes[0]=data; |
65 mpi->stride[0]=mpi->width; | 65 mpi->stride[0]=mpi->width; |
66 if(mpi->bpp == 12 && mpi->flags&MP_IMGFLAG_YUV) { | 66 if(mpi->bpp == 12 && mpi->flags&MP_IMGFLAG_YUV) { |
67 // Support for some common Planar YUV formats | 67 // Support for some common Planar YUV formats |
68 mpi->planes[2]=data+mpi->width*mpi->height; | 68 int cb=2, cr=1; |
69 mpi->stride[2]=mpi->width/2; | 69 if (sh->format == IMGFMT_IYUV || sh->format == IMGFMT_I420) { |
70 mpi->planes[1]=data+5*mpi->width*mpi->height/4; | 70 cb=1; cr=2; |
71 mpi->stride[1]=mpi->width/2; | 71 } |
72 mpi->planes[cb]=data+mpi->width*mpi->height; | |
73 mpi->stride[cb]=mpi->width/2; | |
74 mpi->planes[cr]=data+5*mpi->width*mpi->height/4; | |
75 mpi->stride[cr]=mpi->width/2; | |
72 } | 76 } |
73 } else { | 77 } else { |
74 mpi->planes[0]=data; | 78 mpi->planes[0]=data; |
75 mpi->stride[0]=mpi->width*(mpi->bpp/8); | 79 mpi->stride[0]=mpi->width*(mpi->bpp/8); |
76 if(mpi->imgfmt==IMGFMT_RGB8 || mpi->imgfmt==IMGFMT_BGR8){ | 80 if(mpi->imgfmt==IMGFMT_RGB8 || mpi->imgfmt==IMGFMT_BGR8){ |