Commit Graph

54 Commits

Author SHA1 Message Date
bnnm
4879c74ddd Cleanup 2020-07-17 22:35:32 +02:00
bnnm
27bcba48a9 Codec internal cleanup and moved out of vgmstream.h 2020-07-16 21:43:01 +02:00
bnnm
3b08eca425 Add get metadata function to hide FFmpeg internals and parser cleanup 2020-06-04 23:18:28 +02:00
bnnm
c52a3945cd Misc doc 2020-02-22 20:42:25 +01:00
bnnm
5167cc9252 Fix FFmpeg slowness in MSVC 2019-11-04 23:29:34 +01:00
bnnm
cf618362ff Optimize float-to-int in ffmpeg 2019-10-20 23:50:29 +02:00
Christopher Snowhill
ee3e170026 Fix planar format for mono files 2019-10-18 15:42:46 -07:00
Christopher Snowhill
2b1de051e2 Fix FFmpeg for non-planar formats 2019-10-15 19:54:11 -07:00
bnnm
d64f85a02e Fix MPC missing start samples 2019-10-13 20:13:15 +02:00
bnnm
a05f8cbbec Clean use of FFmpeg internal 2019-10-13 19:54:52 +02:00
bnnm
7214dfbef7 Fix ATRAC3 clips caused by incorrectly inverted PCM16 2019-10-13 18:55:52 +02:00
bnnm
e5e86d3324 Simplify FFmpeg decoder to remove temp buffer for performance
Also changes fuzzy behavior on frame error to mimic ffmpeg.exe
2019-10-13 18:43:13 +02:00
bnnm
1b34ef1f01 Fix various leaks and issues found with drmemory 2019-09-29 18:25:24 +02:00
bnnm
22c3266727 Improve RIFF ATRAC3/plus decoding accuracy 2019-08-25 20:46:29 +02:00
bnnm
e9cfb8d617 Fix FFmpeg formats that can't seek 2019-07-21 14:41:17 +02:00
bnnm
57d724c2b2 Fix 5.1/7.1 .at3 LFE channel order [Devil May Cry 4 (PS3)] 2019-03-30 02:15:22 +01:00
bnnm
051cad9462 Minor shadowing fixes and cleanup 2019-03-02 19:23:37 +01:00
bnnm
d9296c6693 Add multichannel layout for OGG/MP4/WEM/FFmpeg and use in foobar 2019-03-02 15:57:41 +01:00
bnnm
9a402fb797 Minor fixes 2019-02-10 18:43:24 +01:00
bnnm
4e45cbd571 Add FFmpeg encoder delay logs 2018-10-07 21:16:57 +02:00
bnnm
65aca53cb5 Fix some XWB + FFmpeg subsongs 2018-10-07 03:26:05 +02:00
bnnm
9f6c1c4da2 Fix rare FFmpeg codecs decoding more samples after data EOF, cleanup 2018-10-06 22:39:34 +02:00
bnnm
804fceb5e7 Remove custom FFmpeg, as custom IO streamfile can be used instead 2018-09-10 02:19:34 +02:00
bnnm
74536e0933 Swap custom FFmpeg OPUS for custom streamfile IO 2018-09-10 01:23:34 +02:00
bnnm
9e54efe6d8 Remove FFMPEG_EA_XMA as it's now done with custom IO + layers 2018-08-25 13:22:57 +02:00
bnnm
8d7fb21c8f Check max filesize to avoid buggy reads
It was affecting some truncated Switch Opus that were reporting too many
samples
2018-08-15 22:47:22 +02:00
bnnm
9333a22c16 Remove some minor deprecated warnings
Tested with all major codecs we use for FFmpeg, all decode the same
2018-08-15 00:18:05 +02:00
bnnm
7a08ea263f Add FFmpeg fake header/header_size check to simplify some calls 2018-03-31 13:07:26 +02:00
bnnm
3ad6261208 Add check when calling free/seek/reset codec
It's possible to set a "coding" that triggers calls to the above while
codec_data is still null, when using special layouts like AAX
2018-03-10 16:59:00 +01:00
bnnm
42f44925f4 Fix possible segfault with some FFmpeg versions 2018-02-17 23:21:41 +01:00
bnnm
448d52fa4e Remove BGW ATRAC3 mode in FFmpeg in favor of custom streamfiles 2018-01-27 13:01:30 +01:00
bnnm
d09dc9739b Add encrypted ATRAC3 BGW [Final Fantasy XI PC] 2017-10-27 18:50:06 +02:00
bnnm
abaefd17cd Rename wwise_opus to switch_opus as it's apparently so 2017-09-30 00:16:40 +02:00
bnnm
6da7a86cc4 Add FFmpeg custom IO callbacks for data transmogrifiers
Those are custom read/seeks that can transform data on the fly, for
games that use variations of regular FFmpeg codecs. When FFmpeg tries to
read N bytes, the code may read less/more but still fill the buffer with
N transformed bytes. Must handle "real" (data) and "virtual"
(transformed) offset/sizes.

Works with fake headers too, but "virtual" offset/size now include the
fake header, as I found hard to keep in mind when the header_size was
being added/substracted (could be clearer).
2017-09-24 18:40:59 +02:00
bnnm
0103f449d0 Pass stream_index to FFmpeg manually for flexibility 2017-08-19 10:28:28 +02:00
bnnm
5cddab629d Add FFmpeg audio stream selection 2017-08-18 18:56:43 +02:00
bnnm
4263533ba9 Move FFmpeg code from ffmpeg.c to ffmpeg_decoder.c for consistency 2017-05-19 17:21:22 +02:00
bnnm
04f2cb0344 Moved FFmpeg RIFF utils to their own file
I'm going to add more later so it was getting kind of unwieldy
2017-02-25 13:54:05 +01:00
bnnm
248ec021d8 Add FFmpeg fake riff helpers: XMA1, XWMA, XMA2 tweaks 2017-02-25 12:25:10 +01:00
bnnm
9317ce9cc2 Add ffmpeg_set_skip_samples to manually fix encoder delay in some cases 2017-02-12 13:17:01 +01:00
bnnm
376b4acbb2 Minor func rename (ffmpeg_make_riff_xma2_from_fmt) 2017-01-14 22:25:15 +01:00
bnnm
f5750ba2cc Moved make_riff_x to ffmpeg_decoder.c (only actually used by FFmpeg)
Also added make_riff_xma2_from_fmt_be
2017-01-13 23:47:52 +01:00
bnnm
7e520162a3 FFmpeg: remove ACCURATE_LOOPING flag now it's battle-tested
It's fast enough and the older looping code would need to be redone
anyway
2017-01-08 02:54:18 +01:00
bnnm
cdfd47eb7b FFmpeg: expose block/frame size, rename totalFrames for clarity 2016-12-10 15:53:29 +01:00
bnnm
c5c97c4027 Fixed discard in edge cases 2016-12-03 18:17:37 +01:00
bnnm
0faa3286aa Don't manually check framesRead and rely on FFmpeg's EOFs
FFmpeg's duration isn't always reliable (ie. bad headers) and the
decoder detects EOFs already, extra decoding attempts should be ignored.
This way vgmstream can use other values without modifying
ffmpeg_codec_data's state.
2016-12-03 11:42:38 +01:00
bnnm
609bfb5d61 Minor fixes and cleanup 2016-12-01 23:49:00 +01:00
bnnm
f5da8281e2 Move FFmpeg reset to ffmpeg_decoder (cleanup) 2016-12-01 19:58:51 +01:00
bnnm
2754f05b11 Move FFmpeg looping to ffmpeg_decoder for further changes (cleanup) 2016-11-30 23:48:49 +01:00
bnnm
b9db20283d FFmpeg: keep block size constant (for edge loops), don't write on EOF 2016-11-29 20:22:20 +01:00