[vlc-commits] es_format: remove left RGB shifts

Rémi Denis-Courmont git at videolan.org
Mon Dec 17 18:46:16 CET 2018


vlc | branch: master | Rémi Denis-Courmont <remi at remlab.net> | Mon Dec 17 19:38:22 2018 +0200| [8a2d6cd0b034a414f1639dac1c8754dcc01d42bf] | committer: Rémi Denis-Courmont

es_format: remove left RGB shifts

This carried no data, was rarely used and waste 12 bytes per format.

> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=8a2d6cd0b034a414f1639dac1c8754dcc01d42bf
---

 include/vlc_es.h     |  3 ---
 src/misc/es_format.c | 14 --------------
 src/misc/filter.c    |  3 ---
 3 files changed, 20 deletions(-)

diff --git a/include/vlc_es.h b/include/vlc_es.h
index 052659f204..e2a02cd27f 100644
--- a/include/vlc_es.h
+++ b/include/vlc_es.h
@@ -366,9 +366,6 @@ struct video_format_t
     unsigned int i_frame_rate_base;              /**< frame rate denominator */
 
     uint32_t i_rmask, i_gmask, i_bmask;      /**< color masks for RGB chroma */
-    int i_lrshift;
-    int i_lgshift;
-    int i_lbshift;
     video_palette_t *p_palette;              /**< video palette from demuxer */
     video_orientation_t orientation;                /**< picture orientation */
     video_color_primaries_t primaries;                  /**< color primaries */
diff --git a/src/misc/es_format.c b/src/misc/es_format.c
index 716f9b111f..e0fba3c738 100644
--- a/src/misc/es_format.c
+++ b/src/misc/es_format.c
@@ -34,16 +34,6 @@
 #include <vlc_common.h>
 #include <vlc_es.h>
 
-
-/**
- * It transforms a color mask into right and left shifts
- * FIXME copied from video_output.c
- */
-static void MaskToShift( int *pi_left, uint32_t i_mask )
-{
-    *pi_left = ctz(i_mask);
-}
-
 /* */
 void video_format_FixRgb( video_format_t *p_fmt )
 {
@@ -79,10 +69,6 @@ void video_format_FixRgb( video_format_t *p_fmt )
             return;
         }
     }
-
-    MaskToShift( &p_fmt->i_lrshift, p_fmt->i_rmask );
-    MaskToShift( &p_fmt->i_lgshift, p_fmt->i_gmask );
-    MaskToShift( &p_fmt->i_lbshift, p_fmt->i_bmask );
 }
 
 void video_format_Setup( video_format_t *p_fmt, vlc_fourcc_t i_chroma,
diff --git a/src/misc/filter.c b/src/misc/filter.c
index a57097b119..d01390041b 100644
--- a/src/misc/filter.c
+++ b/src/misc/filter.c
@@ -118,9 +118,6 @@ filter_t *filter_NewBlend( vlc_object_t *p_this,
     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;
-    p_blend->fmt_out.video.i_lrshift= p_dst_chroma->i_lrshift;
-    p_blend->fmt_out.video.i_lgshift= p_dst_chroma->i_lgshift;
-    p_blend->fmt_out.video.i_lbshift= p_dst_chroma->i_lbshift;
 
     /* The blend module will be loaded when needed with the real
     * input format */



More information about the vlc-commits mailing list