Skip to content
Snippets Groups Projects

Compare revisions

Changes are shown as if the source revision was being merged into the target revision. Learn more about comparing revisions.

Source

Select target project
No results found

Target

Select target project
  • videolan/vlc
  • chouquette/vlc
  • bakiewicz.marek122/vlc
  • devnexen/vlc
  • rohanrajpal/vlc
  • blurrrb/vlc
  • gsoc/gsoc2019/darkapex/vlc
  • b1ue/vlc
  • fkuehne/vlc
  • magsoft/vlc
  • chub/vlc
  • cramiro9/vlc
  • robUx4/vlc
  • rom1v/vlc
  • akshayaky/vlc
  • tmk907/vlc
  • akymaster/vlc
  • govind.sharma/vlc
  • psilokos/vlc
  • xjbeta/vlc
  • jahan/vlc
  • 1480c1/vlc
  • amanchande/vlc
  • aaqib/vlc
  • rist/vlc
  • apol/vlc
  • mindfreeze/vlc
  • alexandre-janniaux/vlc
  • sandsmark/vlc
  • jagannatharjun/vlc
  • gsoc/gsoc2020/matiaslgonzalez/vlc
  • gsoc/gsoc2020/jagannatharjun/vlc
  • mstorsjo/vlc
  • gsoc/gsoc2020/vedenta/vlc
  • gsoc/gsoc2020/arnav-ishaan/vlc
  • gsoc/gsoc2020/andreduong/vlc
  • fuzun/vlc
  • gsoc/gsoc2020/vatsin/vlc
  • gsoc/gsoc2020/sagid/vlc
  • yaron/vlc
  • Phoenix/vlc
  • Garf/vlc
  • ePiratWorkarounds/vlc
  • tguillem/vlc
  • jnqnfe/vlc
  • mdc/vlc
  • Vedaa/vlc
  • rasa/vlc
  • quink/vlc
  • yealo/vlc
  • aleksey_ak/vlc
  • ePirat/vlc
  • ilya.yanok/vlc
  • asenat/vlc
  • m/vlc
  • bunjee/vlc
  • BLumia/vlc
  • sagudev/vlc
  • hamedmonji30/vlc
  • nullgemm/vlc
  • DivyamAhuja/vlc
  • thesamesam/vlc
  • dag7/vlc
  • snehil101/vlc
  • haasn/vlc
  • jbk/vlc
  • ValZapod/vlc
  • mfkl/vlc
  • WangChuan/vlc
  • core1024/vlc
  • GhostVaibhav/vlc
  • dfuhrmann/vlc
  • davide.prade/vlc
  • tmatth/vlc
  • Courmisch/vlc
  • zouya/vlc
  • hpi/vlc
  • EwoutH/vlc
  • aleung27/vlc
  • hengwu0/vlc
  • saladin/vlc
  • ashuio/vlc
  • richselwood/vlc
  • verma16Ayush/vlc
  • chemicalflash/vlc
  • PoignardAzur/vlc
  • huangjieNT/vlc
  • Blake-Haydon/vlc
  • AnuthaDev/vlc
  • gsoc/gsoc2021/mpd/vlc
  • nicolas_lequec/vlc
  • sambassaly/vlc
  • thresh/vlc
  • bonniegong/vlc
  • myaashish/vlc
  • stavros.vagionitis/vlc
  • ileoo/vlc
  • louis-santucci/vlc
  • cchristiansen/vlc
  • sabyasachi07/vlc
  • AbduAmeen/vlc
  • ashishb0410/vlc
  • urbanhusky/vlc
  • davidepietrasanta/vlc
  • riksleutelstad/vlc
  • jeremyVignelles/vlc
  • komh/vlc
  • iamjithinjohn/vlc
  • JohannesKauffmann/vlc2
  • kunglao/vlc
  • natzberg/vlc
  • jill/vlc
  • cwendling/vlc
  • adufou/vlc
  • ErwanAirone/vlc
  • HasinduDilshan10/vlc
  • vagrantc/vlc
  • rafiv/macos-bigsur-icon
  • Aymeriic/vlc
  • saranshg20/vlc
  • metzlove24/vlc
  • linkfanel/vlc
  • Ds886/vlc
  • metehan-arslan/vlc
  • Skantes/vlc
  • kgsandundananjaya96/vlc
  • mitchcapper/vlc
  • advaitgupta/vlc
  • StefanBruens/vlc
  • ratajs/vlc
  • T.M.F.B.3761/vlc
  • m222059/vlc
  • casemerrick/vlc
  • joshuaword2alt/vlc
  • sjwaddy/vlc
  • dima/vlc
  • Ybalrid/vlc
  • umxprime/vlc
  • eschmidt/vlc
  • vannieuwenhuysenmichelle/vlc
  • badcf00d/vlc
  • wesinator/vlc
  • louis/vlc
  • xqq/vlc
  • EmperorYP7/vlc
  • NicoLiam/vlc
  • loveleen/vlc
  • rofferom/vlc
  • rbultje/vlc
  • TheUnamed/vlc
  • pratiksharma341/vlc
  • Saurab17/vlc
  • purist.coder/vlc
  • Shuicheng/vlc
  • mdrrubel292/vlc
  • silverbleu00/vlc
  • metif12/vlc
  • asher-m/vlc
  • jeffk/vlc
  • Brandonbr1/vlc
  • beautyyuyanli/vlc
  • rego21/vlc
  • muyangren907/vlc
  • collectionbylawrencejason/vlc
  • evelez/vlc
  • GSMgeeth/vlc
  • Oneric/vlc
  • TJ5/vlc
  • XuanTung95/vlc
  • darrenjenny21/vlc
  • Trenly/vlc
  • RockyTDR/vlc
  • mjakubowski/vlc
  • caprica/vlc
  • ForteFrankie/vlc
  • seannamiller19/vlc
  • junlon2006/vlc
  • kiwiren6666/vlc
  • iuseiphonexs/vlc
  • fenngtun/vlc
  • Rajdutt999/vlc
  • typx/vlc
  • leon.vitanos/vlc
  • robertogarci0938/vlc
  • gsoc/gsoc2022/luc65r/vlc-mpd
  • skeller/vlc
  • MCJack123/vlc
  • luc65r/vlc-mpd
  • popov895/vlc
  • claucambra/vlc
  • brad/vlc
  • matthewmurua88/vlc
  • Tomas8874/vlc
  • philenotfound/vlc
  • makita-do3/vlc
  • LZXCorp/vlc
  • mar0x/vlc
  • senojetkennedy0102/vlc
  • shaneb243/vlc
  • ahmadbader/vlc
  • rajduttcse26/vlc-audio-filters
  • Juniorzito8415/vlc
  • achernyakov/vlc
  • lucasjetgroup/vlc
  • pupdoggy666/vlc
  • gmde9363/vlc
  • alexnwayne/vlc
  • bahareebrahimi781/vlc
  • hamad633666/vlc
  • umghof3112/vlc
  • joe0199771874/vlc
  • Octocats66666666/vlc
  • jjm_223/vlc
  • btech10110.19/vlc
  • sunnykfc028/vlc-audio-filters
  • loic/vlc
  • nguyenminhducmx1/vlc
  • JanekKrueger/vlc
  • bstubbington2/vlc
  • rcombs/vlc
  • Ordissimo/vlc
  • king7532/vlc
  • noobsauce101/vlc
  • schong0525/vlc
  • myQwil/vlc
  • apisbg91/vlc
  • geeboy0101017/vlc
  • kim.faughey/vlc
  • nurupo/vlc
  • yyusea/vlc
  • 0711235879.khco/vlc
  • ialo/vlc
  • iloveyeye2/vlc
  • gdtdftdqtd/vlc
  • leandroconsiglio/vlc
  • AndyHTML2012/vlc
  • ncz/vlc
  • lucenticus/vlc
  • knr1931/vlc
  • kjoonlee/vlc
  • chandrakant100/vlc-qt
  • johge42/vlc
  • polter/vlc
  • hexchain/vlc
  • Tushwrld/vlc
  • mztea928/vlc
  • jbelloncastro/vlc
  • alvinhochun/vlc
  • ghostpiratecrow/vlc
  • ujjwaltwitx/vlc
  • alexsonarin06/vlc
  • adrianbon76/vlc
  • altsod/vlc
  • damien.lucas44/vlc
  • dmytrivtaisa/vlc
  • utk202/vlc
  • aaxhrj/vlc
  • thomas.hermes/vlc
  • structurenewworldorder/vlc
  • slomo/vlc
  • wantlamy/vlc
  • musc.o3cminc/vlc
  • thebarshablog/vlc
  • kerrick/vlc
  • kratos142518/vlc
  • leogps/vlc
  • vacantron/vlc
  • luna_koly/vlc
  • Ratio2/vlc
  • anuoshemohammad/vlc
  • apsun/vlc
  • aaa1115910/vlc
  • alimotmoyo/vlc
  • Ambossmann/vlc
  • Sam-LearnsToCode/vlc
  • Chilledheart/vlc
  • Labnann/vlc
  • ktcoooot1/vlc
  • mohit-marathe/vlc
  • johnddx/vlc
  • manstabuk/vlc
  • Omar-ahmed314/vlc
  • vineethkm/vlc
  • 9Enemi86/vlc
  • radoslav.m.panteleev/vlc
  • ashishami2002/vlc
  • Corbax/vlc
  • firnasahmed/vlc
  • pelayarmalam4/vlc
  • c0ff330k/vlc
  • shikhindahikar/vlc
  • l342723951/vlc
  • christianschwandner/vlc
  • douniwan5788/vlc
  • 7damian7/vlc
  • ferdnyc/vlc
  • f.ales1/vlc
  • pandagby/vlc
  • BaaBaa/vlc
  • jewe37/vlc
  • w00drow/vlc
  • russelltg/vlc
  • ironicallygod/vlc
  • soumyaDghosh/vlc
  • linzihao1999/vlc
  • deyayush6/vlc
  • mibi88/vlc
  • newabdallah10/vlc
  • jhorbincolombia/vlc
  • rimvihaqueshupto/vlc
  • andrewkhon98/vlc
  • fab78/vlc
  • lapaz17/vlc
  • amanna13/vlc
  • mdakram28/vlc
  • 07jw1980/vlc
  • sohamgupta/vlc
  • Eson-Jia1/vlc
  • Sumou/vlc
  • vikram-kangotra/vlc
  • chalice191/vlc
  • olivercalder/vlc
  • aaasg4001/vlc
  • zipdox/vlc
  • kwizart/vlc
  • Dragon-S/vlc
  • jdemeule/vlc
  • gabriel_lt/vlc
  • locutusofborg/vlc
  • sammirata/vlc-librist
  • another/vlc
  • Benjamin_Loison/vlc
  • ahmedmoselhi/vlc
  • petergaal/vlc
  • huynhsontung/vlc
  • dariusmihut/vlc
  • tvermaashutosh/vlc
  • buti/vlc
  • Niram7777/vlc
  • rohan-here/vlc
  • balaji-sivasakthi/vlc
  • rlindner81/vlc
  • Kakadus/vlc
  • djain/vlc
  • ABBurmeister/vlc
  • craighuggins/vlc
  • orbea/vlc
  • maxos/vlc
  • aakarshmj/vlc
  • kblaschke/vlc
  • ankitm/vlc
  • advait-0/vlc
  • mohak2003/vlc
  • yselkowitz/vlc
  • AZM999/vlc-azm
  • andrey.turkin/vlc
  • Disha-Baghel/vlc
  • nowrep/vlc
  • Apeng/vlc
  • Choucroute_melba/vlc
  • autra/vlc
  • eclipseo/vlc
  • fhuber/vlc
  • olafhering/vlc
  • sdasda7777/vlc
  • 1div0/vlc
  • skosnits/vlc-extended-playlist-support
  • dnicolson/vlc
  • Timshel/vlc
  • octopols/vlc
  • MangalK/vlc
  • nima64/vlc
  • misawai/vlc
  • Alexander-Wilms/vlc
  • Maxime2/vlc-fork-for-visualizer
  • ww/vlc
  • jeske/vlc
  • sgross-emlix/vlc
  • morenonatural/vlc
  • freakingLovesVLC/vlc
  • borisgolovnev/vlc
  • mpromonet/vlc
  • diogo.simao-marques/vlc
  • masstock/vlc
  • pratikpatel8982/vlc
  • hugok79/vlc
  • longervision/vlc
  • abhiudaysurya/vlc
  • rishabhgarg/vlc
  • tumic/vlc
  • cart/vlc
  • shubham442/vlc
  • Aditya692005/vlc
  • sammirata/vlc4
  • syrykh/vlc
  • Vvorcun/macos-new-icon
  • AyaanshC/vlc
  • nasso/vlc
  • Quark/vlc
  • sebastinas/vlc
  • rhstone/vlc
  • talregev/vlc
  • Managor/vlc
403 results
Show changes
Commits on Source (11)
......@@ -575,9 +575,9 @@ struct subs_format_t
struct
{
/* the width of the original movie the spu was extracted from */
int i_original_frame_width;
unsigned i_original_frame_width;
/* the height of the original movie the spu was extracted from */
int i_original_frame_height;
unsigned i_original_frame_height;
/* */
uint32_t palette[VIDEO_PALETTE_CLUT_COUNT]; /* CLUT Palette AYVU */
......
......@@ -207,8 +207,8 @@ struct subpicture_t
/**@{*/
bool b_subtitle; /**< the picture is a movie subtitle */
bool b_absolute; /**< position is absolute */
int i_original_picture_width; /**< original width of the movie */
int i_original_picture_height;/**< original height of the movie */
unsigned i_original_picture_width; /**< original width of the movie */
unsigned i_original_picture_height;/**< original height of the movie */
int i_alpha; /**< transparency */
/**@}*/
......
......@@ -281,7 +281,7 @@ typedef struct bluray_overlay_t
bool b_on_vout;
OverlayStatus status;
subpicture_region_t *p_regions;
int width, height;
uint16_t width, height;
/* pointer to last subpicture updater.
* used to disconnect this overlay from vout when:
......@@ -1857,7 +1857,7 @@ static void blurayClearOverlay(demux_t *p_demux, int plane)
vlc_mutex_unlock(&ov->lock);
}
static void blurayInitOverlay(demux_t *p_demux, int plane, int width, int height)
static void blurayInitOverlay(demux_t *p_demux, int plane, uint16_t width, uint16_t height)
{
demux_sys_t *p_sys = p_demux->p_sys;
......@@ -2023,7 +2023,7 @@ static void blurayOverlayProc(void *ptr, const BD_OVERLAY *const overlay)
/*
* ARGB overlay (BD-J)
*/
static void blurayInitArgbOverlay(demux_t *p_demux, int plane, int width, int height)
static void blurayInitArgbOverlay(demux_t *p_demux, int plane, uint16_t width, uint16_t height)
{
blurayInitOverlay(p_demux, plane, width, height);
}
......
......@@ -152,10 +152,10 @@ vlc_module_begin()
change_private()
change_safe()
add_integer("imem-width", 0, WIDTH_TEXT, WIDTH_LONGTEXT)
add_integer_with_range("imem-width", 0, 0, UINT_MAX, WIDTH_TEXT, WIDTH_LONGTEXT)
change_private()
change_safe()
add_integer("imem-height", 0, HEIGHT_TEXT, HEIGHT_LONGTEXT)
add_integer_with_range("imem-height", 0, 0, UINT_MAX, HEIGHT_TEXT, HEIGHT_LONGTEXT)
change_private()
change_safe()
add_string ("imem-dar", NULL, DAR_TEXT, DAR_LONGTEXT)
......
......@@ -99,8 +99,11 @@ static void SubpictureTextUpdate(subpicture_t *subpic,
r->p_text = text_segment_New( p_region->psz_text );
r->i_align = SUBPICTURE_ALIGN_LEFT | SUBPICTURE_ALIGN_TOP;
subpic->i_original_picture_width = p_region->i_planewidth;
subpic->i_original_picture_height = p_region->i_planeheight;
if (p_region->i_planewidth > 0 && p_region->i_planeheight > 0)
{
subpic->i_original_picture_width = p_region->i_planewidth;
subpic->i_original_picture_height = p_region->i_planeheight;
}
r->i_x = p_region->i_charleft - (p_region->i_fontwidth + p_region->i_horint / 2) + p_region->i_charleft_adj;
r->i_y = p_region->i_charbottom - (p_region->i_fontheight + p_region->i_verint / 2) + p_region->i_charbottom_adj;
......
......@@ -330,7 +330,7 @@ static subpicture_t *ConvertSubtitle(decoder_t *dec, AVSubtitle *ffsub, vlc_tick
spu->b_ephemer = p_sys->b_need_ephemer;
/* We only show subtitle for i_stop time only */
if (avctx->coded_width != 0 && avctx->coded_height != 0) {
if (avctx->coded_width > 0 && avctx->coded_height > 0) {
spu->i_original_picture_width = avctx->coded_width;
spu->i_original_picture_height = avctx->coded_height;
} else {
......
......@@ -180,8 +180,8 @@ typedef struct dvbsub_display_s
uint8_t i_id;
uint8_t i_version;
int i_width;
int i_height;
uint16_t i_width_minus1;
uint16_t i_height_minus1;
bool b_windowed;
/* these values are only relevant if windowed */
......@@ -1012,8 +1012,8 @@ static void decode_display_definition( decoder_t *p_dec, bs_t *s, uint16_t i_seg
p_sys->display.i_version = i_version;
p_sys->display.b_windowed = bs_read( s, 1 );
bs_skip( s, 3 ); /* Reserved bits */
p_sys->display.i_width = bs_read( s, 16 )+1;
p_sys->display.i_height = bs_read( s, 16 )+1;
p_sys->display.i_width_minus1 = bs_read( s, 16 );
p_sys->display.i_height_minus1 = bs_read( s, 16 );
if( p_sys->display.b_windowed )
{
......@@ -1032,9 +1032,9 @@ static void decode_display_definition( decoder_t *p_dec, bs_t *s, uint16_t i_seg
/* if not windowed, setup the window variables to good defaults */
/* not necessary, but to avoid future confusion.. */
p_sys->display.i_x = 0;
p_sys->display.i_max_x = p_sys->display.i_width-1;
p_sys->display.i_max_x = p_sys->display.i_width_minus1;
p_sys->display.i_y = 0;
p_sys->display.i_max_y = p_sys->display.i_height-1;
p_sys->display.i_max_y = p_sys->display.i_height_minus1;
}
if( i_processed_length != i_segment_length*8 )
......@@ -1045,7 +1045,7 @@ static void decode_display_definition( decoder_t *p_dec, bs_t *s, uint16_t i_seg
#ifdef DEBUG_DVBSUB
msg_Dbg( p_dec, "version: %d, width: %d, height: %d",
p_sys->display.i_version, p_sys->display.i_width, p_sys->display.i_height );
p_sys->display.i_version, (int)p_sys->display.i_width_minus1+1, (int)p_sys->display.i_height_minus1+1 );
if( p_sys->display.b_windowed )
msg_Dbg( p_dec, "xmin: %d, xmax: %d, ymin: %d, ymax: %d",
p_sys->display.i_x, p_sys->display.i_max_x, p_sys->display.i_y, p_sys->display.i_max_y );
......@@ -1494,8 +1494,8 @@ static subpicture_t *render( decoder_t *p_dec )
i_base_x = p_sys->i_spu_x;
i_base_y = p_sys->i_spu_y;
p_spu->i_original_picture_width = p_sys->display.i_width;
p_spu->i_original_picture_height = p_sys->display.i_height;
p_spu->i_original_picture_width = (unsigned)p_sys->display.i_width_minus1 + 1;
p_spu->i_original_picture_height = (unsigned)p_sys->display.i_height_minus1 + 1;
if( p_sys->display.b_windowed )
{
......@@ -2633,8 +2633,8 @@ static void default_dds_init( decoder_t * p_dec )
/* configure for SD res in case DDS is not present */
p_sys->display.i_version = 0xff; /* an invalid version so it's always different */
p_sys->display.i_width = 720;
p_sys->display.i_height = 576;
p_sys->display.i_width_minus1 = 720-1;
p_sys->display.i_height_minus1 = 576-1;
p_sys->display.b_windowed = false;
}
......@@ -182,7 +182,7 @@ static void SubpictureTextUpdate(subpicture_t *subpic,
if (!(p_updtregion->flags & UPDT_REGION_FIXED_DONE))
{
const float margin_ratio = sys->margin_ratio;
const int margin_h = margin_ratio * (( r->b_gridmode ) ? (unsigned) subpic->i_original_picture_width
const int margin_h = margin_ratio * (( r->b_gridmode ) ? subpic->i_original_picture_width
: fmt_dst->i_visible_width );
const int margin_v = margin_ratio * fmt_dst->i_visible_height;
......
......@@ -264,8 +264,11 @@ static subpicture_t *ParseText( decoder_t *p_dec, block_t *p_block )
p_spu->i_stop = p_block->i_pts + p_block->i_length;
p_spu->b_ephemer = (p_block->i_length == VLC_TICK_INVALID);
p_spu->b_absolute = false;
p_spu->i_original_picture_width = p_sys->i_original_width;
p_spu->i_original_picture_height = p_sys->i_original_height;
if (p_sys->i_original_width > 0 && p_sys->i_original_height > 0)
{
p_spu->i_original_picture_width = p_sys->i_original_width;
p_spu->i_original_picture_height = p_sys->i_original_height;
}
free( psz_subtitle );
......
......@@ -486,8 +486,11 @@ static int Decode( decoder_t *p_dec, block_t *p_block )
/* Maintain subtitle position */
p_spu->p_region->i_y = i_first_row*10;
p_spu->i_original_picture_width = p_page.columns*12;
p_spu->i_original_picture_height = p_page.rows*10;
if (p_page.columns > 0 && p_page.rows > 0)
{
p_spu->i_original_picture_width = p_page.columns*12;
p_spu->i_original_picture_height = p_page.rows*10;
}
vbi_draw_vt_page_region( &p_page, ZVBI_PIXFMT_RGBA32,
p_spu->p_region->p_picture->p->p_pixels, -1,
......
......@@ -97,8 +97,8 @@ typedef struct
int i_tracks;
vobsub_track_t *track;
int i_original_frame_width;
int i_original_frame_height;
unsigned i_original_frame_width;
unsigned i_original_frame_height;
bool b_palette;
uint32_t palette[VIDEO_PALETTE_CLUT_COUNT];
} demux_sys_t;
......@@ -149,8 +149,8 @@ static int Open ( vlc_object_t *p_this )
p_sys->track = malloc( sizeof( vobsub_track_t ) );
if( unlikely( !p_sys->track ) )
goto error;
p_sys->i_original_frame_width = -1;
p_sys->i_original_frame_height = -1;
p_sys->i_original_frame_width = 0;
p_sys->i_original_frame_height = 0;
p_sys->b_palette = false;
/* Load the whole file */
......@@ -480,7 +480,7 @@ static int ParseVobSubIDX( demux_t *p_demux )
if( vobsub_size_parse( line, &p_sys->i_original_frame_width,
&p_sys->i_original_frame_height ) == VLC_SUCCESS )
{
msg_Dbg( p_demux, "original frame size: %dx%d", p_sys->i_original_frame_width, p_sys->i_original_frame_height );
msg_Dbg( p_demux, "original frame size: %ux%u", p_sys->i_original_frame_width, p_sys->i_original_frame_height );
}
else
{
......
......@@ -59,11 +59,11 @@ static inline int vobsub_palette_parse( const char *psz_buf, uint32_t *pu_palett
}
static inline int vobsub_size_parse( const char *psz_buf,
int *pi_original_frame_width,
int *pi_original_frame_height )
unsigned *pi_original_frame_width,
unsigned *pi_original_frame_height )
{
int w, h;
if( sscanf( psz_buf, "size: %dx%d", &w, &h ) == 2 )
unsigned w, h;
if( sscanf( psz_buf, "size: %ux%u", &w, &h ) == 2 )
{
*pi_original_frame_width = w;
*pi_original_frame_height = h;
......@@ -92,7 +92,7 @@ static inline void vobsub_extra_parse(vlc_object_t *o, subs_format_t *subs,
&subs->spu.i_original_frame_width,
&subs->spu.i_original_frame_height ) == VLC_SUCCESS )
{
msg_Dbg( o, "original frame size: %dx%d",
msg_Dbg( o, "original frame size: %ux%u",
subs->spu.i_original_frame_width,
subs->spu.i_original_frame_height );
}
......
......@@ -65,7 +65,7 @@ typedef struct
int i_position; /* Mosaic positioning method */
bool b_ar; /* Do we keep the aspect ratio ? */
bool b_keep; /* Do we keep the original picture format ? */
int i_width, i_height; /* Mosaic height and width */
unsigned i_width, i_height; /* Mosaic height and width */
int i_cols, i_rows; /* Mosaic rows and cols */
int i_align; /* Mosaic alignment in background video */
int i_xoffset, i_yoffset; /* Top left corner offset */
......@@ -182,9 +182,9 @@ vlc_module_begin ()
add_integer_with_range( CFG_PREFIX "alpha", 255, 0, 255,
ALPHA_TEXT, ALPHA_LONGTEXT )
add_integer_with_range( CFG_PREFIX "height", 100, 0, INT_MAX,
add_integer_with_range( CFG_PREFIX "height", 100, 0, UINT_MAX,
HEIGHT_TEXT, HEIGHT_LONGTEXT )
add_integer_with_range( CFG_PREFIX "width", 100, 0, INT_MAX,
add_integer_with_range( CFG_PREFIX "width", 100, 0, UINT_MAX,
WIDTH_TEXT, WIDTH_LONGTEXT )
add_integer_with_range( CFG_PREFIX "align", 5, 0, 10,
......@@ -761,16 +761,16 @@ static int MosaicCallback( vlc_object_t *p_this, char const *psz_var,
else if( VAR_IS( "width" ) )
{
vlc_mutex_lock( &p_sys->lock );
msg_Dbg( p_this, "changing width from %dpx to %dpx",
p_sys->i_width, (int)newval.i_int );
msg_Dbg( p_this, "changing width from %upx to %upx",
p_sys->i_width, (unsigned)newval.i_int );
p_sys->i_width = newval.i_int;
vlc_mutex_unlock( &p_sys->lock );
}
else if( VAR_IS( "xoffset" ) )
{
vlc_mutex_lock( &p_sys->lock );
msg_Dbg( p_this, "changing x offset from %dpx to %dpx",
p_sys->i_xoffset, (int)newval.i_int );
msg_Dbg( p_this, "changing x offset from %upx to %upx",
p_sys->i_xoffset, (unsigned)newval.i_int );
p_sys->i_xoffset = newval.i_int;
vlc_mutex_unlock( &p_sys->lock );
}
......
......@@ -316,8 +316,8 @@ static filter_t *SpuRenderCreateAndLoadScale(vlc_object_t *object,
static int SpuRenderText(spu_t *spu,
subpicture_region_t *region,
int i_original_width,
int i_original_height,
unsigned i_original_width,
unsigned i_original_height,
const vlc_fourcc_t *chroma_list)
{
spu_private_t *sys = spu->p;
......@@ -360,16 +360,16 @@ static int SpuRenderText(spu_t *spu,
#define SCALE_UNIT (10000)
typedef struct {
int w;
int h;
unsigned w;
unsigned h;
} spu_scale_t;
static spu_scale_t spu_scale_create(int w, int h)
static spu_scale_t spu_scale_create(unsigned w, unsigned h)
{
spu_scale_t s = { .w = w, .h = h };
if (s.w <= 0)
if (s.w == 0)
s.w = SCALE_UNIT;
if (s.h <= 0)
if (s.h == 0)
s.h = SCALE_UNIT;
return s;
}
......@@ -377,7 +377,7 @@ static spu_scale_t spu_scale_unit(void)
{
return spu_scale_create(SCALE_UNIT, SCALE_UNIT);
}
static spu_scale_t spu_scale_createq(int64_t wn, int64_t wd, int64_t hn, int64_t hd)
static spu_scale_t spu_scale_createq(uint64_t wn, uint64_t wd, uint64_t hn, uint64_t hd)
{
return spu_scale_create(wn * SCALE_UNIT / wd,
hn * SCALE_UNIT / hd);
......@@ -1183,11 +1183,11 @@ static subpicture_t *SpuRenderSubpictures(spu_t *spu,
if (!subpic->p_region)
continue;
if (subpic->i_original_picture_width <= 0 ||
subpic->i_original_picture_height <= 0) {
if (subpic->i_original_picture_width == 0 ||
subpic->i_original_picture_height == 0) {
if (subpic->i_original_picture_width > 0 ||
subpic->i_original_picture_height > 0)
msg_Err(spu, "original picture size %dx%d is unsupported",
msg_Err(spu, "original picture size %ux%u is unsupported",
subpic->i_original_picture_width,
subpic->i_original_picture_height);
else
......@@ -1197,8 +1197,8 @@ static subpicture_t *SpuRenderSubpictures(spu_t *spu,
subpic->i_original_picture_height = fmt_src->i_visible_height;
}
const int i_original_width = subpic->i_original_picture_width;
const int i_original_height = subpic->i_original_picture_height;
const unsigned i_original_width = subpic->i_original_picture_width;
const unsigned i_original_height = subpic->i_original_picture_height;
/* Render all regions
* We always transform non absolute subtitle into absolute one on the
......@@ -1224,14 +1224,13 @@ static subpicture_t *SpuRenderSubpictures(spu_t *spu,
* FIXME The current scaling ensure that the heights match, the width being
* cropped.
*/
spu_scale_t scale = spu_scale_createq((int64_t)fmt_dst->i_visible_height * fmt_dst->i_sar_den * region_fmt.i_sar_num,
(int64_t)subpic->i_original_picture_height * fmt_dst->i_sar_num * region_fmt.i_sar_den,
spu_scale_t scale = spu_scale_createq((uint64_t)fmt_dst->i_visible_height * fmt_dst->i_sar_den * region_fmt.i_sar_num,
(uint64_t)subpic->i_original_picture_height * fmt_dst->i_sar_num * region_fmt.i_sar_den,
fmt_dst->i_visible_height,
subpic->i_original_picture_height);
/* Check scale validity */
if (scale.w <= 0 || scale.h <= 0)
continue;
assert(scale.w != 0 && scale.h != 0);
const bool do_external_scale = external_scale && region->fmt.i_chroma != VLC_CODEC_TEXT;
spu_scale_t virtual_scale = external_scale ? (spu_scale_t){ SCALE_UNIT, SCALE_UNIT } : scale;
......@@ -1483,11 +1482,11 @@ static void spu_PrerenderText(spu_t *spu, subpicture_t *p_subpic,
video_format_t *fmtsrc, video_format_t *fmtdst,
vlc_fourcc_t *chroma_list)
{
if (p_subpic->i_original_picture_width <= 0 ||
p_subpic->i_original_picture_height <= 0) {
if (p_subpic->i_original_picture_width == 0 ||
p_subpic->i_original_picture_height == 0) {
if (p_subpic->i_original_picture_width > 0 ||
p_subpic->i_original_picture_height > 0)
msg_Err(spu, "original picture size %dx%d is unsupported",
msg_Err(spu, "original picture size %ux%u is unsupported",
p_subpic->i_original_picture_width,
p_subpic->i_original_picture_height);
else
......@@ -1501,8 +1500,8 @@ static void spu_PrerenderText(spu_t *spu, subpicture_t *p_subpic,
subpicture_Update(p_subpic, fmtsrc, fmtdst,
p_subpic->b_subtitle ? p_subpic->i_start : vlc_tick_now());
const int i_original_picture_width = p_subpic->i_original_picture_width;
const int i_original_picture_height = p_subpic->i_original_picture_height;
const unsigned i_original_picture_width = p_subpic->i_original_picture_width;
const unsigned i_original_picture_height = p_subpic->i_original_picture_height;
subpicture_region_t *region;
for (region = p_subpic->p_region; region != NULL; region = region->p_next)
......