summaryrefslogtreecommitdiff
path: root/libavcodec/dvbsub.c
diff options
context:
space:
mode:
authorMichael Niedermayer <michaelni@gmx.at>2009-01-03 19:17:18 +0000
committerMichael Niedermayer <michaelni@gmx.at>2009-01-03 19:17:18 +0000
commit25b4c651a3de58ea14c59131c650593736004686 (patch)
tree5cc7c45e50b84d7e8ff0826a9cd932562f07b664 /libavcodec/dvbsub.c
parentebc466bb5fdbfef71700d5f56ffb3cb10e8a3868 (diff)
Replace AVSubtitleRect.rgba_palette and bitmap by AVPicture.
Originally committed as revision 16416 to svn://svn.ffmpeg.org/ffmpeg/trunk
Diffstat (limited to 'libavcodec/dvbsub.c')
-rw-r--r--libavcodec/dvbsub.c13
1 files changed, 7 insertions, 6 deletions
diff --git a/libavcodec/dvbsub.c b/libavcodec/dvbsub.c
index bfc0be2479..ed548e2bd3 100644
--- a/libavcodec/dvbsub.c
+++ b/libavcodec/dvbsub.c
@@ -262,10 +262,11 @@ static int encode_dvb_subtitles(DVBSubtitleContext *s,
*q++ = (1 << (7 - bpp_index)) | (0xf << 1) | 1; /* 2 bits/pixel full range */
{
int a, r, g, b;
- a = (h->rects[clut_id]->rgba_palette[i] >> 24) & 0xff;
- r = (h->rects[clut_id]->rgba_palette[i] >> 16) & 0xff;
- g = (h->rects[clut_id]->rgba_palette[i] >> 8) & 0xff;
- b = (h->rects[clut_id]->rgba_palette[i] >> 0) & 0xff;
+ uint32_t x= ((uint32_t*)h->rects[clut_id]->pict.data[1])[i];
+ a = (x >> 24) & 0xff;
+ r = (x >> 16) & 0xff;
+ g = (x >> 8) & 0xff;
+ b = (x >> 0) & 0xff;
*q++ = RGB_TO_Y_CCIR(r, g, b);
*q++ = RGB_TO_V_CCIR(r, g, b, 0);
@@ -358,10 +359,10 @@ static int encode_dvb_subtitles(DVBSubtitleContext *s,
dvb_encode_rle = dvb_encode_rle4;
top_ptr = q;
- dvb_encode_rle(&q, h->rects[object_id]->bitmap, h->rects[object_id]->w * 2,
+ dvb_encode_rle(&q, h->rects[object_id]->pict.data[0], h->rects[object_id]->w * 2,
h->rects[object_id]->w, h->rects[object_id]->h >> 1);
bottom_ptr = q;
- dvb_encode_rle(&q, h->rects[object_id]->bitmap + h->rects[object_id]->w,
+ dvb_encode_rle(&q, h->rects[object_id]->pict.data[0] + h->rects[object_id]->w,
h->rects[object_id]->w * 2, h->rects[object_id]->w,
h->rects[object_id]->h >> 1);