Move xGA font data from lavc to lavu.

This needs to be accessible for libavfilter in the next commit.
This commit is contained in:
Clément Bœsch 2012-09-22 09:56:33 +02:00
parent c39916bc2f
commit 81bbce9cf3
9 changed files with 467 additions and 402 deletions

View file

@ -26,6 +26,7 @@
#include "libavutil/common.h"
#include "libavutil/lfg.h"
#include "libavutil/xga_font_data.h"
#include "avcodec.h"
#include "cga_data.h"
@ -78,7 +79,7 @@ static av_cold int decode_init(AVCodecContext *avctx)
avctx->pix_fmt = PIX_FMT_PAL8;
/* defaults */
s->font = ff_vga16_font;
s->font = avpriv_vga16_font;
s->font_height = 16;
s->fg = DEFAULT_FG_COLOR;
s->bg = DEFAULT_BG_COLOR;
@ -203,19 +204,19 @@ static int execute_code(AVCodecContext * avctx, int c)
height = avctx->height;
switch(s->args[0]) {
case 0: case 1: case 4: case 5: case 13: case 19: //320x200 (25 rows)
s->font = ff_cga_font;
s->font = avpriv_cga_font;
s->font_height = 8;
width = 40<<3;
height = 25<<3;
break;
case 2: case 3: //640x400 (25 rows)
s->font = ff_vga16_font;
s->font = avpriv_vga16_font;
s->font_height = 16;
width = 80<<3;
height = 25<<4;
break;
case 6: case 14: //640x200 (25 rows)
s->font = ff_cga_font;
s->font = avpriv_cga_font;
s->font_height = 8;
width = 80<<3;
height = 25<<3;
@ -223,13 +224,13 @@ static int execute_code(AVCodecContext * avctx, int c)
case 7: //set line wrapping
break;
case 15: case 16: //640x350 (43 rows)
s->font = ff_cga_font;
s->font = avpriv_cga_font;
s->font_height = 8;
width = 80<<3;
height = 43<<3;
break;
case 17: case 18: //640x480 (60 rows)
s->font = ff_cga_font;
s->font = avpriv_cga_font;
s->font_height = 8;
width = 80<<3;
height = 60<<4;