summaryrefslogtreecommitdiffstats
path: root/libvo
diff options
context:
space:
mode:
authorUoti Urpala <uau@glyph.nonexistent.invalid>2010-01-08 01:36:05 +0200
committerUoti Urpala <uau@glyph.nonexistent.invalid>2010-01-08 01:36:05 +0200
commitb390b9b28fa6280f355eeef4811b6cfc02dea01a (patch)
treeef67be7ab1b189f5818fb8a273fa10f19d19aec6 /libvo
parentefe742e3fa08f007ab41f1d666fd1f1c3bf0d63a (diff)
parent8e778e501948b67b1f8cd889e68242d1a1eb6041 (diff)
downloadmpv-b390b9b28fa6280f355eeef4811b6cfc02dea01a.tar.bz2
mpv-b390b9b28fa6280f355eeef4811b6cfc02dea01a.tar.xz
Merge svn changes up to r30185
Diffstat (limited to 'libvo')
-rw-r--r--libvo/aclib.c2
-rw-r--r--libvo/aclib_template.c16
-rw-r--r--libvo/gl_common.c22
-rw-r--r--libvo/gl_common.h11
-rw-r--r--libvo/matrixview.c378
-rw-r--r--libvo/matrixview.h12
-rw-r--r--libvo/matrixview_font.h588
-rw-r--r--libvo/video_out.c4
-rw-r--r--libvo/vo_matrixview.c325
-rw-r--r--libvo/vo_sdl.c4
10 files changed, 1354 insertions, 8 deletions
diff --git a/libvo/aclib.c b/libvo/aclib.c
index 4fbd36d10e..7328de794a 100644
--- a/libvo/aclib.c
+++ b/libvo/aclib.c
@@ -23,9 +23,11 @@
#include "config.h"
#include <stddef.h>
+#include <stdint.h>
#include <string.h>
#include "cpudetect.h"
#include "fastmemcpy.h"
+#include "ffmpeg_files/x86_cpu.h"
#undef memcpy
#define BLOCK_SIZE 4096
diff --git a/libvo/aclib_template.c b/libvo/aclib_template.c
index d7b2201944..db3015ae66 100644
--- a/libvo/aclib_template.c
+++ b/libvo/aclib_template.c
@@ -100,7 +100,7 @@ If you have questions please contact with me: Nick Kurshev: nickols_k@mail.ru.
/* for small memory blocks (<256 bytes) this version is faster */
#define small_memcpy(to,from,n)\
{\
-register unsigned long int dummy;\
+register x86_reg dummy;\
__asm__ volatile(\
"rep; movsb"\
:"=&D"(to), "=&S"(from), "=&c"(dummy)\
@@ -180,9 +180,9 @@ static void * RENAME(fast_memcpy)(void * to, const void * from, size_t len)
#endif
if(len >= MIN_LEN)
{
- register unsigned long int delta;
+ register x86_reg delta;
/* Align destinition to MMREG_SIZE -boundary */
- delta = ((unsigned long int)to)&(MMREG_SIZE-1);
+ delta = ((intptr_t)to)&(MMREG_SIZE-1);
if(delta)
{
delta=MMREG_SIZE-delta;
@@ -201,7 +201,7 @@ static void * RENAME(fast_memcpy)(void * to, const void * from, size_t len)
processor's decoders, but it's not always possible.
*/
#if HAVE_SSE /* Only P3 (may be Cyrix3) */
- if(((unsigned long)from) & 15)
+ if(((intptr_t)from) & 15)
/* if SRC is misaligned */
for(; i>0; i--)
{
@@ -243,7 +243,7 @@ static void * RENAME(fast_memcpy)(void * to, const void * from, size_t len)
}
#else
// Align destination at BLOCK_SIZE boundary
- for(; ((int)to & (BLOCK_SIZE-1)) && i>0; i--)
+ for(; ((intptr_t)to & (BLOCK_SIZE-1)) && i>0; i--)
{
__asm__ volatile (
#ifndef HAVE_ONLY_MMX1
@@ -328,7 +328,7 @@ static void * RENAME(fast_memcpy)(void * to, const void * from, size_t len)
"cmp %4, %2 \n\t"
" jae 1b \n\t"
: "+r" (from), "+r" (to), "+r" (i)
- : "r" ((long)BLOCK_SIZE), "i" (BLOCK_SIZE/64), "i" ((long)CONFUSION_FACTOR)
+ : "r" ((x86_reg)BLOCK_SIZE), "i" (BLOCK_SIZE/64), "i" ((x86_reg)CONFUSION_FACTOR)
: "%"REG_a, "%ecx"
);
@@ -400,9 +400,9 @@ static void * RENAME(mem2agpcpy)(void * to, const void * from, size_t len)
#endif
if(len >= MIN_LEN)
{
- register unsigned long int delta;
+ register x86_reg delta;
/* Align destinition to MMREG_SIZE -boundary */
- delta = ((unsigned long int)to)&7;
+ delta = ((intptr_t)to)&7;
if(delta)
{
delta=8-delta;
diff --git a/libvo/gl_common.c b/libvo/gl_common.c
index b6bef7f1b7..a411c00eb2 100644
--- a/libvo/gl_common.c
+++ b/libvo/gl_common.c
@@ -41,8 +41,10 @@ void (GLAPIENTRY *End)(void);
void (GLAPIENTRY *Viewport)(GLint, GLint, GLsizei, GLsizei);
void (GLAPIENTRY *MatrixMode)(GLenum);
void (GLAPIENTRY *LoadIdentity)(void);
+void (GLAPIENTRY *Translated)(double, double, double);
void (GLAPIENTRY *Scaled)(double, double, double);
void (GLAPIENTRY *Ortho)(double, double, double, double, double, double);
+void (GLAPIENTRY *Frustum)(double, double, double, double, double, double);
void (GLAPIENTRY *PushMatrix)(void);
void (GLAPIENTRY *PopMatrix)(void);
void (GLAPIENTRY *Clear)(GLbitfield);
@@ -54,10 +56,14 @@ void (GLAPIENTRY *CallList)(GLuint);
void (GLAPIENTRY *CallLists)(GLsizei, GLenum, const GLvoid *);
void (GLAPIENTRY *GenTextures)(GLsizei, GLuint *);
void (GLAPIENTRY *DeleteTextures)(GLsizei, const GLuint *);
+void (GLAPIENTRY *TexEnvf)(GLenum, GLenum, GLfloat);
void (GLAPIENTRY *TexEnvi)(GLenum, GLenum, GLint);
void (GLAPIENTRY *Color4ub)(GLubyte, GLubyte, GLubyte, GLubyte);
void (GLAPIENTRY *Color3f)(GLfloat, GLfloat, GLfloat);
+void (GLAPIENTRY *Color4f)(GLfloat, GLfloat, GLfloat, GLfloat);
void (GLAPIENTRY *ClearColor)(GLclampf, GLclampf, GLclampf, GLclampf);
+void (GLAPIENTRY *ClearDepth)(GLclampd);
+void (GLAPIENTRY *DepthFunc)(GLenum);
void (GLAPIENTRY *Enable)(GLenum);
void (GLAPIENTRY *Disable)(GLenum);
const GLubyte *(GLAPIENTRY *GetString)(GLenum);
@@ -75,6 +81,11 @@ void (GLAPIENTRY *TexParameterf)(GLenum, GLenum, GLfloat);
void (GLAPIENTRY *TexParameterfv)(GLenum, GLenum, const GLfloat *);
void (GLAPIENTRY *TexCoord2f)(GLfloat, GLfloat);
void (GLAPIENTRY *Vertex2f)(GLfloat, GLfloat);
+void (GLAPIENTRY *Vertex3f)(GLfloat, GLfloat, GLfloat);
+void (GLAPIENTRY *Normal3f)(GLfloat, GLfloat, GLfloat);
+void (GLAPIENTRY *Lightfv)(GLenum, GLenum, const GLfloat *);
+void (GLAPIENTRY *ColorMaterial)(GLenum, GLenum);
+void (GLAPIENTRY *ShadeModel)(GLenum);
void (GLAPIENTRY *GetIntegerv)(GLenum, GLint *);
/**
@@ -359,8 +370,10 @@ static const extfunc_desc_t extfuncs[] = {
DEF_FUNC_DESC(Viewport),
DEF_FUNC_DESC(MatrixMode),
DEF_FUNC_DESC(LoadIdentity),
+ DEF_FUNC_DESC(Translated),
DEF_FUNC_DESC(Scaled),
DEF_FUNC_DESC(Ortho),
+ DEF_FUNC_DESC(Frustum),
DEF_FUNC_DESC(PushMatrix),
DEF_FUNC_DESC(PopMatrix),
DEF_FUNC_DESC(Clear),
@@ -372,10 +385,14 @@ static const extfunc_desc_t extfuncs[] = {
DEF_FUNC_DESC(CallLists),
DEF_FUNC_DESC(GenTextures),
DEF_FUNC_DESC(DeleteTextures),
+ DEF_FUNC_DESC(TexEnvf),
DEF_FUNC_DESC(TexEnvi),
DEF_FUNC_DESC(Color4ub),
DEF_FUNC_DESC(Color3f),
+ DEF_FUNC_DESC(Color4f),
DEF_FUNC_DESC(ClearColor),
+ DEF_FUNC_DESC(ClearDepth),
+ DEF_FUNC_DESC(DepthFunc),
DEF_FUNC_DESC(Enable),
DEF_FUNC_DESC(Disable),
DEF_FUNC_DESC(DrawBuffer),
@@ -392,6 +409,11 @@ static const extfunc_desc_t extfuncs[] = {
DEF_FUNC_DESC(TexParameterfv),
DEF_FUNC_DESC(TexCoord2f),
DEF_FUNC_DESC(Vertex2f),
+ DEF_FUNC_DESC(Vertex3f),
+ DEF_FUNC_DESC(Normal3f),
+ DEF_FUNC_DESC(Lightfv),
+ DEF_FUNC_DESC(ColorMaterial),
+ DEF_FUNC_DESC(ShadeModel),
DEF_FUNC_DESC(GetIntegerv),
// here start the real extensions
diff --git a/libvo/gl_common.h b/libvo/gl_common.h
index db20ebbc65..0be98cf6ed 100644
--- a/libvo/gl_common.h
+++ b/libvo/gl_common.h
@@ -395,8 +395,10 @@ extern void (GLAPIENTRY *End)(void);
extern void (GLAPIENTRY *Viewport)(GLint, GLint, GLsizei, GLsizei);
extern void (GLAPIENTRY *MatrixMode)(GLenum);
extern void (GLAPIENTRY *LoadIdentity)(void);
+extern void (GLAPIENTRY *Translated)(double, double, double);
extern void (GLAPIENTRY *Scaled)(double, double, double);
extern void (GLAPIENTRY *Ortho)(double, double, double, double, double, double);
+extern void (GLAPIENTRY *Frustum)(double, double, double, double, double, double);
extern void (GLAPIENTRY *PushMatrix)(void);
extern void (GLAPIENTRY *PopMatrix)(void);
extern void (GLAPIENTRY *Clear)(GLbitfield);
@@ -408,10 +410,14 @@ extern void (GLAPIENTRY *CallList)(GLuint);
extern void (GLAPIENTRY *CallLists)(GLsizei, GLenum, const GLvoid *);
extern void (GLAPIENTRY *GenTextures)(GLsizei, GLuint *);
extern void (GLAPIENTRY *DeleteTextures)(GLsizei, const GLuint *);
+extern void (GLAPIENTRY *TexEnvf)(GLenum, GLenum, GLfloat);
extern void (GLAPIENTRY *TexEnvi)(GLenum, GLenum, GLint);
extern void (GLAPIENTRY *Color4ub)(GLubyte, GLubyte, GLubyte, GLubyte);
extern void (GLAPIENTRY *Color3f)(GLfloat, GLfloat, GLfloat);
+extern void (GLAPIENTRY *Color4f)(GLfloat, GLfloat, GLfloat, GLfloat);
extern void (GLAPIENTRY *ClearColor)(GLclampf, GLclampf, GLclampf, GLclampf);
+extern void (GLAPIENTRY *ClearDepth)(GLclampd);
+extern void (GLAPIENTRY *DepthFunc)(GLenum);
extern void (GLAPIENTRY *Enable)(GLenum);
extern void (GLAPIENTRY *Disable)(GLenum);
extern const GLubyte *(GLAPIENTRY *GetString)(GLenum);
@@ -429,6 +435,11 @@ extern void (GLAPIENTRY *TexParameterf)(GLenum, GLenum, GLfloat);
extern void (GLAPIENTRY *TexParameterfv)(GLenum, GLenum, const GLfloat *);
extern void (GLAPIENTRY *TexCoord2f)(GLfloat, GLfloat);
extern void (GLAPIENTRY *Vertex2f)(GLfloat, GLfloat);
+extern void (GLAPIENTRY *Vertex3f)(GLfloat, GLfloat, GLfloat);
+extern void (GLAPIENTRY *Normal3f)(GLfloat, GLfloat, GLfloat);
+extern void (GLAPIENTRY *Lightfv)(GLenum, GLenum, const GLfloat *);
+extern void (GLAPIENTRY *ColorMaterial)(GLenum, GLenum);
+extern void (GLAPIENTRY *ShadeModel)(GLenum);
extern void (GLAPIENTRY *GetIntegerv)(GLenum, GLint *);
extern void (GLAPIENTRY *GenBuffers)(GLsizei, GLuint *);
diff --git a/libvo/matrixview.c b/libvo/matrixview.c
new file mode 100644
index 0000000000..287ff2d497
--- /dev/null
+++ b/libvo/matrixview.c
@@ -0,0 +1,378 @@
+/*
+ * Copyright (C) 2003 Alex Zolotov <nightradio@knoppix.ru>
+ * Mucked with by Tugrul Galatali <tugrul@galatali.com>
+ *
+ * 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.
+ *
+ * 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.
+ */
+
+/**
+ * Ported to an MPlayer video out plugin by Pigeon <pigeon at pigeond.net>
+ * August 2006
+ */
+
+#include <math.h>
+#include <stdio.h>
+#include <stdint.h>
+#include <stdlib.h>
+#include <string.h>
+#include "gl_common.h"
+#include "matrixview.h"
+#include "matrixview_font.h"
+
+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 };
+
+static const uint8_t flare[4][4] = {
+ { 0, 0, 0, 0},
+ { 0, 180, 0, 0},
+ { 0, 0, 0, 0},
+ { 0, 0, 0, 0}
+};
+
+#define MAX_TEXT_X 0x4000
+#define MAX_TEXT_Y 0x4000
+static int text_x = 0;
+static int text_y = 0;
+#define _text_x text_x/2
+#define _text_y text_y/2
+
+// Scene position
+#define Z_Off -128.0f
+#define Z_Depth 8
+
+static uint8_t *speed;
+static uint8_t *text;
+static uint8_t *text_light;
+static float *text_depth;
+
+static float *bump_pic;
+
+static void draw_char(int num, float light, float x, float y, float z)
+{
+ float tx, ty;
+ int num2, num3;
+
+ num &= 63;
+ //light = light / 255; //light=7-light;num+=(light*60);
+ light = light / 255 * matrix_brightness;
+ num2 = num / 10;
+ num3 = num - (num2 * 10);
+ ty = (float)num2 / 7;
+ tx = (float)num3 / 10;
+ Normal3f(0.0f, 0.0f, 1.0f); // Needed for lighting
+ Color4f(0.0, 1.0, 0.0, light); // Basic polygon color
+
+ TexCoord2f(tx, ty);
+ Vertex3f(x, y, z);
+ TexCoord2f(tx + 0.1, ty);
+ Vertex3f(x + 1, y, z);
+ TexCoord2f(tx + 0.1, ty + 0.166);
+ Vertex3f(x + 1, y - 1, z);
+ TexCoord2f(tx, ty + 0.166);
+ Vertex3f(x, y - 1, z);
+}
+
+static void draw_illuminatedchar(int num, float x, float y, float z)
+{
+ float tx, ty;
+ int num2, num3;
+
+ num2 = num / 10;
+ num3 = num - (num2 * 10);
+ ty = (float)num2 / 7;
+ tx = (float)num3 / 10;
+ Normal3f(0.0f, 0.0f, 1.0f); // Needed for lighting
+ Color4f(1.0, 1.0, 1.0, .5); // Basic polygon color
+
+ TexCoord2f(tx, ty);
+ Vertex3f(x, y, z);
+ TexCoord2f(tx + 0.1, ty);
+ Vertex3f(x + 1, y, z);
+ TexCoord2f(tx + 0.1, ty + 0.166);
+ Vertex3f(x + 1, y - 1, z);
+ TexCoord2f(tx, ty + 0.166);
+ Vertex3f(x, y - 1, z);
+}
+
+static void draw_flare(float x, float y, float z) //flare
+{
+ Normal3f(0.0f, 0.0f, 1.0f); // Needed for lighting
+ Color4f(1.0, 1.0, 1.0, .8); // Basic polygon color
+
+ TexCoord2f(0, 0);
+ Vertex3f(x - 1, y + 1, z);
+ TexCoord2f(0.75, 0);
+ Vertex3f(x + 2, y + 1, z);
+ TexCoord2f(0.75, 0.75);
+ Vertex3f(x + 2, y - 2, z);
+ TexCoord2f(0, 0.75);
+ Vertex3f(x - 1, y - 2, z);
+}
+
+static void draw_text(uint8_t *pic)
+{
+ int x, y;
+ int p = 0;
+ int c, c_pic;
+ int pic_fade = 255;
+
+ for (y = _text_y; y > -_text_y; y--) {
+ for (x = -_text_x; x < _text_x; x++) {
+ c = text_light[p] - (text[p] >> 1);
+ c += pic_fade;
+ if (c > 255)
+ c = 255;
+
+ if (pic) {
+ // Original code
+ //c_pic = pic[p] * matrix_contrast - (255 - pic_fade);
+
+ c_pic = (255 - pic[p]) * matrix_contrast - (255 - pic_fade);
+
+ if (c_pic < 0)
+ c_pic = 0;
+
+ c -= c_pic;
+
+ if (c < 0)
+ c = 0;
+
+ bump_pic[p] = (255.0f - c_pic) / (256 / Z_Depth);
+ } else {
+ bump_pic[p] = Z_Depth;
+ }
+
+ if (text[p] && c > 10)
+ draw_char(text[p] + 1, c, x, y, text_depth[p] + bump_pic[p]);
+
+ if (text_depth[p] < 0.1)
+ text_depth[p] = 0;
+ else
+ text_depth[p] /= 1.1;
+
+ if (text_light[p] > 128 && text_light[p + text_x] < 10)
+ draw_illuminatedchar(text[p] + 1, x, y, text_depth[p] + bump_pic[p]);
+
+ p++;
+ }
+ }
+}
+
+static void draw_flares(void)
+{
+ float x, y;
+ int p = 0;
+
+ for (y = _text_y; y > -_text_y; y--) {
+ for (x = -_text_x; x < _text_x; x++) {
+ if (text_light[p] > 128 && text_light[p + text_x] < 10)
+ draw_flare(x, y, text_depth[p] + bump_pic[p]);
+ p++;
+ }
+ }
+}
+
+static void scroll(double dCurrentTime)
+{
+ int a, s, polovina;
+ //static double dLastCycle = -1;
+ static double dLastMove = -1;
+
+ if (dCurrentTime - dLastMove > 1.0 / (text_y / 1.5)) {
+ dLastMove = dCurrentTime;
+
+ polovina = text_x * text_y / 2;
+ s = 0;
+ for (a = text_x * text_y + text_x - 1; a >= text_x; a--) {
+ if (speed[s])
+ text_light[a] = text_light[a - text_x]; //scroll light table down
+ s++;
+ if (s >= text_x)
+ s = 0;
+ }
+ memmove(text_light + text_x, text_light, text_x * text_y);
+ memset(text_light, 253, text_x);
+
+ s = 0;
+ for (a = polovina; a < text_x * text_y; a++) {
+ if (text_light[a] == 255)
+ text_light[s] = text_light[s + text_x] >> 1; //make black bugs in top line
+
+ s++;
+
+ if (s >= text_x)
+ s = 0;
+ }
+ }
+}
+
+static void make_change(double dCurrentTime)
+{
+ int r = rand() % text_x * text_y;
+
+ text[r] += 133; //random bugs
+
+ r = rand() % (4 * text_x);
+ if (r < text_x && text_light[r])
+ text_light[r] = 255; //white bugs
+
+ scroll (dCurrentTime);
+}
+
+
+static void make_text(void)
+{
+ int a;
+
+ for (a = 0; a < text_x * text_y; a++)
+ text[a] = rand() >> 8; // avoid the lowest bits of rand()
+
+ for (a = 0; a < text_x; a++)
+ speed[a] = rand() >= RAND_MAX / 2;
+}
+
+static void ourBuildTextures(void)
+{
+ TexImage2D(GL_TEXTURE_2D, 0, 1, 128, 64, 0, GL_LUMINANCE, GL_UNSIGNED_BYTE, font_texture);
+ TexParameterf(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_LINEAR);
+ TexParameterf(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_LINEAR);
+
+ BindTexture(GL_TEXTURE_2D, 1);
+ TexImage2D(GL_TEXTURE_2D, 0, 1, 4, 4, 0, GL_LUMINANCE, GL_UNSIGNED_BYTE, flare);
+ TexParameterf(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_LINEAR);
+ TexParameterf(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_LINEAR);
+
+ // Some pretty standard settings for wrapping and filtering.
+ TexParameterf(GL_TEXTURE_2D, GL_TEXTURE_WRAP_S, GL_REPEAT);
+ TexParameterf(GL_TEXTURE_2D, GL_TEXTURE_WRAP_T, GL_REPEAT);
+ BindTexture(GL_TEXTURE_2D, 0);
+}
+
+void matrixview_init(int w, int h)
+{
+ make_text();
+
+ ourBuildTextures();
+
+ // Color to clear color buffer to.
+ ClearColor(0.0f, 0.0f, 0.0f, 0.0f);
+
+ // Depth to clear depth buffer to; type of test.
+ ClearDepth(1.0);
+ DepthFunc(GL_LESS);
+
+ // Enables Smooth Color Shading; try GL_FLAT for (lack of) fun.
+ ShadeModel(GL_SMOOTH);
+
+ // Set up a light, turn it on.
+ Lightfv(GL_LIGHT1, GL_POSITION, Light_Position);
+ Lightfv(GL_LIGHT1, GL_AMBIENT, Light_Ambient);
+ Lightfv(GL_LIGHT1, GL_DIFFUSE, Light_Diffuse);
+ Enable(GL_LIGHT1);
+
+ // A handy trick -- have surface material mirror the color.
+ ColorMaterial(GL_FRONT_AND_BACK, GL_AMBIENT_AND_DIFFUSE);
+ Enable(GL_COLOR_MATERIAL);
+
+ // Allow adjusting of texture color via glColor
+ TexEnvi(GL_TEXTURE_ENV, GL_TEXTURE_ENV_MODE, GL_MODULATE);
+
+ matrixview_reshape(w, h);
+}
+
+
+void matrixview_reshape(int w, int h)
+{
+ Viewport(0, 0, w, h);
+
+ MatrixMode(GL_PROJECTION);
+ LoadIdentity();
+ Frustum(-_text_x, _text_x, -_text_y, _text_y, -Z_Off - Z_Depth, -Z_Off);
+
+ MatrixMode(GL_MODELVIEW);
+}
+
+
+void matrixview_draw(int w, int h, double currentTime, float frameTime, uint8_t *data)
+{
+ Enable(GL_BLEND);
+ Enable(GL_TEXTURE_2D);
+
+ Disable(GL_LIGHTING);
+ BlendFunc(GL_SRC_ALPHA, GL_ONE);
+ Disable(GL_DEPTH_TEST);
+
+ MatrixMode(GL_MODELVIEW);
+ LoadIdentity();
+ Translated(0.0f, 0.0f, Z_Off);
+
+ // Clear the color and depth buffers.
+ Clear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT);
+
+ // OK, let's start drawing our planer quads.
+ Begin(GL_QUADS);
+ draw_text(data);
+ End();
+
+ BindTexture(GL_TEXTURE_2D, 1);
+ Begin(GL_QUADS);
+ draw_flares();
+ End();
+ BindTexture(GL_TEXTURE_2D, 0);
+
+ make_change(currentTime);
+
+ LoadIdentity();
+ MatrixMode(GL_PROJECTION);
+}
+
+void matrixview_contrast_set(float contrast)
+{
+ matrix_contrast = contrast;
+}
+
+void matrixview_brightness_set(float brightness)
+{
+ matrix_brightness = brightness;
+}
+
+
+void matrixview_matrix_resize(int w, int h)
+{
+ int elems;
+ free(speed);
+ speed = NULL;
+ free(text);
+ text = NULL;
+ free(text_light);
+ text_light = NULL;
+ free(text_depth);
+ text_depth = NULL;
+ if (w > MAX_TEXT_X || h > MAX_TEXT_Y)
+ return;
+ elems = w * (h + 1);
+ speed = calloc(w, sizeof(*speed));
+ text = calloc(elems, sizeof(*text));
+ text_light = calloc(elems, sizeof(*text_light));
+ text_depth = calloc(elems, sizeof(*text_depth));
+ bump_pic = calloc(elems, sizeof(*bump_pic));
+ text_x = w;
+ text_y = h;
+ make_text();
+}
diff --git a/libvo/matrixview.h b/libvo/matrixview.h
new file mode 100644
index 0000000000..db76729906
--- /dev/null
+++ b/libvo/matrixview.h
@@ -0,0 +1,12 @@
+#ifndef MPLAYER_MATRIXVIEW_H
+#define MPLAYER_MATRIXVIEW_H
+
+#include <stdint.h>
+void matrixview_init (int w, int h);
+void matrixview_reshape (int w, int h);
+void matrixview_draw (int w, int h, double currentTime, float frameTime, uint8_t *data);
+void matrixview_matrix_resize(int w, int h);
+void matrixview_contrast_set(float contrast);
+void matrixview_brightness_set(float brightness);
+
+#endif /* MPLAYER_MATRIXVIEW_H */
diff --git a/libvo/matrixview_font.h b/libvo/matrixview_font.h
new file mode 100644
index 0000000000..753e9344a2
--- /dev/null
+++ b/libvo/matrixview_font.h
@@ -0,0 +1,588 @@
+#ifndef MPLAYER_MATRIXVIEW_FONT_H
+#define MPLAYER_MATRIXVIEW_FONT_H
+
+#include <stdint.h>
+
+#define FONT_TEXTURE_W 128
+#define FONT_TEXTURE_H 64
+static const uint8_t font_texture[FONT_TEXTURE_H][FONT_TEXTURE_W] = {
+ {
+ 2, 2, 2, 2, 5, 20, 52, 77, 13, 2, 2, 2, 2, 2, 2, 3,
+ 13, 42, 67, 71, 66, 34, 7, 2, 2, 2, 2, 4, 36, 69, 71, 71,
+ 71, 71, 70, 35, 4, 3, 2, 2, 2, 2, 2, 3, 2, 29, 70, 71,
+ 39, 3, 2, 3, 3, 44, 71, 71, 71, 72, 71, 71, 71, 65, 13, 2,
+ 3, 2, 3, 5, 30, 64, 72, 71, 45, 13, 3, 2, 2, 2, 29, 71,
+ 71, 71, 71, 71, 71, 71, 71, 47, 2, 2, 2, 2, 2, 5, 26, 58,
+ 63, 36, 7, 2, 2, 2, 2, 2, 2, 12, 58, 71, 71, 71, 71, 61,
+ 15, 2, 2, 2, 2, 3, 2, 3, 2, 2, 2, 2, 3, 2, 3, 5
+ }, {
+ 2, 2, 2, 3, 30, 122, 127, 122, 20, 3, 2, 2, 2, 2, 3, 33,
+ 110, 125, 85, 54, 64, 111, 80, 8, 3, 3, 3, 20, 92, 63, 50, 50,
+ 83, 125, 127, 121, 29, 2, 2, 2, 2, 2, 3, 3, 14, 106, 118, 127,
+ 74, 2, 3, 3, 3, 42, 67, 67, 67, 67, 67, 102, 127, 120, 22, 3,
+ 2, 3, 8, 79, 125, 115, 73, 103, 127, 107, 28, 3, 2, 2, 21, 50,
+ 50, 49, 50, 50, 56, 118, 127, 85, 2, 2, 2, 2, 6, 65, 124, 127,
+ 123, 126, 89, 15, 2, 2, 2, 2, 3, 80, 127, 126, 65, 62, 124, 127,
+ 86, 5, 3, 2, 3, 3, 4, 12, 13, 7, 7, 12, 12, 4, 3, 6
+ }, {
+ 2, 2, 2, 3, 12, 59, 125, 123, 20, 3, 2, 2, 2, 2, 7, 102,
+ 127, 99, 5, 3, 3, 24, 90, 32, 3, 3, 3, 3, 2, 3, 3, 3,
+ 5, 86, 127, 127, 51, 3, 2, 2, 2, 2, 3, 5, 78, 101, 70, 127,
+ 74, 3, 3, 3, 2, 3, 3, 3, 3, 3, 2, 71, 127, 120, 23, 2,
+ 3, 3, 50, 126, 126, 35, 2, 14, 113, 127, 78, 5, 3, 3, 3, 3,
+ 2, 2, 3, 3, 21, 118, 127, 78, 2, 2, 2, 2, 36, 125, 127, 77,
+ 35, 106, 127, 76, 2, 2, 2, 2, 2, 93, 127, 109, 12, 35, 123, 127,
+ 100, 7, 3, 3, 3, 3, 16, 105, 110, 47, 54, 109, 98, 15, 3, 5
+ }, {
+ 2, 2, 2, 2, 3, 31, 124, 123, 21, 2, 2, 2, 2, 2, 9, 112,
+ 127, 93, 4, 3, 3, 3, 3, 2, 3, 3, 3, 3, 3, 3, 3, 3,
+ 2, 64, 127, 127, 51, 3, 2, 2, 2, 2, 3, 47, 116, 33, 62, 127,
+ 73, 3, 3, 2, 3, 7, 48, 77, 77, 77, 78, 107, 127, 119, 22, 3,
+ 2, 3, 90, 127, 114, 14, 3, 5, 94, 127, 95, 7, 3, 3, 3, 3,
+ 3, 3, 3, 4, 64, 127, 123, 29, 2, 2, 2, 2, 45, 127, 126, 56,
+ 15, 93, 127, 82, 2, 2, 2, 2, 3, 93, 127, 108, 15, 95, 127, 127,
+ 99, 8, 3, 3, 3, 2, 29, 127, 127, 41, 78, 127, 110, 14, 3, 6
+ }, {
+ 2, 2, 2, 2, 2, 30, 124, 123, 20, 2, 2, 2, 2, 2, 5, 83,
+ 127, 113, 11, 2, 3, 3, 2, 3, 2, 3, 3, 3, 3, 3, 3, 3,
+ 3, 68, 127, 127, 51, 3, 3, 3, 2, 3, 20, 111, 62, 3, 62, 127,
+ 74, 2, 2, 3, 3, 50, 126, 127, 118, 66, 47, 47, 47, 43, 9, 2,
+ 2, 3, 98, 127, 125, 23, 3, 11, 110, 127, 87, 5, 3, 2, 2, 2,
+ 3, 3, 3, 26, 118, 127, 73, 4, 3, 2, 2, 2, 12, 100, 127, 122,
+ 109, 127, 115, 31, 2, 2, 2, 2, 2, 94, 127, 109, 55, 125, 127, 127,
+ 99, 7, 2, 3, 3, 3, 42, 127, 124, 32, 92, 127, 100, 7, 3, 5
+ }, {
+ 2, 2, 2, 2, 2, 30, 124, 122, 20, 2, 2, 2, 2, 2, 2, 14,
+ 88, 126, 91, 18, 3, 3, 2, 2, 2, 2, 3, 3, 2, 9, 9, 10,
+ 25, 108, 127, 127, 48, 3, 2, 3, 4, 7, 86, 99, 15, 10, 66, 127,
+ 73, 2, 2, 2, 2, 65, 127, 127, 61, 4, 3, 3, 2, 2, 2, 2,
+ 2, 3, 92, 127, 127, 94, 48, 82, 126, 124, 57, 3, 3, 2, 2, 2,
+ 2, 4, 8, 91, 127, 106, 15, 3, 2, 2, 2, 2, 3, 53, 125, 127,
+ 127, 127, 74, 6, 2, 2, 2, 2, 2, 93, 127, 115, 115, 98, 121, 127,
+ 99, 7, 2, 2, 3, 3, 59, 127, 120, 26, 100, 127, 92, 3, 3, 5
+ }, {
+ 2, 2, 2, 2, 2, 30, 124, 123, 20, 2, 2, 2, 2, 2, 3, 3,
+ 10, 66, 121, 110, 42, 5, 3, 2, 2, 2, 3, 2, 3, 87, 102, 103,
+ 114, 119, 118, 91, 15, 3, 3, 3, 3, 54, 126, 114, 102, 102, 115, 127,
+ 74, 3, 2, 2, 2, 66, 127, 127, 50, 3, 3, 3, 2, 2, 2, 2,
+ 2, 3, 72, 127, 114, 84, 104, 105, 91, 46, 5, 3, 3, 2, 2, 2,
+ 2, 3, 51, 126, 126, 47, 3, 3, 2, 2, 2, 2, 29, 120, 127, 107,
+ 82, 122, 125, 49, 2, 2, 2, 2, 3, 93, 127, 127, 123, 36, 117, 127,
+ 99, 7, 2, 2, 3, 3, 75, 127, 115, 24, 108, 127, 80, 3, 3, 5
+ }, {
+ 2, 2, 2, 2, 2, 30, 124, 123, 20, 2, 2, 2, 2, 2, 2, 3,
+ 3, 4, 35, 107, 122, 66, 10, 3, 2, 2, 3, 3, 3, 34, 86, 120,
+ 112, 63, 29, 5, 3, 2, 3, 3, 4, 44, 59, 59, 59, 59, 93, 127,
+ 73, 3, 2, 2, 2, 65, 127, 127, 53, 2, 2, 2, 2, 2, 2, 2,
+ 2, 2, 32, 122, 125, 40, 3, 3, 2, 3, 3, 3, 3, 2, 2, 2,
+ 2, 7, 97, 127, 105, 10, 3, 3, 3, 2, 2, 2, 52, 127, 126, 45,
+ 5, 88, 127, 78, 2, 2, 2, 2, 3, 93, 127, 127, 83, 9, 117, 127,
+ 99, 7, 2, 2, 3, 3, 72, 111, 94, 20, 101, 111, 55, 2, 3, 5
+ }, {
+ 6, 5, 6, 6, 6, 60, 249, 246, 40, 6, 5, 5, 5, 5, 13, 21,
+ 22, 22, 22, 47, 174, 254, 193, 49, 6, 5, 6, 16, 37, 36, 38, 83,
+ 183, 249, 209, 116, 23, 5, 6, 6, 6, 6, 7, 6, 5, 5, 123, 255,
+ 149, 5, 5, 5, 5, 129, 255, 255, 193, 42, 10, 8, 44, 61, 12, 5,
+ 6, 6, 7, 124, 243, 225, 82, 17, 6, 7, 7, 6, 6, 6, 5, 5,
+ 6, 20, 208, 255, 192, 6, 6, 5, 6, 5, 6, 5, 51, 237, 255, 199,
+ 149, 236, 249, 87, 6, 5, 5, 5, 5, 184, 255, 254, 72, 38, 238, 255,
+ 196, 14, 7, 6, 6, 5, 17, 24, 20, 8, 23, 24, 15, 5, 5, 5
+ }, {
+ 7, 6, 6, 6, 5, 55, 226, 221, 38, 6, 5, 5, 5, 5, 96, 192,
+ 191, 192, 192, 191, 197, 234, 234, 151, 7, 6, 6, 74, 209, 209, 209, 210,
+ 210, 230, 235, 231, 85, 6, 6, 5, 21, 152, 174, 174, 174, 175, 204, 235,
+ 131, 5, 5, 5, 5, 53, 202, 233, 234, 210, 180, 176, 209, 151, 15, 5,
+ 6, 6, 6, 7, 63, 169, 215, 184, 148, 128, 14, 6, 6, 6, 6, 6,
+ 6, 18, 189, 235, 174, 6, 6, 6, 7, 6, 7, 6, 8, 82, 205, 242,
+ 244, 215, 115, 11, 6, 7, 6, 6, 6, 90, 219, 234, 205, 204, 235, 218,
+ 100, 7, 6, 6, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5
+ }, {
+ 6, 6, 6, 7, 5, 13, 39, 36, 10, 6, 6, 5, 5, 5, 23, 40,
+ 40, 40, 39, 40, 40, 40, 39, 29, 6, 6, 6, 17, 38, 40, 40, 39,
+ 40, 41, 39, 41, 17, 6, 6, 6, 11, 50, 58, 49, 39, 38, 39, 38,
+ 25, 5, 5, 5, 5, 12, 37, 56, 58, 57, 58, 57, 51, 21, 6, 6,
+ 6, 6, 6, 7, 5, 5, 27, 38, 39, 39, 10, 6, 6, 6, 7, 6,
+ 5, 7, 33, 40, 30, 6, 6, 7, 6, 5, 6, 6, 18, 25, 36, 68,
+ 71, 40, 24, 23, 23, 9, 5, 6, 6, 6, 26, 40, 40, 40, 38, 25,
+ 6, 6, 6, 6, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5
+ }, {
+ 5, 137, 201, 200, 201, 201, 201, 200, 201, 168, 18, 5, 5, 5, 5, 5,
+ 5, 6, 18, 25, 36, 44, 59, 51, 10, 7, 5, 6, 6, 6, 6, 6,
+ 6, 6, 6, 6, 6, 6, 6, 5, 15, 168, 217, 123, 5, 6, 6, 6,
+ 6, 6, 5, 5, 5, 76, 192, 194, 195, 195, 194, 210, 217, 158, 6, 5,
+ 6, 6, 5, 5, 5, 6, 6, 5, 6, 6, 6, 6, 6, 5, 5, 16,
+ 78, 78, 78, 79, 78, 79, 62, 10, 5, 6, 6, 10, 125, 175, 176, 177,
+ 175, 182, 216, 218, 183, 33, 6, 6, 6, 7, 6, 6, 6, 6, 5, 6,
+ 6, 6, 7, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5
+ }, {
+ 5, 173, 247, 178, 168, 170, 169, 169, 169, 140, 15, 5, 5, 5, 61, 172,
+ 187, 204, 213, 220, 230, 238, 247, 212, 23, 5, 5, 6, 6, 6, 6, 19,
+ 121, 179, 147, 36, 7, 6, 5, 8, 45, 209, 255, 166, 44, 43, 43, 43,
+ 42, 28, 5, 5, 5, 18, 36, 37, 37, 37, 74, 235, 255, 183, 6, 6,
+ 6, 6, 6, 6, 6, 6, 6, 5, 6, 6, 6, 6, 5, 6, 6, 45,
+ 249, 248, 254, 255, 251, 248, 192, 16, 6, 6, 7, 7, 16, 22, 22, 22,
+ 22, 45, 243, 255, 134, 8, 6, 5, 6, 24, 78, 83, 60, 10, 5, 6,
+ 6, 6, 6, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5
+ }, {
+ 5, 173, 228, 26, 7, 6, 5, 6, 6, 5, 5, 5, 5, 5, 111, 255,
+ 251, 246, 232, 226, 210, 202, 190, 147, 17, 6, 6, 7, 6, 6, 62, 196,
+ 252, 181, 49, 7, 6, 6, 6, 23, 200, 252, 255, 248, 237, 238, 238, 238,
+ 238, 151, 5, 5, 5, 5, 6, 5, 6, 30, 201, 255, 245, 85, 5, 6,
+ 6, 6, 6, 7, 6, 6, 6, 6, 7, 6, 6, 7, 6, 7, 5, 12,
+ 51, 52, 184, 255, 105, 52, 40, 8, 6, 5, 6, 7, 33, 44, 44, 44,
+ 44, 66, 244, 255, 144, 11, 6, 6, 6, 21, 123, 236, 244, 153, 32, 6,
+ 6, 7, 5, 6, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5
+ }, {
+ 5, 173, 228, 27, 6, 6, 6, 5, 5, 6, 5, 5, 5, 5, 28, 70,
+ 75, 85, 81, 93, 86, 97, 84, 5, 6, 6, 8, 6, 21, 132, 239, 230,
+ 106, 19, 6, 6, 6, 7, 6, 13, 85, 215, 255, 191, 96, 96, 96, 96,
+ 96, 62, 5, 5, 5, 6, 6, 6, 17, 175, 255, 249, 114, 8, 5, 7,
+ 5, 5, 23, 28, 27, 27, 12, 22, 28, 28, 27, 11, 5, 6, 6, 6,
+ 6, 6, 169, 255, 71, 5, 6, 7, 6, 6, 6, 12, 174, 240, 240, 240,
+ 239, 241, 255, 255, 230, 43, 6, 6, 6, 7, 7, 53, 183, 253, 214, 83,
+ 9, 6, 6, 6, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5
+ }, {
+ 5, 173, 228, 26, 6, 6, 6, 6, 6, 6, 5, 5, 5, 5, 5, 101,
+ 226, 236, 240, 249, 251, 255, 213, 6, 6, 6, 5, 5, 47, 211, 255, 184,
+ 36, 6, 6, 6, 5, 7, 6, 6, 6, 158, 255, 179, 7, 5, 5, 5,
+ 5, 5, 5, 5, 5, 5, 6, 12, 146, 253, 253, 143, 11, 6, 6, 6,
+ 6, 13, 193, 227, 227, 225, 47, 199, 226, 227, 216, 39, 5, 6, 6, 7,
+ 6, 6, 168, 255, 70, 7, 6, 5, 6, 6, 6, 7, 44, 60, 60, 60,
+ 60, 79, 246, 255, 152, 14, 6, 6, 6, 6, 5, 7, 17, 130, 253, 247,
+ 132, 10, 6, 6, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5
+ }, {
+ 2, 86, 114, 13, 3, 3, 3, 2, 2, 2, 3, 3, 2, 2, 2, 49,
+ 107, 101, 97, 90, 83, 78, 54, 2, 3, 3, 3, 3, 3, 14, 75, 123,
+ 110, 45, 5, 2, 3, 3, 2, 3, 4, 42, 127, 114, 16, 3, 3, 3,
+ 2, 2, 2, 2, 2, 2, 4, 54, 124, 127, 89, 8, 2, 3, 3, 3,
+ 2, 4, 24, 28, 28, 26, 6, 25, 28, 28, 26, 4, 2, 3, 3, 3,
+ 3, 3, 83, 127, 35, 3, 3, 3, 3, 3, 3, 3, 3, 2, 3, 3,
+ 2, 15, 120, 127, 64, 3, 2, 3, 2, 2, 3, 3, 40, 106, 126, 92,
+ 27, 4, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 5
+ }, {
+ 3, 86, 114, 13, 3, 3, 3, 2, 2, 2, 3, 3, 2, 3, 11, 33,
+ 47, 45, 52, 58, 67, 79, 83, 80, 9, 4, 3, 3, 3, 3, 5, 37,
+ 103, 118, 73, 12, 3, 3, 3, 3, 3, 10, 98, 127, 67, 3, 3, 3,
+ 3, 2, 2, 2, 2, 3, 38, 120, 127, 103, 17, 3, 3, 3, 3, 3,
+ 3, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 3, 3,
+ 3, 3, 83, 127, 35, 2, 3, 3, 2, 3, 3, 2, 3, 3, 3, 3,
+ 3, 25, 126, 127, 63, 3, 3, 3, 3, 3, 15, 77, 123, 116, 55, 9,
+ 3, 3, 3, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 5
+ }, {
+ 3, 86, 121, 71, 65, 65, 65, 65, 64, 64, 64, 33, 2, 3, 51, 121,
+ 125, 126, 127, 127, 127, 127, 127, 110, 12, 3, 3, 3, 22, 26, 27, 26,
+ 34, 43, 42, 23, 3, 3, 3, 3, 3, 3, 29, 114, 122, 51, 5, 3,
+ 3, 2, 2, 2, 2, 21, 113, 127, 113, 26, 3, 3, 3, 2, 3, 3,
+ 3, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 3, 5, 61,
+ 81, 81, 112, 127, 94, 81, 81, 35, 3, 2, 3, 3, 2, 3, 3, 3,
+ 10, 89, 127, 127, 53, 3, 3, 3, 3, 16, 77, 98, 84, 23, 3, 3,
+ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 5
+ }, {
+ 3, 82, 121, 121, 121, 121, 121, 121, 121, 121, 121, 61, 4, 3, 42, 89,
+ 84, 76, 71, 57, 52, 40, 31, 19, 4, 3, 2, 3, 98, 115, 115, 115,
+ 115, 114, 115, 82, 6, 3, 2, 3, 3, 3, 3, 25, 91, 122, 88, 46,
+ 28, 13, 2, 2, 2, 40, 126, 127, 73, 40, 40, 39, 40, 33, 3, 3,
+ 3, 3, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 3, 7, 90,
+ 121, 121, 121, 121, 121, 121, 121, 53, 3, 3, 3, 5, 60, 82, 83, 83,
+ 107, 127, 127, 109, 18, 3, 3, 3, 3, 4, 7, 8, 5, 3, 3, 3,
+ 2, 2, 2, 3, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 5
+ }, {
+ 2, 12, 17, 17, 16, 17, 17, 16, 16, 17, 16, 9, 2, 2, 4, 5,
+ 2, 3, 3, 2, 3, 3, 2, 2, 2, 2, 2, 2, 15, 17, 17, 16,
+ 17, 17, 17, 12, 3, 3, 3, 3, 2, 3, 2, 3, 7, 32, 63, 69,
+ 58, 20, 3, 3, 2, 26, 82, 83, 82, 81, 82, 82, 81, 67, 2, 3,
+ 3, 2, 2, 3, 2, 2, 2, 2, 2, 2, 3, 3, 3, 3, 4, 13,
+ 16, 17, 17, 17, 17, 17, 17, 9, 3, 3, 2, 5, 62, 83, 83, 83,
+ 82, 83, 71, 22, 2, 2, 2, 2, 2, 3, 3, 3, 3, 2, 3, 3,
+ 3, 3, 3, 2, 3, 3, 2, 3, 3, 2, 3, 3, 2, 3, 2, 5
+ }, {
+ 2, 2, 2, 3, 3, 3, 14, 28, 29, 10, 3, 2, 2, 2, 3, 3,
+ 3, 2, 2, 3, 3, 3, 3, 2, 2, 2, 3, 7, 27, 29, 6, 3,
+ 2, 4, 23, 28, 11, 3, 3, 3, 11, 29, 28, 28, 29, 28, 29, 28,
+ 29, 24, 4, 3, 3, 3, 3, 3, 3, 3, 3, 2, 2, 3, 3, 3,
+ 3, 3, 3, 3, 3, 2, 2, 2, 3, 23, 28, 26, 4, 3, 3, 3,
+ 17, 29, 13, 3, 10, 28, 20, 3, 2, 3, 3, 2, 4, 27, 27, 4,
+ 3, 19,