summaryrefslogtreecommitdiff
path: root/libavformat/mxfdec.c
Commit message (Collapse)AuthorAge
* Merge remote-tracking branch 'qatar/master'Michael Niedermayer2012-07-31
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * qatar/master: mpc8: return more meaningful error codes. mpc: return more meaningful error codes. wv,mpc8: don't return apetag data in packets. rtmp: do not warn about receiving metadata packets x86: h264dsp: Adjust YASM #ifdefs x86: yadif: Mark mmxext optimizations as such h264: convert loop filter strength dsp function to yasm. Improve descriptiveness of a number of codec and container long names Conflicts: libavcodec/flvdec.c libavcodec/libopenjpegdec.c libavformat/apetag.c libavformat/mp3dec.c Merged-by: Michael Niedermayer <michaelni@gmx.at>
| * Improve descriptiveness of a number of codec and container long namesDiego Biurrun2012-07-30
| |
* | mxfdec: fix off by one error in d10 aes3 decodingMarton Balint2012-07-27
| | | | | | | | | | | | | | | | Without this fix the last sample was missing from the packet. Signed-off-by: Marton Balint <cus@passwd.hu> Reviewed-by: Matthieu Bouron <matthieu.bouron@gmail.com> Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* | mxfdec: simplify code by using av_calloc()Michael Niedermayer2012-07-19
| | | | | | | | | | Reviewed a long time ago by: Tomas Härdin <tomas.hardin@codemill.se> Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* | Merge remote-tracking branch 'qatar/master'Michael Niedermayer2012-07-10
|\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * qatar/master: mss1: fix decoding masked regions in interframes mxfdec: fix off by one error. mxfdec: only parse next partition pack if parsing forward mxfdec: let pkt->pts = mxf->current_edit_unit if intra-only mxfdec: fix frame height vs field height confusion mxfdec: Add intra_only flag to MXFTrack mxfdec: fix Avid AirSpeed files being misinterpreted as OP1a mxfdec: truncate packets that extend past the next edit unit mxfdec: set pixel format for cdci picture formats mxfdec: detect uncomp pictures using essence container ul mxfdec: set track edit rate num/den in expected order x86/cpu: implement get/set_eflags using intrinsics x86/cpu: implement support for cpuid through intrinsics x86/cpu: implement support for xgetbv through intrinsics lavu: use intrinsics for emms on systems lacking inline asm support mem: Don't abort on av_malloc(0) in debug mode Conflicts: configure libavformat/mxf.h libavformat/mxfdec.c Merged-by: Michael Niedermayer <michaelni@gmx.at>
| * mxfdec: fix off by one error.Michael Niedermayer2012-07-10
| | | | | | | | | | | | Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind Signed-off-by: Michael Niedermayer <michaelni@gmx.at> Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
| * mxfdec: only parse next partition pack if parsing forwardTomas Härdin2012-07-10
| | | | | | | | | | Signed-off-by: Michael Niedermayer <michaelni@gmx.at> Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
| * mxfdec: let pkt->pts = mxf->current_edit_unit if intra-onlyTomas Härdin2012-07-10
| | | | | | | | | | | | | | | | We cannot do this in general since we could be reading a file with B-frames while lacking an index. Signed-off-by: Michael Niedermayer <michaelni@gmx.at> Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
| * mxfdec: fix frame height vs field height confusionJoseph Artsimovich2012-07-10
| | | | | | | | | | | | | | Reviewed-by: Tomas Härdin <tomas.hardin@codemill.se> Reveiwed-by: Baptiste Coudurier <baptiste.coudurier@gmail.com> Signed-off-by: Michael Niedermayer <michaelni@gmx.at> Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
| * mxfdec: Add intra_only flag to MXFTrackTomas Härdin2012-07-10
| | | | | | | | | | | | | | This allows future assumptions to be made without affecting non-intra files. Signed-off-by: Michael Niedermayer <michaelni@gmx.at> Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
| * mxfdec: fix Avid AirSpeed files being misinterpreted as OP1aTomas Härdin2012-07-10
| | | | | | | | | | | | | | | | | | The "ECs != 1 -> OP1a" assumption was wrong. Luckily, the file that triggered that behavior had two ECs, not zero. Hence distinguishing between them is simple in this case. Signed-off-by: Michael Niedermayer <michaelni@gmx.at> Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
| * mxfdec: truncate packets that extend past the next edit unitTomas Härdin2012-07-10
| | | | | | | | | | | | | | | | This fixes rare cases where OPAtom may be treated as OP1a, causing all essence to be read into RAM. Signed-off-by: Michael Niedermayer <michaelni@gmx.at> Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
| * mxfdec: set pixel format for cdci picture formatsPhilip de Nier2012-07-10
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The properties of the CDCI Descriptor are insufficient to specify the pixel format for uncompressed picture data. SMPTE 377-1 and RP224v10 have defined a set of picture coding labels to indicate what formatting was used. This patch uses 2 labels to detect UYVY422 or YUYV422 pixel formats. It defaults to UYVY422 for 8-bit 4:2:2 pictures to support files that were created before the coding labels were introduced ~2008 The codec pix_fmt default was changed from 0 (PIX_FMT_YUV420P) to -1 (PIX_FMT_NONE) Reviewed-by: Baptiste Coudurier <baptiste.coudurier@gmail.com> Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
| * mxfdec: detect uncomp pictures using essence container ulPhilip de Nier2012-07-10
| | | | | | | | | | | | | | | | | | | | This supports detection of uncompressed picture in files that didn't include a Picture Coding Label. The lables weren't available until SMPTE 377-1 and RP224v10 Reviewed-by: Baptiste Coudurier <baptiste.coudurier@gmail.com> Signed-off-by: Michael Niedermayer <michaelni@gmx.at> Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
| * mxfdec: set track edit rate num/den in expected orderPhilip de Nier2012-07-10
| | | | | | | | | | | | | | | | This matches the order used for the index table edit rate. Reviewed-by: Baptiste Coudurier <baptiste.coudurier@gmail.com> Signed-off-by: Michael Niedermayer <michaelni@gmx.at> Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
* | Merge remote-tracking branch 'qatar/master'Michael Niedermayer2012-07-07
|\| | | | | | | | | | | | | | | | | | | | | * qatar/master: mxfdec: replace x>>av_log2(sizeof(..)) by x/sizeof(..). x86: h264_intrapred: Don't add the 'd' suffix to the SPLATB_REG macro Conflicts: libavformat/mxfdec.c Merged-by: Michael Niedermayer <michaelni@gmx.at>
| * mxfdec: replace x>>av_log2(sizeof(..)) by x/sizeof(..).Ronald S. Bultje2012-07-07
| | | | | | | | | | | | Also replace x>>av_log2(sizeof(..)) + 1 by x/sizeof(..). The +1 is probably meant to emulate av_log2_ceil(sizeof(..)) in cases where ".." is not a power of two.
* | mxfdec: remove unused last_index_durationMichael Niedermayer2012-05-27
| | | | | | | | Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* | mxfdec: fix frame height computation for mixed fields layoutMatthieu Bouron2012-05-22
| | | | | | | | Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* | mxfdec: fix memleak on read error/EOF.Reimar Döffinger2012-04-20
| | | | | | | | | | | | | | This also matches the rest of the demuxer which will return partial packets. Signed-off-by: Reimar Döffinger <Reimar.Doeffinger@gmx.de>
* | mxfdec: Add missing break in frame layout parsingMatthieu Bouron2012-04-19
| | | | | | | | | | Reviewed-by: Tomas Härdin <tomas.hardin@codemill.se> Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* | mxfdec: Fix regression on files from Pinnacle ThunderTomas Härdin2012-04-04
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The reason for this is that such files have IndexTableSegments which when parsed cover EditUnit ranges like this: [0,1) [249,250) [249,377) [0,249) where each interval is [IndexStartPosition,IndexStartPosition+IndexDuration). This would be reduced to a sparse index like: [0,1), [249,250) instead of the full range: [0,249), [249,377) See TimeCode_HD.mxf, UMID = 060a2b340101010101010410130000000004001aa0e59175025b2a5600da4101. Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* | mxfdec: fix off by one error.Michael Niedermayer2012-03-26
| | | | | | | | | | Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* | mxfdec: pass correct context to av_timecode_init()Michael Niedermayer2012-03-26
| | | | | | | | | | fixes null ptr dereference Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* | mxfdec: Only parse next partition pack if parsing forwardTomas Härdin2012-03-20
| | | | | | | | | | | | This fixes ticket #1099. Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* | mxfdec: Let pkt->pts = mxf->current_edit_unit if intra-onlyTomas Härdin2012-03-18
| | | | | | | | | | | | | | We can't do this in general since we could be reading a file with B-frames while lacking an index. Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* | Fix frame height vs field height confusion in MXF decoding.Joseph Artsimovich2012-03-11
| | | | | | | | | | | | Reviewed-by: Tomas Härdin <tomas.hardin@codemill.se> Reveiwed-by: Baptiste Coudurier <baptiste.coudurier@gmail.com> Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* | mxfdec: add timecode to metadataMatthieu Bouron2012-03-11
| | | | | | | | Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* | mxfdec: Add intra_only flag to MXFTrackTomas Härdin2012-03-08
| | | | | | | | | | | | This allows future assumptions to be made without affecting non-intra files. Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* | mxfdec: Fix Avid AirSpeed files being misinterpreted as OP1aTomas Härdin2012-03-08
| | | | | | | | | | | | | | | | The "ECs != 1 -> OP1a" assumption was wrong. Luckily, the file that triggered that behavior had two ECs, not zero. Hence distinguishing between them is simple in this case. Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* | mxfdec: Truncate packets that extend past the next edit unitTomas Härdin2012-03-08
| | | | | | | | | | | | | | This fixes rare cases where OPAtom may be treated as OP1a, causing all essence to be read into RAM. Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* | mxfdec: set pixel format for cdci picture formatsPhilip de Nier2012-02-28
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The properties of the CDCI Descriptor are insufficient to specify the pixel format for uncompressed picture data. SMPTE 377-1 and RP224v10 have defined a set of picture coding labels to indicate what formatting was used. This patch uses 2 labels to detect UYVY422 or YUYV422 pixel formats. It defaults to UYVY422 for 8-bit 4:2:2 pictures to support files that were created before the coding labels were introduced ~2008 The codec pix_fmt default was changed from 0 (PIX_FMT_YUV420P) to -1 (PIX_FMT_NONE) Reviewed-by: Baptiste Coudurier <baptiste.coudurier@gmail.com> Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* | mxfdec: detect uncomp pictures using essence container ulPhilip de Nier2012-02-28
| | | | | | | | | | | | | | | | | | This supports detection of uncompressed picture in files that didn't include a Picture Coding Label. The lables weren't available until SMPTE 377-1 and RP224v10 Reviewed-by: Baptiste Coudurier <baptiste.coudurier@gmail.com> Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* | mxfdec: set track edit rate num/den in expected orderPhilip de Nier2012-02-28
| | | | | | | | | | | | | | This matches the order used for the index table edit rate. Reviewed-by: Baptiste Coudurier <baptiste.coudurier@gmail.com> Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* | Merge remote-tracking branch 'qatar/master'Michael Niedermayer2012-02-10
|\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * qatar/master: (26 commits) eac3dec: replace undefined 1<<31 with INT32_MIN in noise generation yadif: specify array size outside DECLARE_ALIGNED prores: specify array size outside DECLARE_ALIGNED brackets. WavPack demuxer: set packet duration tta: use skip_bits_long() mxfdec: Ignore the last entry in Avid's index table segments mxfdec: Sanity-check SampleRate mxfdec: Handle small EditUnitByteCount mxfdec: Consider OPAtom files that do not have exactly one EC to be OP1a mxfdec: Don't crash in mxf_packet_timestamps() if current_edit_unit overflows mxfdec: Zero nb_ptses in mxf_compute_ptses_fake_index() mxfdec: Sanity check PreviousPartition mxfdec: Never seek back in local sets and KLVs mxfdec: Move the current_partition check inside mxf_read_header() mxfdec: Fix infinite loop in mxf_packet_timestamps() mxfdec: Check eof_reached in mxf_read_local_tags() mxfdec: Check for NULL component mxfdec: Make sure mxf->nb_index_tables > 0 in mxf_packet_timestamps() mxfdec: Make sure x < index_table->nb_ptses build: Add missing directories to DIRS declarations. ... Conflicts: doc/build_system.txt doc/fate.texi libavfilter/x86/yadif_template.c libavformat/mxfdec.c libavutil/Makefile tests/fate/audio.mak tests/fate/prores.mak tests/fate/screen.mak tests/fate/video.mak tests/ref/fate/bethsoft-vid tests/ref/fate/cscd tests/ref/fate/dfa4 tests/ref/fate/nuv tests/ref/fate/vp8-sign-bias tests/ref/fate/wmv8-drm tests/ref/lavf/gxf Merged-by: Michael Niedermayer <michaelni@gmx.at>
| * mxfdec: Ignore the last entry in Avid's index table segmentsTomas Härdin2012-02-09
| | | | | | | | | | | | | | | | The last entry is the total size of the essence container. Previously a TemporalOffset error would be logged, even though segments like these are expected. Signed-off-by: Diego Biurrun <diego@biurrun.de>
| * mxfdec: Sanity-check SampleRateTomas Härdin2012-02-09
| | | | | | | | | | | | This avoids a SIGFPE if SampleRate is missing or set to naughty values. Signed-off-by: Diego Biurrun <diego@biurrun.de>
| * mxfdec: Handle small EditUnitByteCountTomas Härdin2012-02-09
| | | | | | | | | | | | | | These are common with audio atoms. Without this the demuxer would read two bytes at a time for a mono 16-bit file. Signed-off-by: Diego Biurrun <diego@biurrun.de>
| * mxfdec: Consider OPAtom files that do not have exactly one EC to be OP1aTomas Härdin2012-02-09
| | | | | | | | | | | | This fixes demuxing of 2011_DCPTEST_24FPS.V.mxf. Signed-off-by: Diego Biurrun <diego@biurrun.de>
| * mxfdec: Don't crash in mxf_packet_timestamps() if current_edit_unit overflowsTomas Härdin2012-02-09
| | | | | | | | Signed-off-by: Diego Biurrun <diego@biurrun.de>
| * mxfdec: Zero nb_ptses in mxf_compute_ptses_fake_index()Tomas Härdin2012-02-09
| | | | | | | | | | | | This fixes SIGSEGV on files with both CBR and VBR index segments (zzuf6.mxf). Signed-off-by: Diego Biurrun <diego@biurrun.de>
| * mxfdec: Sanity check PreviousPartitionTomas Härdin2012-02-09
| | | | | | | | | | | | Without this certain files could get the demuxer stuck in a loop. Signed-off-by: Diego Biurrun <diego@biurrun.de>
| * mxfdec: Never seek back in local sets and KLVsTomas Härdin2012-02-09
| | | | | | | | | | | | | | | | | | Specially crafted files can lead the parsing code to take too long. We fix a lot of these problems by not allowing local tags to extend past the end of the set and not allowing other KLVs to be read past the end of themselves. Signed-off-by: Diego Biurrun <diego@biurrun.de>
| * mxfdec: Move the current_partition check inside mxf_read_header()Tomas Härdin2012-02-09
| | | | | | | | | | | | This fixes SIGSEGV on files where this is the case, such as zzuf4.mxf. Signed-off-by: Diego Biurrun <diego@biurrun.de>
| * mxfdec: Fix infinite loop in mxf_packet_timestamps()Tomas Härdin2012-02-09
| | | | | | | | | | | | | | This can happen if an index table segment has a very large IndexStartPosition. zzuf3.mxf is an example of such a file. Signed-off-by: Diego Biurrun <diego@biurrun.de>
| * mxfdec: Check eof_reached in mxf_read_local_tags()Tomas Härdin2012-02-09
| | | | | | | | | | | | This fixes an infinite loop with zzuf2.mxf. Signed-off-by: Diego Biurrun <diego@biurrun.de>
| * mxfdec: Check for NULL componentTomas Härdin2012-02-09
| | | | | | | | | | | | This fixes a SIGSEGV with zzuf1.mxf. Signed-off-by: Diego Biurrun <diego@biurrun.de>
| * mxfdec: Make sure mxf->nb_index_tables > 0 in mxf_packet_timestamps()Tomas Härdin2012-02-09
| | | | | | | | | | | | | | Only the OPAtom demuxing logic is guaranteed to have index tables, meaning OP1a files that lack an index would cause SIGSEGV. Signed-off-by: Diego Biurrun <diego@biurrun.de>
| * mxfdec: Make sure x < index_table->nb_ptsesTomas Härdin2012-02-09
| | | | | | | | | | | | Avoids a SIGSEGV on files with IndexEntryCount < IndexDuration. Signed-off-by: Diego Biurrun <diego@biurrun.de>
* | Merge remote-tracking branch 'qatar/master'Michael Niedermayer2012-01-28
|\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * qatar/master: (71 commits) movenc: Allow writing to a non-seekable output if using empty moov movenc: Support adding isml (smooth streaming live) metadata libavcodec: Don't crash in avcodec_encode_audio if time_base isn't set sunrast: Document the different Sun Raster file format types. sunrast: Add a check for experimental type. libspeexenc: use AVSampleFormat instead of deprecated/removed SampleFormat lavf: remove disabled FF_API_SET_PTS_INFO cruft lavf: remove disabled FF_API_OLD_INTERRUPT_CB cruft lavf: remove disabled FF_API_REORDER_PRIVATE cruft lavf: remove disabled FF_API_SEEK_PUBLIC cruft lavf: remove disabled FF_API_STREAM_COPY cruft lavf: remove disabled FF_API_PRELOAD cruft lavf: remove disabled FF_API_NEW_STREAM cruft lavf: remove disabled FF_API_RTSP_URL_OPTIONS cruft lavf: remove disabled FF_API_MUXRATE cruft lavf: remove disabled FF_API_FILESIZE cruft lavf: remove disabled FF_API_TIMESTAMP cruft lavf: remove disabled FF_API_LOOP_OUTPUT cruft lavf: remove disabled FF_API_LOOP_INPUT cruft lavf: remove disabled FF_API_AVSTREAM_QUALITY cruft ... Conflicts: doc/APIchanges libavcodec/8bps.c libavcodec/avcodec.h libavcodec/libx264.c libavcodec/mjpegbdec.c libavcodec/options.c libavcodec/sunrast.c libavcodec/utils.c libavcodec/version.h libavcodec/x86/h264_deblock.asm libavdevice/libdc1394.c libavdevice/v4l2.c libavformat/avformat.h libavformat/avio.c libavformat/avio.h libavformat/aviobuf.c libavformat/dv.c libavformat/mov.c libavformat/utils.c libavformat/version.h libavformat/wtv.c libavutil/Makefile libavutil/file.c libswscale/x86/input.asm libswscale/x86/swscale_mmx.c libswscale/x86/swscale_template.c tests/ref/lavf/ffm Merged-by: Michael Niedermayer <michaelni@gmx.at>