Revision 116758a3

View differences:

libswscale/swscale_internal.h
305 305
                   int xInc, const int16_t *filter, const int16_t *filterPos,
306 306
                   long filterSize);
307 307

  
308
    void (*lumConvertRange)(uint16_t *dst, int width); ///< Color range conversion function for luma plane if needed.
309
    void (*chrConvertRange)(uint16_t *dst, int width); ///< Color range conversion function for chroma planes if needed.
308
    void (*lumConvertRange)(int16_t *dst, int width); ///< Color range conversion function for luma plane if needed.
309
    void (*chrConvertRange)(int16_t *dst, int width); ///< Color range conversion function for chroma planes if needed.
310 310

  
311 311
    int lumSrcOffset; ///< Offset given to luma src pointers passed to horizontal input functions.
312 312
    int chrSrcOffset; ///< Offset given to chroma src pointers passed to horizontal input functions.
libswscale/swscale_template.c
2215 2215

  
2216 2216
//FIXME all pal and rgb srcFormats could do this convertion as well
2217 2217
//FIXME all scalers more complex than bilinear could do half of this transform
2218
static void RENAME(chrRangeToJpeg)(uint16_t *dst, int width)
2218
static void RENAME(chrRangeToJpeg)(int16_t *dst, int width)
2219 2219
{
2220 2220
    int i;
2221 2221
    for (i = 0; i < width; i++) {
......
2223 2223
        dst[i+VOFW] = (FFMIN(dst[i+VOFW],30775)*4663 - 9289992)>>12; //-264
2224 2224
    }
2225 2225
}
2226
static void RENAME(chrRangeFromJpeg)(uint16_t *dst, int width)
2226
static void RENAME(chrRangeFromJpeg)(int16_t *dst, int width)
2227 2227
{
2228 2228
    int i;
2229 2229
    for (i = 0; i < width; i++) {
......
2231 2231
        dst[i+VOFW] = (dst[i+VOFW]*1799 + 4081085)>>11; //1469
2232 2232
    }
2233 2233
}
2234
static void RENAME(lumRangeToJpeg)(uint16_t *dst, int width)
2234
static void RENAME(lumRangeToJpeg)(int16_t *dst, int width)
2235 2235
{
2236 2236
    int i;
2237 2237
    for (i = 0; i < width; i++)
2238 2238
        dst[i] = (FFMIN(dst[i],30189)*19077 - 39057361)>>14;
2239 2239
}
2240
static void RENAME(lumRangeFromJpeg)(uint16_t *dst, int width)
2240
static void RENAME(lumRangeFromJpeg)(int16_t *dst, int width)
2241 2241
{
2242 2242
    int i;
2243 2243
    for (i = 0; i < width; i++)
tests/ref/lavf/pixfmt
10 10
304128 ./tests/data/pixfmt/yuv410p.yuv
11 11
8594ea0b8d7c2c964525b0801b5351de *./tests/data/pixfmt/yuv411p.yuv
12 12
304128 ./tests/data/pixfmt/yuv411p.yuv
13
66673539adf8cda28e3b76068d3aae61 *./tests/data/pixfmt/yuvj420p.yuv
13
e176bd14185788110e055f945de7f95f *./tests/data/pixfmt/yuvj420p.yuv
14 14
304128 ./tests/data/pixfmt/yuvj420p.yuv
15
572bf387dd1e3f073cbfd082e055ca81 *./tests/data/pixfmt/yuvj422p.yuv
15
472028e46a81c98d9b2477507def4723 *./tests/data/pixfmt/yuvj422p.yuv
16 16
304128 ./tests/data/pixfmt/yuvj422p.yuv
17 17
c10442da177c9f1d12be3c53be6fa12c *./tests/data/pixfmt/yuvj444p.yuv
18 18
304128 ./tests/data/pixfmt/yuvj444p.yuv
tests/ref/lavfi/pixdesc_le
39 39
yuva420p            a29884f3f3dfe1e00b961bc17bef3d47
40 40
yuvj420p            32eec78ba51857b16ce9b813a49b7189
41 41
yuvj422p            0dfa0ed434f73be51428758c69e082cb
42
yuvj440p            9c3a093ff64a83ac4cf0b1e65390e236
43
yuvj444p            ede1e5882d5c5bba48ea33cf1209d231
42
yuvj440p            657501a28004e27a592757a7509f5189
43
yuvj444p            98d3d054f2ec09a75eeed5d328dc75b7
44 44
yuyv422             f2569f2b5069a0ee0cecae33de0455e3
tests/ref/lavfi/pixfmts_copy_le
39 39
yuva420p            a29884f3f3dfe1e00b961bc17bef3d47
40 40
yuvj420p            32eec78ba51857b16ce9b813a49b7189
41 41
yuvj422p            0dfa0ed434f73be51428758c69e082cb
42
yuvj440p            9c3a093ff64a83ac4cf0b1e65390e236
43
yuvj444p            ede1e5882d5c5bba48ea33cf1209d231
42
yuvj440p            657501a28004e27a592757a7509f5189
43
yuvj444p            98d3d054f2ec09a75eeed5d328dc75b7
44 44
yuyv422             f2569f2b5069a0ee0cecae33de0455e3
tests/ref/lavfi/pixfmts_hflip_le
34 34
yuva420p            d83ec0c01498189f179ec574918185f1
35 35
yuvj420p            df3aaaec3bb157c3bde5f0365af30f4f
36 36
yuvj422p            d113871528d510a192797af59df9c05c
37
yuvj440p            e8f7ed76e57c892a1e9e27a3f29452db
38
yuvj444p            2c3ae369607608c6dcb0d830f00f971a
37
yuvj440p            07f5ff12ced85aba1b5cf51692fff4bb
38
yuvj444p            8d95f6b4d4c9b4b0389d36df686bfa46
tests/ref/lavfi/pixfmts_null_le
39 39
yuva420p            a29884f3f3dfe1e00b961bc17bef3d47
40 40
yuvj420p            32eec78ba51857b16ce9b813a49b7189
41 41
yuvj422p            0dfa0ed434f73be51428758c69e082cb
42
yuvj440p            9c3a093ff64a83ac4cf0b1e65390e236
43
yuvj444p            ede1e5882d5c5bba48ea33cf1209d231
42
yuvj440p            657501a28004e27a592757a7509f5189
43
yuvj444p            98d3d054f2ec09a75eeed5d328dc75b7
44 44
yuyv422             f2569f2b5069a0ee0cecae33de0455e3
tests/ref/lavfi/pixfmts_pad_le
13 13
yuva420p            919722724765dc3a716c38fa53b20580
14 14
yuvj420p            4f20e2799966c21a9d9e0788b0956925
15 15
yuvj422p            e4d84b0683f77a76f1c17d976eff127c
16
yuvj440p            9ccc1f03d8d9a00dc4a5888bd77093ad
17
yuvj444p            7d202babcedf836e9ae9776163ee9425
16
yuvj440p            33511c43339aa32533ab832861c150c3
17
yuvj444p            82f0badd9d0c062bbfa0d9d73d7240a3
tests/ref/lavfi/pixfmts_scale_le
39 39
yuva420p            8673a9131fb47de69788863f93a50eb7
40 40
yuvj420p            30427bd6caf5bda93a173dbebe759e09
41 41
yuvj422p            fc8288f64fd149573f73cf8da05d8e6d
42
yuvj440p            26d0b4713a87ab9637a4062c22e6e70d
43
yuvj444p            894e6184d987a5ec4dc6f77bb75ef38c
42
yuvj440p            508ac7a9ddeb6d1794a1100ba7a1664c
43
yuvj444p            73aebe144085b22d1189caf6ca07e18c
44 44
yuyv422             169e19ac91b257bd84ace0fdf56559ad
tests/ref/lavfi/pixfmts_vflip_le
39 39
yuva420p            c705d1cf061d8c6580ac690b55f92276
40 40
yuvj420p            41fd02b204da0ab62452cd14b595e2e4
41 41
yuvj422p            7f6ca9bc1812cde02036d7d29a7cce43
42
yuvj440p            40591908cca457f51dee30a86c3e8ffd
43
yuvj444p            77e5e095881c52a04fd9f5abd1d7b5ac
42
yuvj440p            25711c3c0fd15ec19c59a10784fcfb96
43
yuvj444p            e45dee2ac02276dfab92e8ebfbe52e00
44 44
yuyv422             e944ff7316cd03c42c091717ce74f602

Also available in: Unified diff