56 case MKTAG(
'U',
'L',
'H',
'0'):
61 case MKTAG(
'U',
'L',
'H',
'2'):
67 case MKTAG(
'U',
'L',
'Y',
'0'):
71 case MKTAG(
'U',
'L',
'Y',
'2'):
75 case MKTAG(
'U',
'L',
'R',
'G'):
79 case MKTAG(
'U',
'L',
'R',
'A'):
84 case MKTAG(
'U',
'Q',
'Y',
'2'):
91 "Not a Ut Video FOURCC: %X\n", avctx->
codec_tag);
98 if (format == UTVF_v210)
124 utv->
codec = CCodec::CreateInstance(UNFCC(avctx->
codec_tag),
"libavcodec");
131 if (begin_ret != 0) {
133 "Could not initialize decoder: %d\n", begin_ret);
158 pic->linesize[0] = w;
159 pic->linesize[1] = pic->linesize[2] = w / 2;
160 pic->data[0] = utv->
buffer;
161 pic->data[2] = utv->
buffer + (w * h);
162 pic->data[1] = pic->data[2] + (w * h / 4);
165 pic->linesize[0] = w * 2;
166 pic->data[0] = utv->
buffer;
171 int linesize = ((w + 47) / 48) * 128;
173 pic->linesize[0] = w * 2;
175 pic->linesize[2] = w;
176 pic->data[0] = utv->
buffer + linesize * h;
177 pic->data[1] = pic->data[0] + h*pic->linesize[0];
178 pic->data[2] = pic->data[1] + h*pic->linesize[1];
179 y = (uint16_t*)pic->data[0];
180 u = (uint16_t*)pic->data[1];
181 v = (uint16_t*)pic->data[2];
182 for (j = 0; j < h; j++) {
185 for (i = 0; i + 1 < w; i += 6, in += 4) {
191 *y++ = (a>>10) & 0x3FF;
192 *v++ = (a>>20) & 0x3FF;
200 *u++ = (b>>10) & 0x3FF;
201 *y++ = (b>>20) & 0x3FF;
203 *y++ = (a>>10) & 0x3FF;
210 *u++ = (a>>20) & 0x3FF;
212 *v++ = (b>>10) & 0x3FF;
213 *y++ = (b>>20) & 0x3FF;
241 utv->
codec->DecodeEnd();
242 CCodec::DeleteInstance(utv->
codec);