~ubuntu-branches/ubuntu/feisty/kdetv/feisty

« back to all changes in this revision

Viewing changes to kdetv/libkdetv/kdetvvideo/kdetvdscalerfilter.h

  • Committer: Bazaar Package Importer
  • Author(s): Jonathan Riddell
  • Date: 2005-09-17 23:25:16 UTC
  • Revision ID: james.westby@ubuntu.com-20050917232516-9wdsn3ckagbqieh8
Tags: upstream-0.8.8
ImportĀ upstreamĀ versionĀ 0.8.8

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
// -*- c++ -*-
 
2
/***************************************************************************
 
3
                           KdetvDScalerFilter.h
 
4
                           --------------------
 
5
    begin                : Thu Jul 1 2004
 
6
    copyright            : (C) 2004 by Dirk Ziegelmeier
 
7
    email                : dziegel@gmx.de
 
8
 ***************************************************************************/
 
9
 
 
10
/*
 
11
 * This library is free software; you can redistribute it and/or
 
12
 * modify it under the terms of the GNU Library General Public
 
13
 * License as published by the Free Software Foundation; either
 
14
 * version 2 of the License, or (at your option) any later version.
 
15
 *
 
16
 * This library is distributed in the hope that it will be useful,
 
17
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 
18
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
 
19
 * Library General Public License for more details.
 
20
 *
 
21
 * You should have received a copy of the GNU Library General Public License
 
22
 * along with this library; see the file COPYING.LIB.  If not, write to
 
23
 * the Free Software Foundation, Inc., 51 Franklin Steet, Fifth Floor,
 
24
 * Boston, MA 02110-1301, USA.
 
25
 */
 
26
 
 
27
#ifndef KDETVDSCALERFILTER_H
 
28
#define KDETVDSCALERFILTER_H
 
29
 
 
30
#include "kdetvimagefilter.h"
 
31
 
 
32
/*
 
33
 * kdetv to DScaler deinterlacer/filter API wrapper.
 
34
 * Look at DScaler to understand this: www.dscaler.org
 
35
 * Only relevant parts of DScaler API for plugins ported
 
36
 * to kdetv are implemented.
 
37
 * Source level compatibility. I don't want WINE in here.
 
38
 */
 
39
 
 
40
class KdetvDScalerFilter : public KdetvImageFilter
 
41
{
 
42
public:
 
43
    KdetvDScalerFilter(const QString& name);
 
44
    virtual ~KdetvDScalerFilter();
 
45
 
 
46
    KdetvImage::ImageFormat inputFormats();
 
47
 
 
48
    virtual KdetvImageFilterContext* operator<< (KdetvImageFilterContext* ctx);
 
49
 
 
50
 
 
51
protected:
 
52
    // How much frames for dscaler at max
 
53
    static const unsigned int dscalerHistory = 10;
 
54
 
 
55
    // PictureFlags is a bitmask!
 
56
    typedef enum {
 
57
        PICTURE_PROGRESSIVE     = 0,
 
58
        PICTURE_INTERLACED_ODD  = 1,
 
59
        PICTURE_INTERLACED_EVEN = 2
 
60
    } PictureFlags;
 
61
 
 
62
    typedef struct {
 
63
        Q_UINT8* pData;
 
64
        PictureFlags Flags;
 
65
    } TPicture;
 
66
 
 
67
    typedef void* (MEMCPY_FUNC)(void* pOutput, const void* pInput, size_t nSize);
 
68
 
 
69
    typedef struct {
 
70
        TPicture** PictureHistory;
 
71
        unsigned char *Overlay;
 
72
        unsigned int OverlayPitch;
 
73
        unsigned int LineLength;
 
74
        int FrameWidth;
 
75
        int FrameHeight;
 
76
        int FieldHeight;
 
77
        MEMCPY_FUNC* pMemcpy;
 
78
        long InputPitch;
 
79
    } TDeinterlaceInfo;
 
80
 
 
81
    virtual void filterDScaler_MMX(TDeinterlaceInfo* pInfo) = 0;
 
82
 
 
83
    // A filter can reimplement these if it has optimized versions
 
84
    virtual void filterDScaler_3DNOW(TDeinterlaceInfo* pInfo);
 
85
    virtual void filterDScaler_SSE(TDeinterlaceInfo* pInfo);
 
86
    virtual void filterDScaler_SSE2(TDeinterlaceInfo* pInfo);
 
87
};
 
88
 
 
89
#endif // KDETVDSCALERFILTER_H