Annotation of margi2/video.h, revision 1.1
1.1 ! cvs 1: /*
! 2: video.h
! 3:
! 4: Copyright (C) Christian Wolff for convergence integrated media.
! 5:
! 6: This program is free software; you can redistribute it and/or modify
! 7: it under the terms of the GNU General Public License as published by
! 8: the Free Software Foundation; either version 2 of the License, or
! 9: (at your option) any later version.
! 10:
! 11: This program is distributed in the hope that it will be useful,
! 12: but WITHOUT ANY WARRANTY; without even the implied warranty of
! 13: MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
! 14: GNU General Public License for more details.
! 15:
! 16: You should have received a copy of the GNU General Public License
! 17: along with this program; if not, write to the Free Software
! 18: Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
! 19: */
! 20:
! 21: #ifndef CVDV_VIDEO_H
! 22: #define CVDV_VIDEO_H
! 23:
! 24: //
! 25: // Video Decoder
! 26: //
! 27:
! 28: #include "cardbase.h"
! 29:
! 30: // Set the background of the OSD and SPU and it's color
! 31: // mode=0: Video on Black
! 32: // mode=1: Black
! 33: // mode=2: Selected Color
! 34: // mode=3: Video on Selected Color
! 35: void VideoSetBackground(struct cvdv_cards *card, int mode, u8 Y, u8 Cb,
! 36: u8 Cr);
! 37:
! 38:
! 39: int DecoderStartDecode(struct cvdv_cards *card);
! 40:
! 41: int DecoderStopDecode(struct cvdv_cards *card);
! 42:
! 43: // Sets Display Override (Still Image Display) to Frame Buffer at specified addresses,
! 44: // addresses are 16 bit, in 64 byte resolution
! 45: // mode: 0=off, 1=Frame, 2=Field
! 46: // width: width of the still picture in 8 pixel units
! 47: int DecoderStillImageDisplay(struct cvdv_cards *card, int mode, int width,
! 48: u16 LumaAddr, u16 ChromaAddr);
! 49:
! 50: // Frees allocated frame buffers
! 51: int DecoderKillFrameBuffers(struct cvdv_cards *card);
! 52:
! 53: int DecoderSetFrameBuffers(struct cvdv_cards *card, int lines, // number of lines of the decoded MPEG
! 54: int TwoFrames, // 1 if no B-Frames are present in the video stream, thus allowing only 2 framestores
! 55: int RMM); // 1 if RMM
! 56:
! 57: // returns size of the Video ES Buffer in bytes or 0=error
! 58: u32 DecoderGetVideoESSize(struct cvdv_cards *card);
! 59:
! 60: // returns level of fullness in bytes
! 61: u32 DecoderGetVideoESLevel(struct cvdv_cards *card);
! 62:
! 63: // pics=0 --> items=bytes
! 64: // pics=1 --> items=pictures
! 65: void DecoderSetVideoPanic(struct cvdv_cards *card, int pics, int items);
! 66:
! 67: int DecoderClose(struct cvdv_cards *card);
! 68:
! 69: // returns 0 on success, 1 on "picture size too big", 2 on "out of DRAM memory"
! 70: int DecoderOpen(struct cvdv_cards *card, int x, int y, // size of the decoded MPEG picture
! 71: int aspect, // pixel or picture aspect ratio of the MPEG picture: 1=square pixel 2=3:4 3=9:16 4=1:2.21
! 72: int Field, // 0:Frame (interlaced, MPEG-2) , 1:Field (non-interlaced, MPEG-1) structure
! 73: int Letterbox, // 0:PanScan (4:3), 1:letterbox (16:9, 8:3) picture ratio // TODO, ignored for now
! 74: int RMM // 1:use ReducedMemoryMode
! 75: );
! 76:
! 77: // displays a still image, whose pixel data is in luma and chroma
! 78: int DecoderShowStill(struct cvdv_cards *card, int width, int height,
! 79: u8 * luma, u8 * chroma);
! 80:
! 81: // TODO: untested, probably won't work (have to use "main reads per line" instead of width on SIF)
! 82: int DecoderGetStill(struct cvdv_cards *card, int *width, int *height,
! 83: u8 * luma, u8 * chroma);
! 84:
! 85: #endif /* CVDV_VIDEO_H */
LinuxTV legacy CVS <linuxtv.org/cvs>