Mercurial > libavcodec.hg
comparison dvdsubdec.c @ 5941:d030978bcd93 libavcodec
remove some empty close/init functions in avcodec
patch by Alex
author | aurel |
---|---|
date | Sun, 25 Nov 2007 17:31:55 +0000 |
parents | 392483301260 |
children | dfdff1ca78a7 |
comparison
equal
deleted
inserted
replaced
5940:d63186919b60 | 5941:d030978bcd93 |
---|---|
38 cr = *ycbcr++; | 38 cr = *ycbcr++; |
39 YUV_TO_RGB1_CCIR(cb, cr); | 39 YUV_TO_RGB1_CCIR(cb, cr); |
40 YUV_TO_RGB2_CCIR(r, g, b, y); | 40 YUV_TO_RGB2_CCIR(r, g, b, y); |
41 *rgba++ = (*alpha++ << 24) | (r << 16) | (g << 8) | b; | 41 *rgba++ = (*alpha++ << 24) | (r << 16) | (g << 8) | b; |
42 } | 42 } |
43 } | |
44 | |
45 static int dvdsub_init_decoder(AVCodecContext *avctx) | |
46 { | |
47 return 0; | |
48 } | 43 } |
49 | 44 |
50 static int decode_run_2bit(GetBitContext *gb, int *color) | 45 static int decode_run_2bit(GetBitContext *gb, int *color) |
51 { | 46 { |
52 unsigned int v, t; | 47 unsigned int v, t; |
441 s->rects[0].x += x1; | 436 s->rects[0].x += x1; |
442 s->rects[0].y += y1; | 437 s->rects[0].y += y1; |
443 return 1; | 438 return 1; |
444 } | 439 } |
445 | 440 |
446 static int dvdsub_close_decoder(AVCodecContext *avctx) | |
447 { | |
448 return 0; | |
449 } | |
450 | |
451 #ifdef DEBUG | 441 #ifdef DEBUG |
452 #undef fprintf | 442 #undef fprintf |
453 static void ppm_save(const char *filename, uint8_t *bitmap, int w, int h, | 443 static void ppm_save(const char *filename, uint8_t *bitmap, int w, int h, |
454 uint32_t *rgba_palette) | 444 uint32_t *rgba_palette) |
455 { | 445 { |
510 AVCodec dvdsub_decoder = { | 500 AVCodec dvdsub_decoder = { |
511 "dvdsub", | 501 "dvdsub", |
512 CODEC_TYPE_SUBTITLE, | 502 CODEC_TYPE_SUBTITLE, |
513 CODEC_ID_DVD_SUBTITLE, | 503 CODEC_ID_DVD_SUBTITLE, |
514 0, | 504 0, |
515 dvdsub_init_decoder, | |
516 NULL, | 505 NULL, |
517 dvdsub_close_decoder, | 506 NULL, |
507 NULL, | |
518 dvdsub_decode, | 508 dvdsub_decode, |
519 }; | 509 }; |