Showing the changes to libavcodec (2 of 2 files). Show all
Unified · Split
| @@ -626,6 +626,9 @@ static int read_header(FFV1Context *f) · 625 unmodified lines | ||
| 626 | 626 | } else if (f->avctx->bits_per_raw_sample == 12) { |
| 627 | 627 | f->packed_at_lsb = 1; |
| 628 | 628 | f->avctx->pix_fmt = AV_PIX_FMT_GRAY12; |
| 629 | + } else if (f->avctx->bits_per_raw_sample == 14) { | |
| 630 | + f->packed_at_lsb = 1; | |
| 631 | + f->avctx->pix_fmt = AV_PIX_FMT_GRAY14; | |
| 629 | 632 | } else if (f->avctx->bits_per_raw_sample == 16) { |
| 630 | 633 | f->packed_at_lsb = 1; |
| 631 | 634 | f->avctx->pix_fmt = AV_PIX_FMT_GRAY16; |
| @@ -690,6 +693,12 @@ static int read_header(FFV1Context *f) · 58 unmodified lines | ||
| 690 | 693 | case 0x10: f->avctx->pix_fmt = AV_PIX_FMT_YUV422P12; break; |
| 691 | 694 | case 0x11: f->avctx->pix_fmt = AV_PIX_FMT_YUV420P12; break; |
| 692 | 695 | } |
| 696 | + } else if (f->avctx->bits_per_raw_sample == 12 && f->transparency) { | |
| 697 | + f->packed_at_lsb = 1; | |
| 698 | + switch(16 * f->chroma_h_shift + f->chroma_v_shift) { | |
| 699 | + case 0x00: f->avctx->pix_fmt = AV_PIX_FMT_YUVA444P12; break; | |
| 700 | + case 0x10: f->avctx->pix_fmt = AV_PIX_FMT_YUVA422P12; break; | |
| 701 | + } | |
| 693 | 702 | } else if (f->avctx->bits_per_raw_sample == 14 && !f->transparency) { |
| 694 | 703 | f->packed_at_lsb = 1; |
| 695 | 704 | switch(16 * f->chroma_h_shift + f->chroma_v_shift) { |
| @@ -734,6 +743,8 @@ static int read_header(FFV1Context *f) · 38 unmodified lines | ||
| 734 | 743 | f->avctx->pix_fmt = AV_PIX_FMT_GBRAP12; |
| 735 | 744 | else if (f->avctx->bits_per_raw_sample == 14 && !f->transparency) |
| 736 | 745 | f->avctx->pix_fmt = AV_PIX_FMT_GBRP14; |
| 746 | + else if (f->avctx->bits_per_raw_sample == 14 && f->transparency) | |
| 747 | + f->avctx->pix_fmt = AV_PIX_FMT_GBRAP14; | |
| 737 | 748 | else if (f->avctx->bits_per_raw_sample == 16 && !f->transparency) { |
| 738 | 749 | f->avctx->pix_fmt = AV_PIX_FMT_GBRP16; |
| 739 | 750 | f->use32bit = 1; |
| @@ -585,8 +585,11 @@ static av_cold int encode_init(AVCodecContext *avctx) · 584 unmodified lines | ||
| 585 | 585 | case AV_PIX_FMT_YUV440P12: |
| 586 | 586 | case AV_PIX_FMT_YUV420P12: |
| 587 | 587 | case AV_PIX_FMT_YUV422P12: |
| 588 | + case AV_PIX_FMT_YUVA444P12: | |
| 589 | + case AV_PIX_FMT_YUVA422P12: | |
| 588 | 590 | if (!avctx->bits_per_raw_sample && !s->bits_per_raw_sample) |
| 589 | 591 | s->bits_per_raw_sample = 12; |
| 592 | + case AV_PIX_FMT_GRAY14: | |
| 590 | 593 | case AV_PIX_FMT_YUV444P14: |
| 591 | 594 | case AV_PIX_FMT_YUV420P14: |
| 592 | 595 | case AV_PIX_FMT_YUV422P14: |
| @@ -667,6 +670,7 @@ static av_cold int encode_init(AVCodecContext *avctx) · 74 unmodified lines | ||
| 667 | 670 | if (!avctx->bits_per_raw_sample && !s->bits_per_raw_sample) |
| 668 | 671 | s->bits_per_raw_sample = 12; |
| 669 | 672 | case AV_PIX_FMT_GBRP14: |
| 673 | + case AV_PIX_FMT_GBRAP14: | |
| 670 | 674 | if (!avctx->bits_per_raw_sample && !s->bits_per_raw_sample) |
| 671 | 675 | s->bits_per_raw_sample = 14; |
| 672 | 676 | case AV_PIX_FMT_GBRP16: |
| @@ -1284,13 +1288,14 @@ const FFCodec ff_ffv1_encoder = { · 611 unmodified lines | ||
| 1284 | 1288 | AV_PIX_FMT_YUV420P9, AV_PIX_FMT_YUV420P10, AV_PIX_FMT_YUV422P10, AV_PIX_FMT_YUV444P10, |
| 1285 | 1289 | AV_PIX_FMT_YUV420P12, AV_PIX_FMT_YUV422P12, AV_PIX_FMT_YUV444P12, |
| 1286 | 1290 | AV_PIX_FMT_YUVA444P16, AV_PIX_FMT_YUVA422P16, AV_PIX_FMT_YUVA420P16, |
| 1291 | + AV_PIX_FMT_YUVA444P12, AV_PIX_FMT_YUVA422P12, | |
| 1287 | 1292 | AV_PIX_FMT_YUVA444P10, AV_PIX_FMT_YUVA422P10, AV_PIX_FMT_YUVA420P10, |
| 1288 | 1293 | AV_PIX_FMT_YUVA444P9, AV_PIX_FMT_YUVA422P9, AV_PIX_FMT_YUVA420P9, |
| 1289 | 1294 | AV_PIX_FMT_GRAY16, AV_PIX_FMT_GRAY8, AV_PIX_FMT_GBRP9, AV_PIX_FMT_GBRP10, |
| 1290 | − AV_PIX_FMT_GBRP12, AV_PIX_FMT_GBRP14, | |
| 1295 | + AV_PIX_FMT_GBRP12, AV_PIX_FMT_GBRP14, AV_PIX_FMT_GBRAP14, | |
| 1291 | 1296 | AV_PIX_FMT_GBRAP10, AV_PIX_FMT_GBRAP12, |
| 1292 | 1297 | AV_PIX_FMT_YA8, |
| 1293 | − AV_PIX_FMT_GRAY10, AV_PIX_FMT_GRAY12, | |
| 1298 | + AV_PIX_FMT_GRAY10, AV_PIX_FMT_GRAY12, AV_PIX_FMT_GRAY14, | |
| 1294 | 1299 | AV_PIX_FMT_GBRP16, AV_PIX_FMT_RGB48, |
| 1295 | 1300 | AV_PIX_FMT_GBRAP16, AV_PIX_FMT_RGBA64, |
| 1296 | 1301 | AV_PIX_FMT_GRAY9, |