Changeset 20e0dd7eb7c2e6debe9f5546784a422033e5d1bb
- Timestamp:
- 28/08/08 21:23:26
(3 months ago)
- Author:
- Laurent Aimar <fenrir@videolan.org>
- git-committer:
- Laurent Aimar <fenrir@videolan.org> 1219951406 +0200
- git-parent:
[24ed0b35086f2435f61c78ea712c0af801537c73]
- git-author:
- Laurent Aimar <fenrir@videolan.org> 1219951406 +0200
- Message:
Fixed(woraround) another bug of swscaler when ask to do a nop.
If we ask to convert but this conversion does nothing (same chroma and
same width/height, swscaler does not copy the pixels.
-
Files:
-
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
| rfb7f014 |
r20e0dd7 |
|
| 98 | 98 | picture_t *p_dst_e; |
|---|
| 99 | 99 | bool b_add_a; |
|---|
| | 100 | bool b_copy; |
|---|
| 100 | 101 | }; |
|---|
| 101 | 102 | |
|---|
| … | … | |
| 111 | 112 | bool b_add_a; |
|---|
| 112 | 113 | int i_sws_flags; |
|---|
| | 114 | bool b_copy; |
|---|
| 113 | 115 | } ScalerConfiguration; |
|---|
| 114 | 116 | |
|---|
| … | … | |
| 307 | 309 | p_cfg->b_has_a = b_has_ai && b_has_ao; |
|---|
| 308 | 310 | p_cfg->b_add_a = (!b_has_ai) && b_has_ao; |
|---|
| | 311 | p_cfg->b_copy = i_fmti == i_fmto && p_fmti->i_width == p_fmto->i_width && p_fmti->i_width && p_fmto->i_height; |
|---|
| 309 | 312 | p_cfg->i_sws_flags = i_sws_flags; |
|---|
| 310 | 313 | } |
|---|
| … | … | |
| 389 | 392 | |
|---|
| 390 | 393 | p_sys->b_add_a = cfg.b_add_a; |
|---|
| | 394 | p_sys->b_copy = cfg.b_copy; |
|---|
| 391 | 395 | p_sys->fmt_in = *p_fmti; |
|---|
| 392 | 396 | p_sys->fmt_out = *p_fmto; |
|---|
| … | … | |
| 543 | 547 | } |
|---|
| 544 | 548 | |
|---|
| 545 | | Convert( p_sys->ctx, p_dst, p_src, p_fmti->i_height, 0, 3 ); |
|---|
| | 549 | if( p_sys->b_copy ) |
|---|
| | 550 | picture_CopyPixels( p_dst, p_src ); |
|---|
| | 551 | else |
|---|
| | 552 | Convert( p_sys->ctx, p_dst, p_src, p_fmti->i_height, 0, 3 ); |
|---|
| 546 | 553 | if( p_sys->ctxA ) |
|---|
| 547 | 554 | { |
|---|