View | Details | Raw Unified | Return to bug 9978
Collapse All | Expand All

(-)ffmpeg-svn-r6191.orig/libavcodec/imgconvert.c (-2 lines)
Lines 2187-2193 Link Here
2187
    return 0;
2187
    return 0;
2188
}
2188
}
2189
2189
2190
#ifndef CONFIG_SWSCALER
2191
/* XXX: always use linesize. Return -1 if not supported */
2190
/* XXX: always use linesize. Return -1 if not supported */
2192
int img_convert(AVPicture *dst, int dst_pix_fmt,
2191
int img_convert(AVPicture *dst, int dst_pix_fmt,
2193
                const AVPicture *src, int src_pix_fmt,
2192
                const AVPicture *src, int src_pix_fmt,
Lines 2429-2435 Link Here
2429
    avpicture_free(tmp);
2428
    avpicture_free(tmp);
2430
    return ret;
2429
    return ret;
2431
}
2430
}
2432
#endif
2433
2431
2434
/* NOTE: we scan all the pixels to have an exact information */
2432
/* NOTE: we scan all the pixels to have an exact information */
2435
static int get_alpha_info_pal8(const AVPicture *src, int width, int height)
2433
static int get_alpha_info_pal8(const AVPicture *src, int width, int height)
(-)ffmpeg-svn-r6191.orig/libavcodec/Makefile (-2 lines)
Lines 282-290 Link Here
282
282
283
OBJS-$(HAVE_XVMC_ACCEL)                += xvmcvideo.o
283
OBJS-$(HAVE_XVMC_ACCEL)                += xvmcvideo.o
284
284
285
ifneq ($(CONFIG_SWSCALER),yes)
286
OBJS += imgresample.o
285
OBJS += imgresample.o
287
endif
288
286
289
# i386 mmx specific stuff
287
# i386 mmx specific stuff
290
ifeq ($(TARGET_MMX),yes)
288
ifeq ($(TARGET_MMX),yes)
(-)ffmpeg-svn-r6191.orig/libswscale/img_format.h (+120 lines)
Line 0 Link Here
1
2
#ifndef __IMG_FORMAT_H
3
#define __IMG_FORMAT_H
4
5
/* RGB/BGR Formats */
6
7
#define IMGFMT_RGB_MASK 0xFFFFFF00
8
#define IMGFMT_RGB (('R'<<24)|('G'<<16)|('B'<<8))
9
#define IMGFMT_RGB1  (IMGFMT_RGB|1)
10
#define IMGFMT_RGB4  (IMGFMT_RGB|4)
11
#define IMGFMT_RGB4_CHAR  (IMGFMT_RGB|4|128) // RGB4 with 1 pixel per byte
12
#define IMGFMT_RGB8  (IMGFMT_RGB|8)
13
#define IMGFMT_RGB15 (IMGFMT_RGB|15)
14
#define IMGFMT_RGB16 (IMGFMT_RGB|16)
15
#define IMGFMT_RGB24 (IMGFMT_RGB|24)
16
#define IMGFMT_RGB32 (IMGFMT_RGB|32)
17
18
#define IMGFMT_BGR_MASK 0xFFFFFF00
19
#define IMGFMT_BGR (('B'<<24)|('G'<<16)|('R'<<8))
20
#define IMGFMT_BGR1 (IMGFMT_BGR|1)
21
#define IMGFMT_BGR4 (IMGFMT_BGR|4)
22
#define IMGFMT_BGR4_CHAR (IMGFMT_BGR|4|128) // BGR4 with 1 pixel per byte
23
#define IMGFMT_BGR8 (IMGFMT_BGR|8)
24
#define IMGFMT_BGR15 (IMGFMT_BGR|15)
25
#define IMGFMT_BGR16 (IMGFMT_BGR|16)
26
#define IMGFMT_BGR24 (IMGFMT_BGR|24)
27
#define IMGFMT_BGR32 (IMGFMT_BGR|32)
28
29
#ifdef WORDS_BIGENDIAN
30
#define IMGFMT_ABGR IMGFMT_RGB32
31
#define IMGFMT_BGRA (IMGFMT_RGB32|64)
32
#define IMGFMT_ARGB IMGFMT_BGR32
33
#define IMGFMT_RGBA (IMGFMT_BGR32|64)
34
#else
35
#define IMGFMT_ABGR (IMGFMT_BGR32|64)
36
#define IMGFMT_BGRA IMGFMT_BGR32
37
#define IMGFMT_ARGB (IMGFMT_RGB32|64)
38
#define IMGFMT_RGBA IMGFMT_RGB32
39
#endif
40
41
/* old names for compatibility */
42
#define IMGFMT_RG4B  IMGFMT_RGB4_CHAR
43
#define IMGFMT_BG4B  IMGFMT_BGR4_CHAR
44
45
#define IMGFMT_IS_RGB(fmt) (((fmt)&IMGFMT_RGB_MASK)==IMGFMT_RGB)
46
#define IMGFMT_IS_BGR(fmt) (((fmt)&IMGFMT_BGR_MASK)==IMGFMT_BGR)
47
48
#define IMGFMT_RGB_DEPTH(fmt) ((fmt)&0x3F)
49
#define IMGFMT_BGR_DEPTH(fmt) ((fmt)&0x3F)
50
51
52
/* Planar YUV Formats */
53
54
#define IMGFMT_YVU9 0x39555659
55
#define IMGFMT_IF09 0x39304649
56
#define IMGFMT_YV12 0x32315659
57
#define IMGFMT_I420 0x30323449
58
#define IMGFMT_IYUV 0x56555949
59
#define IMGFMT_CLPL 0x4C504C43
60
#define IMGFMT_Y800 0x30303859
61
#define IMGFMT_Y8   0x20203859
62
#define IMGFMT_NV12 0x3231564E
63
#define IMGFMT_NV21 0x3132564E
64
65
/* unofficial Planar Formats, FIXME if official 4CC exists */
66
#define IMGFMT_444P 0x50343434
67
#define IMGFMT_422P 0x50323234
68
#define IMGFMT_411P 0x50313134
69
#define IMGFMT_HM12 0x32314D48
70
71
/* Packed YUV Formats */
72
73
#define IMGFMT_IUYV 0x56595549
74
#define IMGFMT_IY41 0x31435949
75
#define IMGFMT_IYU1 0x31555949
76
#define IMGFMT_IYU2 0x32555949
77
#define IMGFMT_UYVY 0x59565955
78
#define IMGFMT_UYNV 0x564E5955
79
#define IMGFMT_cyuv 0x76757963
80
#define IMGFMT_Y422 0x32323459
81
#define IMGFMT_YUY2 0x32595559
82
#define IMGFMT_YUNV 0x564E5559
83
#define IMGFMT_YVYU 0x55595659
84
#define IMGFMT_Y41P 0x50313459
85
#define IMGFMT_Y211 0x31313259
86
#define IMGFMT_Y41T 0x54313459
87
#define IMGFMT_Y42T 0x54323459
88
#define IMGFMT_V422 0x32323456
89
#define IMGFMT_V655 0x35353656
90
#define IMGFMT_CLJR 0x524A4C43
91
#define IMGFMT_YUVP 0x50565559
92
#define IMGFMT_UYVP 0x50565955
93
94
/* Compressed Formats */
95
#define IMGFMT_MPEGPES (('M'<<24)|('P'<<16)|('E'<<8)|('S'))
96
/* Formats that are understood by zoran chips, we include
97
 * non-interlaced, interlaced top-first, interlaced bottom-first */
98
#define IMGFMT_ZRMJPEGNI  (('Z'<<24)|('R'<<16)|('N'<<8)|('I'))
99
#define IMGFMT_ZRMJPEGIT (('Z'<<24)|('R'<<16)|('I'<<8)|('T'))
100
#define IMGFMT_ZRMJPEGIB (('Z'<<24)|('R'<<16)|('I'<<8)|('B'))
101
102
// I think that this code could not be used by any other codec/format
103
#define IMGFMT_XVMC 0x1DC70000
104
#define IMGFMT_XVMC_MASK 0xFFFF0000
105
#define IMGFMT_IS_XVMC(fmt) (((fmt)&IMGFMT_XVMC_MASK)==IMGFMT_XVMC)
106
//these are chroma420
107
#define IMGFMT_XVMC_MOCO_MPEG2 (IMGFMT_XVMC|0x02)
108
#define IMGFMT_XVMC_IDCT_MPEG2 (IMGFMT_XVMC|0x82)
109
#define IMGFMT_XVMC_VLD_MPEG2 (IMGFMT_XVMC|0x42)
110
111
typedef struct {
112
    void* data;
113
    int size;
114
    int id;        // stream id. usually 0x1E0
115
    int timestamp; // pts, 90000 Hz counter based
116
} vo_mpegpes_t;
117
118
const char *vo_format_name(int format);
119
120
#endif
(-)ffmpeg-svn-r6191.orig/libswscale/Makefile (+2 lines)
Lines 18-23 Link Here
18
OBJS+=  yuv2rgb_altivec.o
18
OBJS+=  yuv2rgb_altivec.o
19
endif
19
endif
20
20
21
EXTRALIBS := -L../libavutil -lavutil$(BUILDSUF) $(EXTRALIBS)
22
21
HEADERS = swscale.h rgb2rgb.h
23
HEADERS = swscale.h rgb2rgb.h
22
24
23
include $(SRC_PATH)/common.mak
25
include $(SRC_PATH)/common.mak
(-)ffmpeg-svn-r6191.orig/libswscale/swscale.c (-1 / +1 lines)
Lines 74-80 Link Here
74
#include "swscale_internal.h"
74
#include "swscale_internal.h"
75
#include "x86_cpu.h"
75
#include "x86_cpu.h"
76
#include "bswap.h"
76
#include "bswap.h"
77
#include "libmpcodecs/img_format.h"
77
#include "img_format.h"
78
#include "rgb2rgb.h"
78
#include "rgb2rgb.h"
79
#ifdef USE_FASTMEMCPY
79
#ifdef USE_FASTMEMCPY
80
#include "libvo/fastmemcpy.h"
80
#include "libvo/fastmemcpy.h"
(-)ffmpeg-svn-r6191.orig/libswscale/swscale-example.c (-1 / +1 lines)
Lines 23-29 Link Here
23
#include <stdarg.h>
23
#include <stdarg.h>
24
24
25
#include "swscale.h"
25
#include "swscale.h"
26
#include "libmpcodecs/img_format.h"
26
#include "img_format.h"
27
27
28
static int testFormat[]={
28
static int testFormat[]={
29
IMGFMT_YVU9,
29
IMGFMT_YVU9,
(-)ffmpeg-svn-r6191.orig/libswscale/yuv2rgb_altivec.c (-1 / +1 lines)
Lines 74-80 Link Here
74
#include "rgb2rgb.h"
74
#include "rgb2rgb.h"
75
#include "swscale.h"
75
#include "swscale.h"
76
#include "swscale_internal.h"
76
#include "swscale_internal.h"
77
#include "libmpcodecs/img_format.h" //FIXME try to reduce dependency of such stuff
77
#include "img_format.h" //FIXME try to reduce dependency of such stuff
78
78
79
#undef PROFILE_THE_BEAST
79
#undef PROFILE_THE_BEAST
80
#undef INC_SCALING
80
#undef INC_SCALING
(-)ffmpeg-svn-r6191.orig/libswscale/yuv2rgb.c (-1 / +1 lines)
Lines 39-45 Link Here
39
#include "rgb2rgb.h"
39
#include "rgb2rgb.h"
40
#include "swscale.h"
40
#include "swscale.h"
41
#include "swscale_internal.h"
41
#include "swscale_internal.h"
42
#include "libmpcodecs/img_format.h" //FIXME try to reduce dependency of such stuff
42
#include "img_format.h" //FIXME try to reduce dependency of such stuff
43
43
44
#ifdef HAVE_MLIB
44
#ifdef HAVE_MLIB
45
#include "yuv2rgb_mlib.c"
45
#include "yuv2rgb_mlib.c"
(-)ffmpeg-svn-r6191.orig/libswscale/yuv2rgb_mlib.c (-1 / +1 lines)
Lines 30-36 Link Here
30
#include <stdlib.h>
30
#include <stdlib.h>
31
#include <assert.h>
31
#include <assert.h>
32
32
33
#include "libmpcodecs/img_format.h" //FIXME try to reduce dependency of such stuff
33
#include "img_format.h" //FIXME try to reduce dependency of such stuff
34
#include "swscale.h"
34
#include "swscale.h"
35
35
36
static int mlib_YUV2ARGB420_32(SwsContext *c, uint8_t* src[], int srcStride[], int srcSliceY, 
36
static int mlib_YUV2ARGB420_32(SwsContext *c, uint8_t* src[], int srcStride[], int srcSliceY, 

Return to bug 9978