Changeset 4904140690f8630d53466a35914f0a37aa5154a4
- Timestamp:
- 08/30/04 03:24:08
(4 years ago)
- Author:
- Gildas Bazin <gbazin@videolan.org>
- git-committer:
- Gildas Bazin <gbazin@videolan.org> 1093829048 +0000
- git-parent:
[60349e21f45e7da3341c13d28e4b36ba0913dfd1]
- git-author:
- Gildas Bazin <gbazin@videolan.org> 1093829048 +0000
- Message:
* modules/video_chroma/i420_rgb16.c: take care of width != pitch as well.
-
Files:
-
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
| r41a8349 |
r4904140 |
|
| 3 | 3 | ***************************************************************************** |
|---|
| 4 | 4 | * Copyright (C) 2000 VideoLAN |
|---|
| 5 | | * $Id: i420_rgb16.c,v 1.5 2003/08/29 18:58:05 fenrir Exp $ |
|---|
| | 5 | * $Id$ |
|---|
| 6 | 6 | * |
|---|
| 7 | 7 | * Authors: Samuel Hocevar <sam@zoy.org> |
|---|
| … | … | |
| 83 | 83 | int * p_offset; |
|---|
| 84 | 84 | |
|---|
| | 85 | const int i_source_margin = p_src->p[0].i_pitch |
|---|
| | 86 | - p_src->p[0].i_visible_pitch; |
|---|
| | 87 | const int i_source_margin_c = p_src->p[1].i_pitch |
|---|
| | 88 | - p_src->p[1].i_visible_pitch; |
|---|
| | 89 | |
|---|
| 85 | 90 | /* The dithering matrices */ |
|---|
| 86 | 91 | int dither10[4] = { 0x0, 0x8, 0x2, 0xa }; |
|---|
| … | … | |
| 173 | 178 | SCALE_WIDTH; |
|---|
| 174 | 179 | SCALE_HEIGHT( 420, 2 ); |
|---|
| | 180 | |
|---|
| | 181 | p_y += i_source_margin; |
|---|
| | 182 | if( i_y % 2 ) |
|---|
| | 183 | { |
|---|
| | 184 | p_u += i_source_margin_c; |
|---|
| | 185 | p_v += i_source_margin_c; |
|---|
| | 186 | } |
|---|
| 175 | 187 | } |
|---|
| 176 | 188 | } |
|---|
| … | … | |
| 220 | 232 | int * p_offset; |
|---|
| 221 | 233 | |
|---|
| | 234 | const int i_source_margin = p_src->p[0].i_pitch |
|---|
| | 235 | - p_src->p[0].i_visible_pitch; |
|---|
| | 236 | const int i_source_margin_c = p_src->p[1].i_pitch |
|---|
| | 237 | - p_src->p[1].i_visible_pitch; |
|---|
| | 238 | |
|---|
| 222 | 239 | i_right_margin = p_dest->p->i_pitch - p_dest->p->i_visible_pitch; |
|---|
| 223 | 240 | |
|---|
| … | … | |
| 343 | 360 | SCALE_WIDTH; |
|---|
| 344 | 361 | SCALE_HEIGHT( 420, 2 ); |
|---|
| | 362 | |
|---|
| | 363 | p_y += i_source_margin; |
|---|
| | 364 | if( i_y % 2 ) |
|---|
| | 365 | { |
|---|
| | 366 | p_u += i_source_margin_c; |
|---|
| | 367 | p_v += i_source_margin_c; |
|---|
| | 368 | } |
|---|
| 345 | 369 | } |
|---|
| 346 | 370 | } |
|---|
| … | … | |
| 389 | 413 | int * p_offset; |
|---|
| 390 | 414 | |
|---|
| | 415 | const int i_source_margin = p_src->p[0].i_pitch |
|---|
| | 416 | - p_src->p[0].i_visible_pitch; |
|---|
| | 417 | const int i_source_margin_c = p_src->p[1].i_pitch |
|---|
| | 418 | - p_src->p[1].i_visible_pitch; |
|---|
| | 419 | |
|---|
| 391 | 420 | i_right_margin = p_dest->p->i_pitch - p_dest->p->i_visible_pitch; |
|---|
| 392 | 421 | |
|---|
| … | … | |
| 472 | 501 | SCALE_WIDTH; |
|---|
| 473 | 502 | SCALE_HEIGHT( 420, 4 ); |
|---|
| | 503 | |
|---|
| | 504 | p_y += i_source_margin; |
|---|
| | 505 | if( i_y % 2 ) |
|---|
| | 506 | { |
|---|
| | 507 | p_u += i_source_margin_c; |
|---|
| | 508 | p_v += i_source_margin_c; |
|---|
| | 509 | } |
|---|
| 474 | 510 | } |
|---|
| 475 | 511 | } |
|---|