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
3939 {
4040 TMVContext *tmv = avctx->priv_data;
4141 const uint8_t *src = avpkt->data;
42− uint8_t *dst, *dst_char;
42+ uint8_t *dst;
4343 unsigned char_cols = avctx->width >> 3;
4444 unsigned char_rows = avctx->height >> 3;
45− unsigned x, y, mask, char_y, fg, bg, c;
45+ unsigned x, y, fg, bg, c;
4646
4747 if (tmv->pic.data[0])
4848 avctx->release_buffer(avctx, &tmv->pic);
@@ -68,17 +68,11 @@ static int tmv_decode_frame(AVCodecContext *avctx, void *data, · 19 unmodified lines
6868
6969 for (y = 0; y < char_rows; y++) {
7070 for (x = 0; x < char_cols; x++) {
71− c = *src++ * 8;
71+ c = *src++;
7272 bg = *src >> 4;
7373 fg = *src++ & 0xF;
74−
75− dst_char = dst + x * 8;
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− }
74+ ff_draw_pc_font(dst + x * 8, tmv->pic.linesize[0],
75+ ff_cga_font, 8, c, fg, bg);
8276 }
8377 dst += tmv->pic.linesize[0] * 8;
8478 }

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