diff options
author | arpi_esp <arpi_esp@b3059339-0415-0410-9bf9-f77b7e298cf2> | 2001-04-16 03:33:35 +0000 |
---|---|---|
committer | arpi_esp <arpi_esp@b3059339-0415-0410-9bf9-f77b7e298cf2> | 2001-04-16 03:33:35 +0000 |
commit | 10f985abb26c9c748cdef35baedbcd98f82d5ea7 (patch) | |
tree | 6f7c08cec604417c6cd3eb53407f95faebb91ba0 /drivers | |
parent | 46bf0d7566e31a9fd0513d12e91d6b5238cb1a0b (diff) |
I420/IYUV support
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@471 b3059339-0415-0410-9bf9-f77b7e298cf2
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/mga_vid.c | 19 | ||||
-rw-r--r-- | drivers/mga_vid.h | 2 |
2 files changed, 20 insertions, 1 deletions
diff --git a/drivers/mga_vid.c b/drivers/mga_vid.c index d8f1c36343..33b396da1c 100644 --- a/drivers/mga_vid.c +++ b/drivers/mga_vid.c @@ -395,6 +395,8 @@ static int mga_vid_set_config(mga_vid_config_t *config) switch(config->format){ case MGA_VID_FORMAT_YV12: + case MGA_VID_FORMAT_I420: + case MGA_VID_FORMAT_IYUV: regs.besctl = 1 // BES enabled + (0<<6) // even start polarity + (1<<10) // x filtering enabled @@ -484,13 +486,17 @@ switch(config->format){ regs.besb1org = (uint32_t) mga_src_base + baseadrofs + 2*frame_size; regs.besb2org = (uint32_t) mga_src_base + baseadrofs + 3*frame_size; -if(config->format==MGA_VID_FORMAT_YV12){ +if(config->format==MGA_VID_FORMAT_YV12 + ||config->format==MGA_VID_FORMAT_IYUV + ||config->format==MGA_VID_FORMAT_I420 + ){ // planar YUV frames: if (is_g400) baseadrofs = (((ofstop*regs.besviscal)/4)>>16)*regs.bespitch; else baseadrofs = (((ofstop*regs.besviscal)/2)>>16)*regs.bespitch; + if(config->format==MGA_VID_FORMAT_YV12){ regs.besa1corg = (uint32_t) mga_src_base + baseadrofs + regs.bespitch * sh ; regs.besa2corg = (uint32_t) mga_src_base + baseadrofs + 1*frame_size + regs.bespitch * sh; regs.besb1corg = (uint32_t) mga_src_base + baseadrofs + 2*frame_size + regs.bespitch * sh; @@ -499,6 +505,17 @@ if(config->format==MGA_VID_FORMAT_YV12){ regs.besa2c3org = regs.besa2corg + ((regs.bespitch * sh) / 4); regs.besb1c3org = regs.besb1corg + ((regs.bespitch * sh) / 4); regs.besb2c3org = regs.besb2corg + ((regs.bespitch * sh) / 4); + } else { + regs.besa1c3org = (uint32_t) mga_src_base + baseadrofs + regs.bespitch * sh ; + regs.besa2c3org = (uint32_t) mga_src_base + baseadrofs + 1*frame_size + regs.bespitch * sh; + regs.besb1c3org = (uint32_t) mga_src_base + baseadrofs + 2*frame_size + regs.bespitch * sh; + regs.besb2c3org = (uint32_t) mga_src_base + baseadrofs + 3*frame_size + regs.bespitch * sh; + regs.besa1corg = regs.besa1c3org + ((regs.bespitch * sh) / 4); + regs.besa2corg = regs.besa2c3org + ((regs.bespitch * sh) / 4); + regs.besb1corg = regs.besb1c3org + ((regs.bespitch * sh) / 4); + regs.besb2corg = regs.besb2c3org + ((regs.bespitch * sh) / 4); + } + } weight = ofstop * (regs.besviscal >> 2); diff --git a/drivers/mga_vid.h b/drivers/mga_vid.h index 69eccefee7..55b807e7a1 100644 --- a/drivers/mga_vid.h +++ b/drivers/mga_vid.h @@ -38,6 +38,8 @@ uint32_t num_frames; } mga_vid_config_t; #define MGA_VID_FORMAT_YV12 0x32315659 +#define MGA_VID_FORMAT_IYUV (('I'<<24)|('Y'<<16)|('U'<<8)|'V') +#define MGA_VID_FORMAT_I420 (('I'<<24)|('4'<<16)|('2'<<8)|'0') #define MGA_VID_FORMAT_YUY2 (('Y'<<24)|('U'<<16)|('Y'<<8)|'2') #define MGA_VID_FORMAT_UYVY (('U'<<24)|('Y'<<16)|('V'<<8)|'Y') |