comparison libmpcodecs/mp_image.c @ 34157:ab178e06077e

Support planar GBR24 decoding.
author cehoyos
date Sun, 23 Oct 2011 20:40:31 +0000
parents cf2a4f4cac0e
children a93891202051
comparison
equal deleted inserted replaced
34156:758264af214d 34157:ab178e06077e
119 else 119 else
120 mpi->bpp=(IMGFMT_BGR_DEPTH(out_fmt)+7)&(~7); 120 mpi->bpp=(IMGFMT_BGR_DEPTH(out_fmt)+7)&(~7);
121 mpi->flags|=MP_IMGFLAG_SWAPPED; 121 mpi->flags|=MP_IMGFLAG_SWAPPED;
122 return; 122 return;
123 } 123 }
124 mpi->num_planes=3;
125 if (out_fmt == IMGFMT_GBR24P) {
126 mpi->bpp=24;
127 mpi->flags|=MP_IMGFLAG_PLANAR;
128 return;
129 }
124 mpi->flags|=MP_IMGFLAG_YUV; 130 mpi->flags|=MP_IMGFLAG_YUV;
125 mpi->num_planes=3;
126 if (mp_get_chroma_shift(out_fmt, NULL, NULL, NULL)) { 131 if (mp_get_chroma_shift(out_fmt, NULL, NULL, NULL)) {
127 mpi->flags|=MP_IMGFLAG_PLANAR; 132 mpi->flags|=MP_IMGFLAG_PLANAR;
128 mpi->bpp = mp_get_chroma_shift(out_fmt, &mpi->chroma_x_shift, &mpi->chroma_y_shift, NULL); 133 mpi->bpp = mp_get_chroma_shift(out_fmt, &mpi->chroma_x_shift, &mpi->chroma_y_shift, NULL);
129 mpi->chroma_width = mpi->width >> mpi->chroma_x_shift; 134 mpi->chroma_width = mpi->width >> mpi->chroma_x_shift;
130 mpi->chroma_height = mpi->height >> mpi->chroma_y_shift; 135 mpi->chroma_height = mpi->height >> mpi->chroma_y_shift;