1
0
mirror of https://github.com/FFmpeg/FFmpeg.git synced 2024-12-23 12:43:46 +02:00

Merge commit 'fb845ffdd335a1efd6dfd43e8adeb530397b348e'

* commit 'fb845ffdd335a1efd6dfd43e8adeb530397b348e':
  h264: add 3 pixels below for subpixel filter wait position
  dvdsubdec: Support palette in mkv

Conflicts:
	libavcodec/dvdsubdec.c

Merged-by: Michael Niedermayer <michaelni@gmx.at>
This commit is contained in:
Michael Niedermayer 2013-01-16 12:01:21 +01:00
commit 06af724c56

View File

@ -127,8 +127,8 @@ static int decode_rle(uint8_t *bitmap, int linesize, int w, int h,
return 0;
}
static void guess_palette(uint32_t *rgba_palette,
DVDSubContext* ctx,
static void guess_palette(DVDSubContext* ctx,
uint32_t *rgba_palette,
uint32_t subtitle_color)
{
static const uint8_t level_map[4][4] = {
@ -351,7 +351,7 @@ static int decode_dvd_subtitles(DVDSubContext *ctx, AVSubtitle *sub_header,
yuv_a_to_rgba(yuv_palette, alpha, (uint32_t*)sub_header->rects[0]->pict.data[1], 256);
} else {
sub_header->rects[0]->nb_colors = 4;
guess_palette((uint32_t*)sub_header->rects[0]->pict.data[1], ctx,
guess_palette(ctx, (uint32_t*)sub_header->rects[0]->pict.data[1],
0xffff00);
}
sub_header->rects[0]->x = x1;
@ -487,7 +487,7 @@ static int dvdsub_decode(AVCodecContext *avctx,
void *data, int *data_size,
AVPacket *avpkt)
{
DVDSubContext *ctx = (DVDSubContext*) avctx->priv_data;
DVDSubContext *ctx = avctx->priv_data;
const uint8_t *buf = avpkt->data;
int buf_size = avpkt->size;
AVSubtitle *sub = data;
@ -566,7 +566,7 @@ static int dvdsub_parse_extradata(AVCodecContext *avctx)
static int dvdsub_init(AVCodecContext *avctx)
{
DVDSubContext *ctx = (DVDSubContext*) avctx->priv_data;
DVDSubContext *ctx = avctx->priv_data;
int ret;
if ((ret = dvdsub_parse_extradata(avctx)) < 0)