Unified · Split
| @@ -173,11 +173,16 @@ static int decode_frame(AVCodecContext *avctx, · 172 unmodified lines | |||
| 173 | break; | 173 | break; |
| 174 | case 52: // ABGR | 174 | case 52: // ABGR |
| 175 | case 51: // RGBA | 175 | case 51: // RGBA |
| 176 | case 103: // UYVA4444 | ||
| 176 | elements = 4; | 177 | elements = 4; |
| 177 | break; | 178 | break; |
| 178 | case 50: // RGB | 179 | case 50: // RGB |
| 180 | case 102: // UYV444 | ||
| 179 | elements = 3; | 181 | elements = 3; |
| 180 | break; | 182 | break; |
| 183 | case 100: // UYVY422 | ||
| 184 | elements = 2; | ||
| 185 | break; | ||
| 181 | default: | 186 | default: |
| 182 | avpriv_report_missing_feature(avctx, "Descriptor %d", descriptor); | 187 | avpriv_report_missing_feature(avctx, "Descriptor %d", descriptor); |
| 183 | return AVERROR_PATCHWELCOME; | 188 | return AVERROR_PATCHWELCOME; |
| @@ -280,6 +285,15 @@ static int decode_frame(AVCodecContext *avctx, · 96 unmodified lines | |||
| 280 | case 51160: | 285 | case 51160: |
| 281 | avctx->pix_fmt = AV_PIX_FMT_RGBA64LE; | 286 | avctx->pix_fmt = AV_PIX_FMT_RGBA64LE; |
| 282 | break; | 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 | default: | 297 | default: |
| 284 | av_log(avctx, AV_LOG_ERROR, "Unsupported format\n"); | 298 | av_log(avctx, AV_LOG_ERROR, "Unsupported format\n"); |
| 285 | return AVERROR_PATCHWELCOME; | 299 | return AVERROR_PATCHWELCOME; |
| @@ -344,9 +358,26 @@ static int decode_frame(AVCodecContext *avctx, · 58 unmodified lines | |||
| 344 | case 16: | 358 | case 16: |
| 345 | elements *= 2; | 359 | elements *= 2; |
| 346 | case 8: | 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 | av_image_copy_plane(ptr[0], p->linesize[0], | 377 | av_image_copy_plane(ptr[0], p->linesize[0], |
| 348 | buf, stride, | 378 | buf, stride, |
| 349 | elements * avctx->width, avctx->height); | 379 | elements * avctx->width, avctx->height); |
| 380 | } | ||
| 350 | break; | 381 | break; |
| 351 | } | 382 | } |
| 352 | 383 | ||