| 1 |
/* frame_struct.d |
|---|
| 2 |
* |
|---|
| 3 |
* C++ version: |
|---|
| 4 |
* Copyright (C) 2005 Richard Spindler <richard.spindler AT gmail.com> |
|---|
| 5 |
* |
|---|
| 6 |
* D version: |
|---|
| 7 |
* Copyright (C) 2008 Jonas Kivi <satelliittipupu AT yahoo.co.uk> |
|---|
| 8 |
* |
|---|
| 9 |
* This program is free software; you can redistribute it and/or modify |
|---|
| 10 |
* it under the terms of the GNU General Public License as published by |
|---|
| 11 |
* the Free Software Foundation; either version 2 of the License, or |
|---|
| 12 |
* (at your option) any later version. |
|---|
| 13 |
* |
|---|
| 14 |
* This program is distributed in the hope that it will be useful, |
|---|
| 15 |
* but WITHOUT ANY WARRANTY; without even the implied warranty of |
|---|
| 16 |
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
|---|
| 17 |
* GNU General Public License for more details. |
|---|
| 18 |
* |
|---|
| 19 |
* You should have received a copy of the GNU General Public License |
|---|
| 20 |
* along with this program; if not, write to the Free Software |
|---|
| 21 |
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. |
|---|
| 22 |
*/ |
|---|
| 23 |
|
|---|
| 24 |
module frame_struct; |
|---|
| 25 |
|
|---|
| 26 |
import tango.io.Stdout; |
|---|
| 27 |
//import stringz = tango.stdc.stringz; |
|---|
| 28 |
|
|---|
| 29 |
import globals; |
|---|
| 30 |
|
|---|
| 31 |
enum render_strategy_t |
|---|
| 32 |
{ |
|---|
| 33 |
RENDER_FIT = 0, |
|---|
| 34 |
RENDER_CROP, |
|---|
| 35 |
RENDER_STRETCH, |
|---|
| 36 |
RENDER_DEFAULT |
|---|
| 37 |
} |
|---|
| 38 |
|
|---|
| 39 |
/* |
|---|
| 40 |
//Was: |
|---|
| 41 |
enum interlace_state |
|---|
| 42 |
{ |
|---|
| 43 |
INTERLACE_PROGRESSIVE = 0, |
|---|
| 44 |
INTERLACE_TOP_FIELD_FIRST = 1, |
|---|
| 45 |
INTERLACE_BOTTOM_FIELD_FIRST = 2, |
|---|
| 46 |
INTERLACE_DEVIDED_FIELDS = 3 // Top Frame is first |
|---|
| 47 |
} |
|---|
| 48 |
*/ |
|---|
| 49 |
|
|---|
| 50 |
enum InterlaceType |
|---|
| 51 |
{ |
|---|
| 52 |
PROGRESSIVE = 0, |
|---|
| 53 |
TOP_FIELD_FIRST = 1, |
|---|
| 54 |
BOTTOM_FIELD_FIRST = 2, |
|---|
| 55 |
DEVIDED_FIELDS = 3 // Top Frame is first |
|---|
| 56 |
} |
|---|
| 57 |
|
|---|
| 58 |
struct frame_struct |
|---|
| 59 |
{ |
|---|
| 60 |
int x, y, w, h; |
|---|
| 61 |
ubyte* RGB; |
|---|
| 62 |
ubyte* YUV; |
|---|
| 63 |
ubyte*[] rows; |
|---|
| 64 |
int64_t nr; |
|---|
| 65 |
float alpha; |
|---|
| 66 |
bool has_alpha_channel; |
|---|
| 67 |
bool cacheable; |
|---|
| 68 |
render_strategy_t render_strategy; |
|---|
| 69 |
float pixel_aspect_ratio; |
|---|
| 70 |
int pixel_w; |
|---|
| 71 |
int pixel_h; |
|---|
| 72 |
InterlaceType interlace_mode;//Was int |
|---|
| 73 |
bool first_field; // should be true if first field is to be displayed |
|---|
| 74 |
int scale_x; |
|---|
| 75 |
int scale_y; |
|---|
| 76 |
int crop_left; |
|---|
| 77 |
int crop_right; |
|---|
| 78 |
int crop_top; |
|---|
| 79 |
int crop_bottom; |
|---|
| 80 |
int tilt_x; |
|---|
| 81 |
int tilt_y; |
|---|
| 82 |
bool dirty; |
|---|
| 83 |
} |
|---|