Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- --- a/libavcodec/libzvbi-teletextdec.c 2017-02-20 06:19:29.168609733 +0100
- +++ b/libavcodec/libzvbi-teletextdec.c 2017-02-20 20:01:26.248132241 +0100
- @@ -30,7 +30,7 @@
- #include <libzvbi.h>
- #define TEXT_MAXSZ (25 * (56 + 1) * 4 + 2)
- -#define VBI_NB_COLORS 40
- +#define VBI_NB_COLORS 12
- #define VBI_TRANSPARENT_BLACK 8
- #define RGBA(r,g,b,a) (((a) << 24) | ((r) << 16) | ((g) << 8) | (b))
- #define VBI_R(rgba) (((rgba) >> 0) & 0xFF)
- @@ -255,6 +255,7 @@
- sub_rect->w = resx;
- sub_rect->h = resy;
- sub_rect->nb_colors = ctx->opacity > 0 && ctx->opacity < 255 ? 2 * VBI_NB_COLORS : VBI_NB_COLORS;
- + sub_rect->nb_colors = 16;
- sub_rect->data[1] = av_mallocz(AVPALETTE_SIZE);
- if (!sub_rect->data[1]) {
- av_freep(&sub_rect->data[0]);
- @@ -267,7 +268,7 @@
- g = VBI_G(page->color_map[ci]);
- b = VBI_B(page->color_map[ci]);
- a = VBI_A(page->color_map[ci]);
- - ((uint32_t *)sub_rect->data[1])[ci] = RGBA(r, g, b, a);
- +// ((uint32_t *)sub_rect->data[1])[ci] = RGBA(r, g, b, a);
- ((uint32_t *)sub_rect->data[1])[ci + VBI_NB_COLORS] = RGBA(r, g, b, ctx->opacity);
- ff_dlog(ctx, "palette %0x\n", ((uint32_t *)sub_rect->data[1])[ci]);
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement