~ubuntu-branches/debian/sid/mplayer/sid

« back to all changes in this revision

Viewing changes to fmt-conversion.h

  • Committer: Bazaar Package Importer
  • Author(s): A Mennucc1
  • Date: 2009-03-23 10:05:45 UTC
  • mfrom: (4.1.4 sid)
  • Revision ID: james.westby@ubuntu.com-20090323100545-x8h79obawnnte7kk
Tags: 1.0~rc2+svn20090303-5
debian/control : move docbook-xml,docbook-xsl,xsltproc from 
Build-Depends-Indep to Build-Depends, since they are needed to run
configure

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
#ifndef FMT_CONVERSION_H
2
 
#define FMT_CONVERSION_H
3
 
 
4
 
#ifdef USE_LIBAVUTIL_SO
5
 
#include <ffmpeg/avutil.h>
6
 
#else
7
 
#include "avutil.h"
8
 
#endif
9
 
#include "img_format.h"
10
 
 
11
 
enum PixelFormat imgfmt2pixfmt(int fmt)
12
 
{
13
 
    switch (fmt) {
14
 
        case IMGFMT_BGR32:
15
 
            return PIX_FMT_RGB32;
16
 
        case IMGFMT_BGR24:
17
 
            return PIX_FMT_BGR24;
18
 
        case IMGFMT_BGR16:
19
 
            return PIX_FMT_BGR565;
20
 
        case IMGFMT_BGR15:
21
 
            return PIX_FMT_BGR555;
22
 
        case IMGFMT_BGR8:
23
 
            return PIX_FMT_BGR8;
24
 
        case IMGFMT_BGR4:
25
 
            return PIX_FMT_BGR4;
26
 
        case IMGFMT_BGR1:
27
 
        case IMGFMT_RGB1:
28
 
            return PIX_FMT_MONOBLACK;
29
 
        case IMGFMT_RG4B:
30
 
            return PIX_FMT_RGB4_BYTE;
31
 
        case IMGFMT_BG4B:
32
 
            return PIX_FMT_BGR4_BYTE;
33
 
        case IMGFMT_RGB32:
34
 
            return PIX_FMT_BGR32;
35
 
        case IMGFMT_RGB24:
36
 
            return PIX_FMT_RGB24;
37
 
        case IMGFMT_RGB16:
38
 
            return PIX_FMT_RGB565;
39
 
        case IMGFMT_RGB15:
40
 
            return PIX_FMT_RGB555;
41
 
        case IMGFMT_RGB8:
42
 
            return PIX_FMT_RGB8;
43
 
        case IMGFMT_RGB4:
44
 
            return PIX_FMT_RGB4;
45
 
        case IMGFMT_YUY2:
46
 
            return PIX_FMT_YUYV422;
47
 
        case IMGFMT_UYVY:
48
 
            return PIX_FMT_UYVY422;
49
 
        case IMGFMT_NV12:
50
 
            return PIX_FMT_NV12;
51
 
        case IMGFMT_NV21:
52
 
            return PIX_FMT_NV21;
53
 
        case IMGFMT_Y800:
54
 
        case IMGFMT_Y8:
55
 
            return PIX_FMT_GRAY8;
56
 
        case IMGFMT_IF09:
57
 
        case IMGFMT_YVU9:
58
 
            return PIX_FMT_YUV410P;
59
 
        case IMGFMT_I420:
60
 
        case IMGFMT_IYUV:
61
 
        case IMGFMT_YV12:
62
 
            return PIX_FMT_YUV420P;
63
 
        case IMGFMT_411P:
64
 
            return PIX_FMT_YUV411P;
65
 
        case IMGFMT_422P:
66
 
            return PIX_FMT_YUV422P;
67
 
        case IMGFMT_444P:
68
 
            return PIX_FMT_YUV444P;
69
 
        default:
70
 
            fprintf(stderr, "Unsupported format %s\n", vo_format_name(fmt));
71
 
    }
72
 
 
73
 
    return PIX_FMT_NONE;
74
 
}
75
 
 
76
 
#endif /* FMT_CONVERSION_H */
 
1
#ifndef MPLAYER_FMT_CONVERSION_H
 
2
#define MPLAYER_FMT_CONVERSION_H
 
3
 
 
4
#include "libavutil/avutil.h"
 
5
 
 
6
enum PixelFormat imgfmt2pixfmt(int fmt);
 
7
int pixfmt2imgfmt(enum PixelFormat pix_fmt);
 
8
 
 
9
#endif /* MPLAYER_FMT_CONVERSION_H */