[MPlayer-cvslog] r30182 - in trunk: Makefile configure libvo/matrixview.c libvo/matrixview.h libvo/matrixview_font.h libvo/video_out.c libvo/vo_matrixview.c

Diego Biurrun diego at biurrun.de
Mon Jan 4 11:28:09 CET 2010


On Sun, Jan 03, 2010 at 03:54:51PM +0100, reimar wrote:
> 
> Log:
> Finally add matrixview vo.
> Heavily cleaned up/fixed etc. by me, improvements are still possible though.
> 
> @@ -4603,6 +4607,18 @@ else
>  
> +echocheck "MatrixView"
> +if test "$_gl" = no ; then
> +  matrixview=no
> +fi

nit: I slightly prefer the more compact

  test "$_gl" = no && matrixview=no

> --- /dev/null	00:00:00 1970	(empty, because file is newly added)
> +++ trunk/libvo/matrixview.c	Sun Jan  3 15:54:51 2010	(r30182)
> @@ -0,0 +1,378 @@
> + * MatrixView is free software; you can redistribute it and/or modify
> + * it under the terms of the GNU General Public License version 2 as
> + * published by the Free Software Foundation.

Danger Will Robinson!

This is GPL v2, not GPL v2+ as the rest of MPlayer.  This is not
acceptable, please ask the patch submitter to relicense.

> + * MatrixView is distributed in the hope that it will be useful,
> + * but WITHOUT ANY WARRANTY; without even the implied warranty of
> + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
> + * GNU General Public License for more details.
> + *
> + * You should have received a copy of the GNU General Public License along
> + * with MPlayer; if not, write to the Free Software Foundation, Inc.,
> + * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
> + */

MatrixView or MPlayer?  It should be the latter.

> +static float matrix_contrast = 1.5;
> +static float matrix_brightness = 1.0;
> +
> +// Settings for our light.  Try playing with these (or add more lights).
> +static float Light_Ambient[] = { 0.1f, 0.1f, 0.1f, 1.0f };
> +static float Light_Diffuse[] = { 1.2f, 1.2f, 1.2f, 1.0f };
> +static float Light_Position[] = { 2.0f, 2.0f, 0.0f, 1.0f };

Could possibly be aligned - not important.

The uppercase names are ugly.

> +#define _text_x text_x/2
> +#define _text_y text_y/2

Leading underscores should be avoided.

> --- /dev/null	00:00:00 1970	(empty, because file is newly added)
> +++ trunk/libvo/matrixview.h	Sun Jan  3 15:54:51 2010	(r30182)
> @@ -0,0 +1,12 @@
> +#ifndef MPLAYER_MATRIXVIEW_H
> +#define MPLAYER_MATRIXVIEW_H

missing license header

> --- /dev/null	00:00:00 1970	(empty, because file is newly added)
> +++ trunk/libvo/matrixview_font.h	Sun Jan  3 15:54:51 2010	(r30182)
> @@ -0,0 +1,588 @@
> +#ifndef MPLAYER_MATRIXVIEW_FONT_H
> +#define MPLAYER_MATRIXVIEW_FONT_H

missing license header

> --- /dev/null	00:00:00 1970	(empty, because file is newly added)
> +++ trunk/libvo/vo_matrixview.c	Sun Jan  3 15:54:51 2010	(r30182)
> @@ -0,0 +1,333 @@
> +static int query_format(uint32_t format)
> +{
> +    int caps = VFCAP_CSP_SUPPORTED | VFCAP_HWSCALE_UP | VFCAP_HWSCALE_DOWN | VFCAP_ACCEPT_STRIDE;
> +
> +    switch(format) {
> +        case IMGFMT_YV12:
> +        case IMGFMT_BGR32:
> +        case IMGFMT_BGR24:
> +        case IMGFMT_BGR16:
> +        case IMGFMT_BGR15:
> +        case IMGFMT_RGB32:
> +        case IMGFMT_RGB24:
> +        case IMGFMT_ARGB:
> +            return caps;
> +        default:
> +            break;
> +    }

IMGFMT_ARGB and IMGFMT_BGR32 clash on bigendian and fail to compile:

libvo/vo_matrixview.c: In function 'query_format':
libvo/vo_matrixview.c:211: error: duplicate case value
libvo/vo_matrixview.c:205: error: previously used here

Diego


More information about the MPlayer-cvslog mailing list