Changeset 3cef8ec17ec505720d45f0659cb9c2b5e5c842b9

Show
Ignore:
Timestamp:
08/30/04 03:26:14 (4 years ago)
Author:
Gildas Bazin <gbazin@videolan.org>
git-committer:
Gildas Bazin <gbazin@videolan.org> 1093829174 +0000
git-parent:

[4904140690f8630d53466a35914f0a37aa5154a4]

git-author:
Gildas Bazin <gbazin@videolan.org> 1093829174 +0000
Message:

* modules/video_chroma/i420_rgb8.c: take care of width != pitch as well.

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • modules/video_chroma/i420_rgb8.c

    r41a8349 r3cef8ec  
    33 ***************************************************************************** 
    44 * Copyright (C) 2000 VideoLAN 
    5  * $Id: i420_rgb8.c,v 1.3 2003/08/29 18:58:05 fenrir Exp
     5 * $Id
    66 * 
    77 * Authors: Samuel Hocevar <sam@zoy.org> 
     
    6262    int *       p_offset; 
    6363 
     64    const int i_source_margin = p_src->p[0].i_pitch 
     65                                 - p_src->p[0].i_visible_pitch; 
     66    const int i_source_margin_c = p_src->p[1].i_pitch 
     67                                 - p_src->p[1].i_visible_pitch; 
     68 
    6469    /* The dithering matrices */ 
    6570    static int dither10[4] = {  0x0,  0x8,  0x2,  0xa }; 
     
    8994        SCALE_WIDTH_DITHER( 420 ); 
    9095        SCALE_HEIGHT_DITHER( 420 ); 
     96    } 
     97 
     98    p_y += i_source_margin; 
     99    if( i_y % 2 ) 
     100    { 
     101        p_u += i_source_margin_c; 
     102        p_v += i_source_margin_c; 
    91103    } 
    92104}