Browse Source

vlc_es: remove always 0 video_format_t RGB mask

pull/162/head
Steve Lhomme 3 years ago
committed by Jean-Baptiste Kempf
parent
commit
47af51ec58
  1. 1
      include/vlc_es.h
  2. 3
      modules/access/v4l2/video.c
  3. 3
      modules/codec/arib/libaribcaption.c
  4. 17
      modules/codec/avcodec/chroma.c
  5. 3
      modules/codec/avcodec/encoder.c
  6. 6
      modules/codec/avcodec/video.c
  7. 3
      modules/codec/cdg.c
  8. 3
      modules/codec/jpeg.c
  9. 3
      modules/codec/mft.cpp
  10. 6
      modules/codec/oggspots.c
  11. 3
      modules/codec/png.c
  12. 3
      modules/codec/qsv.c
  13. 3
      modules/codec/rtp-rawvid.c
  14. 3
      modules/codec/svg.c
  15. 13
      modules/demux/avi/bitmapinfoheader.h
  16. 6
      modules/demux/mp4/essetup.c
  17. 4
      modules/hw/d3d9/dxa9.c
  18. 3
      modules/hw/nvdec/nvdec.c
  19. 3
      modules/hw/nvdec/nvdec_gl.c
  20. 1
      modules/stream_out/mosaic_bridge.c
  21. 1
      modules/stream_out/renderer_common.cpp
  22. 6
      modules/video_chroma/chain.c
  23. 1
      modules/video_output/caca.c
  24. 1
      modules/video_output/flaschen.c
  25. 4
      modules/video_output/kva.c
  26. 6
      modules/video_output/opengl/filters.c
  27. 3
      modules/video_output/opengl/interop_sw.c
  28. 10
      modules/video_output/vmem.c
  29. 3
      modules/video_output/wayland/shm.c
  30. 8
      modules/video_output/win32/direct3d11.cpp
  31. 1
      modules/video_output/win32/direct3d9.c
  32. 12
      modules/video_output/win32/wingdi.c
  33. 3
      modules/video_output/xcb/pictures.c
  34. 6
      modules/video_output/xcb/render.c
  35. 5
      src/misc/es_format.c
  36. 3
      src/misc/filter.c
  37. 14
      src/video_output/vout_subpictures.c

1
include/vlc_es.h

@ -368,7 +368,6 @@ struct video_format_t
unsigned int i_frame_rate; /**< frame rate numerator */
unsigned int i_frame_rate_base; /**< frame rate denominator */
uint32_t i_rmask, i_gmask, i_bmask; /**< color masks for RGB chroma */
video_palette_t *p_palette; /**< video palette from demuxer */
video_orientation_t orientation; /**< picture orientation */
video_color_primaries_t primaries; /**< color primaries */

3
modules/access/v4l2/video.c

@ -840,9 +840,6 @@ int SetupVideo(vlc_object_t *obj, int fd, uint32_t caps,
/* Setup our unique elementary (video) stream format */
es_format_Init(es_fmt, VIDEO_ES, selected->vlc);
es_fmt->video.i_chroma = selected->vlc;
es_fmt->video.i_rmask = 0;
es_fmt->video.i_gmask = 0;
es_fmt->video.i_bmask = 0;
es_fmt->video.i_visible_width = fmt.fmt.pix.width;
if (fmt.fmt.pix.bytesperline != 0 && selected->bpp != 0)
es_fmt->video.i_width = fmt.fmt.pix.bytesperline / selected->bpp;

3
modules/codec/arib/libaribcaption.c

@ -166,9 +166,6 @@ static void SubpictureUpdate(subpicture_t *p_subpic,
video_format_t fmt = *p_dst_format;
fmt.i_chroma = VLC_CODEC_RGBA;
fmt.i_rmask = 0;
fmt.i_gmask = 0;
fmt.i_bmask = 0;
fmt.i_x_offset = 0;
fmt.i_y_offset = 0;

17
modules/codec/avcodec/chroma.c

@ -225,25 +225,11 @@ enum AVPixelFormat GetFfmpegChroma( const video_format_t *fmt )
{
for( int i = 0; chroma_table[i].i_chroma != 0; i++ )
{
if( chroma_table[i].i_chroma == fmt->i_chroma &&
0 == fmt->i_rmask &&
0 == fmt->i_gmask &&
0 == fmt->i_bmask )
if( chroma_table[i].i_chroma == fmt->i_chroma )
{
return chroma_table[i].i_chroma_id;
}
}
// try again without the mask as they may not correspond exactly
if (fmt->i_rmask || fmt->i_gmask || fmt->i_bmask)
{
for( int i = 0; chroma_table[i].i_chroma != 0; i++ )
{
if( chroma_table[i].i_chroma == fmt->i_chroma )
{
return chroma_table[i].i_chroma_id;
}
}
}
return AV_PIX_FMT_NONE;
}
@ -261,7 +247,6 @@ int GetVlcChroma( video_format_t *fmt, enum AVPixelFormat i_ffmpeg_chroma )
{
if( chroma_table[i].i_chroma_id == i_ffmpeg_chroma )
{
fmt->i_rmask = fmt->i_gmask = fmt->i_bmask = 0;
fmt->i_chroma = chroma_table[i].i_chroma;
return VLC_SUCCESS;
}

3
modules/codec/avcodec/encoder.c

@ -561,9 +561,6 @@ int InitVideoEnc( vlc_object_t *p_this )
p_enc->fmt_in.i_codec =
p_enc->fmt_in.video.i_chroma = VLC_CODEC_I420;
p_enc->fmt_in.video.i_rmask = 0;
p_enc->fmt_in.video.i_gmask = 0;
p_enc->fmt_in.video.i_bmask = 0;
/* Very few application support YUV in TIFF, not even VLC */
if( p_enc->fmt_out.i_codec == VLC_CODEC_TIFF )

6
modules/codec/avcodec/video.c

@ -652,9 +652,6 @@ static int ffmpeg_OpenVa(decoder_t *p_dec, AVCodecContext *p_context,
vlc_mutex_unlock(open_lock);
p_dec->fmt_out.video.i_chroma = 0; // make sure the va sets its output chroma
p_dec->fmt_out.video.i_rmask = 0;
p_dec->fmt_out.video.i_gmask = 0;
p_dec->fmt_out.video.i_bmask = 0;
vlc_video_context *vctx_out;
vlc_va_t *va = vlc_va_New(VLC_OBJECT(p_dec), p_context, hwfmt, src_desc,
p_dec->fmt_in, init_device,
@ -1466,9 +1463,6 @@ static int DecodeBlock( decoder_t *p_dec, block_t **pp_block )
assert( frame->data[1] != NULL );
lavc_Frame8PaletteCopy( p_palette, frame->data[1] );
p_dec->fmt_out.video.i_chroma = VLC_CODEC_RGBP;
p_dec->fmt_out.video.i_rmask = 0;
p_dec->fmt_out.video.i_gmask = 0;
p_dec->fmt_out.video.i_bmask = 0;
if( decoder_UpdateVideoFormat( p_dec ) )
{
vlc_mutex_unlock(&p_sys->lock);

3
modules/codec/cdg.c

@ -116,9 +116,6 @@ static int Open( vlc_object_t *p_this )
p_dec->fmt_out.video.i_height = CDG_DISPLAY_HEIGHT;
p_dec->fmt_out.video.i_sar_num = 1;
p_dec->fmt_out.video.i_sar_den = 1;
p_dec->fmt_out.video.i_rmask = 0;
p_dec->fmt_out.video.i_gmask = 0;
p_dec->fmt_out.video.i_bmask = 0;
/* Set callbacks */
p_dec->pf_decode = Decode;

3
modules/codec/jpeg.c

@ -188,9 +188,6 @@ static int OpenDecoder(vlc_object_t *p_this)
p_dec->fmt_out.i_codec =
p_dec->fmt_out.video.i_chroma = VLC_CODEC_RGB24;
p_dec->fmt_out.video.i_rmask = 0;
p_dec->fmt_out.video.i_gmask = 0;
p_dec->fmt_out.video.i_bmask = 0;
p_dec->fmt_out.video.transfer = TRANSFER_FUNC_SRGB;
p_dec->fmt_out.video.space = COLOR_SPACE_SRGB;
p_dec->fmt_out.video.primaries = COLOR_PRIMARIES_SRGB;

3
modules/codec/mft.cpp

@ -930,9 +930,6 @@ static int ProcessOutputStream(decoder_t *p_dec, DWORD stream_id, bool & keep_re
p_dec->fmt_out.i_codec = p_sys->cfg->fourcc;
p_dec->fmt_out.video.i_chroma = p_sys->cfg->fourcc;
p_dec->fmt_out.video.i_rmask = 0;
p_dec->fmt_out.video.i_gmask = 0;
p_dec->fmt_out.video.i_bmask = 0;
// pre allocate all the SRV for that texture
for (size_t slice=0; slice < desc.ArraySize; slice++)

6
modules/codec/oggspots.c

@ -354,15 +354,9 @@ static picture_t* DecodePacket(decoder_t* p_dec, block_t* p_block)
es_format_t fmt_in = *p_dec->fmt_in;
if ( !memcmp(&p_block->p_buffer[4], "PNG", 3) ) {
fmt_in.video.i_chroma = VLC_CODEC_PNG;
fmt_in.video.i_rmask = 0;
fmt_in.video.i_gmask = 0;
fmt_in.video.i_bmask = 0;
}
else if ( !memcmp(&p_block->p_buffer[4], "JPEG", 4) ) {
fmt_in.video.i_chroma = VLC_CODEC_JPEG;
fmt_in.video.i_rmask = 0;
fmt_in.video.i_gmask = 0;
fmt_in.video.i_bmask = 0;
}
else {
char psz_image_type[8+1];

3
modules/codec/png.c

@ -430,9 +430,6 @@ static int OpenEncoder(vlc_object_t *p_this)
p_enc->fmt_in.i_codec =
p_enc->fmt_in.video.i_chroma = VLC_CODEC_RGB24;
p_enc->fmt_in.video.i_rmask = 0;
p_enc->fmt_in.video.i_gmask = 0;
p_enc->fmt_in.video.i_bmask = 0;
static const struct vlc_encoder_operations ops =
{ .encode_video = EncodeBlock };

3
modules/codec/qsv.c

@ -619,9 +619,6 @@ static int Open(vlc_object_t *this)
/* Vlc module configuration */
enc->fmt_in.i_codec =
enc->fmt_in.video.i_chroma = VLC_CODEC_NV12; // Intel Media SDK requirement
enc->fmt_in.video.i_rmask = 0;
enc->fmt_in.video.i_gmask = 0;
enc->fmt_in.video.i_bmask = 0;
// require aligned pictures on input, a filter may be added before the encoder
enc->fmt_in.video.i_width = sys->params.mfx.FrameInfo.Width;
enc->fmt_in.video.i_height = sys->params.mfx.FrameInfo.Height;

3
modules/codec/rtp-rawvid.c

@ -839,9 +839,6 @@ static int Open(vlc_object_t *obj)
es_format_Copy(&dec->fmt_out, dec->fmt_in);
dec->fmt_out.i_codec = format->fourcc;
dec->fmt_out.video.i_chroma = format->fourcc;
dec->fmt_out.video.i_rmask = 0;
dec->fmt_out.video.i_gmask = 0;
dec->fmt_out.video.i_bmask = 0;
int ret = decoder_UpdateVideoFormat(dec);
if (ret != VLC_SUCCESS)

3
modules/codec/svg.c

@ -192,9 +192,6 @@ static int DecodeBlock( decoder_t *p_dec, block_t *p_block )
p_dec->fmt_out.video.i_visible_height = i_height;
p_dec->fmt_out.video.i_sar_num = 1;
p_dec->fmt_out.video.i_sar_den = 1;
p_dec->fmt_out.video.i_rmask = 0;
p_dec->fmt_out.video.i_gmask = 0;
p_dec->fmt_out.video.i_bmask = 0;
/* Get a new picture */
if( decoder_UpdateVideoFormat( p_dec ) )

13
modules/demux/avi/bitmapinfoheader.h

@ -177,9 +177,6 @@ static inline int ParseBitmapInfoHeader( const VLC_BITMAPINFOHEADER *p_bih, size
if (known_chroma != 0)
{
fmt->video.i_chroma = fmt->i_codec = known_chroma;
fmt->video.i_rmask = 0;
fmt->video.i_gmask = 0;
fmt->video.i_bmask = 0;
}
else
{
@ -220,9 +217,6 @@ static inline int ParseBitmapInfoHeader( const VLC_BITMAPINFOHEADER *p_bih, size
default: return VLC_EINVAL;
}
fmt->video.i_chroma = fmt->i_codec = bi_rgb_chroma;
fmt->video.i_rmask = 0;
fmt->video.i_gmask = 0;
fmt->video.i_bmask = 0;
}
p_props->i_stride = p_bih->biWidth * (p_bih->biBitCount >> 3);
@ -345,13 +339,6 @@ static inline int CreateBitmapInfoHeader( const es_format_t *fmt,
break;
}
}
if (i_rmask == 0)
{
i_rmask = fmt->video.i_rmask;
i_gmask = fmt->video.i_gmask;
i_bmask = fmt->video.i_bmask;
i_amask = 0;
}
SetDWLE( &p_bmiColors[0], i_rmask );
SetDWLE( &p_bmiColors[4], i_gmask );
SetDWLE( &p_bmiColors[8], i_bmask );

6
modules/demux/mp4/essetup.c

@ -426,15 +426,9 @@ int SetupVideoES( demux_t *p_demux, const mp4_track_t *p_track, const MP4_Box_t
break;
case VLC_FOURCC('A','B','G','R'):
p_fmt->i_codec = VLC_CODEC_ARGB;
p_fmt->video.i_rmask = 0;
p_fmt->video.i_gmask = 0;
p_fmt->video.i_bmask = 0;
break;
case VLC_FOURCC('2','4','B','G'):
p_fmt->i_codec = VLC_CODEC_BGR24;
p_fmt->video.i_rmask = 0;
p_fmt->video.i_gmask = 0;
p_fmt->video.i_bmask = 0;
break;
case VLC_FOURCC('r','a','w',' '):
switch( p_vide->i_depth ) {

4
modules/hw/d3d9/dxa9.c

@ -212,9 +212,6 @@ static filter_t *CreateFilter( filter_t *p_this, const es_format_t *p_fmt_in,
es_format_InitFromVideo( &p_filter->fmt_in, &p_fmt_in->video );
es_format_InitFromVideo( &p_filter->fmt_out, &p_fmt_in->video );
p_filter->fmt_out.i_codec = p_filter->fmt_out.video.i_chroma = dst_chroma;
p_filter->fmt_out.video.i_rmask = 0;
p_filter->fmt_out.video.i_gmask = 0;
p_filter->fmt_out.video.i_bmask = 0;
p_filter->p_module = module_need( p_filter, "video converter", NULL, false );
if( !p_filter->p_module )
@ -353,7 +350,6 @@ static picture_t *AllocateCPUtoGPUTexture(filter_t *p_filter)
video_format_Copy(&fmt_staging, &p_filter->fmt_out.video);
fmt_staging.i_chroma = format;
fmt_staging.i_rmask = fmt_staging.i_gmask = fmt_staging.i_bmask = 0;
picture_resource_t dummy_res = { .p_sys = NULL };
picture_t *p_dst = picture_NewFromResource(&fmt_staging, &dummy_res);

3
modules/hw/nvdec/nvdec.c

@ -1001,9 +1001,6 @@ static int OpenDecoder(vlc_object_t *p_this)
for (chroma_idx = 0; output_chromas[chroma_idx] != 0; chroma_idx++)
{
p_dec->fmt_out.i_codec = p_dec->fmt_out.video.i_chroma = output_chromas[chroma_idx];
p_dec->fmt_out.video.i_rmask = 0;
p_dec->fmt_out.video.i_gmask = 0;
p_dec->fmt_out.video.i_bmask = 0;
result = decoder_UpdateVideoOutput(p_dec, p_sys->vctx_out);
if (result == 0)
{

3
modules/hw/nvdec/nvdec_gl.c

@ -290,9 +290,6 @@ static int Open(vlc_object_t *obj)
}
interop->fmt_out.i_chroma = render_chroma;
interop->fmt_out.i_rmask = 0;
interop->fmt_out.i_gmask = 0;
interop->fmt_out.i_bmask = 0;
interop->fmt_out.space = interop->fmt_in.space;
static const struct vlc_gl_interop_ops ops = {

1
modules/stream_out/mosaic_bridge.c

@ -641,7 +641,6 @@ static int video_update_format_decoder( decoder_t *p_dec, vlc_video_context *vct
if( p_sys->i_chroma )
{
fmt.video.i_chroma = p_sys->i_chroma;
fmt.video.i_rmask = fmt.video.i_gmask = fmt.video.i_bmask = 0;
vctx = NULL; // CPU chroma, no video context
}
filter_chain_Reset( p_sys->p_vf2, &fmt, vctx, &fmt );

1
modules/stream_out/renderer_common.cpp

@ -114,7 +114,6 @@ GetVencOption( sout_stream_t *p_stream, std::vector<vlc_fourcc_t> codecs,
es_format_InitFromVideo( &fmt, p_vid );
fmt.i_codec =
fmt.video.i_chroma = VLC_CODEC_I420;
fmt.video.i_rmask = fmt.video.i_gmask = fmt.video.i_bmask = 0;
/* Test the maximum size/fps we will encode */
fmt.video.i_visible_width = fmt.video.i_width = 1920;

6
modules/video_chroma/chain.c

@ -376,9 +376,6 @@ static int BuildChromaChain( filter_t *p_filter )
es_format_Copy( &fmt_mid, &p_filter->fmt_in );
fmt_mid.i_codec =
fmt_mid.video.i_chroma = i_chroma;
fmt_mid.video.i_rmask = 0;
fmt_mid.video.i_gmask = 0;
fmt_mid.video.i_bmask = 0;
i_ret = CreateChain( p_filter, &fmt_mid );
es_format_Clean( &fmt_mid );
@ -423,9 +420,6 @@ static int BuildFilterChain( filter_t *p_filter )
es_format_Copy( &fmt_mid, &p_filter->fmt_in );
fmt_mid.i_codec =
fmt_mid.video.i_chroma = i_chroma;
fmt_mid.video.i_rmask = 0;
fmt_mid.video.i_gmask = 0;
fmt_mid.video.i_bmask = 0;
if( filter_chain_AppendConverter( p_sys->p_chain,
&fmt_mid ) != VLC_SUCCESS )

1
modules/video_output/caca.c

@ -488,7 +488,6 @@ static int Open(vout_display_t *vd,
sys->cursor_deadline = INVALID_DEADLINE;
fmtp->i_chroma = VLC_CODEC_XRGB;
fmtp->i_rmask = fmtp->i_gmask = fmtp->i_bmask = 0;
/* Setup vout_display now that everything is fine */
vd->ops = &ops;

1
modules/video_output/flaschen.c

@ -117,7 +117,6 @@ static int Open(vout_display_t *vd,
video_format_t fmt = *fmtp;
/* TODO: check if this works on big-endian systems */
fmt.i_chroma = VLC_CODEC_RGB24;
fmt.i_rmask = fmt.i_gmask = fmt.i_bmask = 0;
fmt.i_width = var_InheritInteger(vd, "flaschen-width");
fmt.i_height = var_InheritInteger(vd, "flaschen-height");
fmt.i_visible_width = fmt.i_width;

4
modules/video_output/kva.c

@ -602,10 +602,6 @@ static int OpenDisplay( vout_display_t *vd, video_format_t *fmt )
return VLC_EGENERIC;
}
fmt->i_rmask = 0;
fmt->i_gmask = 0;
fmt->i_bmask = 0;
msg_Dbg( vd, "output chroma = %4.4s", ( const char * )&fmt->i_chroma );
msg_Dbg( vd, "KVA chroma = %4.4s", ( const char * )&i_kva_fourcc );

6
modules/video_output/opengl/filters.c

@ -243,12 +243,6 @@ vlc_gl_filters_Append(struct vlc_gl_filters *filters, const char *name,
video_format_t *fmt = &glfmt->fmt;
video_format_Init(fmt, chroma);
if (prev_filter->filter.config.filter_planes)
{
fmt->i_rmask = prev_filter->glfmt_in.fmt.i_rmask;
fmt->i_gmask = prev_filter->glfmt_in.fmt.i_gmask;
fmt->i_bmask = prev_filter->glfmt_in.fmt.i_bmask;
}
fmt->i_width = fmt->i_visible_width = prev_filter->size_out.width;
fmt->i_height = fmt->i_visible_height = prev_filter->size_out.height;

3
modules/video_output/opengl/interop_sw.c

@ -782,9 +782,6 @@ interop_init:
* be created. */
interop->fmt_in.i_chroma = i_chroma;
interop->fmt_in.i_rmask = 0;
interop->fmt_in.i_gmask = 0;
interop->fmt_in.i_bmask = 0;
static const struct vlc_gl_interop_ops ops = {
.allocate_textures = tc_common_allocate_textures,

10
modules/video_output/vmem.c

@ -189,16 +189,6 @@ static int Open(vout_display_t *vd,
return VLC_EGENERIC;
}
/* Define the bitmasks */
switch (fmt.i_chroma)
{
default:
break;
}
fmt.i_rmask = 0;
fmt.i_gmask = 0;
fmt.i_bmask = 0;
/* */
*fmtp = fmt;

3
modules/video_output/wayland/shm.c

@ -337,9 +337,6 @@ static int Open(vout_display_t *vd,
}
fmtp->i_chroma = VLC_CODEC_BGRX;
fmtp->i_rmask = 0;
fmtp->i_gmask = 0;
fmtp->i_bmask = 0;
vd->ops = &ops;

8
modules/video_output/win32/direct3d11.cpp

@ -326,9 +326,6 @@ static int UpdateStaging(vout_display_t *vd, const video_format_t *fmt)
if (!is_d3d11_opaque(fmt->i_chroma))
{
texture_fmt.i_chroma = sys->picQuad.generic.textureFormat->fourcc;
texture_fmt.i_rmask = 0;
texture_fmt.i_gmask = 0;
texture_fmt.i_bmask = 0;
}
if (AllocateTextures(vd, sys->d3d_dev, sys->picQuad.generic.textureFormat, &texture_fmt,
@ -813,7 +810,6 @@ static int Direct3D11Open(vout_display_t *vd, video_format_t *fmtp, vlc_video_co
const vlc_fourcc_t *list = vlc_fourcc_GetFallback(vd->source->i_chroma);
for (unsigned i = 0; list[i] != 0; i++) {
fmt.i_chroma = list[i];
fmt.i_rmask = fmt.i_gmask = fmt.i_bmask = 0;
if (fmt.i_chroma == vd->source->i_chroma)
continue;
err = SetupOutputFormat(vd, &fmt, NULL);
@ -835,9 +831,6 @@ static int Direct3D11Open(vout_display_t *vd, video_format_t *fmtp, vlc_video_co
if (!is_d3d11_opaque(fmt.i_chroma))
{
sys->picQuad.quad_fmt.i_chroma = sys->picQuad.generic.textureFormat->fourcc;
sys->picQuad.quad_fmt.i_rmask = 0;
sys->picQuad.quad_fmt.i_gmask = 0;
sys->picQuad.quad_fmt.i_bmask = 0;
}
/* adjust the decoder sizes to have proper padding */
@ -998,7 +991,6 @@ static int SetupOutputFormat(vout_display_t *vd, video_format_t *fmt, vlc_video_
(char *)&fmt->i_chroma );
fmt->i_chroma = decoder_format ? decoder_format->fourcc : sys->picQuad.generic.textureFormat->fourcc;
fmt->i_rmask = fmt->i_gmask = fmt->i_bmask = 0;
/* check the region pixel format */
sys->regionQuad.generic.textureFormat = GetBlendableFormat(vd, VLC_CODEC_RGBA);

1
modules/video_output/win32/direct3d9.c

@ -1657,7 +1657,6 @@ static int Direct3D9Open(vout_display_t *vd, video_format_t *fmt, vlc_video_cont
/* */
*fmt = *vd->source;
fmt->i_chroma = d3dfmt->fourcc;
fmt->i_rmask = fmt->i_gmask = fmt->i_bmask = 0;
sys->sw_texture_fmt = d3dfmt;
if (Direct3D9CreateResources(vd, fmt)) {

12
modules/video_output/win32/wingdi.c

@ -256,30 +256,18 @@ static int Init(vout_display_t *vd, video_format_t *fmt)
switch (i_depth) {
case 8:
fmt->i_chroma = VLC_CODEC_RGB233;
fmt->i_rmask = 0;
fmt->i_gmask = 0;
fmt->i_bmask = 0;
break;
case 16:
fmt->i_chroma = VLC_CODEC_RGB555LE;
fmt->i_rmask = 0;
fmt->i_gmask = 0;
fmt->i_bmask = 0;
break;
case 24:
fmt->i_chroma = VLC_CODEC_RGB24;
fmt->i_rmask = 0;
fmt->i_gmask = 0;
fmt->i_bmask = 0;
break;
case 32:
if (vd->source->i_chroma == VLC_CODEC_BGRA)
fmt->i_chroma = VLC_CODEC_BGRA;
else
fmt->i_chroma = VLC_CODEC_BGRX;
fmt->i_rmask = 0;
fmt->i_gmask = 0;
fmt->i_bmask = 0;
break;
default:
msg_Err(vd, "screen depth %i not supported", i_depth);

3
modules/video_output/xcb/pictures.c

@ -211,9 +211,6 @@ bool vlc_xcb_VisualToFormat(const xcb_setup_t *setup, uint_fast8_t depth,
vlc_assert_unreachable();
}
f->i_rmask = 0;
f->i_gmask = 0;
f->i_bmask = 0;
return true;
}

6
modules/video_output/xcb/render.c

@ -625,12 +625,6 @@ static int Open(vout_display_t *vd,
continue;
fmtp->i_chroma = chroma;
fmtp->i_rmask = fmtp->i_gmask = fmtp->i_bmask = 0;
#if 0
fmtp->i_rmask = ((uint32_t)d->red_mask) << d->red_shift;
fmtp->i_gmask = ((uint32_t)d->green_mask) << d->green_shift;
fmtp->i_bmask = ((uint32_t)d->blue_mask) << d->blue_shift;
#endif
sys->format.argb = pic_fmt->id;
visual = vid;
}

5
src/misc/es_format.c

@ -260,14 +260,13 @@ void video_format_Print( vlc_object_t *p_this,
else orient = "error";
msg_Dbg( p_this,
"%s sz %ux%u, of (%u,%u), vsz %ux%u, 4cc %4.4s, sar %u:%u, orient: %s, msk r0x%" PRIx32 " g0x%" PRIx32 " b0x%" PRIx32,
"%s sz %ux%u, of (%u,%u), vsz %ux%u, 4cc %4.4s, sar %u:%u, orient: %s",
psz_text,
fmt->i_width, fmt->i_height, fmt->i_x_offset, fmt->i_y_offset,
fmt->i_visible_width, fmt->i_visible_height,
(char*)&fmt->i_chroma,
fmt->i_sar_num, fmt->i_sar_den,
orient,
fmt->i_rmask, fmt->i_gmask, fmt->i_bmask );
orient );
}
void es_format_Init( es_format_t *fmt,

3
src/misc/filter.c

@ -115,9 +115,6 @@ vlc_blender_t *filter_NewBlend( vlc_object_t *p_this,
p_blend->fmt_out.i_codec =
p_blend->fmt_out.video.i_chroma = p_dst_chroma->i_chroma;
p_blend->fmt_out.video.i_rmask = p_dst_chroma->i_rmask;
p_blend->fmt_out.video.i_gmask = p_dst_chroma->i_gmask;
p_blend->fmt_out.video.i_bmask = p_dst_chroma->i_bmask;
/* The blend module will be loaded when needed with the real
* input format */

14
src/video_output/vout_subpictures.c

@ -948,10 +948,7 @@ static void SpuRenderRegion(spu_t *spu,
bool convert_chroma = true;
for (int i = 0; chroma_list[i] && convert_chroma; i++) {
if (region_fmt.i_chroma == chroma_list[i] &&
region_fmt.i_rmask == 0 &&
region_fmt.i_gmask == 0 &&
region_fmt.i_bmask == 0)
if (region_fmt.i_chroma == chroma_list[i])
convert_chroma = false;
}
@ -999,9 +996,6 @@ static void SpuRenderRegion(spu_t *spu,
scale_yuvp->fmt_out.video = region->fmt;
scale_yuvp->fmt_out.video.i_chroma = chroma_list[0];
scale_yuvp->fmt_out.video.i_rmask =
scale_yuvp->fmt_out.video.i_gmask =
scale_yuvp->fmt_out.video.i_bmask = 0;
scale_yuvp->fmt_out.video.p_palette = NULL;
picture = scale_yuvp->ops->filter_video(scale_yuvp, picture);
@ -1027,17 +1021,11 @@ static void SpuRenderRegion(spu_t *spu,
if (using_palette)
{
scale->fmt_in.video.i_chroma = chroma_list[0];
scale->fmt_in.video.i_rmask =
scale->fmt_in.video.i_gmask =
scale->fmt_in.video.i_bmask = 0;
}
if (convert_chroma)
{
scale->fmt_out.i_codec =
scale->fmt_out.video.i_chroma = chroma_list[0];
scale->fmt_out.video.i_rmask =
scale->fmt_out.video.i_gmask =
scale->fmt_out.video.i_bmask = 0;
}
scale->fmt_out.video.i_width = dst_width;

Loading…
Cancel
Save