Lines Matching refs:style
112 but will come from ASS style in the future*/
115 const StyleBox *style = &s->style_attributes[j];
118 bytestream_put_be16(&p, style->style_start);
119 bytestream_put_be16(&p, style->style_end);
120 bytestream_put_be16(&p, style->style_fontID);
121 bytestream_put_byte(&p, style->style_flag);
122 bytestream_put_byte(&p, style->style_fontsize);
123 bytestream_put_be32(&p, style->style_color);
180 ASSStyle *style;
201 // 0x00, // uint8_t face-style-flags
225 style = ff_ass_style_get(s->ass_ctx, "Default");
226 if (!style && ass->styles_count) {
227 style = &ass->styles[0];
233 if (style) {
234 s->d.style_fontsize = FONTSIZE_SCALE(s, style->font_size);
235 s->d.style_color = BGR_TO_RGB(style->primary_color & 0xffffff) << 8 |
236 255 - ((uint32_t)style->primary_color >> 24);
237 s->d.style_flag = (!!style->bold * STYLE_FLAG_BOLD) |
238 (!!style->italic * STYLE_FLAG_ITALIC) |
239 (!!style->underline * STYLE_FLAG_UNDERLINE);
240 back_color = (BGR_TO_RGB(style->back_color & 0xffffff) << 8) |
241 (255 - ((uint32_t)style->back_color >> 24));
262 if (style && ass->styles_count) {
264 if (style->font_name) {
265 av_dynarray_add(&s->fonts, &s->font_count, style->font_name);
266 font_names_total_len += strlen(style->font_name);
342 // Start a new style box if needed
345 // there's an existing style entry
355 // last style != defaults, end the style entry and start a new one
371 } else { // style entry matches defaults, drop entry
378 static uint8_t mov_text_style_to_flag(const char style)
382 switch (style){
406 static void mov_text_style_cb(void *priv, const char style, int close)
409 uint8_t style_flag = mov_text_style_to_flag(style);
541 // End of text, close any open style record
545 static void mov_text_ass_style_set(MovTextContext *s, ASSStyle *style)
550 if (style) {
551 style_flags = (!!style->bold * STYLE_FLAG_BOLD) |
552 (!!style->italic * STYLE_FLAG_ITALIC) |
553 (!!style->underline * STYLE_FLAG_UNDERLINE);
555 color = BGR_TO_RGB(style->primary_color & 0xffffff) << 8;
557 alpha = 255 - ((uint32_t)style->primary_color >> 24);
559 mov_text_font_size_set(s, style->font_size);
560 mov_text_font_name_set(s, style->font_name);
562 // End current style record, go back to defaults
569 ASSStyle *style = ff_ass_style_get(s->ass_ctx, dialog->style);
571 s->ass_dialog_style = style;
572 mov_text_ass_style_set(s, style);
578 ASSStyle *style;
581 style = s->ass_dialog_style;
583 style= ff_ass_style_get(s->ass_ctx, style_name);
585 mov_text_ass_style_set(s, style);
627 .style = mov_text_style_cb,