History

8088flex TMV video decoder now uses ff_draw_pc_font()

Originally committed as revision 24297 to svn://svn.ffmpeg.org/ffmpeg/trunk

Peter Ross committed 16 years ago

Commit 36259991 parent 9e5f3df1 file · +5 −11Browse files

Unified · Split

libavcodec/tmv.c+5−11
@@ -39,10 +39,10 @@ static int tmv_decode_frame(AVCodecContext *avctx, void *data, · 38 unmodified lines
39{39{
40 TMVContext *tmv = avctx->priv_data;40 TMVContext *tmv = avctx->priv_data;
41 const uint8_t *src = avpkt->data;41 const uint8_t *src = avpkt->data;
42 uint8_t *dst, *dst_char;42 uint8_t *dst;
43 unsigned char_cols = avctx->width >> 3;43 unsigned char_cols = avctx->width >> 3;
44 unsigned char_rows = avctx->height >> 3;44 unsigned char_rows = avctx->height >> 3;
45 unsigned x, y, mask, char_y, fg, bg, c;45 unsigned x, y, fg, bg, c;
46 46
47 if (tmv->pic.data[0])47 if (tmv->pic.data[0])
48 avctx->release_buffer(avctx, &tmv->pic);48 avctx->release_buffer(avctx, &tmv->pic);
@@ -68,17 +68,11 @@ static int tmv_decode_frame(AVCodecContext *avctx, void *data, · 19 unmodified lines
68 68
69 for (y = 0; y < char_rows; y++) {69 for (y = 0; y < char_rows; y++) {
70 for (x = 0; x < char_cols; x++) {70 for (x = 0; x < char_cols; x++) {
71 c = *src++ * 8;71 c = *src++;
72 bg = *src >> 4;72 bg = *src >> 4;
73 fg = *src++ & 0xF;73 fg = *src++ & 0xF;
74 74 ff_draw_pc_font(dst + x * 8, tmv->pic.linesize[0],
75 dst_char = dst + x * 8;75 ff_cga_font, 8, c, fg, bg);
76 for (char_y = 0; char_y < 8; char_y++) {
77 for (mask = 0x80; mask; mask >>= 1) {
78 *dst_char++ = ff_cga_font[c + char_y] & mask ? fg : bg;
79 }
80 dst_char += tmv->pic.linesize[0] - 8;
81 }
82 }76 }
83 dst += tmv->pic.linesize[0] * 8;77 dst += tmv->pic.linesize[0] * 8;
84 }78 }

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t