Mercurial > mplayer.hg
comparison libmpcodecs/ve_nuv.c @ 29263:0f1b5b68af32
whitespace cosmetics: Remove all trailing whitespace.
author | diego |
---|---|
date | Wed, 13 May 2009 02:58:57 +0000 |
parents | fad277267be5 |
children | bbb6ebec87a0 |
comparison
equal
deleted
inserted
replaced
29262:7d545a6b8aff | 29263:0f1b5b68af32 |
---|---|
60 {"nolzo", &nuv_priv_dflt.lzo, CONF_TYPE_FLAG, 0, 1, 0, NULL}, | 60 {"nolzo", &nuv_priv_dflt.lzo, CONF_TYPE_FLAG, 0, 1, 0, NULL}, |
61 {"q", &nuv_priv_dflt.q, CONF_TYPE_INT, M_OPT_RANGE,3,255, NULL}, | 61 {"q", &nuv_priv_dflt.q, CONF_TYPE_INT, M_OPT_RANGE,3,255, NULL}, |
62 {"l", &nuv_priv_dflt.l, CONF_TYPE_INT, M_OPT_RANGE,0,20, NULL}, | 62 {"l", &nuv_priv_dflt.l, CONF_TYPE_INT, M_OPT_RANGE,0,20, NULL}, |
63 {"c", &nuv_priv_dflt.c, CONF_TYPE_INT, M_OPT_RANGE,0,20, NULL}, | 63 {"c", &nuv_priv_dflt.c, CONF_TYPE_INT, M_OPT_RANGE,0,20, NULL}, |
64 {NULL, NULL, 0, 0, 0, 0, NULL} | 64 {NULL, NULL, 0, 0, 0, 0, NULL} |
65 }; | 65 }; |
66 | 66 |
67 //===========================================================================// | 67 //===========================================================================// |
68 | 68 |
69 | 69 |
70 #define COMPDATASIZE (128*4) | 70 #define COMPDATASIZE (128*4) |
110 size_t zlen = 0; | 110 size_t zlen = 0; |
111 | 111 |
112 memset(header, 0, FRAMEHEADERSIZE); // Reset the header | 112 memset(header, 0, FRAMEHEADERSIZE); // Reset the header |
113 if(vf->priv->lzo) | 113 if(vf->priv->lzo) |
114 memset(vf->priv->zbuffer,0,FRAMEHEADERSIZE); | 114 memset(vf->priv->zbuffer,0,FRAMEHEADERSIZE); |
115 | 115 |
116 // This has to be don here otherwise tv with sound doesn't work | 116 // This has to be don here otherwise tv with sound doesn't work |
117 if(!vf->priv->tbl_wrote) { | 117 if(!vf->priv->tbl_wrote) { |
118 RTjpeg_init_compress((uint32_t *)data,mpi->width,mpi->height,vf->priv->q); | 118 RTjpeg_init_compress((uint32_t *)data,mpi->width,mpi->height,vf->priv->q); |
119 RTjpeg_init_mcompress(); | 119 RTjpeg_init_mcompress(); |
120 | 120 |
121 header[0] = 'D'; // frametype: compressor data | 121 header[0] = 'D'; // frametype: compressor data |
122 header[1] = 'R'; // comptype: compressor data for RTjpeg | 122 header[1] = 'R'; // comptype: compressor data for RTjpeg |
123 AV_WL32(header + 8, COMPDATASIZE); // packetlength | 123 AV_WL32(header + 8, COMPDATASIZE); // packetlength |
124 | 124 |
125 mux_v->buffer=vf->priv->buffer; | 125 mux_v->buffer=vf->priv->buffer; |
126 muxer_write_chunk(mux_v,FRAMEHEADERSIZE + COMPDATASIZE, 0x10, MP_NOPTS_VALUE, MP_NOPTS_VALUE); | 126 muxer_write_chunk(mux_v,FRAMEHEADERSIZE + COMPDATASIZE, 0x10, MP_NOPTS_VALUE, MP_NOPTS_VALUE); |
127 vf->priv->tbl_wrote = 1; | 127 vf->priv->tbl_wrote = 1; |
128 memset(header, 0, FRAMEHEADERSIZE); // Reset the header | 128 memset(header, 0, FRAMEHEADERSIZE); // Reset the header |
129 } | 129 } |
173 header[1] = '2'; // comptype: RTjpeg + LZO | 173 header[1] = '2'; // comptype: RTjpeg + LZO |
174 len = zlen; | 174 len = zlen; |
175 } | 175 } |
176 | 176 |
177 } | 177 } |
178 | 178 |
179 header[0] = 'V'; // frametype: video frame | 179 header[0] = 'V'; // frametype: video frame |
180 AV_WL32(header + 8, len); // packetlength | 180 AV_WL32(header + 8, len); // packetlength |
181 mux_v->buffer = header; | 181 mux_v->buffer = header; |
182 muxer_write_chunk(mux_v, len + FRAMEHEADERSIZE, 0x10, pts, pts); | 182 muxer_write_chunk(mux_v, len + FRAMEHEADERSIZE, 0x10, pts, pts); |
183 return 1; | 183 return 1; |
204 vf->put_image=put_image; | 204 vf->put_image=put_image; |
205 vf->uninit = uninit; | 205 vf->uninit = uninit; |
206 vf->priv=malloc(sizeof(struct vf_priv_s)); | 206 vf->priv=malloc(sizeof(struct vf_priv_s)); |
207 memcpy(vf->priv, &nuv_priv_dflt,sizeof(struct vf_priv_s)); | 207 memcpy(vf->priv, &nuv_priv_dflt,sizeof(struct vf_priv_s)); |
208 vf->priv->mux=(muxer_stream_t*)args; | 208 vf->priv->mux=(muxer_stream_t*)args; |
209 | 209 |
210 mux_v->bih=calloc(1, sizeof(BITMAPINFOHEADER)); | 210 mux_v->bih=calloc(1, sizeof(BITMAPINFOHEADER)); |
211 mux_v->bih->biSize=sizeof(BITMAPINFOHEADER); | 211 mux_v->bih->biSize=sizeof(BITMAPINFOHEADER); |
212 mux_v->bih->biWidth=0; | 212 mux_v->bih->biWidth=0; |
213 mux_v->bih->biHeight=0; | 213 mux_v->bih->biHeight=0; |
214 mux_v->bih->biPlanes=1; | 214 mux_v->bih->biPlanes=1; |