#endif
#include <vlc/vlc.h>
-#include <vlc/vout.h>
-#include "vlc_osd.h"
-#include "vlc_block.h"
-#include "vlc_filter.h"
+#include <vlc_vout.h>
+#include <vlc_osd.h>
+#include <vlc_block.h>
+#include <vlc_filter.h>
#include <math.h>
#define FONTSIZE_LONGTEXT N_("This is the default size of the fonts " \
"that will be rendered on the video. " \
"If set to something different than 0 this option will override the " \
- "relative font size. " )
+ "relative font size." )
#define OPACITY_TEXT N_("Opacity")
#define OPACITY_LONGTEXT N_("The opacity (inverse of transparency) of the " \
"text that will be rendered on the video. 0 = transparent, " \
#define YUVP_LONGTEXT N_("This renders the font using \"paletized YUV\". " \
"This option is only needed if you want to encode into DVB subtitles" )
#define EFFECT_TEXT N_("Font Effect")
-/// \bug [String] Missing space
-#define EFFECT_LONGTEXT N_("It is possible to apply effects to the rendered" \
+#define EFFECT_LONGTEXT N_("It is possible to apply effects to the rendered " \
"text to improve its readability." )
#define EFFECT_BACKGROUND 1
static int RenderYUVA( filter_t *p_filter, subpicture_region_t *p_region,
line_desc_t *p_line, int i_width, int i_height )
{
- static uint8_t pi_gamma[16] =
- {0x00, 0x52, 0x84, 0x96, 0xb8, 0xca, 0xdc, 0xee, 0xff,
- 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff};
-
uint8_t *p_dst_y,*p_dst_u,*p_dst_v,*p_dst_a;
video_format_t fmt;
int i, x, y, i_pitch, i_alpha;
DrawBlack( p_line, i_width, p_region, 1, 0);
DrawBlack( p_line, i_width, p_region, 0, 1);
}
-
+
if( p_filter->p_sys->i_effect == EFFECT_OUTLINE_FAT )
{
DrawBlack( p_line, i_width, p_region, -1, -1);
p_dst_u[i_offset+x] = i_u;
p_dst_v[i_offset+x] = i_v;
-
+
if( p_filter->p_sys->i_effect == EFFECT_BACKGROUND )
p_dst_a[i_offset+x] = 0xff;
}
}
}
}
-
+
/* Apply the alpha setting */
for( i = 0; i < (int)fmt.i_height * i_pitch; i++ )
p_dst_a[i] = p_dst_a[i] * (255 - i_alpha) / 255;
}
{
- char *p_in_buffer, *p_out_buffer;
+ char *p_out_buffer;
+ const char *p_in_buffer = psz_string;
size_t i_in_bytes, i_out_bytes, i_out_bytes_left, i_ret;
i_in_bytes = strlen( psz_string );
i_out_bytes = i_in_bytes * sizeof( uint32_t );
i_out_bytes_left = i_out_bytes;
- p_in_buffer = psz_string;
p_out_buffer = (char *)psz_unicode;
- i_ret = vlc_iconv( iconv_handle, &p_in_buffer, &i_in_bytes,
+ i_ret = vlc_iconv( iconv_handle, (const char**)&p_in_buffer, &i_in_bytes,
&p_out_buffer, &i_out_bytes_left );
vlc_iconv_close( iconv_handle );
{
uint32_t *p_fribidi_string;
int start_pos, pos = 0;
-
+
p_fribidi_string = malloc( (i_string_length + 1) * sizeof(uint32_t) );
/* Do bidi conversion line-by-line */