mp_image: add IMGFMT_BGR0/PIX_FMT_BGR0

Needed by ffv1.
This commit is contained in:
wm4 2012-10-21 01:10:32 +02:00
parent 8bbce10c77
commit 933805daa1
4 changed files with 10 additions and 0 deletions

View File

@ -101,6 +101,8 @@ static const struct {
{IMGFMT_444P, PIX_FMT_YUVJ444P},
{IMGFMT_440P, PIX_FMT_YUVJ440P},
{IMGFMT_BGR0, PIX_FMT_BGR0},
{IMGFMT_VDPAU_MPEG1, PIX_FMT_VDPAU_MPEG1},
{IMGFMT_VDPAU_MPEG2, PIX_FMT_VDPAU_MPEG2},
{IMGFMT_VDPAU_H264, PIX_FMT_VDPAU_H264},

View File

@ -191,6 +191,7 @@ struct mp_imgfmt_entry mp_imgfmt_list[] = {
{"argb", IMGFMT_ARGB},
{"bgra", IMGFMT_BGRA},
{"abgr", IMGFMT_ABGR},
{"bgr0", IMGFMT_BGR0},
{"gbrp", IMGFMT_GBRP},
{"mjpeg", IMGFMT_MJPEG},
{"mjpg", IMGFMT_MJPEG},

View File

@ -101,6 +101,8 @@
#define IMGFMT_RGB_DEPTH(fmt) ((fmt)&0x3F)
#define IMGFMT_BGR_DEPTH(fmt) ((fmt)&0x3F)
// AV_PIX_FMT_BGR0
#define IMGFMT_BGR0 0x1DC70000
/* Planar YUV Formats */

View File

@ -119,6 +119,11 @@ void mp_image_setfmt(mp_image_t* mpi,unsigned int out_fmt){
mpi->flags|=MP_IMGFLAG_SWAPPED;
return;
}
switch (out_fmt) {
case IMGFMT_BGR0:
mpi->bpp = 32;
return;
}
mpi->num_planes=3;
if (out_fmt == IMGFMT_GBRP) {
mpi->bpp=24;