Merge svn changes up to r31145

This commit is contained in:
Uoti Urpala 2010-05-30 15:21:18 +03:00
commit 18657beb19
4 changed files with 304 additions and 295 deletions

582
configure vendored

File diff suppressed because it is too large Load Diff

View File

@ -151,13 +151,18 @@ int mp_get_chroma_shift(int format, int *x_shift, int *y_shift)
xs = 0;
ys = 1;
break;
case IMGFMT_Y8:
case IMGFMT_Y800:
xs = 31;
ys = 31;
break;
default:
err = 1;
break;
}
if (x_shift) *x_shift = xs;
if (y_shift) *y_shift = ys;
bpp = 8 + (16 >> (xs + ys));
bpp = 8 + ((16 >> xs) >> ys);
if (format == IMGFMT_420A)
bpp += 8;
bpp *= bpp_factor;

View File

@ -153,8 +153,7 @@ void mp_image_setfmt(mp_image_t* mpi,unsigned int out_fmt){
case IMGFMT_Y800:
case IMGFMT_Y8:
/* they're planar ones, but for easier handling use them as packed */
// mpi->flags|=MP_IMGFLAG_PLANAR;
mpi->bpp=8;
mpi->flags&=~MP_IMGFLAG_PLANAR;
mpi->num_planes=1;
return;
case IMGFMT_UYVY:

View File

@ -529,8 +529,11 @@ void glCreateClearTex(GLenum target, GLenum fmt, GLenum format, GLenum type, GLi
int w, int h, unsigned char val) {
GLfloat fval = (GLfloat)val / 255.0;
GLfloat border[4] = {fval, fval, fval, fval};
int stride = w * glFmt2bpp(format, type);
int stride;
char *init;
if (w == 0) w = 1;
if (h == 0) h = 1;
stride = w * glFmt2bpp(format, type);
if (!stride) return;
init = malloc(stride * h);
memset(init, val, stride * h);
@ -1422,6 +1425,8 @@ int glAutodetectYUVConversion(void) {
void glSetupYUVConversion(gl_conversion_params_t *params) {
float uvcos = params->csp_params.saturation * cos(params->csp_params.hue);
float uvsin = params->csp_params.saturation * sin(params->csp_params.hue);
if (params->chrom_texw == 0) params->chrom_texw = 1;
if (params->chrom_texh == 0) params->chrom_texh = 1;
switch (YUV_CONVERSION(params->type)) {
case YUV_CONVERSION_COMBINERS:
glSetupYUVCombiners(uvcos, uvsin);