• Home
  • Raw
  • Download

Lines Matching refs:ke

45 gst_kate_spu_decode_colormap (GstKateEnc * ke, const guint8 * ptr)  in gst_kate_spu_decode_colormap()  argument
47 ke->spu_colormap[3] = ptr[0] >> 4; in gst_kate_spu_decode_colormap()
48 ke->spu_colormap[2] = ptr[0] & 0x0f; in gst_kate_spu_decode_colormap()
49 ke->spu_colormap[1] = ptr[1] >> 4; in gst_kate_spu_decode_colormap()
50 ke->spu_colormap[0] = ptr[1] & 0x0f; in gst_kate_spu_decode_colormap()
54 gst_kate_spu_decode_alpha (GstKateEnc * ke, const guint8 * ptr) in gst_kate_spu_decode_alpha() argument
56 ke->spu_alpha[3] = ptr[0] >> 4; in gst_kate_spu_decode_alpha()
57 ke->spu_alpha[2] = ptr[0] & 0x0f; in gst_kate_spu_decode_alpha()
58 ke->spu_alpha[1] = ptr[1] >> 4; in gst_kate_spu_decode_alpha()
59 ke->spu_alpha[0] = ptr[1] & 0x0f; in gst_kate_spu_decode_alpha()
63 gst_kate_spu_decode_area (GstKateEnc * ke, const guint8 * ptr) in gst_kate_spu_decode_area() argument
65 ke->spu_left = ((((guint16) ptr[0]) & 0xff) << 4) | (ptr[1] >> 4); in gst_kate_spu_decode_area()
66 ke->spu_top = ((((guint16) ptr[3]) & 0xff) << 4) | (ptr[4] >> 4); in gst_kate_spu_decode_area()
67 ke->spu_right = ((((guint16) ptr[1]) & 0x0f) << 8) | ptr[2]; in gst_kate_spu_decode_area()
68 ke->spu_bottom = ((((guint16) ptr[4]) & 0x0f) << 8) | ptr[5]; in gst_kate_spu_decode_area()
69 GST_DEBUG_OBJECT (ke, "SPU area %u %u -> %u %d", ke->spu_left, ke->spu_top, in gst_kate_spu_decode_area()
70 ke->spu_right, ke->spu_bottom); in gst_kate_spu_decode_area()
74 gst_kate_spu_decode_pixaddr (GstKateEnc * ke, const guint8 * ptr) in gst_kate_spu_decode_pixaddr() argument
76 ke->spu_pix_data[0] = GST_KATE_UINT16_BE (ptr + 0); in gst_kate_spu_decode_pixaddr()
77 ke->spu_pix_data[1] = GST_KATE_UINT16_BE (ptr + 2); in gst_kate_spu_decode_pixaddr()
82 gst_kate_spu_decode_colcon (GstKateEnc * ke, const guint8 * ptr, guint16 sz) in gst_kate_spu_decode_colcon() argument
87 GST_LOG_OBJECT (ke, "Number of bytes in color/contrast change command is %u", in gst_kate_spu_decode_colcon()
90 GST_WARNING_OBJECT (ke, in gst_kate_spu_decode_colcon()
96 GST_WARNING_OBJECT (ke, in gst_kate_spu_decode_colcon()
108 GST_LOG_OBJECT (ke, "Reading a color/contrast change entry, %u bytes left", in gst_kate_spu_decode_colcon()
111 GST_WARNING_OBJECT (ke, in gst_kate_spu_decode_colcon()
116 GST_LOG_OBJECT (ke, "Color/contrast change entry header is %08x", entry); in gst_kate_spu_decode_colcon()
121 GST_LOG_OBJECT (ke, in gst_kate_spu_decode_colcon()
126 GST_LOG_OBJECT (ke, "Color/contrast change entry has %u changes", nchanges); in gst_kate_spu_decode_colcon()
129 GST_WARNING_OBJECT (ke, in gst_kate_spu_decode_colcon()
176 gst_kate_spu_crop_bitmap (GstKateEnc * ke, kate_bitmap * kb, guint16 * dx, in gst_kate_spu_crop_bitmap() argument
188 GST_LOG_OBJECT (ke, "top line at %u is not zero: %u", x, kb->pixels[x]); in gst_kate_spu_crop_bitmap()
249 GST_LOG_OBJECT (ke, "cropped from %" G_GSIZE_FORMAT " %" G_GSIZE_FORMAT in gst_kate_spu_crop_bitmap()
265 GST_ELEMENT_ERROR (ke, STREAM, ENCODE, (NULL), ("Read outside buffer")); \
279 gst_kate_spu_decode_command_sequence (GstKateEnc * ke, GstBuffer * buf, in gst_kate_spu_decode_command_sequence() argument
289 GST_ERROR_OBJECT (ke, "Failed to map buffer"); in gst_kate_spu_decode_command_sequence()
299 GST_DEBUG_OBJECT (ke, "Decoding command sequence at %u (%u bytes)", in gst_kate_spu_decode_command_sequence()
305 GST_DEBUG_OBJECT (ke, "date %u", date); in gst_kate_spu_decode_command_sequence()
310 GST_DEBUG_OBJECT (ke, "next command sequence at %u", next_command_sequence); in gst_kate_spu_decode_command_sequence()
316 GST_DEBUG_OBJECT (ke, "[0] DISPLAY"); in gst_kate_spu_decode_command_sequence()
319 GST_DEBUG_OBJECT (ke, "[1] SHOW"); in gst_kate_spu_decode_command_sequence()
320 ke->show_time = date; in gst_kate_spu_decode_command_sequence()
323 GST_DEBUG_OBJECT (ke, "[2] HIDE"); in gst_kate_spu_decode_command_sequence()
324 ke->hide_time = date; in gst_kate_spu_decode_command_sequence()
327 GST_DEBUG_OBJECT (ke, "[3] SET COLOR"); in gst_kate_spu_decode_command_sequence()
329 gst_kate_spu_decode_colormap (ke, ptr); in gst_kate_spu_decode_command_sequence()
333 GST_DEBUG_OBJECT (ke, "[4] SET ALPHA"); in gst_kate_spu_decode_command_sequence()
335 gst_kate_spu_decode_alpha (ke, ptr); in gst_kate_spu_decode_command_sequence()
339 GST_DEBUG_OBJECT (ke, "[5] SET DISPLAY AREA"); in gst_kate_spu_decode_command_sequence()
341 gst_kate_spu_decode_area (ke, ptr); in gst_kate_spu_decode_command_sequence()
345 GST_DEBUG_OBJECT (ke, "[6] SET PIXEL ADDRESSES"); in gst_kate_spu_decode_command_sequence()
347 gst_kate_spu_decode_pixaddr (ke, ptr); in gst_kate_spu_decode_command_sequence()
348 GST_DEBUG_OBJECT (ke, " -> first pixel address %u", in gst_kate_spu_decode_command_sequence()
349 ke->spu_pix_data[0]); in gst_kate_spu_decode_command_sequence()
350 GST_DEBUG_OBJECT (ke, " -> second pixel address %u", in gst_kate_spu_decode_command_sequence()
351 ke->spu_pix_data[1]); in gst_kate_spu_decode_command_sequence()
355 GST_DEBUG_OBJECT (ke, "[7] CHANGE COLOR/CONTRAST"); in gst_kate_spu_decode_command_sequence()
357 ADVANCE (gst_kate_spu_decode_colcon (ke, ptr, sz)); in gst_kate_spu_decode_command_sequence()
360 GST_DEBUG_OBJECT (ke, "[0xff] END"); in gst_kate_spu_decode_command_sequence()
362 GST_DEBUG_OBJECT (ke, "Jumping to next sequence at offset %u", in gst_kate_spu_decode_command_sequence()
365 return gst_kate_spu_decode_command_sequence (ke, buf, in gst_kate_spu_decode_command_sequence()
369 GST_DEBUG_OBJECT (ke, "No more sequences to decode"); in gst_kate_spu_decode_command_sequence()
375 GST_ELEMENT_ERROR (ke, STREAM, ENCODE, (NULL), in gst_kate_spu_decode_command_sequence()
381 GST_ELEMENT_ERROR (ke, STREAM, ENCODE, (NULL), ("Error parsing SPU")); in gst_kate_spu_decode_command_sequence()
388 GST_ELEMENT_ERROR (ke, STREAM, DECODE, (NULL), in gst_kate_spu_decode_command_sequence()
428 gst_kate_spu_create_spu_palette (GstKateEnc * ke, kate_palette * kp) in gst_kate_spu_create_spu_palette() argument
436 GST_ELEMENT_ERROR (ke, STREAM, ENCODE, (NULL), ("Out of memory")); in gst_kate_spu_create_spu_palette()
441 int idx = ke->spu_colormap[n]; in gst_kate_spu_create_spu_palette()
442 guint32 color = ke->spu_clut[idx]; in gst_kate_spu_create_spu_palette()
451 kp->colors[n].a = ke->spu_alpha[n] * 17; in gst_kate_spu_create_spu_palette()
456 if (ke->spu_alpha[n] == 0) in gst_kate_spu_create_spu_palette()
463 kp->colors[n].a = ke->spu_alpha[n] * 17; in gst_kate_spu_create_spu_palette()
464 if (ke->spu_alpha[n]) in gst_kate_spu_create_spu_palette()
473 gst_kate_spu_decode_spu (GstKateEnc * ke, GstBuffer * buf, kate_region * kr, in gst_kate_spu_decode_spu() argument
490 GST_ERROR_OBJECT (ke, "Failed to map buffer"); in gst_kate_spu_decode_spu()
497 memset (ke->spu_colormap, 0, sizeof (ke->spu_colormap)); in gst_kate_spu_decode_spu()
498 memset (ke->spu_alpha, 0, sizeof (ke->spu_alpha)); in gst_kate_spu_decode_spu()
499 ke->spu_top = ke->spu_left = 1; in gst_kate_spu_decode_spu()
500 ke->spu_bottom = ke->spu_right = 0; in gst_kate_spu_decode_spu()
501 ke->spu_pix_data[0] = ke->spu_pix_data[1] = 0; in gst_kate_spu_decode_spu()
502 ke->show_time = ke->hide_time = 0; in gst_kate_spu_decode_spu()
508 GST_DEBUG_OBJECT (ke, "packet size %d (GstBuffer size %" G_GSIZE_FORMAT ")", in gst_kate_spu_decode_spu()
516 GST_DEBUG_OBJECT (ke, "next command sequence at %u for %u", in gst_kate_spu_decode_spu()
519 rflow = gst_kate_spu_decode_command_sequence (ke, buf, next_command_sequence); in gst_kate_spu_decode_spu()
526 if (G_UNLIKELY (ke->spu_right - ke->spu_left < 0 in gst_kate_spu_decode_spu()
527 || ke->spu_bottom - ke->spu_top < 0 || ke->spu_pix_data[0] == 0 in gst_kate_spu_decode_spu()
528 || ke->spu_pix_data[1] == 0)) { in gst_kate_spu_decode_spu()
529 GST_DEBUG_OBJECT (ke, in gst_kate_spu_decode_spu()
530 "left %d, right %d, top %d, bottom %d, pix data %d %d", ke->spu_left, in gst_kate_spu_decode_spu()
531 ke->spu_right, ke->spu_top, ke->spu_bottom, ke->spu_pix_data[0], in gst_kate_spu_decode_spu()
532 ke->spu_pix_data[1]); in gst_kate_spu_decode_spu()
533 GST_WARNING_OBJECT (ke, "SPU area is empty, nothing to encode"); in gst_kate_spu_decode_spu()
541 rflow = gst_kate_spu_create_spu_palette (ke, kp); in gst_kate_spu_decode_spu()
549 kb->width = ke->spu_right - ke->spu_left + 1; in gst_kate_spu_decode_spu()
550 kb->height = ke->spu_bottom - ke->spu_top + 1; in gst_kate_spu_decode_spu()
556 GST_ELEMENT_ERROR (ke, STREAM, ENCODE, (NULL), in gst_kate_spu_decode_spu()
562 pixptr[0] = info.data + ke->spu_pix_data[0]; in gst_kate_spu_decode_spu()
563 pixptr[1] = info.data + ke->spu_pix_data[1]; in gst_kate_spu_decode_spu()
566 max_nybbles[0] = 2 * (packet_size - ke->spu_pix_data[0]); in gst_kate_spu_decode_spu()
567 max_nybbles[1] = 2 * (packet_size - ke->spu_pix_data[1]); in gst_kate_spu_decode_spu()
572 GST_DEBUG_OBJECT (ke, "RLE overflow, clearing the remainder"); in gst_kate_spu_decode_spu()
595 GST_LOG_OBJECT (ke, "%u/%u bytes left in the data packet", in gst_kate_spu_decode_spu()
600 x = ke->spu_left; in gst_kate_spu_decode_spu()
601 y = ke->spu_top; in gst_kate_spu_decode_spu()
602 gst_kate_spu_crop_bitmap (ke, kb, &x, &y); in gst_kate_spu_decode_spu()
606 if (ke->original_canvas_width > 0 && ke->original_canvas_height > 0) { in gst_kate_spu_decode_spu()
610 kr->x = 1000000 * (size_t) x / ke->original_canvas_width; in gst_kate_spu_decode_spu()
611 kr->y = 1000000 * (size_t) y / ke->original_canvas_height; in gst_kate_spu_decode_spu()
612 kr->w = 1000000 * kb->width / ke->original_canvas_width; in gst_kate_spu_decode_spu()
613 kr->h = 1000000 * kb->height / ke->original_canvas_height; in gst_kate_spu_decode_spu()
623 if (ke->hide_time == 0) { in gst_kate_spu_decode_spu()
624 GST_INFO_OBJECT (ke, "SPU has no hide time"); in gst_kate_spu_decode_spu()