Commit 9d99f0af authored by Paras Chadha's avatar Paras Chadha Committed by Paul B Mahol

FATE: Add FITS tests

Signed-off-by: 's avatarParas Chadha <paraschadha18@gmail.com>
parent df475db9
......@@ -131,6 +131,7 @@ include $(SRC_PATH)/tests/fate/fft.mak
include $(SRC_PATH)/tests/fate/fifo-muxer.mak
include $(SRC_PATH)/tests/fate/filter-audio.mak
include $(SRC_PATH)/tests/fate/filter-video.mak
include $(SRC_PATH)/tests/fate/fits.mak
include $(SRC_PATH)/tests/fate/flac.mak
include $(SRC_PATH)/tests/fate/flvenc.mak
include $(SRC_PATH)/tests/fate/gapless.mak
......
......@@ -10,6 +10,7 @@ FATE_LAVF-$(call ENCDEC, PCM_S16BE, CAF) += caf
FATE_LAVF-$(call ENCDEC, DPX, IMAGE2) += dpx
FATE_LAVF-$(call ENCDEC2, DVVIDEO, PCM_S16LE, AVI) += dv_fmt
FATE_LAVF-$(call ENCDEC2, MPEG1VIDEO, MP2, FFM) += ffm
FATE_LAVF-$(call ENCDEC, FITS, IMAGE2) += fits
FATE_LAVF-$(call ENCDEC, RAWVIDEO, FILMSTRIP) += flm
FATE_LAVF-$(call ENCDEC, FLV, FLV) += flv_fmt
FATE_LAVF-$(call ENCDEC, GIF, IMAGE2) += gif
......
......@@ -36,6 +36,10 @@ fate-d-cinema-demux: CMD = framecrc -i $(TARGET_SAMPLES)/d-cinema/THX_Science_FL
FATE_SAMPLES_DEMUX-$(CONFIG_EA_DEMUXER) += fate-d-eavp6-demux
fate-d-eavp6-demux: CMD = framecrc -i $(TARGET_SAMPLES)/ea-vp6/SmallRing.vp6 -map 0 -vcodec copy
FATE_SAMPLES_DEMUX-$(CONFIG_FITS_DEMUXER) += fate-fits-demux
fate-fits-demux: tests/data/fits-multi.fits
fate-fits-demux: CMD = framecrc -i $(TARGET_PATH)/tests/data/fits-multi.fits -vcodec copy
FATE_SAMPLES_DEMUX-$(CONFIG_FLV_DEMUXER) += fate-flv-demux
fate-flv-demux: CMD = framecrc -i $(TARGET_SAMPLES)/flv/Enigma_Principles_of_Lust-part.flv -codec copy
......
tests/data/fits-multi.fits: TAG = GEN
tests/data/fits-multi.fits: ffmpeg$(PROGSSUF)$(EXESUF) | tests/data
$(M)$(TARGET_EXEC) $(TARGET_PATH)/$< \
-i $(TARGET_SAMPLES)/gif/m4nb.gif \
-y $(TARGET_PATH)/$(@) 2>/dev/null
#mapping of fits file formats to png filenames
map.tests/data/lena-gray.fits := gray8
map.tests/data/lena-gbrp.fits := rgb24
map.tests/data/lena-gbrp16.fits := rgb48
map.tests/data/lena-gbrap16.fits := rgba64
tests/data/lena%.fits: TAG = GEN
tests/data/lena%.fits: NAME = $(map.$(@))
tests/data/lena%.fits: ffmpeg$(PROGSSUF)$(EXESUF) | tests/data
$(M)$(TARGET_EXEC) $(TARGET_PATH)/$< \
-i $(TARGET_SAMPLES)/png1/lena-$(map.$(@)).png \
-y $(TARGET_PATH)/$(@) 2>/dev/null
FATE_FITS_DEC-$(call DEMDEC, FITS, FITS) += fate-fitsdec-ext_data_min_max
fate-fitsdec-ext_data_min_max: CMD = framecrc -i $(TARGET_SAMPLES)/fits/x0cj010ct_d0h.fit -pix_fmt gray16
FATE_FITS_DEC-$(call DEMDEC, FITS, FITS) += fate-fitsdec-blank_bitpix32
fate-fitsdec-blank_bitpix32: CMD = framecrc -blank_value 65535 -i $(TARGET_SAMPLES)/fits/file008.fits -pix_fmt gray16
FATE_FITS_DEC-$(call DEMDEC, FITS, FITS) += fate-fitsdec-bitpix-32
fate-fitsdec-bitpix-32: CMD = framecrc -i $(TARGET_SAMPLES)/fits/tst0005.fits -pix_fmt gray16
FATE_FITS_DEC-$(call DEMDEC, FITS, FITS) += fate-fitsdec-bitpix-64
fate-fitsdec-bitpix-64: CMD = framecrc -i $(TARGET_SAMPLES)/fits/tst0006.fits -pix_fmt gray16
FATE_FITS_DEC-$(call DEMDEC, FITS, FITS) += fate-fitsdec-multi
fate-fitsdec-multi: tests/data/fits-multi.fits
fate-fitsdec-multi: CMD = framecrc -i $(TARGET_PATH)/tests/data/fits-multi.fits -pix_fmt gbrap
fate-fitsdec%: PIXFMT = $(word 3, $(subst -, ,$(@)))
fate-fitsdec%: SRC = $(TARGET_PATH)/tests/data/lena-$(PIXFMT).fits
fate-fitsdec%: CMD = framecrc -i $(SRC) -pix_fmt $(PIXFMT)
FATE_FITS_DEC_PIXFMT = gray gbrp gbrp16 gbrap16
$(FATE_FITS_DEC_PIXFMT:%=fate-fitsdec-%): fate-fitsdec-%: tests/data/lena-%.fits
FATE_FITS_DEC-$(call DEMDEC, FITS, FITS) += $(FATE_FITS_DEC_PIXFMT:%=fate-fitsdec-%)
FATE_FITS += $(FATE_FITS_DEC-yes)
fate-fitsdec: $(FATE_FITS_DEC-yes)
fate-fitsenc%: PIXFMT = $(word 3, $(subst -, ,$(@)))
fate-fitsenc%: SRC = $(TARGET_PATH)/tests/data/fits-multi.fits
fate-fitsenc%: CMD = framecrc -i $(SRC) -c:v fits -pix_fmt $(PIXFMT)
FATE_FITS_ENC_PIXFMT = gray gray16be gbrp gbrap gbrp16be gbrap16be
$(FATE_FITS_ENC_PIXFMT:%=fate-fitsenc-%): tests/data/fits-multi.fits
FATE_FITS_ENC-$(call ENCDEC, FITS, FITS) += $(FATE_FITS_ENC_PIXFMT:%=fate-fitsenc-%)
FATE_FITS += $(FATE_FITS_ENC-yes)
fate-fitsenc: $(FATE_FITS_ENC-yes)
FATE_SAMPLES_FFMPEG += $(FATE_FITS)
fate-fits: $(FATE_FITS)
......@@ -230,6 +230,15 @@ do_avconv $file $DEC_OPTS -f image2 -vcodec pgmyuv -i $raw_src $ENC_OPTS -t 1 -q
#do_avconv_crc $file -i $target_path/$file
fi
if [ -n "$do_fits" ] ; then
pix_fmts="gray gray16be gbrp gbrap gbrp16be gbrap16be"
for pix_fmt in $pix_fmts ; do
file=${outfile}${pix_fmt}lavf.fits
do_avconv $file $DEC_OPTS -f image2 -vcodec pgmyuv -i $raw_src $ENC_OPTS -pix_fmt $pix_fmt
do_avconv_crc $file $DEC_OPTS -i $target_path/$file -pix_fmt $pix_fmt
done
fi
# image formats
if [ -n "$do_pgm" ] ; then
......
#tb 0: 1/1
#media_type 0: video
#codec_id 0: fits
#dimensions 0: 72x36
#sar 0: 0/1
0, 0, 0, 1, 14320, 0x0ecf72e0
0, 1, 1, 1, 14320, 0xd94af6eb
0, 2, 2, 1, 14320, 0x15c21892
0, 3, 3, 1, 14320, 0xb18adc01
0, 4, 4, 1, 14320, 0xc2be706d
#tb 0: 1/1
#media_type 0: video
#codec_id 0: rawvideo
#dimensions 0: 102x109
#sar 0: 0/1
0, 0, 0, 1, 22236, 0x34490902
#tb 0: 1/1
#media_type 0: video
#codec_id 0: rawvideo
#dimensions 0: 77x173
#sar 0: 0/1
0, 0, 0, 1, 26642, 0x0ad2a46a
#tb 0: 1/1
#media_type 0: video
#codec_id 0: rawvideo
#dimensions 0: 256x256
#sar 0: 0/1
0, 0, 0, 1, 131072, 0x7fb22427
#tb 0: 1/1
#media_type 0: video
#codec_id 0: rawvideo
#dimensions 0: 512x512
#sar 0: 0/1
0, 0, 0, 1, 524288, 0xc327ed23
#tb 0: 1/1
#media_type 0: video
#codec_id 0: rawvideo
#dimensions 0: 128x128
#sar 0: 0/1
0, 0, 0, 1, 131072, 0x487894b2
#tb 0: 1/1
#media_type 0: video
#codec_id 0: rawvideo
#dimensions 0: 128x128
#sar 0: 0/1
0, 0, 0, 1, 49152, 0x565c3dee
#tb 0: 1/1
#media_type 0: video
#codec_id 0: rawvideo
#dimensions 0: 128x128
#sar 0: 0/1
0, 0, 0, 1, 98304, 0x1b917bdc
#tb 0: 1/1
#media_type 0: video
#codec_id 0: rawvideo
#dimensions 0: 128x128
#sar 0: 0/1
0, 0, 0, 1, 16384, 0xd788a2d2
#tb 0: 1/1
#media_type 0: video
#codec_id 0: rawvideo
#dimensions 0: 72x36
#sar 0: 0/1
0, 0, 0, 1, 10368, 0xb4490cc8
0, 1, 1, 1, 10368, 0x37198e4f
0, 2, 2, 1, 10368, 0x1e89afe7
0, 3, 3, 1, 10368, 0x80127365
0, 4, 4, 1, 10368, 0xfd2d07d1
#tb 0: 1/1
#media_type 0: video
#codec_id 0: fits
#dimensions 0: 72x36
#sar 0: 0/1
0, 0, 0, 1, 11520, 0xeb0a0cc8
0, 1, 1, 1, 11520, 0x9d7d8e4f
0, 2, 2, 1, 11520, 0xd9e6afe7
0, 3, 3, 1, 11520, 0x75bd7365
0, 4, 4, 1, 11520, 0x86f107d1
#tb 0: 1/1
#media_type 0: video
#codec_id 0: fits
#dimensions 0: 72x36
#sar 0: 0/1
0, 0, 0, 1, 23040, 0xfa4ff4f0
0, 1, 1, 1, 23040, 0xf57102d4
0, 2, 2, 1, 23040, 0x58e0294d
0, 3, 3, 1, 23040, 0x8097502a
0, 4, 4, 1, 23040, 0x65fd7b54
#tb 0: 1/1
#media_type 0: video
#codec_id 0: fits
#dimensions 0: 72x36
#sar 0: 0/1
0, 0, 0, 1, 8640, 0xf6b9f643
0, 1, 1, 1, 8640, 0x250d77d9
0, 2, 2, 1, 8640, 0x652595e5
0, 3, 3, 1, 8640, 0x4b8e5963
0, 4, 4, 1, 8640, 0xd8d611ab
#tb 0: 1/1
#media_type 0: video
#codec_id 0: fits
#dimensions 0: 72x36
#sar 0: 0/1
0, 0, 0, 1, 17280, 0x6b87eec5
0, 1, 1, 1, 17280, 0x1bf0fc9a
0, 2, 2, 1, 17280, 0xaf071b1e
0, 3, 3, 1, 17280, 0xfbe941fb
0, 4, 4, 1, 17280, 0xbbc26d01
#tb 0: 1/1
#media_type 0: video
#codec_id 0: fits
#dimensions 0: 72x36
#sar 0: 0/1
0, 0, 0, 1, 2880, 0xd2d83752
0, 1, 1, 1, 2880, 0x77246e79
0, 2, 2, 1, 2880, 0xdf480c1f
0, 3, 3, 1, 2880, 0x559247a9
0, 4, 4, 1, 2880, 0xc3df2cc4
#tb 0: 1/1
#media_type 0: video
#codec_id 0: fits
#dimensions 0: 72x36
#sar 0: 0/1
0, 0, 0, 1, 5760, 0x317ba180
0, 1, 1, 1, 5760, 0x439c9e40
0, 2, 2, 1, 5760, 0x6136ff8f
0, 3, 3, 1, 5760, 0x2c331324
0, 4, 4, 1, 5760, 0x2f0816c1
ed9fd697d0d782df6201f6a2db184552 *./tests/data/lavf/graylavf.fits
5328000 ./tests/data/lavf/graylavf.fits
./tests/data/lavf/graylavf.fits CRC=0xbacf446c
48e6caf6a59e32f9a8a39979c9183a7f *./tests/data/lavf/gray16belavf.fits
10368000 ./tests/data/lavf/gray16belavf.fits
./tests/data/lavf/gray16belavf.fits CRC=0xae2b58d4
be2f7112fd193c9a909304c81e662769 *./tests/data/lavf/gbrplavf.fits
15408000 ./tests/data/lavf/gbrplavf.fits
./tests/data/lavf/gbrplavf.fits CRC=0x04ed3828
c89a72185cfad363aa9cc42e84fed301 *./tests/data/lavf/gbraplavf.fits
20448000 ./tests/data/lavf/gbraplavf.fits
./tests/data/lavf/gbraplavf.fits CRC=0x032a6409
d539b9e02f5ab8fb85717c8adb60b6cc *./tests/data/lavf/gbrp16belavf.fits
30672000 ./tests/data/lavf/gbrp16belavf.fits
./tests/data/lavf/gbrp16belavf.fits CRC=0x81897ff7
3dc3622fb09a338b406d8a12a30f2545 *./tests/data/lavf/gbrap16belavf.fits
40752000 ./tests/data/lavf/gbrap16belavf.fits
./tests/data/lavf/gbrap16belavf.fits CRC=0x247dd7b9
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment