Advertisement
Guest User

Untitled

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