Lines Matching refs:vobsub
40 if (state->vobsub.current_clut[idx[0]] != 0) { in gstspu_vobsub_recalc_palette()
42 guint32 col = state->vobsub.current_clut[idx[i]]; in gstspu_vobsub_recalc_palette()
77 if (state->vobsub.main_pal_dirty) { in gstspu_vobsub_update_palettes()
78 gstspu_vobsub_recalc_palette (dvdspu, state->vobsub.main_pal, in gstspu_vobsub_update_palettes()
79 state->vobsub.main_idx, state->vobsub.main_alpha); in gstspu_vobsub_update_palettes()
82 memcpy (state->vobsub.hl_ctrl_i.pix_ctrl_i[0].pal_cache, in gstspu_vobsub_update_palettes()
83 state->vobsub.main_pal, 4 * sizeof (SpuColour)); in gstspu_vobsub_update_palettes()
84 memcpy (state->vobsub.hl_ctrl_i.pix_ctrl_i[2].pal_cache, in gstspu_vobsub_update_palettes()
85 state->vobsub.main_pal, 4 * sizeof (SpuColour)); in gstspu_vobsub_update_palettes()
87 state->vobsub.main_pal_dirty = FALSE; in gstspu_vobsub_update_palettes()
90 if (state->vobsub.hl_pal_dirty) { in gstspu_vobsub_update_palettes()
92 state->vobsub.hl_ctrl_i.pix_ctrl_i[1].pal_cache, state->vobsub.hl_idx, in gstspu_vobsub_update_palettes()
93 state->vobsub.hl_alpha); in gstspu_vobsub_update_palettes()
94 state->vobsub.hl_pal_dirty = FALSE; in gstspu_vobsub_update_palettes()
98 if (state->vobsub.hl_rect.top != -1) { in gstspu_vobsub_update_palettes()
99 state->vobsub.hl_ctrl_i.top = state->vobsub.hl_rect.top; in gstspu_vobsub_update_palettes()
100 state->vobsub.hl_ctrl_i.bottom = state->vobsub.hl_rect.bottom; in gstspu_vobsub_update_palettes()
101 state->vobsub.hl_ctrl_i.n_changes = 3; in gstspu_vobsub_update_palettes()
102 state->vobsub.hl_ctrl_i.pix_ctrl_i[0].left = 0; in gstspu_vobsub_update_palettes()
103 state->vobsub.hl_ctrl_i.pix_ctrl_i[1].left = state->vobsub.hl_rect.left; in gstspu_vobsub_update_palettes()
104 state->vobsub.hl_ctrl_i.pix_ctrl_i[2].left = in gstspu_vobsub_update_palettes()
105 state->vobsub.hl_rect.right + 1; in gstspu_vobsub_update_palettes()
108 if (state->vobsub.line_ctrl_i_pal_dirty) { in gstspu_vobsub_update_palettes()
111 for (l = 0; l < state->vobsub.n_line_ctrl_i; l++) { in gstspu_vobsub_update_palettes()
112 SpuVobsubLineCtrlI *cur_line_ctrl = state->vobsub.line_ctrl_i + l; in gstspu_vobsub_update_palettes()
129 state->vobsub.line_ctrl_i_pal_dirty = FALSE; in gstspu_vobsub_update_palettes()
138 if (G_UNLIKELY (*rle_offset >= state->vobsub.max_offset)) in gstspu_vobsub_get_nibble()
141 ret = state->vobsub.pix_buf_map.data[(*rle_offset) / 2]; in gstspu_vobsub_get_nibble()
177 state->vobsub.cur_Y, x, end, colour->Y, colour->U, colour->V, colour->A); in gstspu_vobsub_draw_rle_run()
185 state->vobsub.out_Y[x] = in gstspu_vobsub_draw_rle_run()
186 (inv_A * state->vobsub.out_Y[x] + colour->Y) / 0xff; in gstspu_vobsub_draw_rle_run()
187 state->vobsub.out_U[x / 2] += colour->U; in gstspu_vobsub_draw_rle_run()
188 state->vobsub.out_V[x / 2] += colour->V; in gstspu_vobsub_draw_rle_run()
189 state->vobsub.out_A[x / 2] += colour->A; in gstspu_vobsub_draw_rle_run()
193 *(state->vobsub.comp_last_x_ptr) = end - 1; /* end is the start of the *next* run */ in gstspu_vobsub_draw_rle_run()
224 if (state->vobsub.cur_chg_col != NULL) { in gstspu_vobsub_render_line()
227 if (state->vobsub.cur_Y >= state->vobsub.cur_chg_col->top && in gstspu_vobsub_render_line()
228 state->vobsub.cur_Y <= state->vobsub.cur_chg_col->bottom) { in gstspu_vobsub_render_line()
238 state->vobsub.out_Y = planes[0]; in gstspu_vobsub_render_line()
239 state->vobsub.out_U = state->comp_bufs[0]; in gstspu_vobsub_render_line()
240 state->vobsub.out_V = state->comp_bufs[1]; in gstspu_vobsub_render_line()
241 state->vobsub.out_A = state->comp_bufs[2]; in gstspu_vobsub_render_line()
245 x = state->vobsub.disp_rect.left; in gstspu_vobsub_render_line()
246 end = state->vobsub.disp_rect.right + 1; in gstspu_vobsub_render_line()
249 colour = &state->vobsub.main_pal[rle_code & 3]; in gstspu_vobsub_render_line()
252 if (next_draw_x > state->vobsub.clip_rect.right) in gstspu_vobsub_render_line()
253 next_draw_x = state->vobsub.clip_rect.right; /* ensure no overflow */ in gstspu_vobsub_render_line()
255 if (state->vobsub.cur_Y >= state->vobsub.clip_rect.top && in gstspu_vobsub_render_line()
256 state->vobsub.cur_Y <= state->vobsub.clip_rect.bottom) in gstspu_vobsub_render_line()
267 if (state->vobsub.cur_chg_col == NULL) in gstspu_vobsub_update_chgcol()
270 if (state->vobsub.cur_Y <= state->vobsub.cur_chg_col->bottom) in gstspu_vobsub_update_chgcol()
273 while (state->vobsub.cur_chg_col < state->vobsub.cur_chg_col_end) { in gstspu_vobsub_update_chgcol()
274 if (state->vobsub.cur_Y >= state->vobsub.cur_chg_col->top && in gstspu_vobsub_update_chgcol()
275 state->vobsub.cur_Y <= state->vobsub.cur_chg_col->bottom) { in gstspu_vobsub_update_chgcol()
278 (gint16) (state->vobsub.cur_chg_col - state->vobsub.line_ctrl_i), in gstspu_vobsub_update_chgcol()
279 state->vobsub.cur_chg_col->top, state->vobsub.cur_chg_col->bottom, y); in gstspu_vobsub_update_chgcol()
283 state->vobsub.cur_chg_col++; in gstspu_vobsub_update_chgcol()
287 state->vobsub.cur_chg_col = NULL; in gstspu_vobsub_update_chgcol()
295 SpuVobsubLineCtrlI *chg_col = state->vobsub.cur_chg_col; in gstspu_vobsub_render_line_with_chgcol()
307 state->vobsub.out_Y = planes[0]; in gstspu_vobsub_render_line_with_chgcol()
308 state->vobsub.out_U = state->comp_bufs[0]; in gstspu_vobsub_render_line_with_chgcol()
309 state->vobsub.out_V = state->comp_bufs[1]; in gstspu_vobsub_render_line_with_chgcol()
310 state->vobsub.out_A = state->comp_bufs[2]; in gstspu_vobsub_render_line_with_chgcol()
316 x = state->vobsub.disp_rect.left; in gstspu_vobsub_render_line_with_chgcol()
317 disp_end = state->vobsub.disp_rect.right + 1; in gstspu_vobsub_render_line_with_chgcol()
328 dummy_pix_ctrl.pal_cache[i] = state->vobsub.main_pal[i]; in gstspu_vobsub_render_line_with_chgcol()
347 if (run_draw_end > state->vobsub.clip_rect.right) in gstspu_vobsub_render_line_with_chgcol()
348 run_draw_end = state->vobsub.clip_rect.right; /* ensure no overflow */ in gstspu_vobsub_render_line_with_chgcol()
375 state->comp_left = state->vobsub.disp_rect.left; in gstspu_vobsub_blend_comp_buffers()
377 MAX (state->vobsub.comp_last_x[0], state->vobsub.comp_last_x[1]); in gstspu_vobsub_blend_comp_buffers()
379 state->comp_left = MAX (state->comp_left, state->vobsub.clip_rect.left); in gstspu_vobsub_blend_comp_buffers()
380 state->comp_right = MIN (state->comp_right, state->vobsub.clip_rect.right); in gstspu_vobsub_blend_comp_buffers()
388 state->comp_left = state->vobsub.clip_rect.left; in gstspu_vobsub_clear_comp_buffers()
389 state->comp_right = state->vobsub.clip_rect.right; in gstspu_vobsub_clear_comp_buffers()
393 state->vobsub.comp_last_x[0] = -1; in gstspu_vobsub_clear_comp_buffers()
394 state->vobsub.comp_last_x[1] = -1; in gstspu_vobsub_clear_comp_buffers()
432 if (G_UNLIKELY (state->vobsub.pix_buf == NULL)) in gstspu_vobsub_render()
435 if (!gst_buffer_map (state->vobsub.pix_buf, &state->vobsub.pix_buf_map, in gstspu_vobsub_render()
453 state->vobsub.disp_rect.left, state->vobsub.disp_rect.top, in gstspu_vobsub_render()
454 state->vobsub.disp_rect.right, state->vobsub.disp_rect.bottom, in gstspu_vobsub_render()
455 state->vobsub.hl_rect.left, state->vobsub.hl_rect.top, in gstspu_vobsub_render()
456 state->vobsub.hl_rect.right, state->vobsub.hl_rect.bottom); in gstspu_vobsub_render()
461 state->vobsub.cur_offsets[0] = state->vobsub.pix_data[0] * 2; in gstspu_vobsub_render()
462 state->vobsub.cur_offsets[1] = state->vobsub.pix_data[1] * 2; in gstspu_vobsub_render()
463 state->vobsub.max_offset = state->vobsub.pix_buf_map.size * 2; in gstspu_vobsub_render()
469 if (state->vobsub.hl_rect.top != -1) { in gstspu_vobsub_render()
470 state->vobsub.cur_chg_col = &state->vobsub.hl_ctrl_i; in gstspu_vobsub_render()
471 state->vobsub.cur_chg_col_end = state->vobsub.cur_chg_col + 1; in gstspu_vobsub_render()
472 } else if (state->vobsub.n_line_ctrl_i > 0) { in gstspu_vobsub_render()
473 state->vobsub.cur_chg_col = state->vobsub.line_ctrl_i; in gstspu_vobsub_render()
474 state->vobsub.cur_chg_col_end = in gstspu_vobsub_render()
475 state->vobsub.cur_chg_col + state->vobsub.n_line_ctrl_i; in gstspu_vobsub_render()
477 state->vobsub.cur_chg_col = NULL; in gstspu_vobsub_render()
479 state->vobsub.clip_rect.left = state->vobsub.disp_rect.left; in gstspu_vobsub_render()
480 state->vobsub.clip_rect.right = state->vobsub.disp_rect.right; in gstspu_vobsub_render()
483 if (width <= state->vobsub.disp_rect.right) { in gstspu_vobsub_render()
486 disp_width = state->vobsub.disp_rect.right - state->vobsub.disp_rect.left in gstspu_vobsub_render()
489 state->vobsub.disp_rect.left = left; in gstspu_vobsub_render()
490 state->vobsub.disp_rect.right = left + disp_width - 1; in gstspu_vobsub_render()
493 if (state->vobsub.disp_rect.right >= width) { in gstspu_vobsub_render()
494 gint shift = state->vobsub.disp_rect.right - width - 1; in gstspu_vobsub_render()
495 if (shift > state->vobsub.disp_rect.left) in gstspu_vobsub_render()
496 shift = state->vobsub.disp_rect.left; in gstspu_vobsub_render()
497 state->vobsub.disp_rect.left -= shift; in gstspu_vobsub_render()
498 state->vobsub.disp_rect.right -= shift; in gstspu_vobsub_render()
502 state->vobsub.clip_rect.left = state->vobsub.disp_rect.left; in gstspu_vobsub_render()
503 state->vobsub.clip_rect.right = state->vobsub.disp_rect.right; in gstspu_vobsub_render()
506 if (state->vobsub.clip_rect.right >= width) in gstspu_vobsub_render()
507 state->vobsub.clip_rect.right = width - 1; in gstspu_vobsub_render()
510 "clipping width to %d,%d", state->vobsub.clip_rect.left, in gstspu_vobsub_render()
511 state->vobsub.clip_rect.right); in gstspu_vobsub_render()
517 state->vobsub.clip_rect.top = state->vobsub.disp_rect.top; in gstspu_vobsub_render()
518 state->vobsub.clip_rect.bottom = state->vobsub.disp_rect.bottom; in gstspu_vobsub_render()
519 if (height <= state->vobsub.disp_rect.bottom) { in gstspu_vobsub_render()
522 gint shift = state->vobsub.disp_rect.bottom - height - 1; in gstspu_vobsub_render()
523 if (shift > state->vobsub.disp_rect.top) in gstspu_vobsub_render()
524 shift = state->vobsub.disp_rect.top; in gstspu_vobsub_render()
525 state->vobsub.disp_rect.top -= shift; in gstspu_vobsub_render()
526 state->vobsub.disp_rect.bottom -= shift; in gstspu_vobsub_render()
529 if (state->vobsub.disp_rect.top & 1) { in gstspu_vobsub_render()
530 state->vobsub.disp_rect.top--; in gstspu_vobsub_render()
531 state->vobsub.disp_rect.bottom--; in gstspu_vobsub_render()
535 state->vobsub.clip_rect.top = state->vobsub.disp_rect.top; in gstspu_vobsub_render()
536 state->vobsub.clip_rect.bottom = state->vobsub.disp_rect.bottom; in gstspu_vobsub_render()
539 if (state->vobsub.clip_rect.bottom >= height) in gstspu_vobsub_render()
540 state->vobsub.clip_rect.bottom = height - 1; in gstspu_vobsub_render()
543 "clipping height to %d,%d", state->vobsub.clip_rect.top, in gstspu_vobsub_render()
544 state->vobsub.clip_rect.bottom); in gstspu_vobsub_render()
548 y = state->vobsub.disp_rect.top; in gstspu_vobsub_render()
553 if (y > state->vobsub.disp_rect.bottom) in gstspu_vobsub_render()
562 state->vobsub.cur_Y = y; in gstspu_vobsub_render()
563 if (state->vobsub.cur_Y & 0x1) { in gstspu_vobsub_render()
566 clip = (state->vobsub.cur_Y < state->vobsub.clip_rect.top in gstspu_vobsub_render()
567 || state->vobsub.cur_Y > state->vobsub.clip_rect.bottom); in gstspu_vobsub_render()
572 state->vobsub.comp_last_x_ptr = state->vobsub.comp_last_x + 1; in gstspu_vobsub_render()
575 &state->vobsub.cur_offsets[offset_index]); in gstspu_vobsub_render()
581 state->vobsub.cur_Y++; in gstspu_vobsub_render()
589 last_y = (state->vobsub.disp_rect.bottom - 1) & ~(0x01); in gstspu_vobsub_render()
590 for (; state->vobsub.cur_Y <= last_y; state->vobsub.cur_Y++) { in gstspu_vobsub_render()
593 clip = (state->vobsub.cur_Y < state->vobsub.clip_rect.top in gstspu_vobsub_render()
594 || state->vobsub.cur_Y > state->vobsub.clip_rect.bottom); in gstspu_vobsub_render()
599 state->vobsub.comp_last_x_ptr = state->vobsub.comp_last_x; in gstspu_vobsub_render()
601 &state->vobsub.cur_offsets[offset_index]); in gstspu_vobsub_render()
608 state->vobsub.cur_Y++; in gstspu_vobsub_render()
611 state->vobsub.comp_last_x_ptr = state->vobsub.comp_last_x + 1; in gstspu_vobsub_render()
614 &state->vobsub.cur_offsets[offset_index]); in gstspu_vobsub_render()
629 if (state->vobsub.cur_Y == state->vobsub.disp_rect.bottom) { in gstspu_vobsub_render()
632 clip = (state->vobsub.cur_Y < state->vobsub.clip_rect.top in gstspu_vobsub_render()
633 || state->vobsub.cur_Y > state->vobsub.clip_rect.bottom); in gstspu_vobsub_render()
635 g_return_if_fail ((state->vobsub.disp_rect.bottom & 0x01) == 0); in gstspu_vobsub_render()
641 state->vobsub.comp_last_x_ptr = state->vobsub.comp_last_x; in gstspu_vobsub_render()
644 &state->vobsub.cur_offsets[offset_index]); in gstspu_vobsub_render()
652 gstspu_vobsub_draw_highlight (state, frame, &state->vobsub.disp_rect); in gstspu_vobsub_render()
656 && state->vobsub.hl_rect.top != -1) { in gstspu_vobsub_render()
657 gstspu_vobsub_draw_highlight (state, frame, &state->vobsub.hl_rect); in gstspu_vobsub_render()
660 gst_buffer_unmap (state->vobsub.pix_buf, &state->vobsub.pix_buf_map); in gstspu_vobsub_render()