Mercurial > libavcodec.hg
comparison dvbsubdec.c @ 8516:315b302fcd1d libavcodec
Replace AVSubtitleRect.rgba_palette and bitmap by AVPicture.
author | michael |
---|---|
date | Sat, 03 Jan 2009 19:17:18 +0000 |
parents | aa45029f5cd7 |
children | 04423b2f6e0b |
comparison
equal
deleted
inserted
replaced
8515:45506d633cdc | 8516:315b302fcd1d |
---|---|
1303 rect->x = display->x_pos; | 1303 rect->x = display->x_pos; |
1304 rect->y = display->y_pos; | 1304 rect->y = display->y_pos; |
1305 rect->w = region->width; | 1305 rect->w = region->width; |
1306 rect->h = region->height; | 1306 rect->h = region->height; |
1307 rect->nb_colors = 16; | 1307 rect->nb_colors = 16; |
1308 rect->linesize = region->width; | 1308 rect->pict.linesize[0] = region->width; |
1309 | 1309 |
1310 clut = get_clut(ctx, region->clut); | 1310 clut = get_clut(ctx, region->clut); |
1311 | 1311 |
1312 if (!clut) | 1312 if (!clut) |
1313 clut = &default_clut; | 1313 clut = &default_clut; |
1323 default: | 1323 default: |
1324 clut_table = clut->clut16; | 1324 clut_table = clut->clut16; |
1325 break; | 1325 break; |
1326 } | 1326 } |
1327 | 1327 |
1328 rect->rgba_palette = av_malloc((1 << region->depth) * sizeof(uint32_t)); | 1328 rect->pict.data[1] = av_malloc((1 << region->depth) * sizeof(uint32_t)); |
1329 memcpy(rect->rgba_palette, clut_table, (1 << region->depth) * sizeof(uint32_t)); | 1329 memcpy(rect->pict.data[1], clut_table, (1 << region->depth) * sizeof(uint32_t)); |
1330 | 1330 |
1331 rect->bitmap = av_malloc(region->buf_size); | 1331 rect->pict.data[0] = av_malloc(region->buf_size); |
1332 memcpy(rect->bitmap, region->pbuf, region->buf_size); | 1332 memcpy(rect->pict.data[0], region->pbuf, region->buf_size); |
1333 | 1333 |
1334 i++; | 1334 i++; |
1335 } | 1335 } |
1336 | 1336 |
1337 sub->num_rects = i; | 1337 sub->num_rects = i; |