From db465be45d2a105c7bce3a301f125426c49e2e7c Mon Sep 17 00:00:00 2001 From: Mans Rullgard Date: Tue, 15 May 2012 11:51:12 +0100 Subject: [PATCH 01/15] lavf: add mdec to is_intra_only() list Signed-off-by: Mans Rullgard --- libavformat/utils.c | 1 + 1 file changed, 1 insertion(+) diff --git a/libavformat/utils.c b/libavformat/utils.c index 658da8f951..e51884774b 100644 --- a/libavformat/utils.c +++ b/libavformat/utils.c @@ -791,6 +791,7 @@ static int is_intra_only(AVCodecContext *enc){ case CODEC_ID_VCR1: case CODEC_ID_DNXHD: case CODEC_ID_JPEG2000: + case CODEC_ID_MDEC: return 1; default: break; } From c68adc7b2f47f32051be0c285ef14cf3c4ffb1e1 Mon Sep 17 00:00:00 2001 From: Mans Rullgard Date: Tue, 15 May 2012 12:09:56 +0100 Subject: [PATCH 02/15] fate: convert psx-str to a demuxer test While these codecs are covered elsewhere, the container is different from the other psx-str file. Signed-off-by: Mans Rullgard --- tests/fate/demux.mak | 4 +- tests/ref/fate/psx-str | 202 ----------------------------------- tests/ref/fate/psx-str-demux | 202 +++++++++++++++++++++++++++++++++++ 3 files changed, 204 insertions(+), 204 deletions(-) delete mode 100644 tests/ref/fate/psx-str create mode 100644 tests/ref/fate/psx-str-demux diff --git a/tests/fate/demux.mak b/tests/fate/demux.mak index ab4e80d7c0..66cd0e9cd5 100644 --- a/tests/fate/demux.mak +++ b/tests/fate/demux.mak @@ -40,8 +40,8 @@ fate-nsv-demux: CMD = framecrc -i $(SAMPLES)/nsv/witchblade-51kbps.nsv -t 6 -vco FATE_AVCONV += fate-oma-demux fate-oma-demux: CMD = crc -i $(SAMPLES)/oma/01-Untitled-partial.oma -acodec copy -FATE_AVCONV += fate-psx-str -fate-psx-str: CMD = framecrc -i $(SAMPLES)/psx-str/descent-partial.str +FATE_AVCONV += fate-psx-str-demux +fate-psx-str-demux: CMD = framecrc -i $(SAMPLES)/psx-str/descent-partial.str -c copy FATE_AVCONV += fate-psx-str-v3-mdec fate-psx-str-v3-mdec: CMD = framecrc -i $(SAMPLES)/psx-str/abc000_cut.str -an diff --git a/tests/ref/fate/psx-str b/tests/ref/fate/psx-str deleted file mode 100644 index a76af1c4f8..0000000000 --- a/tests/ref/fate/psx-str +++ /dev/null @@ -1,202 +0,0 @@ -#tb 0: 1/15 -#tb 1: 1/37800 -0, 0, 0, 1, 115200, 0x6b106a56 -1, 0, 0, 2016, 8064, 0x02260037 -1, 2016, 2016, 2016, 8064, 0x4ee9f4e9 -0, 1, 1, 1, 115200, 0x53c16930 -1, 4032, 4032, 2016, 8064, 0xf8fd82aa -0, 2, 2, 1, 115200, 0xe2126f03 -1, 6048, 6048, 2016, 8064, 0xc100792b -0, 3, 3, 1, 115200, 0xc3c18ba0 -1, 8064, 8064, 2016, 8064, 0xf11a5316 -0, 4, 4, 1, 115200, 0xe281b655 -1, 10080, 10080, 2016, 8064, 0x6937f8c0 -1, 12096, 12096, 2016, 8064, 0xed194e42 -0, 5, 5, 1, 115200, 0x7b1e0536 -1, 14112, 14112, 2016, 8064, 0x619ce54b -0, 6, 6, 1, 115200, 0xbbd868c5 -1, 16128, 16128, 2016, 8064, 0x544999ec -0, 7, 7, 1, 115200, 0xfc67bf8e -1, 18144, 18144, 2016, 8064, 0x0ea877b4 -0, 8, 8, 1, 115200, 0xb463151c -1, 20160, 20160, 2016, 8064, 0xb764d1c0 -1, 22176, 22176, 2016, 8064, 0x7a2fd211 -0, 9, 9, 1, 115200, 0x6e686846 -1, 24192, 24192, 2016, 8064, 0xff69f6c5 -0, 10, 10, 1, 115200, 0xca36b835 -1, 26208, 26208, 2016, 8064, 0x26c11ec7 -0, 11, 11, 1, 115200, 0x17b91efc -1, 28224, 28224, 2016, 8064, 0xfb4ecc0c -0, 12, 12, 1, 115200, 0xc051a49a -1, 30240, 30240, 2016, 8064, 0x111d799b -1, 32256, 32256, 2016, 8064, 0xc704dc91 -0, 13, 13, 1, 115200, 0xc68c227b -1, 34272, 34272, 2016, 8064, 0xa9f372fb -0, 14, 14, 1, 115200, 0x9ba6b521 -1, 36288, 36288, 2016, 8064, 0xa3f0ad0f -0, 15, 15, 1, 115200, 0x09d56ecc -1, 38304, 38304, 2016, 8064, 0x958719b9 -0, 16, 16, 1, 115200, 0xc20e3485 -1, 40320, 40320, 2016, 8064, 0x9b011bf7 -1, 42336, 42336, 2016, 8064, 0x466d96fb -0, 17, 17, 1, 115200, 0xf07e2c48 -1, 44352, 44352, 2016, 8064, 0x6ed4eb29 -0, 18, 18, 1, 115200, 0x551c6da1 -1, 46368, 46368, 2016, 8064, 0x066966db -0, 19, 19, 1, 115200, 0xed65bacd -1, 48384, 48384, 2016, 8064, 0xf60fe0bc -0, 20, 20, 1, 115200, 0x51a23a3b -1, 50400, 50400, 2016, 8064, 0x2c845167 -1, 52416, 52416, 2016, 8064, 0x7d63894f -0, 21, 21, 1, 115200, 0x559ddce1 -1, 54432, 54432, 2016, 8064, 0x0682ee36 -0, 22, 22, 1, 115200, 0x1fef6373 -1, 56448, 56448, 2016, 8064, 0xcaeb7c70 -0, 23, 23, 1, 115200, 0x11b2dece -1, 58464, 58464, 2016, 8064, 0x93948697 -0, 24, 24, 1, 115200, 0x851b877c -1, 60480, 60480, 2016, 8064, 0x5805f0d6 -1, 62496, 62496, 2016, 8064, 0xcfb641ff -0, 25, 25, 1, 115200, 0x5f9a7c99 -1, 64512, 64512, 2016, 8064, 0xe3499bb1 -0, 26, 26, 1, 115200, 0x9ffe6153 -1, 66528, 66528, 2016, 8064, 0x689fe483 -0, 27, 27, 1, 115200, 0x950b0de8 -1, 68544, 68544, 2016, 8064, 0x1b8f2f2d -0, 28, 28, 1, 115200, 0x6ec4c89a -1, 70560, 70560, 2016, 8064, 0x23852e71 -1, 72576, 72576, 2016, 8064, 0x15e7b298 -0, 29, 29, 1, 115200, 0xa9234812 -1, 74592, 74592, 2016, 8064, 0x5345a9a3 -0, 30, 30, 1, 115200, 0xc834f491 -1, 76608, 76608, 2016, 8064, 0x257b6ecf -0, 31, 31, 1, 115200, 0x2cc1a2aa -1, 78624, 78624, 2016, 8064, 0xaf62836c -0, 32, 32, 1, 115200, 0x5df53b71 -1, 80640, 80640, 2016, 8064, 0xc3a401e3 -1, 82656, 82656, 2016, 8064, 0x2b98fdf1 -0, 33, 33, 1, 115200, 0xe1d0cb31 -1, 84672, 84672, 2016, 8064, 0x37168697 -0, 34, 34, 1, 115200, 0xa0d2f8ab -1, 86688, 86688, 2016, 8064, 0x2d876c89 -0, 35, 35, 1, 115200, 0x9342d739 -1, 88704, 88704, 2016, 8064, 0xc40a6ada -0, 36, 36, 1, 115200, 0x586bc658 -1, 90720, 90720, 2016, 8064, 0xcca6b829 -1, 92736, 92736, 2016, 8064, 0x6667550a -0, 37, 37, 1, 115200, 0x76902834 -1, 94752, 94752, 2016, 8064, 0x99c1b5cb -0, 38, 38, 1, 115200, 0x91f25616 -1, 96768, 96768, 2016, 8064, 0xc05d3ed3 -0, 39, 39, 1, 115200, 0xce8c95fb -1, 98784, 98784, 2016, 8064, 0xdd641781 -0, 40, 40, 1, 115200, 0xdf0d3de6 -1, 100800, 100800, 2016, 8064, 0xa65d49dc -1, 102816, 102816, 2016, 8064, 0x2a0d5df7 -0, 41, 41, 1, 115200, 0x120db7ae -1, 104832, 104832, 2016, 8064, 0xa6348438 -0, 42, 42, 1, 115200, 0x2143e287 -1, 106848, 106848, 2016, 8064, 0xf2e1412d -0, 43, 43, 1, 115200, 0x2498d3b6 -1, 108864, 108864, 2016, 8064, 0xc41c6a7a -0, 44, 44, 1, 115200, 0x99975ff8 -1, 110880, 110880, 2016, 8064, 0x147edc3d -1, 112896, 112896, 2016, 8064, 0x17e3cfe7 -0, 45, 45, 1, 115200, 0xbad65f9f -1, 114912, 114912, 2016, 8064, 0x01fe3969 -0, 46, 46, 1, 115200, 0x5066605b -1, 116928, 116928, 2016, 8064, 0xc437ac11 -0, 47, 47, 1, 115200, 0x6f8a61a0 -1, 118944, 118944, 2016, 8064, 0xbbf747c1 -0, 48, 48, 1, 115200, 0x80c96143 -1, 120960, 120960, 2016, 8064, 0x2a4b88c0 -1, 122976, 122976, 2016, 8064, 0xcd149c80 -0, 49, 49, 1, 115200, 0x663c6198 -1, 124992, 124992, 2016, 8064, 0xcf339dfc -0, 50, 50, 1, 115200, 0x0354620b -1, 127008, 127008, 2016, 8064, 0xc81ff84b -0, 51, 51, 1, 115200, 0xfe186346 -1, 129024, 129024, 2016, 8064, 0x4d978100 -0, 52, 52, 1, 115200, 0x844962f8 -1, 131040, 131040, 2016, 8064, 0x6da6665b -1, 133056, 133056, 2016, 8064, 0x12fa354f -0, 53, 53, 1, 115200, 0x917c672f -1, 135072, 135072, 2016, 8064, 0x6baedae6 -0, 54, 54, 1, 115200, 0x45086647 -1, 137088, 137088, 2016, 8064, 0xddd77327 -0, 55, 55, 1, 115200, 0xace06816 -1, 139104, 139104, 2016, 8064, 0x0a31c118 -0, 56, 56, 1, 115200, 0x4ef26aa2 -1, 141120, 141120, 2016, 8064, 0x7652ee6e -1, 143136, 143136, 2016, 8064, 0x486a24cc -0, 57, 57, 1, 115200, 0xf2046bb3 -1, 145152, 145152, 2016, 8064, 0xf6cf01ee -0, 58, 58, 1, 115200, 0x846b6eb0 -1, 147168, 147168, 2016, 8064, 0x2a19e830 -0, 59, 59, 1, 115200, 0x8a17716d -1, 149184, 149184, 2016, 8064, 0xde675a31 -0, 60, 60, 1, 115200, 0x36127568 -1, 151200, 151200, 2016, 8064, 0xeefcc9af -1, 153216, 153216, 2016, 8064, 0xaec4c989 -0, 61, 61, 1, 115200, 0x3e877b5c -1, 155232, 155232, 2016, 8064, 0x16b73de9 -0, 62, 62, 1, 115200, 0xea5681e8 -1, 157248, 157248, 2016, 8064, 0x188a582a -0, 63, 63, 1, 115200, 0x41bc8a39 -1, 159264, 159264, 2016, 8064, 0xc092e73d -0, 64, 64, 1, 115200, 0x6f839446 -1, 161280, 161280, 2016, 8064, 0xf7ebca97 -1, 163296, 163296, 2016, 8064, 0x170ce07a -0, 65, 65, 1, 115200, 0xef74a005 -1, 165312, 165312, 2016, 8064, 0xa0705384 -0, 66, 66, 1, 115200, 0x4354b2c2 -1, 167328, 167328, 2016, 8064, 0xd0154a3c -0, 67, 67, 1, 115200, 0x4607cf99 -1, 169344, 169344, 2016, 8064, 0x57c73c6c -0, 68, 68, 1, 115200, 0x4c18e8db -1, 171360, 171360, 2016, 8064, 0x590c9ddb -1, 173376, 173376, 2016, 8064, 0x2cbe552f -0, 69, 69, 1, 115200, 0x04d71efb -1, 175392, 175392, 2016, 8064, 0x0d286932 -0, 70, 70, 1, 115200, 0x32f4b9ae -1, 177408, 177408, 2016, 8064, 0x5931cea3 -0, 71, 71, 1, 115200, 0x4dd48d01 -1, 179424, 179424, 2016, 8064, 0xaf0fb80d -0, 72, 72, 1, 115200, 0x5fa9627f -1, 181440, 181440, 2016, 8064, 0x7fb61e9b -1, 183456, 183456, 2016, 8064, 0xf17134bb -0, 73, 73, 1, 115200, 0x7a413f88 -1, 185472, 185472, 2016, 8064, 0xd647859a -0, 74, 74, 1, 115200, 0xf1b7e5b6 -1, 187488, 187488, 2016, 8064, 0x55a60921 -0, 75, 75, 1, 115200, 0x3d720e05 -1, 189504, 189504, 2016, 8064, 0x3811fa58 -0, 76, 76, 1, 115200, 0x49243fd8 -1, 191520, 191520, 2016, 8064, 0xaceeccea -1, 193536, 193536, 2016, 8064, 0x5fcedf14 -0, 77, 77, 1, 115200, 0x9834b697 -1, 195552, 195552, 2016, 8064, 0xd8c64abf -0, 78, 78, 1, 115200, 0x4b8bc217 -1, 197568, 197568, 2016, 8064, 0x79495e8d -0, 79, 79, 1, 115200, 0x3eaf5504 -1, 199584, 199584, 2016, 8064, 0x4b7db039 -0, 80, 80, 1, 115200, 0x057a3701 -1, 201600, 201600, 2016, 8064, 0x7152f86d -1, 203616, 203616, 2016, 8064, 0xd92cfc1a -0, 81, 81, 1, 115200, 0x6e88f21a -1, 205632, 205632, 2016, 8064, 0x75c540ef -0, 82, 82, 1, 115200, 0x236c5226 -1, 207648, 207648, 2016, 8064, 0x9c03ef5e -0, 83, 83, 1, 115200, 0x92212d84 -1, 209664, 209664, 2016, 8064, 0x7b2911c8 -0, 84, 84, 1, 115200, 0xf6b0a4ff -1, 211680, 211680, 2016, 8064, 0x69d9d553 -1, 213696, 213696, 2016, 8064, 0xcb45d7c5 -0, 85, 85, 1, 115200, 0xb49e9b4e -1, 215712, 215712, 2016, 8064, 0x37ec8b0a -0, 86, 86, 1, 115200, 0x4a252440 -1, 217728, 217728, 2016, 8064, 0xe4354221 -0, 87, 87, 1, 115200, 0x65f3339a -1, 219744, 219744, 2016, 8064, 0xc0d91cdb -0, 88, 88, 1, 115200, 0x38e40a20 -1, 221760, 221760, 2016, 8064, 0xea0be175 diff --git a/tests/ref/fate/psx-str-demux b/tests/ref/fate/psx-str-demux new file mode 100644 index 0000000000..42c5731142 --- /dev/null +++ b/tests/ref/fate/psx-str-demux @@ -0,0 +1,202 @@ +#tb 0: 1/15 +#tb 1: 4/75 +0, 0, 0, 1, 8832, 0x01ad3eeb +1, 0, 0, 1, 2304, 0xf0ad1000 +1, 1, 1, 1, 2304, 0x69269ce6 +0, 1, 1, 1, 8968, 0xe0033799 +1, 2, 2, 1, 2304, 0x124a995d +0, 2, 2, 1, 9036, 0xd6189ab7 +1, 3, 3, 1, 2304, 0x3fc0ca07 +0, 3, 3, 1, 9192, 0xb44b9ffa +1, 4, 4, 1, 2304, 0x40a1b447 +0, 4, 4, 1, 9404, 0xe94dfd40 +1, 5, 5, 1, 2304, 0x150dae9f +1, 6, 6, 1, 2304, 0xad16bc63 +0, 5, 5, 1, 9492, 0xf73f2541 +1, 7, 7, 1, 2304, 0xe989b175 +0, 6, 6, 1, 9652, 0x243d53f8 +1, 8, 8, 1, 2304, 0x3c77cd39 +0, 7, 7, 1, 9872, 0x83f3ea7a +1, 9, 9, 1, 2304, 0x93f0c2ba +0, 8, 8, 1, 10052, 0x7604247a +1, 10, 10, 1, 2304, 0x6e2ad2d0 +1, 11, 11, 1, 2304, 0xf8eab90a +0, 9, 9, 1, 10100, 0x077107fd +1, 12, 12, 1, 2304, 0xc039bf0d +0, 10, 10, 1, 10264, 0xae675eb6 +1, 13, 13, 1, 2304, 0x0900c7e8 +0, 11, 11, 1, 10464, 0x428f83ae +1, 14, 14, 1, 2304, 0x9722d580 +0, 12, 12, 1, 10580, 0x1bdcd71b +1, 15, 15, 1, 2304, 0x02eec8de +1, 16, 16, 1, 2304, 0x4807a2b3 +0, 13, 13, 1, 10800, 0xde75213a +1, 17, 17, 1, 2304, 0x4643be06 +0, 14, 14, 1, 11236, 0x9387cc8e +1, 18, 18, 1, 2304, 0x5bd9d249 +0, 15, 15, 1, 11420, 0x3a7d321b +1, 19, 19, 1, 2304, 0x4e33c2bc +0, 16, 16, 1, 11632, 0x7edc9cdf +1, 20, 20, 1, 2304, 0x085ca51d +1, 21, 21, 1, 2304, 0xa205b202 +0, 17, 17, 1, 11936, 0xf0521017 +1, 22, 22, 1, 2304, 0x71b9bcca +0, 18, 18, 1, 11804, 0x53b22066 +1, 23, 23, 1, 2304, 0xcb769e5f +0, 19, 19, 1, 11852, 0x9425fb21 +1, 24, 24, 1, 2304, 0x9322d85a +0, 20, 20, 1, 12108, 0xc386941d +1, 25, 25, 1, 2304, 0x7f13bf6e +1, 26, 26, 1, 2304, 0xd302a5cd +0, 21, 21, 1, 12796, 0x8b7e5dab +1, 27, 27, 1, 2304, 0x7a7a9e30 +0, 22, 22, 1, 13316, 0x81235102 +1, 28, 28, 1, 2304, 0x6ffccfdd +0, 23, 23, 1, 13724, 0xe5fc2bca +1, 29, 29, 1, 2304, 0xae88bf7a +0, 24, 24, 1, 14304, 0xa5b1f811 +1, 30, 30, 1, 2304, 0xf816c2f5 +1, 31, 31, 1, 2304, 0xdb42a783 +0, 25, 25, 1, 15216, 0xf4996763 +1, 32, 32, 1, 2304, 0xfc55c021 +0, 26, 26, 1, 16224, 0xe30b0679 +1, 33, 33, 1, 2304, 0x9da68fc1 +0, 27, 27, 1, 10640, 0xaeb122c9 +1, 34, 34, 1, 2304, 0x2f65bb0f +0, 28, 28, 1, 11652, 0x087d18b1 +1, 35, 35, 1, 2304, 0x6e5da2c7 +1, 36, 36, 1, 2304, 0xb0b0c5f8 +0, 29, 29, 1, 12008, 0x1eeeac41 +1, 37, 37, 1, 2304, 0x32559dc6 +0, 30, 30, 1, 12344, 0x488c64ec +1, 38, 38, 1, 2304, 0x9168aed0 +0, 31, 31, 1, 13004, 0x02a69339 +1, 39, 39, 1, 2304, 0x32069bce +0, 32, 32, 1, 14092, 0x348a7d3f +1, 40, 40, 1, 2304, 0x763ca8e0 +1, 41, 41, 1, 2304, 0x70c7a44e +0, 33, 33, 1, 15048, 0xa55ef200 +1, 42, 42, 1, 2304, 0x7dc1b275 +0, 34, 34, 1, 16100, 0xac17de5b +1, 43, 43, 1, 2304, 0x2e26ceae +0, 35, 35, 1, 13180, 0x4d874f61 +1, 44, 44, 1, 2304, 0xa071a7e2 +0, 36, 36, 1, 14592, 0x5f58f505 +1, 45, 45, 1, 2304, 0xe434ad92 +1, 46, 46, 1, 2304, 0xb4469381 +0, 37, 37, 1, 14372, 0x369bb5d9 +1, 47, 47, 1, 2304, 0x3f20a7c5 +0, 38, 38, 1, 16172, 0x513a97b6 +1, 48, 48, 1, 2304, 0x68ef9ef9 +0, 39, 39, 1, 15136, 0x7f9a3865 +1, 49, 49, 1, 2304, 0x32dbb3e2 +0, 40, 40, 1, 16336, 0x1339ba5f +1, 50, 50, 1, 2304, 0xdd90c7c3 +1, 51, 51, 1, 2304, 0xd106adb5 +0, 41, 41, 1, 16944, 0x122f71b7 +1, 52, 52, 1, 2304, 0x11dca8c4 +0, 42, 42, 1, 17536, 0x7461b152 +1, 53, 53, 1, 2304, 0x646d98bc +0, 43, 43, 1, 13940, 0xf5278274 +1, 54, 54, 1, 2304, 0x6f019e81 +0, 44, 44, 1, 8592, 0x4bb2eaea +1, 55, 55, 1, 2304, 0xc872a896 +1, 56, 56, 1, 2304, 0xc7d7a0bc +0, 45, 45, 1, 8584, 0x2ff1e3db +1, 57, 57, 1, 2304, 0x181b880a +0, 46, 46, 1, 8548, 0xadfd01b4 +1, 58, 58, 1, 2304, 0x6486b158 +0, 47, 47, 1, 8548, 0x9e2ec85f +1, 59, 59, 1, 2304, 0x26d5a3db +0, 48, 48, 1, 8540, 0x9e2ad166 +1, 60, 60, 1, 2304, 0x4ff89a4d +1, 61, 61, 1, 2304, 0xc42e9552 +0, 49, 49, 1, 8524, 0x047bc406 +1, 62, 62, 1, 2304, 0x0dc1c346 +0, 50, 50, 1, 8508, 0xd051ddbb +1, 63, 63, 1, 2304, 0x5e51b7a5 +0, 51, 51, 1, 8572, 0x40b5004c +1, 64, 64, 1, 2304, 0xbd49c142 +0, 52, 52, 1, 8564, 0xb379db59 +1, 65, 65, 1, 2304, 0x373da274 +1, 66, 66, 1, 2304, 0xde97b1bb +0, 53, 53, 1, 8592, 0x22d0bc35 +1, 67, 67, 1, 2304, 0x9715bf29 +0, 54, 54, 1, 8656, 0xa58917d5 +1, 68, 68, 1, 2304, 0xc341b4ef +0, 55, 55, 1, 8616, 0xc9e4f431 +1, 69, 69, 1, 2304, 0xc610adc6 +0, 56, 56, 1, 8660, 0x7a90ffd1 +1, 70, 70, 1, 2304, 0x67bba315 +1, 71, 71, 1, 2304, 0x949b9c16 +0, 57, 57, 1, 8636, 0xec8ce437 +1, 72, 72, 1, 2304, 0xc7c1a8ca +0, 58, 58, 1, 8668, 0x8b73139f +1, 73, 73, 1, 2304, 0x1929bc7e +0, 59, 59, 1, 8640, 0x3ee30f9c +1, 74, 74, 1, 2304, 0x5fc97897 +0, 60, 60, 1, 8728, 0xdbe12a94 +1, 75, 75, 1, 2304, 0x272da8d3 +1, 76, 76, 1, 2304, 0x141e904d +0, 61, 61, 1, 8748, 0xc4132fd5 +1, 77, 77, 1, 2304, 0x9880b0ed +0, 62, 62, 1, 8720, 0x7ac9316a +1, 78, 78, 1, 2304, 0x0438932a +0, 63, 63, 1, 8756, 0xf47d843d +1, 79, 79, 1, 2304, 0x27069761 +0, 64, 64, 1, 8840, 0x82808e79 +1, 80, 80, 1, 2304, 0x0baba2b7 +1, 81, 81, 1, 2304, 0x4bc491af +0, 65, 65, 1, 8908, 0x63568647 +1, 82, 82, 1, 2304, 0x72e18e82 +0, 66, 66, 1, 8968, 0xbd26de31 +1, 83, 83, 1, 2304, 0xf85d8a91 +0, 67, 67, 1, 9168, 0xe1cd43a3 +1, 84, 84, 1, 2304, 0x653582e3 +0, 68, 68, 1, 9272, 0x0cc64c79 +1, 85, 85, 1, 2304, 0x6b5e8084 +1, 86, 86, 1, 2304, 0x8cc27d10 +0, 69, 69, 1, 9700, 0x5cd2be73 +1, 87, 87, 1, 2304, 0xcf8f9e1d +0, 70, 70, 1, 9868, 0x9b1629ae +1, 88, 88, 1, 2304, 0xecbe89df +0, 71, 71, 1, 10264, 0xa13cb7db +1, 89, 89, 1, 2304, 0xa433753d +0, 72, 72, 1, 10908, 0xe995858e +1, 90, 90, 1, 2304, 0xe386afe9 +1, 91, 91, 1, 2304, 0x90409771 +0, 73, 73, 1, 11272, 0xebea53f6 +1, 92, 92, 1, 2304, 0x29c88ae5 +0, 74, 74, 1, 12128, 0xdfa8b7aa +1, 93, 93, 1, 2304, 0x900b9e6a +0, 75, 75, 1, 12560, 0x46048576 +1, 94, 94, 1, 2304, 0x958cbb49 +0, 76, 76, 1, 12900, 0x5b3aeb76 +1, 95, 95, 1, 2304, 0xf83da537 +1, 96, 96, 1, 2304, 0x5fad9e5f +0, 77, 77, 1, 13544, 0x0f98fb94 +1, 97, 97, 1, 2304, 0xae15902a +0, 78, 78, 1, 13968, 0x7c17c4c2 +1, 98, 98, 1, 2304, 0xf2a8b9d8 +0, 79, 79, 1, 15020, 0xe8faa930 +1, 99, 99, 1, 2304, 0x7bc99f71 +0, 80, 80, 1, 16152, 0x3f004f78 +1, 100, 100, 1, 2304, 0x3f199672 +1, 101, 101, 1, 2304, 0x4e258c38 +0, 81, 81, 1, 17224, 0x103f3935 +1, 102, 102, 1, 2304, 0x5119b909 +0, 82, 82, 1, 11956, 0x7af9354a +1, 103, 103, 1, 2304, 0xad57a533 +0, 83, 83, 1, 12644, 0xe113a4b2 +1, 104, 104, 1, 2304, 0xe40eb453 +0, 84, 84, 1, 13420, 0xdf3ec8a4 +1, 105, 105, 1, 2304, 0x502cc37e +1, 106, 106, 1, 2304, 0x5b7bae9a +0, 85, 85, 1, 14140, 0x0ad8a165 +1, 107, 107, 1, 2304, 0x0458a92d +0, 86, 86, 1, 15192, 0xc55f45cd +1, 108, 108, 1, 2304, 0x1529aba8 +0, 87, 87, 1, 12740, 0xa13c85db +1, 109, 109, 1, 2304, 0x1a52a9d1 +0, 88, 88, 1, 14416, 0x9e68b57d +1, 110, 110, 1, 2304, 0x76a2a7c9 From 6d042f7989509aa2d2d223d41c73092f476f4c9b Mon Sep 17 00:00:00 2001 From: Mans Rullgard Date: Mon, 14 May 2012 16:44:15 +0100 Subject: [PATCH 03/15] fate: rename psx-str-v3-mdec to mdec-v3 This name better reflects that it is v3 of mdec that is tested. Signed-off-by: Mans Rullgard --- tests/fate/demux.mak | 3 --- tests/fate/video.mak | 3 +++ tests/ref/fate/{psx-str-v3-mdec => mdec-v3} | 0 3 files changed, 3 insertions(+), 3 deletions(-) rename tests/ref/fate/{psx-str-v3-mdec => mdec-v3} (100%) diff --git a/tests/fate/demux.mak b/tests/fate/demux.mak index 66cd0e9cd5..fd317b7add 100644 --- a/tests/fate/demux.mak +++ b/tests/fate/demux.mak @@ -43,9 +43,6 @@ fate-oma-demux: CMD = crc -i $(SAMPLES)/oma/01-Untitled-partial.oma -acodec copy FATE_AVCONV += fate-psx-str-demux fate-psx-str-demux: CMD = framecrc -i $(SAMPLES)/psx-str/descent-partial.str -c copy -FATE_AVCONV += fate-psx-str-v3-mdec -fate-psx-str-v3-mdec: CMD = framecrc -i $(SAMPLES)/psx-str/abc000_cut.str -an - FATE_AVCONV += fate-pva-demux fate-pva-demux: CMD = framecrc -idct simple -i $(SAMPLES)/pva/PVA_test-partial.pva -t 0.6 -acodec copy -vn diff --git a/tests/fate/video.mak b/tests/fate/video.mak index 0f4219d94f..405c651ca9 100644 --- a/tests/fate/video.mak +++ b/tests/fate/video.mak @@ -148,6 +148,9 @@ fate-kmvc: CMD = framecrc -i $(SAMPLES)/KMVC/LOGO1.AVI -an -t 3 -pix_fmt rgb24 FATE_AVCONV += fate-mdec fate-mdec: CMD = framecrc -idct simple -i $(SAMPLES)/ea-dct/NFS2Esprit-partial.dct -an +FATE_AVCONV += fate-mdec-v3 +fate-mdec-v3: CMD = framecrc -idct simple -i $(SAMPLES)/psx-str/abc000_cut.str -an + FATE_AVCONV += fate-mimic fate-mimic: CMD = framecrc -idct simple -i $(SAMPLES)/mimic/mimic2-womanloveffmpeg.cam diff --git a/tests/ref/fate/psx-str-v3-mdec b/tests/ref/fate/mdec-v3 similarity index 100% rename from tests/ref/fate/psx-str-v3-mdec rename to tests/ref/fate/mdec-v3 From fc417db3f162d5269c0d22f8e467da4afa67c20a Mon Sep 17 00:00:00 2001 From: Kostya Shishkov Date: Mon, 14 May 2012 19:30:54 +0200 Subject: [PATCH 04/15] indeo3: ensure that decoded cell data is in 7-bit range as presumed by decoder --- libavcodec/indeo3.c | 30 ++++++++++++++++-------------- 1 file changed, 16 insertions(+), 14 deletions(-) diff --git a/libavcodec/indeo3.c b/libavcodec/indeo3.c index 80839406c0..0856d0607c 100644 --- a/libavcodec/indeo3.c +++ b/libavcodec/indeo3.c @@ -344,8 +344,10 @@ if (*data_ptr >= last_ptr) \ fill_64(dst, pix64, num_lines << 1, row_offset) #define APPLY_DELTA_4 \ - AV_WN16A(dst + line_offset , AV_RN16A(ref ) + delta_tab->deltas[dyad1]);\ - AV_WN16A(dst + line_offset + 2, AV_RN16A(ref + 2) + delta_tab->deltas[dyad2]);\ + AV_WN16A(dst + line_offset ,\ + (AV_RN16A(ref ) + delta_tab->deltas[dyad1]) & 0x7F7F);\ + AV_WN16A(dst + line_offset + 2,\ + (AV_RN16A(ref + 2) + delta_tab->deltas[dyad2]) & 0x7F7F);\ if (mode >= 3) {\ if (is_top_of_cell && !cell->ypos) {\ AV_COPY32(dst, dst + row_offset);\ @@ -358,14 +360,14 @@ if (*data_ptr >= last_ptr) \ /* apply two 32-bit VQ deltas to next even line */\ if (is_top_of_cell) { \ AV_WN32A(dst + row_offset , \ - replicate32(AV_RN32A(ref )) + delta_tab->deltas_m10[dyad1]);\ + (replicate32(AV_RN32A(ref )) + delta_tab->deltas_m10[dyad1]) & 0x7F7F7F7F);\ AV_WN32A(dst + row_offset + 4, \ - replicate32(AV_RN32A(ref + 4)) + delta_tab->deltas_m10[dyad2]);\ + (replicate32(AV_RN32A(ref + 4)) + delta_tab->deltas_m10[dyad2]) & 0x7F7F7F7F);\ } else { \ AV_WN32A(dst + row_offset , \ - AV_RN32A(ref ) + delta_tab->deltas_m10[dyad1]);\ + (AV_RN32A(ref ) + delta_tab->deltas_m10[dyad1]) & 0x7F7F7F7F);\ AV_WN32A(dst + row_offset + 4, \ - AV_RN32A(ref + 4) + delta_tab->deltas_m10[dyad2]);\ + (AV_RN32A(ref + 4) + delta_tab->deltas_m10[dyad2]) & 0x7F7F7F7F);\ } \ /* odd lines are not coded but rather interpolated/replicated */\ /* first line of the cell on the top of image? - replicate */\ @@ -379,22 +381,22 @@ if (*data_ptr >= last_ptr) \ #define APPLY_DELTA_1011_INTER \ if (mode == 10) { \ AV_WN32A(dst , \ - AV_RN32A(dst ) + delta_tab->deltas_m10[dyad1]);\ + (AV_RN32A(dst ) + delta_tab->deltas_m10[dyad1]) & 0x7F7F7F7F);\ AV_WN32A(dst + 4 , \ - AV_RN32A(dst + 4 ) + delta_tab->deltas_m10[dyad2]);\ + (AV_RN32A(dst + 4 ) + delta_tab->deltas_m10[dyad2]) & 0x7F7F7F7F);\ AV_WN32A(dst + row_offset , \ - AV_RN32A(dst + row_offset ) + delta_tab->deltas_m10[dyad1]);\ + (AV_RN32A(dst + row_offset ) + delta_tab->deltas_m10[dyad1]) & 0x7F7F7F7F);\ AV_WN32A(dst + row_offset + 4, \ - AV_RN32A(dst + row_offset + 4) + delta_tab->deltas_m10[dyad2]);\ + (AV_RN32A(dst + row_offset + 4) + delta_tab->deltas_m10[dyad2]) & 0x7F7F7F7F);\ } else { \ AV_WN16A(dst , \ - AV_RN16A(dst ) + delta_tab->deltas[dyad1]);\ + (AV_RN16A(dst ) + delta_tab->deltas[dyad1]) & 0x7F7F);\ AV_WN16A(dst + 2 , \ - AV_RN16A(dst + 2 ) + delta_tab->deltas[dyad2]);\ + (AV_RN16A(dst + 2 ) + delta_tab->deltas[dyad2]) & 0x7F7F);\ AV_WN16A(dst + row_offset , \ - AV_RN16A(dst + row_offset ) + delta_tab->deltas[dyad1]);\ + (AV_RN16A(dst + row_offset ) + delta_tab->deltas[dyad1]) & 0x7F7F);\ AV_WN16A(dst + row_offset + 2, \ - AV_RN16A(dst + row_offset + 2) + delta_tab->deltas[dyad2]);\ + (AV_RN16A(dst + row_offset + 2) + delta_tab->deltas[dyad2]) & 0x7F7F);\ } From 81064a8045028838fd32d18490034c207c8ecc06 Mon Sep 17 00:00:00 2001 From: Kostya Shishkov Date: Mon, 14 May 2012 19:33:03 +0200 Subject: [PATCH 05/15] indeo3: initialise pixel planes on allocation This prevents decoder from reading garbage from it in case of errors later. --- libavcodec/indeo3.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/libavcodec/indeo3.c b/libavcodec/indeo3.c index 0856d0607c..1221ffab18 100644 --- a/libavcodec/indeo3.c +++ b/libavcodec/indeo3.c @@ -194,6 +194,8 @@ static av_cold int allocate_frame_buffers(Indeo3DecodeContext *ctx, /* set buffer pointers = buf_ptr + pitch and thus skip the INTRA prediction line */ ctx->planes[p].pixels[0] = ctx->planes[p].buffers[0] + ctx->planes[p].pitch; ctx->planes[p].pixels[1] = ctx->planes[p].buffers[1] + ctx->planes[p].pitch; + memset(ctx->planes[p].pixels[0], 0, ctx->planes[p].pitch * ctx->planes[p].height); + memset(ctx->planes[p].pixels[1], 0, ctx->planes[p].pitch * ctx->planes[p].height); } return 0; From bc00da27010ed9e5dbe47e5b6fae3dcddb999d78 Mon Sep 17 00:00:00 2001 From: Kostya Shishkov Date: Mon, 14 May 2012 19:45:41 +0200 Subject: [PATCH 06/15] indeo3: when freeing buffers, set pointers referencing them to NULL as well --- libavcodec/indeo3.c | 1 + 1 file changed, 1 insertion(+) diff --git a/libavcodec/indeo3.c b/libavcodec/indeo3.c index 1221ffab18..e5b2ea7ef0 100644 --- a/libavcodec/indeo3.c +++ b/libavcodec/indeo3.c @@ -209,6 +209,7 @@ static av_cold void free_frame_buffers(Indeo3DecodeContext *ctx) for (p = 0; p < 3; p++) { av_freep(&ctx->planes[p].buffers[0]); av_freep(&ctx->planes[p].buffers[1]); + ctx->planes[p].pixels[0] = ctx->planes[p].pixels[1] = 0; } } From 6de226a2b8b703abc823f18c3fd7f39a0787aeb5 Mon Sep 17 00:00:00 2001 From: Kostya Shishkov Date: Mon, 14 May 2012 19:46:54 +0200 Subject: [PATCH 07/15] indeo3: validate new frame size before resetting decoder --- libavcodec/indeo3.c | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/libavcodec/indeo3.c b/libavcodec/indeo3.c index e5b2ea7ef0..d526d910da 100644 --- a/libavcodec/indeo3.c +++ b/libavcodec/indeo3.c @@ -900,6 +900,14 @@ static int decode_frame_headers(Indeo3DecodeContext *ctx, AVCodecContext *avctx, av_dlog(avctx, "Frame dimensions changed!\n"); + if (width < 16 || width > 640 || + height < 16 || height > 480 || + width & 3 || height & 3) { + av_log(avctx, AV_LOG_ERROR, + "Invalid picture dimensions: %d x %d!\n", width, height); + return AVERROR_INVALIDDATA; + } + ctx->width = width; ctx->height = height; From 4982e1ddfaff5287e05b95957f3c56901d60b56a Mon Sep 17 00:00:00 2001 From: Diego Biurrun Date: Sun, 26 Jun 2011 13:52:40 +0200 Subject: [PATCH 08/15] build: Add 'check' target to run all compile and test targets. --- Makefile | 4 +++- doc/developer.texi | 4 +--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/Makefile b/Makefile index 5da4d51b60..28568f98c7 100644 --- a/Makefile +++ b/Makefile @@ -184,6 +184,8 @@ distclean:: config: $(SRC_PATH)/configure $(value LIBAV_CONFIGURATION) +check: all alltools checkheaders examples testprogs fate + include $(SRC_PATH)/doc/Makefile include $(SRC_PATH)/tests/Makefile @@ -198,5 +200,5 @@ $(sort $(OBJDIRS)): # so this saves some time on slow systems. .SUFFIXES: -.PHONY: all all-yes alltools *clean config examples install* +.PHONY: all all-yes alltools check *clean config examples install* .PHONY: testprogs uninstall* diff --git a/doc/developer.texi b/doc/developer.texi index fed28cdbcd..2e25f5fb0d 100644 --- a/doc/developer.texi +++ b/doc/developer.texi @@ -432,9 +432,7 @@ send a reminder by email. Your patch should eventually be dealt with. @enumerate @item - Does @code{make fate} pass with the patch applied? -@item - Does @code{make checkheaders} pass with the patch applied? + Does @code{make check} pass with the patch applied? @item Is the patch against latest Libav git master branch? @item From 91791ac2edc46ff5f2ab09bbcdc58c3053f23075 Mon Sep 17 00:00:00 2001 From: Diego Biurrun Date: Tue, 15 May 2012 15:56:04 +0200 Subject: [PATCH 09/15] avfilter: Move ff_get_ref_perms_string() to where it is used. This fixes a compilation failure with -DDEBUG. --- libavfilter/avfilter.c | 14 -------------- libavfilter/video.c | 14 ++++++++++++++ 2 files changed, 14 insertions(+), 14 deletions(-) diff --git a/libavfilter/avfilter.c b/libavfilter/avfilter.c index febc12ff15..231c875131 100644 --- a/libavfilter/avfilter.c +++ b/libavfilter/avfilter.c @@ -179,20 +179,6 @@ int avfilter_config_links(AVFilterContext *filter) return 0; } -#ifdef DEBUG -static char *ff_get_ref_perms_string(char *buf, size_t buf_size, int perms) -{ - snprintf(buf, buf_size, "%s%s%s%s%s%s", - perms & AV_PERM_READ ? "r" : "", - perms & AV_PERM_WRITE ? "w" : "", - perms & AV_PERM_PRESERVE ? "p" : "", - perms & AV_PERM_REUSE ? "u" : "", - perms & AV_PERM_REUSE2 ? "U" : "", - perms & AV_PERM_NEG_LINESIZES ? "n" : ""); - return buf; -} -#endif - void ff_dlog_link(void *ctx, AVFilterLink *link, int end) { if (link->type == AVMEDIA_TYPE_VIDEO) { diff --git a/libavfilter/video.c b/libavfilter/video.c index 26805feba0..211cec9055 100644 --- a/libavfilter/video.c +++ b/libavfilter/video.c @@ -21,6 +21,20 @@ #include "avfilter.h" #include "internal.h" +#ifdef DEBUG +static char *ff_get_ref_perms_string(char *buf, size_t buf_size, int perms) +{ + snprintf(buf, buf_size, "%s%s%s%s%s%s", + perms & AV_PERM_READ ? "r" : "", + perms & AV_PERM_WRITE ? "w" : "", + perms & AV_PERM_PRESERVE ? "p" : "", + perms & AV_PERM_REUSE ? "u" : "", + perms & AV_PERM_REUSE2 ? "U" : "", + perms & AV_PERM_NEG_LINESIZES ? "n" : ""); + return buf; +} +#endif + static void ff_dlog_ref(void *ctx, AVFilterBufferRef *ref, int end) { av_unused char buf[16]; From 46ea46357a1f9adf7a8266125308803d00024b75 Mon Sep 17 00:00:00 2001 From: Aneesh Dogra Date: Tue, 15 May 2012 22:02:02 +0530 Subject: [PATCH 10/15] tta: Fix comment about channel number; TTA supports >2 channels. Signed-off-by: Diego Biurrun --- libavcodec/tta.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libavcodec/tta.c b/libavcodec/tta.c index e28023f941..0650086dcd 100644 --- a/libavcodec/tta.c +++ b/libavcodec/tta.c @@ -416,7 +416,7 @@ static int tta_decode_frame(AVCodecContext *avctx, void *data, if (cur_chan < (s->channels-1)) cur_chan++; else { - // decorrelate in case of stereo integer + // decorrelate in case of multiple channels if (s->channels > 1) { int32_t *r = p - 1; for (*p += *r / 2; r > p - s->channels; r--) From 11e33402ca0ed949241133aef1959f8d937982a5 Mon Sep 17 00:00:00 2001 From: Mans Rullgard Date: Mon, 14 May 2012 22:31:08 +0100 Subject: [PATCH 11/15] fate: use standard diff options diff -w is not a standard option. This fixes the reference files to match what the tests actually output and switches to using the standard diff -b which is sufficient to handle different line ending styles. Signed-off-by: Mans Rullgard --- tests/fate-run.sh | 2 +- tests/ref/fate/crc | 8 ++++---- tests/ref/lavf/pam | 2 +- tests/ref/vsynth1/cljr | 2 +- tests/ref/vsynth1/dnxhd_720p_10bit | 2 +- tests/ref/vsynth1/error | 2 +- tests/ref/vsynth1/ffvhuff | 2 +- tests/ref/vsynth2/cljr | 2 +- tests/ref/vsynth2/dnxhd_720p_10bit | 2 +- tests/ref/vsynth2/error | 2 +- tests/ref/vsynth2/ffvhuff | 2 +- 11 files changed, 14 insertions(+), 14 deletions(-) diff --git a/tests/fate-run.sh b/tests/fate-run.sh index 636fc2d599..a933fa1ab7 100755 --- a/tests/fate-run.sh +++ b/tests/fate-run.sh @@ -157,7 +157,7 @@ fi if test -e "$ref" || test $cmp = "oneline" ; then case $cmp in - diff) diff -u -w "$ref" "$outfile" >$cmpfile ;; + diff) diff -u -b "$ref" "$outfile" >$cmpfile ;; oneoff) oneoff "$ref" "$outfile" >$cmpfile ;; stddev) stddev "$ref" "$outfile" >$cmpfile ;; oneline)oneline "$ref" "$outfile" >$cmpfile ;; diff --git a/tests/ref/fate/crc b/tests/ref/fate/crc index 4a82680490..1c24aea74a 100644 --- a/tests/ref/fate/crc +++ b/tests/ref/fate/crc @@ -1,4 +1,4 @@ -crc EDB88320 =3D5CDD04 -crc 04C11DB7 =E0BAF5C0 -crc 00008005 =BB1F -crc 00000007 =E3 +crc EDB88320 = 3D5CDD04 +crc 04C11DB7 = E0BAF5C0 +crc 00008005 = BB1F +crc 00000007 = E3 diff --git a/tests/ref/lavf/pam b/tests/ref/lavf/pam index 972d72825e..e53132a312 100644 --- a/tests/ref/lavf/pam +++ b/tests/ref/lavf/pam @@ -1,3 +1,3 @@ 0dce5565222cf0f8b309467f279aecd2 *./tests/data/images/pam/02.pam ./tests/data/images/pam/%02d.pam CRC=0x6da01946 - 304191 ./tests/data/images/pam/02.pam +304191 ./tests/data/images/pam/02.pam diff --git a/tests/ref/vsynth1/cljr b/tests/ref/vsynth1/cljr index 4978344bd3..4eb6483fed 100644 --- a/tests/ref/vsynth1/cljr +++ b/tests/ref/vsynth1/cljr @@ -1,4 +1,4 @@ b4d3d31da0b4b6873ad8239d113c91d2 *./tests/data/vsynth1/cljr.avi - 5075660 ./tests/data/vsynth1/cljr.avi +5075660 ./tests/data/vsynth1/cljr.avi 4debaab994c2c7273bebaa0c5733017b *./tests/data/cljr.vsynth1.out.yuv stddev: 30.75 PSNR: 18.37 MAXDIFF: 225 bytes: 7603200/ 7603200 diff --git a/tests/ref/vsynth1/dnxhd_720p_10bit b/tests/ref/vsynth1/dnxhd_720p_10bit index ad97b66b7d..499714c80b 100644 --- a/tests/ref/vsynth1/dnxhd_720p_10bit +++ b/tests/ref/vsynth1/dnxhd_720p_10bit @@ -1,4 +1,4 @@ b5e24a055af02edec8674333260214fd *./tests/data/vsynth1/dnxhd-720p-10bit.dnxhd - 2293760 ./tests/data/vsynth1/dnxhd-720p-10bit.dnxhd +2293760 ./tests/data/vsynth1/dnxhd-720p-10bit.dnxhd 4466ff3d73d01bbe75ea25001d379b63 *./tests/data/dnxhd_720p_10bit.vsynth1.out.yuv stddev: 6.27 PSNR: 32.18 MAXDIFF: 64 bytes: 760320/ 7603200 diff --git a/tests/ref/vsynth1/error b/tests/ref/vsynth1/error index bc24d5b2af..4d1e9e5b0c 100644 --- a/tests/ref/vsynth1/error +++ b/tests/ref/vsynth1/error @@ -1,4 +1,4 @@ 7416dfd319f04044d4575dc9d1b406e1 *./tests/data/vsynth1/error-mpeg4-adv.avi - 756836 ./tests/data/vsynth1/error-mpeg4-adv.avi +756836 ./tests/data/vsynth1/error-mpeg4-adv.avi 79e94ba32b37759397362cbcb479d4d3 *./tests/data/error.vsynth1.out.yuv stddev: 18.36 PSNR: 22.85 MAXDIFF: 243 bytes: 7603200/ 7603200 diff --git a/tests/ref/vsynth1/ffvhuff b/tests/ref/vsynth1/ffvhuff index 4a1ebdb1a3..e1aad33f71 100644 --- a/tests/ref/vsynth1/ffvhuff +++ b/tests/ref/vsynth1/ffvhuff @@ -1,4 +1,4 @@ da0c0bd12ac141c976ffa6a71832ab4b *./tests/data/vsynth1/ffvhuff.avi - 5987208 ./tests/data/vsynth1/ffvhuff.avi +5987208 ./tests/data/vsynth1/ffvhuff.avi c5ccac874dbf808e9088bc3107860042 *./tests/data/ffvhuff.vsynth1.out.yuv stddev: 0.00 PSNR:999.99 MAXDIFF: 0 bytes: 7603200/ 7603200 diff --git a/tests/ref/vsynth2/cljr b/tests/ref/vsynth2/cljr index 562f35fa22..f920b7a67a 100644 --- a/tests/ref/vsynth2/cljr +++ b/tests/ref/vsynth2/cljr @@ -1,4 +1,4 @@ 416ddcf73d2d993456f3c49f3eed4f1a *./tests/data/vsynth2/cljr.avi - 5075660 ./tests/data/vsynth2/cljr.avi +5075660 ./tests/data/vsynth2/cljr.avi 3a70ba2a535ef9c7fc6478b27a2cb58a *./tests/data/cljr.vsynth2.out.yuv stddev: 10.48 PSNR: 27.72 MAXDIFF: 64 bytes: 7603200/ 7603200 diff --git a/tests/ref/vsynth2/dnxhd_720p_10bit b/tests/ref/vsynth2/dnxhd_720p_10bit index 60c0d84a34..9409e246cf 100644 --- a/tests/ref/vsynth2/dnxhd_720p_10bit +++ b/tests/ref/vsynth2/dnxhd_720p_10bit @@ -1,4 +1,4 @@ 4b57da2c0c1280469ff3579f7151c227 *./tests/data/vsynth2/dnxhd-720p-10bit.dnxhd - 2293760 ./tests/data/vsynth2/dnxhd-720p-10bit.dnxhd +2293760 ./tests/data/vsynth2/dnxhd-720p-10bit.dnxhd 31a6aa8b8702e85fa3b48e73f035c4e4 *./tests/data/dnxhd_720p_10bit.vsynth2.out.yuv stddev: 1.35 PSNR: 45.46 MAXDIFF: 23 bytes: 760320/ 7603200 diff --git a/tests/ref/vsynth2/error b/tests/ref/vsynth2/error index 424c54962b..a6bfcd4fe2 100644 --- a/tests/ref/vsynth2/error +++ b/tests/ref/vsynth2/error @@ -1,4 +1,4 @@ 90e65096aa9ebafa3fe3f44a5a47cdc4 *./tests/data/vsynth2/error-mpeg4-adv.avi - 176588 ./tests/data/vsynth2/error-mpeg4-adv.avi +176588 ./tests/data/vsynth2/error-mpeg4-adv.avi 96baa9e4c24c837a3ba5abd8dd2cdd30 *./tests/data/error.vsynth2.out.yuv stddev: 8.98 PSNR: 29.06 MAXDIFF: 184 bytes: 7603200/ 7603200 diff --git a/tests/ref/vsynth2/ffvhuff b/tests/ref/vsynth2/ffvhuff index 47fc6597d7..3a4a89021f 100644 --- a/tests/ref/vsynth2/ffvhuff +++ b/tests/ref/vsynth2/ffvhuff @@ -1,4 +1,4 @@ d31aab445b24f738df45fdd7479d6dd7 *./tests/data/vsynth2/ffvhuff.avi - 4988056 ./tests/data/vsynth2/ffvhuff.avi +4988056 ./tests/data/vsynth2/ffvhuff.avi dde5895817ad9d219f79a52d0bdfb001 *./tests/data/ffvhuff.vsynth2.out.yuv stddev: 0.00 PSNR:999.99 MAXDIFF: 0 bytes: 7603200/ 7603200 From 95a98ab3f0439df82a907233f80a7404b987e838 Mon Sep 17 00:00:00 2001 From: Justin Ruggles Date: Mon, 14 May 2012 15:56:39 -0400 Subject: [PATCH 12/15] ac3dsp: simplify x86 versions of ac3_max_msb_abs_int16 Simplifies the code by using cpuflags and a new macro. Also fixes the invalid use of the MMX2 pshufw operation in the MMX-only function. --- libavcodec/x86/ac3dsp.asm | 59 ++++++++++++++++++++++++------------- libavcodec/x86/ac3dsp_mmx.c | 10 +++---- 2 files changed, 43 insertions(+), 26 deletions(-) diff --git a/libavcodec/x86/ac3dsp.asm b/libavcodec/x86/ac3dsp.asm index 1438811fc7..f1e73d375a 100644 --- a/libavcodec/x86/ac3dsp.asm +++ b/libavcodec/x86/ac3dsp.asm @@ -91,12 +91,36 @@ AC3_EXPONENT_MIN sse2 ; This is used for mmxext and sse2 because they have pminsw/pmaxsw. ;----------------------------------------------------------------------------- -%macro AC3_MAX_MSB_ABS_INT16 2 -cglobal ac3_max_msb_abs_int16_%1, 2,2,5, src, len +; logical 'or' of 4 or 8 words in an mmx or xmm register into the low word +%macro OR_WORDS_HORIZ 2 ; src, tmp +%if cpuflag(sse2) + movhlps %2, %1 + por %1, %2 + pshuflw %2, %1, q0032 + por %1, %2 + pshuflw %2, %1, q0001 + por %1, %2 +%elif cpuflag(mmx2) + pshufw %2, %1, q0032 + por %1, %2 + pshufw %2, %1, q0001 + por %1, %2 +%else ; mmx + movq %2, %1 + psrlq %2, 32 + por %1, %2 + movq %2, %1 + psrlq %2, 16 + por %1, %2 +%endif +%endmacro + +%macro AC3_MAX_MSB_ABS_INT16 1 +cglobal ac3_max_msb_abs_int16, 2,2,5, src, len pxor m2, m2 pxor m3, m3 .loop: -%ifidn %2, min_max +%ifidn %1, min_max mova m0, [srcq] mova m1, [srcq+mmsize] pminsw m2, m0 @@ -104,7 +128,7 @@ cglobal ac3_max_msb_abs_int16_%1, 2,2,5, src, len pmaxsw m3, m0 pmaxsw m3, m1 %else ; or_abs -%ifidn %1, mmx +%if notcpuflag(ssse3) mova m0, [srcq] mova m1, [srcq+mmsize] ABS2 m0, m1, m3, m4 @@ -119,34 +143,27 @@ cglobal ac3_max_msb_abs_int16_%1, 2,2,5, src, len add srcq, mmsize*2 sub lend, mmsize ja .loop -%ifidn %2, min_max +%ifidn %1, min_max ABS2 m2, m3, m0, m1 por m2, m3 %endif -%ifidn mmsize, 16 - movhlps m0, m2 - por m2, m0 -%endif - PSHUFLW m0, m2, 0xe - por m2, m0 - PSHUFLW m0, m2, 0x1 - por m2, m0 + OR_WORDS_HORIZ m2, m0 movd eax, m2 and eax, 0xFFFF RET %endmacro -INIT_MMX +INIT_MMX mmx %define ABS2 ABS2_MMX -%define PSHUFLW pshufw -AC3_MAX_MSB_ABS_INT16 mmx, or_abs +AC3_MAX_MSB_ABS_INT16 or_abs +INIT_MMX mmx2 %define ABS2 ABS2_MMX2 -AC3_MAX_MSB_ABS_INT16 mmxext, min_max -INIT_XMM -%define PSHUFLW pshuflw -AC3_MAX_MSB_ABS_INT16 sse2, min_max +AC3_MAX_MSB_ABS_INT16 min_max +INIT_XMM sse2 +AC3_MAX_MSB_ABS_INT16 min_max +INIT_XMM ssse3 %define ABS2 ABS2_SSSE3 -AC3_MAX_MSB_ABS_INT16 ssse3, or_abs +AC3_MAX_MSB_ABS_INT16 or_abs ;----------------------------------------------------------------------------- ; macro used for ff_ac3_lshift_int16() and ff_ac3_rshift_int32() diff --git a/libavcodec/x86/ac3dsp_mmx.c b/libavcodec/x86/ac3dsp_mmx.c index d6bb469457..1a43183aa0 100644 --- a/libavcodec/x86/ac3dsp_mmx.c +++ b/libavcodec/x86/ac3dsp_mmx.c @@ -27,10 +27,10 @@ extern void ff_ac3_exponent_min_mmx (uint8_t *exp, int num_reuse_blocks, int n extern void ff_ac3_exponent_min_mmxext(uint8_t *exp, int num_reuse_blocks, int nb_coefs); extern void ff_ac3_exponent_min_sse2 (uint8_t *exp, int num_reuse_blocks, int nb_coefs); -extern int ff_ac3_max_msb_abs_int16_mmx (const int16_t *src, int len); -extern int ff_ac3_max_msb_abs_int16_mmxext(const int16_t *src, int len); -extern int ff_ac3_max_msb_abs_int16_sse2 (const int16_t *src, int len); -extern int ff_ac3_max_msb_abs_int16_ssse3 (const int16_t *src, int len); +extern int ff_ac3_max_msb_abs_int16_mmx (const int16_t *src, int len); +extern int ff_ac3_max_msb_abs_int16_mmx2 (const int16_t *src, int len); +extern int ff_ac3_max_msb_abs_int16_sse2 (const int16_t *src, int len); +extern int ff_ac3_max_msb_abs_int16_ssse3(const int16_t *src, int len); extern void ff_ac3_lshift_int16_mmx (int16_t *src, unsigned int len, unsigned int shift); extern void ff_ac3_lshift_int16_sse2(int16_t *src, unsigned int len, unsigned int shift); @@ -67,7 +67,7 @@ av_cold void ff_ac3dsp_init_x86(AC3DSPContext *c, int bit_exact) } if (mm_flags & AV_CPU_FLAG_MMX2 && HAVE_MMX2) { c->ac3_exponent_min = ff_ac3_exponent_min_mmxext; - c->ac3_max_msb_abs_int16 = ff_ac3_max_msb_abs_int16_mmxext; + c->ac3_max_msb_abs_int16 = ff_ac3_max_msb_abs_int16_mmx2; } if (mm_flags & AV_CPU_FLAG_SSE && HAVE_SSE) { c->float_to_fixed24 = ff_float_to_fixed24_sse; From 6797d1948b1dff634eafce402d96f05393af7edc Mon Sep 17 00:00:00 2001 From: Michael Kostylev Date: Thu, 10 May 2012 23:44:04 +0200 Subject: [PATCH 13/15] x86: rv40: Mark rv40_weight functions as MMX2; they use MMX2 instructions. --- libavcodec/x86/rv40dsp.asm | 2 +- libavcodec/x86/rv40dsp_init.c | 10 +++++----- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/libavcodec/x86/rv40dsp.asm b/libavcodec/x86/rv40dsp.asm index e0213f40b9..ae740c213a 100644 --- a/libavcodec/x86/rv40dsp.asm +++ b/libavcodec/x86/rv40dsp.asm @@ -487,7 +487,7 @@ cglobal rv40_weight_func_%1_%2, 6, 7, 8 REP_RET %endmacro -INIT_MMX mmx +INIT_MMX mmx2 RV40_WEIGHT rnd, 8, 3 RV40_WEIGHT rnd, 16, 4 RV40_WEIGHT nornd, 8, 3 diff --git a/libavcodec/x86/rv40dsp_init.c b/libavcodec/x86/rv40dsp_init.c index 3f42363e4e..cc1ea45e88 100644 --- a/libavcodec/x86/rv40dsp_init.c +++ b/libavcodec/x86/rv40dsp_init.c @@ -52,7 +52,7 @@ void ff_rv40_weight_func_nornd_16_##opt(uint8_t *dst, uint8_t *src1, uint8_t *sr int w1, int w2, ptrdiff_t stride); \ void ff_rv40_weight_func_nornd_8_##opt (uint8_t *dst, uint8_t *src1, uint8_t *src2, \ int w1, int w2, ptrdiff_t stride); -DECLARE_WEIGHT(mmx) +DECLARE_WEIGHT(mmx2) DECLARE_WEIGHT(sse2) DECLARE_WEIGHT(ssse3) @@ -190,10 +190,6 @@ void ff_rv40dsp_init_x86(RV34DSPContext *c, DSPContext *dsp) if (mm_flags & AV_CPU_FLAG_MMX) { c->put_chroma_pixels_tab[0] = ff_put_rv40_chroma_mc8_mmx; c->put_chroma_pixels_tab[1] = ff_put_rv40_chroma_mc4_mmx; - c->rv40_weight_pixels_tab[0][0] = ff_rv40_weight_func_rnd_16_mmx; - c->rv40_weight_pixels_tab[0][1] = ff_rv40_weight_func_rnd_8_mmx; - c->rv40_weight_pixels_tab[1][0] = ff_rv40_weight_func_nornd_16_mmx; - c->rv40_weight_pixels_tab[1][1] = ff_rv40_weight_func_nornd_8_mmx; c->put_pixels_tab[0][15] = ff_put_rv40_qpel16_mc33_mmx; c->put_pixels_tab[1][15] = ff_put_rv40_qpel8_mc33_mmx; c->avg_pixels_tab[0][15] = ff_avg_rv40_qpel16_mc33_mmx; @@ -205,6 +201,10 @@ void ff_rv40dsp_init_x86(RV34DSPContext *c, DSPContext *dsp) if (mm_flags & AV_CPU_FLAG_MMX2) { c->avg_chroma_pixels_tab[0] = ff_avg_rv40_chroma_mc8_mmx2; c->avg_chroma_pixels_tab[1] = ff_avg_rv40_chroma_mc4_mmx2; + c->rv40_weight_pixels_tab[0][0] = ff_rv40_weight_func_rnd_16_mmx2; + c->rv40_weight_pixels_tab[0][1] = ff_rv40_weight_func_rnd_8_mmx2; + c->rv40_weight_pixels_tab[1][0] = ff_rv40_weight_func_nornd_16_mmx2; + c->rv40_weight_pixels_tab[1][1] = ff_rv40_weight_func_nornd_8_mmx2; #if ARCH_X86_32 QPEL_MC_SET(avg_, _mmx2) #endif From ed7409fe9da8da941cdc91e8d86cb8b77ef8038e Mon Sep 17 00:00:00 2001 From: Mans Rullgard Date: Tue, 15 May 2012 22:02:42 +0100 Subject: [PATCH 14/15] fate: work around non-standard wc implementations On some systems, the wc command prints spaces before the first number causing mismatches with the test references. Using the output of wc as arguments to echo removes any extra whitespace. Signed-off-by: Mans Rullgard --- tests/regression-funcs.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tests/regression-funcs.sh b/tests/regression-funcs.sh index 3889129009..c6ca00b2aa 100755 --- a/tests/regression-funcs.sh +++ b/tests/regression-funcs.sh @@ -67,7 +67,7 @@ do_avconv() elif [ $f = $pcm_dst ] ; then $tiny_psnr $f $pcm_ref 2 else - wc -c $f + echo $(wc -c $f) fi } @@ -82,7 +82,7 @@ do_avconv_nomd5() elif [ $f = $pcm_dst ] ; then $tiny_psnr $f $pcm_ref 2 else - wc -c $f + echo $(wc -c $f) fi } From 6ce51a9b392aaf647c4cdfd149fff1af5259a6fd Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Martin=20Storsj=C3=B6?= Date: Wed, 16 May 2012 12:42:43 +0300 Subject: [PATCH 15/15] fate: Work around non-standard wc implementations at more places MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This applies the same fix as in ed7409fe9d for lavf-regressions.sh. Signed-off-by: Martin Storsjö --- tests/lavf-regression.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/lavf-regression.sh b/tests/lavf-regression.sh index ab8064df16..1d4e26252c 100755 --- a/tests/lavf-regression.sh +++ b/tests/lavf-regression.sh @@ -33,7 +33,7 @@ do_image_formats() run_avconv $DEC_OPTS -f image2 -vcodec pgmyuv -i $raw_src $2 $ENC_OPTS $3 -t 0.5 -y -qscale 10 $target_path/$file do_md5sum ${outfile}02.$1 do_avconv_crc $file $DEC_OPTS $3 -i $target_path/$file - wc -c ${outfile}02.$1 + echo $(wc -c ${outfile}02.$1) } do_audio_only()