Unified · Split
| @@ -173,11 +173,16 @@ static int decode_frame(AVCodecContext *avctx, · 172 unmodified lines | ||
| 173 | 173 | break; |
| 174 | 174 | case 52: // ABGR |
| 175 | 175 | case 51: // RGBA |
| 176 | + case 103: // UYVA4444 | |
| 176 | 177 | elements = 4; |
| 177 | 178 | break; |
| 178 | 179 | case 50: // RGB |
| 180 | + case 102: // UYV444 | |
| 179 | 181 | elements = 3; |
| 180 | 182 | break; |
| 183 | + case 100: // UYVY422 | |
| 184 | + elements = 2; | |
| 185 | + break; | |
| 181 | 186 | default: |
| 182 | 187 | avpriv_report_missing_feature(avctx, "Descriptor %d", descriptor); |
| 183 | 188 | return AVERROR_PATCHWELCOME; |
| @@ -280,6 +285,15 @@ static int decode_frame(AVCodecContext *avctx, · 96 unmodified lines | ||
| 280 | 285 | case 51160: |
| 281 | 286 | avctx->pix_fmt = AV_PIX_FMT_RGBA64LE; |
| 282 | 287 | break; |
| 288 | + case 100081: | |
| 289 | + avctx->pix_fmt = AV_PIX_FMT_UYVY422; | |
| 290 | + break; | |
| 291 | + case 102081: | |
| 292 | + avctx->pix_fmt = AV_PIX_FMT_YUV444P; | |
| 293 | + break; | |
| 294 | + case 103081: | |
| 295 | + avctx->pix_fmt = AV_PIX_FMT_YUVA444P; | |
| 296 | + break; | |
| 283 | 297 | default: |
| 284 | 298 | av_log(avctx, AV_LOG_ERROR, "Unsupported format\n"); |
| 285 | 299 | return AVERROR_PATCHWELCOME; |
| @@ -344,9 +358,26 @@ static int decode_frame(AVCodecContext *avctx, · 58 unmodified lines | ||
| 344 | 358 | case 16: |
| 345 | 359 | elements *= 2; |
| 346 | 360 | case 8: |
| 361 | + if ( avctx->pix_fmt == AV_PIX_FMT_YUVA444P | |
| 362 | + || avctx->pix_fmt == AV_PIX_FMT_YUV444P) { | |
| 363 | + for (x = 0; x < avctx->height; x++) { | |
| 364 | + ptr[0] = p->data[0] + x * p->linesize[0]; | |
| 365 | + ptr[1] = p->data[1] + x * p->linesize[1]; | |
| 366 | + ptr[2] = p->data[2] + x * p->linesize[2]; | |
| 367 | + ptr[3] = p->data[3] + x * p->linesize[3]; | |
| 368 | + for (y = 0; y < avctx->width; y++) { | |
| 369 | + *ptr[1]++ = *buf++; | |
| 370 | + *ptr[0]++ = *buf++; | |
| 371 | + *ptr[2]++ = *buf++; | |
| 372 | + if (avctx->pix_fmt == AV_PIX_FMT_YUVA444P) | |
| 373 | + *ptr[3]++ = *buf++; | |
| 374 | + } | |
| 375 | + } | |
| 376 | + } else { | |
| 347 | 377 | av_image_copy_plane(ptr[0], p->linesize[0], |
| 348 | 378 | buf, stride, |
| 349 | 379 | elements * avctx->width, avctx->height); |
| 380 | + } | |
| 350 | 381 | break; |
| 351 | 382 | } |
| 352 | 383 | |