[vlc-devel] commit: Removed video_format_FixRgb from blend.c (Laurent Aimar )

git version control git at videolan.org
Thu Aug 21 00:08:10 CEST 2008


vlc | branch: master | Laurent Aimar <fenrir at videolan.org> | Wed Aug 20 23:52:32 2008 +0200| [249fb10047dbb45e50165ae1c2708cf6c391ca55] | committer: Laurent Aimar 

Removed video_format_FixRgb from blend.c

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

 modules/video_filter/blend.c |  104 ------------------------------------------
 1 files changed, 0 insertions(+), 104 deletions(-)

diff --git a/modules/video_filter/blend.c b/modules/video_filter/blend.c
index 11ee448..7fa5beb 100644
--- a/modules/video_filter/blend.c
+++ b/modules/video_filter/blend.c
@@ -117,8 +117,6 @@ static void BlendRGBAR16( filter_t *, picture_t *, picture_t *, picture_t *,
 static void BlendRGBAR24( filter_t *, picture_t *, picture_t *, picture_t *,
                           int, int, int, int, int );
 
-static void video_format_FixRgb( video_format_t *p_fmt );
-
 /*****************************************************************************
  * OpenFilter: probe the filter and return score
  *****************************************************************************/
@@ -390,27 +388,6 @@ static void vlc_blend_rgb16( uint16_t *p_dst, const uint16_t *p_src,
              ( vlc_blend( B >> p_fmt->i_rbshift, b, i_alpha ) << p_fmt->i_lbshift );
 }
 
-/*****************************************************************************
- * BinaryLog: computes the base 2 log of a binary value
- *****************************************************************************
- * This functions is used by MaskToShift, to get a bit index from a binary
- * value.
- *****************************************************************************/
-static int BinaryLog( uint32_t i )
-{
-    int i_log = 0;
-
-    if( i == 0 ) return -31337;
-
-    if( i & 0xffff0000 ) i_log += 16;
-    if( i & 0xff00ff00 ) i_log += 8;
-    if( i & 0xf0f0f0f0 ) i_log += 4;
-    if( i & 0xcccccccc ) i_log += 2;
-    if( i & 0xaaaaaaaa ) i_log += 1;
-
-    return i_log;
-}
-
 static void vlc_rgb_index( int *pi_rindex, int *pi_gindex, int *pi_bindex,
                            const video_format_t *p_fmt )
 {
@@ -430,87 +407,6 @@ static void vlc_rgb_index( int *pi_rindex, int *pi_gindex, int *pi_bindex,
 #endif
 }
 
-/**
- * It transforms a color mask into right and left shifts
- * FIXME copied from video_output.c
- */
-static void MaskToShift( int *pi_left, int *pi_right, uint32_t i_mask )
-{
-    uint32_t i_low, i_high;            /* lower hand higher bits of the mask */
-
-    if( !i_mask )
-    {
-        *pi_left = *pi_right = 0;
-        return;
-    }
-
-    /* Get bits */
-    i_low = i_high = i_mask;
-
-    i_low &= - (int32_t)i_low;          /* lower bit of the mask */
-    i_high += i_low;                    /* higher bit of the mask */
-
-    /* Transform bits into an index. Also deal with i_high overflow, which
-     * is faster than changing the BinaryLog code to handle 64 bit integers. */
-    i_low =  BinaryLog (i_low);
-    i_high = i_high ? BinaryLog (i_high) : 32;
-
-    /* Update pointers and return */
-    *pi_left =   i_low;
-    *pi_right = (8 - i_high + i_low);
-}
-
-/* FIXME should be moved to src/ */
-static void video_format_FixRgb( video_format_t *p_fmt )
-{
-    if( p_fmt->i_chroma != FCC_RV15 &&
-        p_fmt->i_chroma != FCC_RV16 &&
-        p_fmt->i_chroma != FCC_RV24 &&
-        p_fmt->i_chroma != FCC_RV32 )
-        return;
-
-    /* FIXME find right default mask */
-    if( !p_fmt->i_rmask || !p_fmt->i_gmask || !p_fmt->i_bmask )
-    {
-        switch( p_fmt->i_chroma )
-        {
-        case FCC_RV15:
-            p_fmt->i_rmask = 0x7c00;
-            p_fmt->i_gmask = 0x03e0;
-            p_fmt->i_bmask = 0x001f;
-            break;
-
-        case FCC_RV16:
-            p_fmt->i_rmask = 0xf800;
-            p_fmt->i_gmask = 0x07e0;
-            p_fmt->i_bmask = 0x001f;
-            break;
-
-        case FCC_RV24:
-            p_fmt->i_rmask = 0xff0000;
-            p_fmt->i_gmask = 0x00ff00;
-            p_fmt->i_bmask = 0x0000ff;
-            break;
-        case FCC_RV32:
-            p_fmt->i_rmask = 0x00ff0000;
-            p_fmt->i_gmask = 0x0000ff00;
-            p_fmt->i_bmask = 0x000000ff;
-            break;
-
-        default:
-            assert(0);
-            break;
-        }
-    }
-
-    MaskToShift( &p_fmt->i_lrshift, &p_fmt->i_rrshift,
-                 p_fmt->i_rmask );
-    MaskToShift( &p_fmt->i_lgshift, &p_fmt->i_rgshift,
-                 p_fmt->i_gmask );
-    MaskToShift( &p_fmt->i_lbshift, &p_fmt->i_rbshift,
-                 p_fmt->i_bmask );
-}
-
 /***********************************************************************
  * YUVA
  ***********************************************************************/




More information about the vlc-devel mailing list