History

avcodec/proresenc_anatoliy: do not write into alpha reserved bitfields

This byte represents 4 reserved bits followed by 4 alpha_channel_type bits. alpha_channel_type currently has 3 differents defined values: 0 (no alpha), 1 (8b alpha), and 2 (16b alpha), all the other values are reserved. The 4 initial reserved bits are expected to be 0.

Clément Bœsch committed 2 years ago

Commit 21f7a811 parent 6d3591117 files · +17 −25Browse files

Unified · Split

17 files
  1. libavcodec/proresenc_anatoliy.c +1 −9
  2. tests/ref/vsynth/vsynth1-prores +1 −1
  3. tests/ref/vsynth/vsynth1-prores_444 +1 −1
  4. tests/ref/vsynth/vsynth1-prores_444_int +1 −1
  5. tests/ref/vsynth/vsynth1-prores_int +1 −1
  6. tests/ref/vsynth/vsynth2-prores +1 −1
  7. tests/ref/vsynth/vsynth2-prores_444 +1 −1
  8. tests/ref/vsynth/vsynth2-prores_444_int +1 −1
  9. tests/ref/vsynth/vsynth2-prores_int +1 −1
  10. tests/ref/vsynth/vsynth3-prores +1 −1
  11. tests/ref/vsynth/vsynth3-prores_444 +1 −1
  12. tests/ref/vsynth/vsynth3-prores_444_int +1 −1
  13. tests/ref/vsynth/vsynth3-prores_int +1 −1
  14. tests/ref/vsynth/vsynth_lena-prores +1 −1
  15. tests/ref/vsynth/vsynth_lena-prores_444 +1 −1
  16. tests/ref/vsynth/vsynth_lena-prores_444_int +1 −1
  17. tests/ref/vsynth/vsynth_lena-prores_int +1 −1
libavcodec/proresenc_anatoliy.c+1−9
@@ -775,15 +775,7 @@ static int prores_encode_frame(AVCodecContext *avctx, AVPacket *pkt, · 774 unmodified lines
775 pict->color_trc, valid_trc, 0);775 pict->color_trc, valid_trc, 0);
776 *buf++ = int_from_list_or_default(avctx, "frame colorspace",776 *buf++ = int_from_list_or_default(avctx, "frame colorspace",
777 pict->colorspace, valid_colorspace, 0);777 pict->colorspace, valid_colorspace, 0);
778 if (avctx->profile >= AV_PROFILE_PRORES_4444) {778 *buf++ = ctx->need_alpha ? 0x2 /* 16-bit alpha */ : 0;
779 if (avctx->pix_fmt == AV_PIX_FMT_YUV444P10) {
780 *buf++ = 0xA0;/* src b64a and no alpha */
781 } else {
782 *buf++ = 0xA2;/* src b64a and 16b alpha */
783 }
784 } else {
785 *buf++ = 32;/* src v210 and no alpha */
786 }
787 *buf++ = 0; /* reserved */779 *buf++ = 0; /* reserved */
788 *buf++ = 3; /* luma and chroma matrix present */780 *buf++ = 3; /* luma and chroma matrix present */
789 781
tests/ref/vsynth/vsynth1-prores+1−1
@@ -1,4 +1,4 @@
1460f69344752e6af2dc46b00169b78a3 *tests/data/fate/vsynth1-prores.mov1816d6e42260509681c49398cd4aa38a4 *tests/data/fate/vsynth1-prores.mov
25022821 tests/data/fate/vsynth1-prores.mov25022821 tests/data/fate/vsynth1-prores.mov
3fb4a9e025d12afc0dbbca8d82831858f *tests/data/fate/vsynth1-prores.out.rawvideo3fb4a9e025d12afc0dbbca8d82831858f *tests/data/fate/vsynth1-prores.out.rawvideo
4stddev: 2.47 PSNR: 40.27 MAXDIFF: 31 bytes: 7603200/ 76032004stddev: 2.47 PSNR: 40.27 MAXDIFF: 31 bytes: 7603200/ 7603200
tests/ref/vsynth/vsynth1-prores_444+1−1
@@ -1,4 +1,4 @@
117c5652215ee8213319f58bc6bbcc505 *tests/data/fate/vsynth1-prores_444.mov1722dde50fce82923b81748ad8c64ca8d *tests/data/fate/vsynth1-prores_444.mov
27778954 tests/data/fate/vsynth1-prores_444.mov27778954 tests/data/fate/vsynth1-prores_444.mov
3e0da52b5d58171294d1b299539801ae0 *tests/data/fate/vsynth1-prores_444.out.rawvideo3e0da52b5d58171294d1b299539801ae0 *tests/data/fate/vsynth1-prores_444.out.rawvideo
4stddev: 2.80 PSNR: 39.17 MAXDIFF: 44 bytes: 7603200/ 76032004stddev: 2.80 PSNR: 39.17 MAXDIFF: 44 bytes: 7603200/ 7603200
tests/ref/vsynth/vsynth1-prores_444_int+1−1
@@ -1,4 +1,4 @@
141cc25faabf5545b84983d43cc46aded *tests/data/fate/vsynth1-prores_444_int.mov1c7e7c65147f68893d735b650efec9ed3 *tests/data/fate/vsynth1-prores_444_int.mov
29940947 tests/data/fate/vsynth1-prores_444_int.mov29940947 tests/data/fate/vsynth1-prores_444_int.mov
3732ceeb6887524e0aee98762fe50578b *tests/data/fate/vsynth1-prores_444_int.out.rawvideo3732ceeb6887524e0aee98762fe50578b *tests/data/fate/vsynth1-prores_444_int.out.rawvideo
4stddev: 2.83 PSNR: 39.08 MAXDIFF: 45 bytes: 7603200/ 76032004stddev: 2.83 PSNR: 39.08 MAXDIFF: 45 bytes: 7603200/ 7603200
tests/ref/vsynth/vsynth1-prores_int+1−1
@@ -1,4 +1,4 @@
13711e22aa5052f39dabfcb9ee3a42045 *tests/data/fate/vsynth1-prores_int.mov13ffa73e7ecd5c2f9a2bd2098499e22a5 *tests/data/fate/vsynth1-prores_int.mov
26308688 tests/data/fate/vsynth1-prores_int.mov26308688 tests/data/fate/vsynth1-prores_int.mov
3164a4ca890695cf594293d1acec9463c *tests/data/fate/vsynth1-prores_int.out.rawvideo3164a4ca890695cf594293d1acec9463c *tests/data/fate/vsynth1-prores_int.out.rawvideo
4stddev: 2.66 PSNR: 39.62 MAXDIFF: 34 bytes: 7603200/ 76032004stddev: 2.66 PSNR: 39.62 MAXDIFF: 34 bytes: 7603200/ 7603200
tests/ref/vsynth/vsynth2-prores+1−1
@@ -1,4 +1,4 @@
1a38660faa093dbc8a1ae8e570b6e595b *tests/data/fate/vsynth2-prores.mov1a3815327670b2c893045d0bf1b1da9b5 *tests/data/fate/vsynth2-prores.mov
23260123 tests/data/fate/vsynth2-prores.mov23260123 tests/data/fate/vsynth2-prores.mov
3416fa8773615889c70491452428d6710 *tests/data/fate/vsynth2-prores.out.rawvideo3416fa8773615889c70491452428d6710 *tests/data/fate/vsynth2-prores.out.rawvideo
4stddev: 1.38 PSNR: 45.29 MAXDIFF: 12 bytes: 7603200/ 76032004stddev: 1.38 PSNR: 45.29 MAXDIFF: 12 bytes: 7603200/ 7603200
tests/ref/vsynth/vsynth2-prores_444+1−1
@@ -1,4 +1,4 @@
19b2e73b60b1809754390f3d6bcd65218 *tests/data/fate/vsynth2-prores_444.mov1ab3646c0599b116b533c5b7f78741cac *tests/data/fate/vsynth2-prores_444.mov
25219722 tests/data/fate/vsynth2-prores_444.mov25219722 tests/data/fate/vsynth2-prores_444.mov
3e425b6af7afa51b5e64fc529528b3691 *tests/data/fate/vsynth2-prores_444.out.rawvideo3e425b6af7afa51b5e64fc529528b3691 *tests/data/fate/vsynth2-prores_444.out.rawvideo
4stddev: 0.88 PSNR: 49.18 MAXDIFF: 14 bytes: 7603200/ 76032004stddev: 0.88 PSNR: 49.18 MAXDIFF: 14 bytes: 7603200/ 7603200
tests/ref/vsynth/vsynth2-prores_444_int+1−1
@@ -1,4 +1,4 @@
1dbb3038d8fc88d7261a7aad315196600 *tests/data/fate/vsynth2-prores_444_int.mov1e8dc9c3d56af3f382ae2d9de4dad095f *tests/data/fate/vsynth2-prores_444_int.mov
26420787 tests/data/fate/vsynth2-prores_444_int.mov26420787 tests/data/fate/vsynth2-prores_444_int.mov
333a5db4f0423168d4ae4f1db3610928e *tests/data/fate/vsynth2-prores_444_int.out.rawvideo333a5db4f0423168d4ae4f1db3610928e *tests/data/fate/vsynth2-prores_444_int.out.rawvideo
4stddev: 0.93 PSNR: 48.73 MAXDIFF: 14 bytes: 7603200/ 76032004stddev: 0.93 PSNR: 48.73 MAXDIFF: 14 bytes: 7603200/ 7603200
tests/ref/vsynth/vsynth2-prores_int+1−1
@@ -1,4 +1,4 @@
1dd7835992e7a30b7be9014916411b5b3 *tests/data/fate/vsynth2-prores_int.mov12470bebd9dd05dabe02ff4555ed747f8 *tests/data/fate/vsynth2-prores_int.mov
24070996 tests/data/fate/vsynth2-prores_int.mov24070996 tests/data/fate/vsynth2-prores_int.mov
3bef9e38387a1fbb1ce2e4401b6d41674 *tests/data/fate/vsynth2-prores_int.out.rawvideo3bef9e38387a1fbb1ce2e4401b6d41674 *tests/data/fate/vsynth2-prores_int.out.rawvideo
4stddev: 1.54 PSNR: 44.37 MAXDIFF: 13 bytes: 7603200/ 76032004stddev: 1.54 PSNR: 44.37 MAXDIFF: 13 bytes: 7603200/ 7603200
tests/ref/vsynth/vsynth3-prores+1−1
@@ -1,4 +1,4 @@
13e6f1fd0e4fdad4a8dd351dec08b0bf5 *tests/data/fate/vsynth3-prores.mov1a7c499437e66fbfb1fe96f5eba326610 *tests/data/fate/vsynth3-prores.mov
2105367 tests/data/fate/vsynth3-prores.mov2105367 tests/data/fate/vsynth3-prores.mov
3fff5e7ad21d78501c8fa4749bf4bf289 *tests/data/fate/vsynth3-prores.out.rawvideo3fff5e7ad21d78501c8fa4749bf4bf289 *tests/data/fate/vsynth3-prores.out.rawvideo
4stddev: 2.80 PSNR: 39.17 MAXDIFF: 27 bytes: 86700/ 867004stddev: 2.80 PSNR: 39.17 MAXDIFF: 27 bytes: 86700/ 86700
tests/ref/vsynth/vsynth3-prores_444+1−1
@@ -1,4 +1,4 @@
107d2ba443bd0a2ae090dd85cc8d9423e *tests/data/fate/vsynth3-prores_444.mov123f4ad11002ece9b864cfeeb4bff51a7 *tests/data/fate/vsynth3-prores_444.mov
2159127 tests/data/fate/vsynth3-prores_444.mov2159127 tests/data/fate/vsynth3-prores_444.mov
3025b48feb3d9a9652983ef71e6cb7e7c *tests/data/fate/vsynth3-prores_444.out.rawvideo3025b48feb3d9a9652983ef71e6cb7e7c *tests/data/fate/vsynth3-prores_444.out.rawvideo
4stddev: 3.21 PSNR: 37.98 MAXDIFF: 41 bytes: 86700/ 867004stddev: 3.21 PSNR: 37.98 MAXDIFF: 41 bytes: 86700/ 86700
tests/ref/vsynth/vsynth3-prores_444_int+1−1
@@ -1,4 +1,4 @@
1a97bdacf54af3f81610861f2ba613bc7 *tests/data/fate/vsynth3-prores_444_int.mov1fb4f7ddf139f2da095335026e4be9585 *tests/data/fate/vsynth3-prores_444_int.mov
2184397 tests/data/fate/vsynth3-prores_444_int.mov2184397 tests/data/fate/vsynth3-prores_444_int.mov
3a8852aa2841c2ce5f2aa86176ceda4ef *tests/data/fate/vsynth3-prores_444_int.out.rawvideo3a8852aa2841c2ce5f2aa86176ceda4ef *tests/data/fate/vsynth3-prores_444_int.out.rawvideo
4stddev: 3.24 PSNR: 37.91 MAXDIFF: 41 bytes: 86700/ 867004stddev: 3.24 PSNR: 37.91 MAXDIFF: 41 bytes: 86700/ 86700
tests/ref/vsynth/vsynth3-prores_int+1−1
@@ -1,4 +1,4 @@
16085fc27cc6cc7c02abc59ce914d85cb *tests/data/fate/vsynth3-prores_int.mov1db1ca2743b60dc1c3c49fab0dfca6145 *tests/data/fate/vsynth3-prores_int.mov
2120484 tests/data/fate/vsynth3-prores_int.mov2120484 tests/data/fate/vsynth3-prores_int.mov
3e5859ba47a99f9e53c1ddcaa68a8f8f8 *tests/data/fate/vsynth3-prores_int.out.rawvideo3e5859ba47a99f9e53c1ddcaa68a8f8f8 *tests/data/fate/vsynth3-prores_int.out.rawvideo
4stddev: 2.92 PSNR: 38.81 MAXDIFF: 29 bytes: 86700/ 867004stddev: 2.92 PSNR: 38.81 MAXDIFF: 29 bytes: 86700/ 86700
tests/ref/vsynth/vsynth_lena-prores+1−1
@@ -1,4 +1,4 @@
1eed04261f5d5878ea3b91321420270a0 *tests/data/fate/vsynth_lena-prores.mov1d9cba10c23c0935ae2774bccee273664 *tests/data/fate/vsynth_lena-prores.mov
22844076 tests/data/fate/vsynth_lena-prores.mov22844076 tests/data/fate/vsynth_lena-prores.mov
303fd29e3963716a09d232b6f817ecb57 *tests/data/fate/vsynth_lena-prores.out.rawvideo303fd29e3963716a09d232b6f817ecb57 *tests/data/fate/vsynth_lena-prores.out.rawvideo
4stddev: 1.31 PSNR: 45.77 MAXDIFF: 11 bytes: 7603200/ 76032004stddev: 1.31 PSNR: 45.77 MAXDIFF: 11 bytes: 7603200/ 7603200
tests/ref/vsynth/vsynth_lena-prores_444+1−1
@@ -1,4 +1,4 @@
1e14c1dbd26cebe70feda70acb18962c0 *tests/data/fate/vsynth_lena-prores_444.mov10818f09f8250dc8030ae6ef1dcdba90d *tests/data/fate/vsynth_lena-prores_444.mov
24734395 tests/data/fate/vsynth_lena-prores_444.mov24734395 tests/data/fate/vsynth_lena-prores_444.mov
3a704e05e3e0a451edef7515b25a76bb8 *tests/data/fate/vsynth_lena-prores_444.out.rawvideo3a704e05e3e0a451edef7515b25a76bb8 *tests/data/fate/vsynth_lena-prores_444.out.rawvideo
4stddev: 0.81 PSNR: 49.88 MAXDIFF: 8 bytes: 7603200/ 76032004stddev: 0.81 PSNR: 49.88 MAXDIFF: 8 bytes: 7603200/ 7603200
tests/ref/vsynth/vsynth_lena-prores_444_int+1−1
@@ -1,4 +1,4 @@
17a1aa9e220dffde91c3a9a0595261461 *tests/data/fate/vsynth_lena-prores_444_int.mov1b8545710824cd87b51ebe223513cc9af *tests/data/fate/vsynth_lena-prores_444_int.mov
25696258 tests/data/fate/vsynth_lena-prores_444_int.mov25696258 tests/data/fate/vsynth_lena-prores_444_int.mov
3466380156e4d2b811f4ffb9c5a8bca72 *tests/data/fate/vsynth_lena-prores_444_int.out.rawvideo3466380156e4d2b811f4ffb9c5a8bca72 *tests/data/fate/vsynth_lena-prores_444_int.out.rawvideo
4stddev: 0.88 PSNR: 49.23 MAXDIFF: 9 bytes: 7603200/ 76032004stddev: 0.88 PSNR: 49.23 MAXDIFF: 9 bytes: 7603200/ 7603200
tests/ref/vsynth/vsynth_lena-prores_int+1−1
@@ -1,4 +1,4 @@
1f45bc9026780bbbcdbbcc0d54c21ef06 *tests/data/fate/vsynth_lena-prores_int.mov13d5956899538737305edb383443b8a9a *tests/data/fate/vsynth_lena-prores_int.mov
23532698 tests/data/fate/vsynth_lena-prores_int.mov23532698 tests/data/fate/vsynth_lena-prores_int.mov
3eb5caa9824ca294f403cd13f33c40f23 *tests/data/fate/vsynth_lena-prores_int.out.rawvideo3eb5caa9824ca294f403cd13f33c40f23 *tests/data/fate/vsynth_lena-prores_int.out.rawvideo
4stddev: 1.47 PSNR: 44.78 MAXDIFF: 12 bytes: 7603200/ 76032004stddev: 1.47 PSNR: 44.78 MAXDIFF: 12 bytes: 7603200/ 7603200

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t