#include "subsdec.h"
#include <vlc_plugin.h>
+#include <assert.h>
/*****************************************************************************
* Local prototypes
* Module descriptor.
*****************************************************************************/
-vlc_module_begin();
- set_capability( "decoder", 40 );
- set_shortname( N_("USFSubs"));
- set_description( N_("USF subtitles decoder") );
- set_callbacks( OpenDecoder, CloseDecoder );
- set_category( CAT_INPUT );
- set_subcategory( SUBCAT_INPUT_SCODEC );
+vlc_module_begin ()
+ set_capability( "decoder", 40 )
+ set_shortname( N_("USFSubs"))
+ set_description( N_("USF subtitles decoder") )
+ set_callbacks( OpenDecoder, CloseDecoder )
+ set_category( CAT_INPUT )
+ set_subcategory( SUBCAT_INPUT_SCODEC )
/* We inherit subsdec-align and subsdec-formatted from subsdec.c */
-vlc_module_end();
+vlc_module_end ()
/*****************************************************************************
* OpenDecoder: probe the decoder and return score
{
decoder_t *p_dec = (decoder_t*)p_this;
decoder_sys_t *p_sys;
- vlc_value_t val;
if( p_dec->fmt_in.i_codec != VLC_FOURCC('u','s','f',' ') )
- {
return VLC_EGENERIC;
- }
-
- p_dec->pf_decode_sub = DecodeBlock;
/* Allocate the memory needed to store the decoder's structure */
- if( ( p_dec->p_sys = p_sys =
- (decoder_sys_t *)calloc(1, sizeof(decoder_sys_t)) ) == NULL )
- {
+ if( ( p_dec->p_sys = p_sys = calloc(1, sizeof(decoder_sys_t)) ) == NULL )
return VLC_ENOMEM;
- }
+
+ p_dec->pf_decode_sub = DecodeBlock;
+ p_dec->fmt_out.i_cat = SPU_ES;
+ p_dec->fmt_out.i_codec = 0;
/* Unused fields of p_sys - not needed for USF decoding */
p_sys->b_ass = false;
/* init of p_sys */
p_sys->i_align = 0;
- p_sys->i_original_height = -1;
- p_sys->i_original_width = -1;
+ p_sys->i_original_height = 0;
+ p_sys->i_original_width = 0;
TAB_INIT( p_sys->i_ssa_styles, p_sys->pp_ssa_styles );
TAB_INIT( p_sys->i_images, p_sys->pp_images );
/* USF subtitles are mandated to be UTF-8, so don't need vlc_iconv */
- var_Create( p_dec, "subsdec-align", VLC_VAR_INTEGER | VLC_VAR_DOINHERIT );
- var_Get( p_dec, "subsdec-align", &val );
- p_sys->i_align = val.i_int;
+ p_sys->i_align = var_CreateGetInteger( p_dec, "subsdec-align" );
ParseImageAttachments( p_dec );
return NULL;
p_block = *pp_block;
- if( p_block->i_rate != 0 )
- p_block->i_length = p_block->i_length * p_block->i_rate / INPUT_RATE_DEFAULT;
p_spu = ParseText( p_dec, p_block );
continue;
free( p_sys->pp_ssa_styles[i]->psz_stylename );
+ //FIXME: Make font_style a pointer and use text_style_* functions
free( p_sys->pp_ssa_styles[i]->font_style.psz_fontname );
free( p_sys->pp_ssa_styles[i] );
}
}
/* Create the subpicture unit */
- p_spu = p_dec->pf_spu_buffer_new( p_dec );
+ p_spu = decoder_NewSubpicture( p_dec );
if( !p_spu )
{
msg_Warn( p_dec, "can't get spu buffer" );
static ssa_style_t *ParseStyle( decoder_sys_t *p_sys, char *psz_subtitle )
{
- ssa_style_t *p_style = NULL;
+ ssa_style_t *p_ssa_style = NULL;
char *psz_style = GrabAttributeValue( "style", psz_subtitle );
if( psz_style )
for( i = 0; i < p_sys->i_ssa_styles; i++ )
{
if( !strcmp( p_sys->pp_ssa_styles[i]->psz_stylename, psz_style ) )
- p_style = p_sys->pp_ssa_styles[i];
+ p_ssa_style = p_sys->pp_ssa_styles[i];
}
free( psz_style );
}
- return p_style;
+ return p_ssa_style;
}
static int ParsePositionAttributeList( char *psz_subtitle, int *i_align,
/* Create a new subpicture region */
memset( &fmt, 0, sizeof(video_format_t) );
- fmt.i_chroma = VLC_FOURCC('T','E','X','T');
+ fmt.i_chroma = VLC_CODEC_TEXT;
fmt.i_aspect = 0;
fmt.i_width = fmt.i_height = 0;
fmt.i_x_offset = fmt.i_y_offset = 0;
- p_text_region = p_spu->pf_create_region( VLC_OBJECT(p_dec), &fmt );
+ p_text_region = subpicture_region_New( &fmt );
if( p_text_region != NULL )
{
- ssa_style_t *p_style = NULL;
+ ssa_style_t *p_ssa_style = NULL;
p_text_region->psz_text = NULL;
p_text_region->psz_html = strndup( psz_subtitle, i_len );
if( ! p_text_region->psz_html )
{
- p_spu->pf_destroy_region( VLC_OBJECT(p_dec), p_text_region );
+ subpicture_region_Delete( p_text_region );
return NULL;
}
- p_style = ParseStyle( p_sys, p_text_region->psz_html );
- if( !p_style )
+ p_ssa_style = ParseStyle( p_sys, p_text_region->psz_html );
+ if( !p_ssa_style )
{
int i;
for( i = 0; i < p_sys->i_ssa_styles; i++ )
{
if( !strcasecmp( p_sys->pp_ssa_styles[i]->psz_stylename, "Default" ) )
- p_style = p_sys->pp_ssa_styles[i];
+ p_ssa_style = p_sys->pp_ssa_styles[i];
}
}
- if( p_style )
+ if( p_ssa_style )
{
- msg_Dbg( p_dec, "style is: %s", p_style->psz_stylename );
+ msg_Dbg( p_dec, "style is: %s", p_ssa_style->psz_stylename );
- p_text_region->p_style = &p_style->font_style;
- p_text_region->i_align = p_style->i_align;
+ p_text_region->p_style = text_style_Duplicate( &p_ssa_style->font_style );
+ p_text_region->i_align = p_ssa_style->i_align;
/* TODO: Setup % based offsets properly, without adversely affecting
* everything else in vlc. Will address with separate patch,
* to prevent this one being any more complicated.
- * p_style->i_margin_percent_h;
- * p_style->i_margin_percent_v;
+ * p_ssa_style->i_margin_percent_h;
+ * p_ssa_style->i_margin_percent_v;
*/
- p_text_region->i_x = p_style->i_margin_h;
- p_text_region->i_y = p_style->i_margin_v;
+ p_text_region->i_x = p_ssa_style->i_margin_h;
+ p_text_region->i_y = p_ssa_style->i_margin_v;
}
else
{
input_attachment_t *p_attach = pp_attachments[k];
- vlc_fourcc_t type = 0;
-
- if( ( !strcmp( p_attach->psz_mime, "image/bmp" ) ) || /* BMP */
- ( !strcmp( p_attach->psz_mime, "image/x-bmp" ) ) ||
- ( !strcmp( p_attach->psz_mime, "image/x-bitmap" ) ) ||
- ( !strcmp( p_attach->psz_mime, "image/x-ms-bmp" ) ) )
- {
- type = VLC_FOURCC('b','m','p',' ');
- }
- else if( ( !strcmp( p_attach->psz_mime, "image/x-portable-anymap" ) ) || /* PNM */
- ( !strcmp( p_attach->psz_mime, "image/x-portable-bitmap" ) ) || /* PBM */
- ( !strcmp( p_attach->psz_mime, "image/x-portable-graymap" ) ) || /* PGM */
- ( !strcmp( p_attach->psz_mime, "image/x-portable-pixmap" ) ) ) /* PPM */
- {
- type = VLC_FOURCC('p','n','m',' ');
- }
- else if ( !strcmp( p_attach->psz_mime, "image/gif" ) ) /* GIF */
- type = VLC_FOURCC('g','i','f',' ');
- else if ( !strcmp( p_attach->psz_mime, "image/jpeg" ) ) /* JPG, JPEG */
- type = VLC_FOURCC('j','p','e','g');
- else if ( !strcmp( p_attach->psz_mime, "image/pcx" ) ) /* PCX */
- type = VLC_FOURCC('p','c','x',' ');
- else if ( !strcmp( p_attach->psz_mime, "image/png" ) ) /* PNG */
- type = VLC_FOURCC('p','n','g',' ');
- else if ( !strcmp( p_attach->psz_mime, "image/tiff" ) ) /* TIF, TIFF */
- type = VLC_FOURCC('t','i','f','f');
- else if ( !strcmp( p_attach->psz_mime, "image/x-tga" ) ) /* TGA */
- type = VLC_FOURCC('t','g','a',' ');
- else if ( !strcmp( p_attach->psz_mime, "image/x-xpixmap") ) /* XPM */
- type = VLC_FOURCC('x','p','m',' ');
+ vlc_fourcc_t type = image_Mime2Fourcc( p_attach->psz_mime );
if( ( type != 0 ) &&
( p_attach->i_data > 0 ) &&
memset( &fmt_out, 0, sizeof( video_format_t));
fmt_in.i_chroma = type;
- fmt_out.i_chroma = VLC_FOURCC('Y','U','V','A');
+ fmt_out.i_chroma = VLC_CODEC_YUVA;
/* Find a suitable decoder module */
- if( module_Exists( p_dec, "sdl_image" ) )
+ if( module_exists( "sdl_image" ) )
{
/* ffmpeg thinks it can handle bmp properly but it can't (at least
* not all of them), so use sdl_image if it is available */
{
decoder_sys_t *p_sys = p_dec->p_sys;
char *psz_node;
- ssa_style_t *p_style = NULL;
+ ssa_style_t *p_ssa_style = NULL;
int i_style_level = 0;
int i_metadata_level = 0;
case 2:
if( !strcasecmp( "style", psz_node ) )
{
- TAB_APPEND( p_sys->i_ssa_styles, p_sys->pp_ssa_styles, p_style );
+ TAB_APPEND( p_sys->i_ssa_styles, p_sys->pp_ssa_styles, p_ssa_style );
- p_style = NULL;
+ p_ssa_style = NULL;
i_style_level--;
}
break;
{
i_style_level++;
- p_style = calloc( 1, sizeof(ssa_style_t) );
- if( ! p_style )
+ p_ssa_style = calloc( 1, sizeof(ssa_style_t) );
+ if( !p_ssa_style )
{
free( psz_node );
- break;
+ return;
}
/* All styles are supposed to default to Default, and then
* one or more settings are over-ridden.
{
ssa_style_t *p_default_style = p_sys->pp_ssa_styles[i];
- memcpy( p_style, p_default_style, sizeof( ssa_style_t ) );
- p_style->font_style.psz_fontname = strdup( p_style->font_style.psz_fontname );
- p_style->psz_stylename = NULL;
+ memcpy( p_ssa_style, p_default_style, sizeof( ssa_style_t ) );
+ //FIXME: Make font_style a pointer. Actually we double copy some data here,
+ // we use text_style_Copy to avoid copying psz_fontname, though .
+ text_style_Copy( &p_ssa_style->font_style, &p_default_style->font_style );
+ p_ssa_style->psz_stylename = NULL;
}
}
if( psz_name && psz_value )
{
if( !strcasecmp( "name", psz_name ) )
- p_style->psz_stylename = strdup( psz_value);
+ p_ssa_style->psz_stylename = strdup( psz_value );
}
free( psz_name );
free( psz_value );
{
if( !strcasecmp( "face", psz_name ) )
{
- free( p_style->font_style.psz_fontname );
- p_style->font_style.psz_fontname = strdup( psz_value );
+ free( p_ssa_style->font_style.psz_fontname );
+ p_ssa_style->font_style.psz_fontname = strdup( psz_value );
}
else if( !strcasecmp( "size", psz_name ) )
{
int i_value = atoi( psz_value );
if( ( i_value >= -5 ) && ( i_value <= 5 ) )
- p_style->font_style.i_font_size +=
- ( i_value * p_style->font_style.i_font_size ) / 10;
+ p_ssa_style->font_style.i_font_size +=
+ ( i_value * p_ssa_style->font_style.i_font_size ) / 10;
else if( i_value < -5 )
- p_style->font_style.i_font_size = - i_value;
+ p_ssa_style->font_style.i_font_size = - i_value;
else if( i_value > 5 )
- p_style->font_style.i_font_size = i_value;
+ p_ssa_style->font_style.i_font_size = i_value;
}
else
- p_style->font_style.i_font_size = atoi( psz_value );
+ p_ssa_style->font_style.i_font_size = atoi( psz_value );
}
else if( !strcasecmp( "italic", psz_name ) )
{
if( !strcasecmp( "yes", psz_value ))
- p_style->font_style.i_style_flags |= STYLE_ITALIC;
+ p_ssa_style->font_style.i_style_flags |= STYLE_ITALIC;
else
- p_style->font_style.i_style_flags &= ~STYLE_ITALIC;
+ p_ssa_style->font_style.i_style_flags &= ~STYLE_ITALIC;
}
else if( !strcasecmp( "weight", psz_name ) )
{
if( !strcasecmp( "bold", psz_value ))
- p_style->font_style.i_style_flags |= STYLE_BOLD;
+ p_ssa_style->font_style.i_style_flags |= STYLE_BOLD;
else
- p_style->font_style.i_style_flags &= ~STYLE_BOLD;
+ p_ssa_style->font_style.i_style_flags &= ~STYLE_BOLD;
}
else if( !strcasecmp( "underline", psz_name ) )
{
if( !strcasecmp( "yes", psz_value ))
- p_style->font_style.i_style_flags |= STYLE_UNDERLINE;
+ p_ssa_style->font_style.i_style_flags |= STYLE_UNDERLINE;
else
- p_style->font_style.i_style_flags &= ~STYLE_UNDERLINE;
+ p_ssa_style->font_style.i_style_flags &= ~STYLE_UNDERLINE;
}
else if( !strcasecmp( "color", psz_name ) )
{
if( *psz_value == '#' )
{
unsigned long col = strtol(psz_value+1, NULL, 16);
- p_style->font_style.i_font_color = (col & 0x00ffffff);
- p_style->font_style.i_font_alpha = (col >> 24) & 0xff;
+ p_ssa_style->font_style.i_font_color = (col & 0x00ffffff);
+ p_ssa_style->font_style.i_font_alpha = (col >> 24) & 0xff;
}
}
else if( !strcasecmp( "outline-color", psz_name ) )
if( *psz_value == '#' )
{
unsigned long col = strtol(psz_value+1, NULL, 16);
- p_style->font_style.i_outline_color = (col & 0x00ffffff);
- p_style->font_style.i_outline_alpha = (col >> 24) & 0xff;
+ p_ssa_style->font_style.i_outline_color = (col & 0x00ffffff);
+ p_ssa_style->font_style.i_outline_alpha = (col >> 24) & 0xff;
}
}
else if( !strcasecmp( "outline-level", psz_name ) )
{
- p_style->font_style.i_outline_width = atoi( psz_value );
+ p_ssa_style->font_style.i_outline_width = atoi( psz_value );
}
else if( !strcasecmp( "shadow-color", psz_name ) )
{
if( *psz_value == '#' )
{
unsigned long col = strtol(psz_value+1, NULL, 16);
- p_style->font_style.i_shadow_color = (col & 0x00ffffff);
- p_style->font_style.i_shadow_alpha = (col >> 24) & 0xff;
+ p_ssa_style->font_style.i_shadow_color = (col & 0x00ffffff);
+ p_ssa_style->font_style.i_shadow_alpha = (col >> 24) & 0xff;
}
}
else if( !strcasecmp( "shadow-level", psz_name ) )
{
- p_style->font_style.i_shadow_width = atoi( psz_value );
+ p_ssa_style->font_style.i_shadow_width = atoi( psz_value );
}
else if( !strcasecmp( "back-color", psz_name ) )
{
if( *psz_value == '#' )
{
unsigned long col = strtol(psz_value+1, NULL, 16);
- p_style->font_style.i_karaoke_background_color = (col & 0x00ffffff);
- p_style->font_style.i_karaoke_background_alpha = (col >> 24) & 0xff;
+ p_ssa_style->font_style.i_karaoke_background_color = (col & 0x00ffffff);
+ p_ssa_style->font_style.i_karaoke_background_alpha = (col >> 24) & 0xff;
}
}
else if( !strcasecmp( "spacing", psz_name ) )
{
- p_style->font_style.i_spacing = atoi( psz_value );
+ p_ssa_style->font_style.i_spacing = atoi( psz_value );
}
}
free( psz_name );
if( !strcasecmp( "alignment", psz_name ) )
{
if( !strcasecmp( "TopLeft", psz_value ) )
- p_style->i_align = SUBPICTURE_ALIGN_TOP | SUBPICTURE_ALIGN_LEFT;
+ p_ssa_style->i_align = SUBPICTURE_ALIGN_TOP | SUBPICTURE_ALIGN_LEFT;
else if( !strcasecmp( "TopCenter", psz_value ) )
- p_style->i_align = SUBPICTURE_ALIGN_TOP;
+ p_ssa_style->i_align = SUBPICTURE_ALIGN_TOP;
else if( !strcasecmp( "TopRight", psz_value ) )
- p_style->i_align = SUBPICTURE_ALIGN_TOP | SUBPICTURE_ALIGN_RIGHT;
+ p_ssa_style->i_align = SUBPICTURE_ALIGN_TOP | SUBPICTURE_ALIGN_RIGHT;
else if( !strcasecmp( "MiddleLeft", psz_value ) )
- p_style->i_align = SUBPICTURE_ALIGN_LEFT;
+ p_ssa_style->i_align = SUBPICTURE_ALIGN_LEFT;
else if( !strcasecmp( "MiddleCenter", psz_value ) )
- p_style->i_align = 0;
+ p_ssa_style->i_align = 0;
else if( !strcasecmp( "MiddleRight", psz_value ) )
- p_style->i_align = SUBPICTURE_ALIGN_RIGHT;
+ p_ssa_style->i_align = SUBPICTURE_ALIGN_RIGHT;
else if( !strcasecmp( "BottomLeft", psz_value ) )
- p_style->i_align = SUBPICTURE_ALIGN_BOTTOM | SUBPICTURE_ALIGN_LEFT;
+ p_ssa_style->i_align = SUBPICTURE_ALIGN_BOTTOM | SUBPICTURE_ALIGN_LEFT;
else if( !strcasecmp( "BottomCenter", psz_value ) )
- p_style->i_align = SUBPICTURE_ALIGN_BOTTOM;
+ p_ssa_style->i_align = SUBPICTURE_ALIGN_BOTTOM;
else if( !strcasecmp( "BottomRight", psz_value ) )
- p_style->i_align = SUBPICTURE_ALIGN_BOTTOM | SUBPICTURE_ALIGN_RIGHT;
+ p_ssa_style->i_align = SUBPICTURE_ALIGN_BOTTOM | SUBPICTURE_ALIGN_RIGHT;
}
else if( !strcasecmp( "horizontal-margin", psz_name ) )
{
if( strchr( psz_value, '%' ) )
{
- p_style->i_margin_h = 0;
- p_style->i_margin_percent_h = atoi( psz_value );
+ p_ssa_style->i_margin_h = 0;
+ p_ssa_style->i_margin_percent_h = atoi( psz_value );
}
else
{
- p_style->i_margin_h = atoi( psz_value );
- p_style->i_margin_percent_h = 0;
+ p_ssa_style->i_margin_h = atoi( psz_value );
+ p_ssa_style->i_margin_percent_h = 0;
}
}
else if( !strcasecmp( "vertical-margin", psz_name ) )
{
if( strchr( psz_value, '%' ) )
{
- p_style->i_margin_v = 0;
- p_style->i_margin_percent_v = atoi( psz_value );
+ p_ssa_style->i_margin_v = 0;
+ p_ssa_style->i_margin_percent_v = atoi( psz_value );
}
else
{
- p_style->i_margin_v = atoi( psz_value );
- p_style->i_margin_percent_v = 0;
+ p_ssa_style->i_margin_v = atoi( psz_value );
+ p_ssa_style->i_margin_percent_v = 0;
}
}
}
break;
}
}
- free( p_style );
+ free( p_ssa_style );
}
/* Display the feed's image */
memset( &fmt_out, 0, sizeof( video_format_t));
- fmt_out.i_chroma = VLC_FOURCC('Y','U','V','A');
+ fmt_out.i_chroma = VLC_CODEC_YUVA;
fmt_out.i_aspect = VOUT_ASPECT_FACTOR;
fmt_out.i_sar_num = fmt_out.i_sar_den = 1;
fmt_out.i_width =
- fmt_out.i_visible_width = p_pic->p[Y_PLANE].i_visible_pitch;
+ fmt_out.i_visible_width = p_pic->format.i_visible_width;
fmt_out.i_height =
- fmt_out.i_visible_height = p_pic->p[Y_PLANE].i_visible_lines;
+ fmt_out.i_visible_height = p_pic->format.i_visible_height;
- p_region = p_spu->pf_create_region( VLC_OBJECT(p_dec), &fmt_out );
+ p_region = subpicture_region_New( &fmt_out );
if( !p_region )
{
msg_Err( p_dec, "cannot allocate SPU region" );
return NULL;
}
- vout_CopyPicture( p_dec, &p_region->picture, p_pic );
+ assert( p_pic->format.i_chroma == VLC_CODEC_YUVA );
+ /* FIXME the copy is probably not needed anymore */
+ picture_CopyPixels( p_region->p_picture, p_pic );
/* This isn't the best way to do this - if you really want transparency, then
* you're much better off using an image type that supports it like PNG. The
*/
if( i_transparent_color > 0 )
{
- uint8_t i_r = ( i_transparent_color >> 16 ) & 0xff;
- uint8_t i_g = ( i_transparent_color >> 8 ) & 0xff;
- uint8_t i_b = ( i_transparent_color ) & 0xff;
- uint8_t i_y = ( ( ( 66 * i_r + 129 * i_g + 25 * i_b + 128 ) >> 8 ) + 16 );
- uint8_t i_u = ( ( -38 * i_r - 74 * i_g + 112 * i_b + 128 ) >> 8 ) + 128 ;
- uint8_t i_v = ( ( 112 * i_r - 94 * i_g - 18 * i_b + 128 ) >> 8 ) + 128 ;
-
- if( ( p_region->picture.Y_PITCH == p_region->picture.U_PITCH ) &&
- ( p_region->picture.Y_PITCH == p_region->picture.V_PITCH ) &&
- ( p_region->picture.Y_PITCH == p_region->picture.A_PITCH ) )
+ int i_r = ( i_transparent_color >> 16 ) & 0xff;
+ int i_g = ( i_transparent_color >> 8 ) & 0xff;
+ int i_b = ( i_transparent_color ) & 0xff;
+
+ /* FIXME it cannot work as the yuv conversion code will probably NOT match
+ * this one */
+ int i_y = ( ( ( 66 * i_r + 129 * i_g + 25 * i_b + 128 ) >> 8 ) + 16 );
+ int i_u = ( ( -38 * i_r - 74 * i_g + 112 * i_b + 128 ) >> 8 ) + 128 ;
+ int i_v = ( ( 112 * i_r - 94 * i_g - 18 * i_b + 128 ) >> 8 ) + 128 ;
+
+ assert( p_region->fmt.i_chroma == VLC_CODEC_YUVA );
+ for( unsigned int y = 0; y < p_region->fmt.i_height; y++ )
{
- int i_lines = p_region->picture.p[ Y_PLANE ].i_lines;
- if( i_lines > p_region->picture.p[ U_PLANE ].i_lines )
- i_lines = p_region->picture.p[ U_PLANE ].i_lines;
- if( i_lines > p_region->picture.p[ V_PLANE ].i_lines )
- i_lines = p_region->picture.p[ V_PLANE ].i_lines;
- if( i_lines > p_region->picture.p[ A_PLANE ].i_lines )
- i_lines = p_region->picture.p[ A_PLANE ].i_lines;
-
- int i;
-
- for( i = 0; i < p_region->picture.A_PITCH * i_lines; i++ )
+ for( unsigned int x = 0; x < p_region->fmt.i_width; x++ )
{
- if(( p_region->picture.Y_PIXELS[ i ] == i_y ) &&
- ( p_region->picture.U_PIXELS[ i ] == i_u ) &&
- ( p_region->picture.V_PIXELS[ i ] == i_v ) )
- {
- p_region->picture.A_PIXELS[ i ] = 1;
- }
+ if( p_region->p_picture->Y_PIXELS[y*p_region->p_picture->Y_PITCH + x] != i_y ||
+ p_region->p_picture->U_PIXELS[y*p_region->p_picture->U_PITCH + x] != i_u ||
+ p_region->p_picture->V_PIXELS[y*p_region->p_picture->V_PITCH + x] != i_v )
+ continue;
+ p_region->p_picture->A_PIXELS[y*p_region->p_picture->A_PITCH + x] = 0;
+
}
}
}