[vlc-commits] [Git][videolan/vlc][master] 3 commits: i420_rgb: remove p_filter from RGB2PIXEL()
Jean-Baptiste Kempf (@jbk)
gitlab at videolan.org
Thu Sep 21 09:42:59 UTC 2023
Jean-Baptiste Kempf pushed to branch master at VideoLAN / VLC
Commits:
b699dcfe by Steve Lhomme at 2023-09-21T09:25:37+00:00
i420_rgb: remove p_filter from RGB2PIXEL()
It's not used since cff37e09134aabd260e366003b4fa664a0796468.
- - - - -
7d9a6fae by Steve Lhomme at 2023-09-21T09:25:37+00:00
transcode: fix unused warning
Following b2acbeab301280129aba6d1a185383a0336871ac.
- - - - -
1127d5fc by Steve Lhomme at 2023-09-21T09:25:37+00:00
access/dshow: fix sign warning
- - - - -
3 changed files:
- modules/access/dshow/dshow.cpp
- modules/stream_out/transcode/transcode.c
- modules/video_chroma/i420_rgb.c
Changes:
=====================================
modules/access/dshow/dshow.cpp
=====================================
@@ -1682,7 +1682,7 @@ static size_t EnumDeviceCaps( vlc_object_t *p_this, ComPtr<IBaseFilter> &p_filte
{
// the first four bytes of subtype GUID contains the codec FOURCC
const char *pfcc = (char *)&p_mt->subtype;
- int i_current_fourcc = VLC_FOURCC(pfcc[0], pfcc[1], pfcc[2], pfcc[3]);
+ vlc_fourcc_t i_current_fourcc = VLC_FOURCC(pfcc[0], pfcc[1], pfcc[2], pfcc[3]);
if( VLC_FOURCC('H','C','W','2') == i_current_fourcc
&& p_mt->majortype == MEDIATYPE_Video && !b_audio )
{
=====================================
modules/stream_out/transcode/transcode.c
=====================================
@@ -380,6 +380,7 @@ static int Control( sout_stream_t *p_stream, int i_query, va_list args )
static void Flush( sout_stream_t *p_stream, void *_id)
{
+ VLC_UNUSED(p_stream);
sout_stream_id_sys_t *id = (sout_stream_id_sys_t *)_id;
enum es_format_category_e i_cat = id->b_transcode && id->p_decoder != NULL ?
id->p_decoder->fmt_in->i_cat : UNKNOWN_ES;
=====================================
modules/video_chroma/i420_rgb.c
=====================================
@@ -46,7 +46,7 @@ static void Set8bppPalette( filter_t *, uint8_t * );
/*****************************************************************************
* RGB2PIXEL: assemble RGB components to a pixel value, returns a uint32_t
*****************************************************************************/
-#define RGB2PIXEL( p_filter, i_r, i_g, i_b ) \
+#define RGB2PIXEL( i_r, i_g, i_b ) \
((((i_r) >> i_rrshift) << i_lrshift) \
| (((i_g) >> i_rgshift) << i_lgshift) \
| (((i_b) >> i_rbshift) << i_lbshift))
@@ -338,24 +338,24 @@ static void SetYUV( filter_t *p_filter, const video_format_t *vfmt )
p_sys->p_rgb16 = (uint16_t *)p_sys->p_base;
for( unsigned i_index = 0; i_index < RED_MARGIN; i_index++ )
{
- p_sys->p_rgb16[RED_OFFSET - RED_MARGIN + i_index] = RGB2PIXEL( p_filter, 0, 0, 0 );
- p_sys->p_rgb16[RED_OFFSET + 256 + i_index] = RGB2PIXEL( p_filter, 255, 0, 0 );
+ p_sys->p_rgb16[RED_OFFSET - RED_MARGIN + i_index] = RGB2PIXEL( 0, 0, 0 );
+ p_sys->p_rgb16[RED_OFFSET + 256 + i_index] = RGB2PIXEL( 255, 0, 0 );
}
for( unsigned i_index = 0; i_index < GREEN_MARGIN; i_index++ )
{
- p_sys->p_rgb16[GREEN_OFFSET - GREEN_MARGIN + i_index] = RGB2PIXEL( p_filter, 0, 0, 0 );
- p_sys->p_rgb16[GREEN_OFFSET + 256 + i_index] = RGB2PIXEL( p_filter, 0, 255, 0 );
+ p_sys->p_rgb16[GREEN_OFFSET - GREEN_MARGIN + i_index] = RGB2PIXEL( 0, 0, 0 );
+ p_sys->p_rgb16[GREEN_OFFSET + 256 + i_index] = RGB2PIXEL( 0, 255, 0 );
}
for( unsigned i_index = 0; i_index < BLUE_MARGIN; i_index++ )
{
- p_sys->p_rgb16[BLUE_OFFSET - BLUE_MARGIN + i_index] = RGB2PIXEL( p_filter, 0, 0, 0 );
- p_sys->p_rgb16[BLUE_OFFSET + BLUE_MARGIN + i_index] = RGB2PIXEL( p_filter, 0, 0, 255 );
+ p_sys->p_rgb16[BLUE_OFFSET - BLUE_MARGIN + i_index] = RGB2PIXEL( 0, 0, 0 );
+ p_sys->p_rgb16[BLUE_OFFSET + BLUE_MARGIN + i_index] = RGB2PIXEL( 0, 0, 255 );
}
for( unsigned i_index = 0; i_index < 256; i_index++ )
{
- p_sys->p_rgb16[RED_OFFSET + i_index] = RGB2PIXEL( p_filter, i_index, 0, 0 );
- p_sys->p_rgb16[GREEN_OFFSET + i_index] = RGB2PIXEL( p_filter, 0, i_index, 0 );
- p_sys->p_rgb16[BLUE_OFFSET + i_index] = RGB2PIXEL( p_filter, 0, 0, i_index );
+ p_sys->p_rgb16[RED_OFFSET + i_index] = RGB2PIXEL( i_index, 0, 0 );
+ p_sys->p_rgb16[GREEN_OFFSET + i_index] = RGB2PIXEL( 0, i_index, 0 );
+ p_sys->p_rgb16[BLUE_OFFSET + i_index] = RGB2PIXEL( 0, 0, i_index );
}
break;
@@ -364,24 +364,24 @@ static void SetYUV( filter_t *p_filter, const video_format_t *vfmt )
p_sys->p_rgb32 = (uint32_t *)p_sys->p_base;
for( unsigned i_index = 0; i_index < RED_MARGIN; i_index++ )
{
- p_sys->p_rgb32[RED_OFFSET - RED_MARGIN + i_index] = RGB2PIXEL( p_filter, 0, 0, 0 );
- p_sys->p_rgb32[RED_OFFSET + 256 + i_index] = RGB2PIXEL( p_filter, 255, 0, 0 );
+ p_sys->p_rgb32[RED_OFFSET - RED_MARGIN + i_index] = RGB2PIXEL( 0, 0, 0 );
+ p_sys->p_rgb32[RED_OFFSET + 256 + i_index] = RGB2PIXEL( 255, 0, 0 );
}
for( unsigned i_index = 0; i_index < GREEN_MARGIN; i_index++ )
{
- p_sys->p_rgb32[GREEN_OFFSET - GREEN_MARGIN + i_index] = RGB2PIXEL( p_filter, 0, 0, 0 );
- p_sys->p_rgb32[GREEN_OFFSET + 256 + i_index] = RGB2PIXEL( p_filter, 0, 255, 0 );
+ p_sys->p_rgb32[GREEN_OFFSET - GREEN_MARGIN + i_index] = RGB2PIXEL( 0, 0, 0 );
+ p_sys->p_rgb32[GREEN_OFFSET + 256 + i_index] = RGB2PIXEL( 0, 255, 0 );
}
for( unsigned i_index = 0; i_index < BLUE_MARGIN; i_index++ )
{
- p_sys->p_rgb32[BLUE_OFFSET - BLUE_MARGIN + i_index] = RGB2PIXEL( p_filter, 0, 0, 0 );
- p_sys->p_rgb32[BLUE_OFFSET + BLUE_MARGIN + i_index] = RGB2PIXEL( p_filter, 0, 0, 255 );
+ p_sys->p_rgb32[BLUE_OFFSET - BLUE_MARGIN + i_index] = RGB2PIXEL( 0, 0, 0 );
+ p_sys->p_rgb32[BLUE_OFFSET + BLUE_MARGIN + i_index] = RGB2PIXEL( 0, 0, 255 );
}
for( unsigned i_index = 0; i_index < 256; i_index++ )
{
- p_sys->p_rgb32[RED_OFFSET + i_index] = RGB2PIXEL( p_filter, i_index, 0, 0 );
- p_sys->p_rgb32[GREEN_OFFSET + i_index] = RGB2PIXEL( p_filter, 0, i_index, 0 );
- p_sys->p_rgb32[BLUE_OFFSET + i_index] = RGB2PIXEL( p_filter, 0, 0, i_index );
+ p_sys->p_rgb32[RED_OFFSET + i_index] = RGB2PIXEL( i_index, 0, 0 );
+ p_sys->p_rgb32[GREEN_OFFSET + i_index] = RGB2PIXEL( 0, i_index, 0 );
+ p_sys->p_rgb32[BLUE_OFFSET + i_index] = RGB2PIXEL( 0, 0, i_index );
}
break;
}
View it on GitLab: https://code.videolan.org/videolan/vlc/-/compare/effe39be81f79173b593fe0f3934c7a52f457529...1127d5fc7e88a0ee6fed103ad1e3c16a7d40de8a
--
View it on GitLab: https://code.videolan.org/videolan/vlc/-/compare/effe39be81f79173b593fe0f3934c7a52f457529...1127d5fc7e88a0ee6fed103ad1e3c16a7d40de8a
You're receiving this email because of your account on code.videolan.org.
VideoLAN code repository instance
More information about the vlc-commits
mailing list