Update FFmpeg to version 7.0 and rebuilt soxr
Rebuilt libsoxr, which now removes the dependency on libavutil.
This commit is contained in:
parent
42ea824972
commit
9f0ef52fd4
75 changed files with 4009 additions and 2302 deletions
8
.gitignore
vendored
8
.gitignore
vendored
|
@ -31,10 +31,10 @@ Xcode-config/DEVELOPMENT_TEAM.xcconfig
|
|||
/ThirdParty/fdk-aac/lib/libfdk-aac.dylib
|
||||
/ThirdParty/fdk-aac/lib/libfdk-aac.la
|
||||
/ThirdParty/fdk-aac/lib/pkgconfig/fdk-aac.pc
|
||||
/ThirdParty/ffmpeg/lib/libavcodec.59.dylib
|
||||
/ThirdParty/ffmpeg/lib/libavformat.59.dylib
|
||||
/ThirdParty/ffmpeg/lib/libavutil.57.dylib
|
||||
/ThirdParty/ffmpeg/lib/libswresample.4.dylib
|
||||
/ThirdParty/ffmpeg/lib/libavcodec.61.dylib
|
||||
/ThirdParty/ffmpeg/lib/libavformat.61.dylib
|
||||
/ThirdParty/ffmpeg/lib/libavutil.59.dylib
|
||||
/ThirdParty/ffmpeg/lib/libswresample.5.dylib
|
||||
/ThirdParty/flac/lib/libFLAC.12.dylib
|
||||
/ThirdParty/libid3tag/lib/libid3tag.a
|
||||
/ThirdParty/libmad/lib/libmad.a
|
||||
|
|
|
@ -158,10 +158,10 @@
|
|||
839E56F52879625100DFB5F4 /* SADIE_D02-96000.mhr in Resources */ = {isa = PBXBuildFile; fileRef = 839E56F12879625100DFB5F4 /* SADIE_D02-96000.mhr */; };
|
||||
83A360B220E4E81D00192DAB /* Flac.bundle in CopyFiles */ = {isa = PBXBuildFile; fileRef = 8303A30C20E4E3D000951EF8 /* Flac.bundle */; settings = {ATTRIBUTES = (CodeSignOnCopy, RemoveHeadersOnCopy, ); }; };
|
||||
83A3B734283AE89000CC6593 /* ColorToValueTransformer.m in Sources */ = {isa = PBXBuildFile; fileRef = 83A3B72F283AE6AA00CC6593 /* ColorToValueTransformer.m */; };
|
||||
83AA7D04279EBCA900087AA4 /* libavcodec.59.dylib in CopyFiles */ = {isa = PBXBuildFile; fileRef = 83AA7D00279EBC8200087AA4 /* libavcodec.59.dylib */; settings = {ATTRIBUTES = (CodeSignOnCopy, ); }; };
|
||||
83AA7D05279EBCAB00087AA4 /* libavformat.59.dylib in CopyFiles */ = {isa = PBXBuildFile; fileRef = 83AA7D03279EBC8300087AA4 /* libavformat.59.dylib */; settings = {ATTRIBUTES = (CodeSignOnCopy, ); }; };
|
||||
83AA7D06279EBCAD00087AA4 /* libavutil.57.dylib in CopyFiles */ = {isa = PBXBuildFile; fileRef = 83AA7D02279EBC8200087AA4 /* libavutil.57.dylib */; settings = {ATTRIBUTES = (CodeSignOnCopy, ); }; };
|
||||
83AA7D07279EBCAF00087AA4 /* libswresample.4.dylib in CopyFiles */ = {isa = PBXBuildFile; fileRef = 83AA7D01279EBC8200087AA4 /* libswresample.4.dylib */; settings = {ATTRIBUTES = (CodeSignOnCopy, ); }; };
|
||||
83AA7D04279EBCA900087AA4 /* libavcodec.61.dylib in CopyFiles */ = {isa = PBXBuildFile; fileRef = 83AA7D00279EBC8200087AA4 /* libavcodec.61.dylib */; settings = {ATTRIBUTES = (CodeSignOnCopy, ); }; };
|
||||
83AA7D05279EBCAB00087AA4 /* libavformat.61.dylib in CopyFiles */ = {isa = PBXBuildFile; fileRef = 83AA7D03279EBC8300087AA4 /* libavformat.61.dylib */; settings = {ATTRIBUTES = (CodeSignOnCopy, ); }; };
|
||||
83AA7D06279EBCAD00087AA4 /* libavutil.59.dylib in CopyFiles */ = {isa = PBXBuildFile; fileRef = 83AA7D02279EBC8200087AA4 /* libavutil.59.dylib */; settings = {ATTRIBUTES = (CodeSignOnCopy, ); }; };
|
||||
83AA7D07279EBCAF00087AA4 /* libswresample.5.dylib in CopyFiles */ = {isa = PBXBuildFile; fileRef = 83AA7D01279EBC8200087AA4 /* libswresample.5.dylib */; settings = {ATTRIBUTES = (CodeSignOnCopy, ); }; };
|
||||
83B06704180D579E008E3612 /* MIDI.bundle in CopyFiles */ = {isa = PBXBuildFile; fileRef = 83B066A1180D5669008E3612 /* MIDI.bundle */; settings = {ATTRIBUTES = (CodeSignOnCopy, ); }; };
|
||||
83B61E2429A8296500CD0580 /* LyricsWindow.xib in Resources */ = {isa = PBXBuildFile; fileRef = 83B61E2229A8296500CD0580 /* LyricsWindow.xib */; };
|
||||
83B61E2829A82A0200CD0580 /* LyricsWindowController.m in Sources */ = {isa = PBXBuildFile; fileRef = 83B61E2729A82A0200CD0580 /* LyricsWindowController.m */; };
|
||||
|
@ -717,10 +717,10 @@
|
|||
83256B69286661FC0036D9C0 /* libmpg123.0.dylib in CopyFiles */,
|
||||
836EF0C927BB91E900BF35B2 /* libvorbisfile.3.dylib in CopyFiles */,
|
||||
836EF0C827BB91E600BF35B2 /* libogg.0.dylib in CopyFiles */,
|
||||
83AA7D07279EBCAF00087AA4 /* libswresample.4.dylib in CopyFiles */,
|
||||
83AA7D06279EBCAD00087AA4 /* libavutil.57.dylib in CopyFiles */,
|
||||
83AA7D05279EBCAB00087AA4 /* libavformat.59.dylib in CopyFiles */,
|
||||
83AA7D04279EBCA900087AA4 /* libavcodec.59.dylib in CopyFiles */,
|
||||
83AA7D07279EBCAF00087AA4 /* libswresample.5.dylib in CopyFiles */,
|
||||
83AA7D06279EBCAD00087AA4 /* libavutil.59.dylib in CopyFiles */,
|
||||
83AA7D05279EBCAB00087AA4 /* libavformat.61.dylib in CopyFiles */,
|
||||
83AA7D04279EBCA900087AA4 /* libavcodec.61.dylib in CopyFiles */,
|
||||
83B72E3B279045B7006007A3 /* libfdk-aac.2.dylib in CopyFiles */,
|
||||
8305963C277F013200EBFAAE /* File_Extractor.framework in CopyFiles */,
|
||||
ED69CBCA25BE32E80090B90D /* MASShortcut.framework in CopyFiles */,
|
||||
|
@ -1019,10 +1019,10 @@
|
|||
839E56F12879625100DFB5F4 /* SADIE_D02-96000.mhr */ = {isa = PBXFileReference; lastKnownFileType = file; path = "SADIE_D02-96000.mhr"; sourceTree = "<group>"; };
|
||||
83A3B72F283AE6AA00CC6593 /* ColorToValueTransformer.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; name = ColorToValueTransformer.m; path = Preferences/Preferences/ColorToValueTransformer.m; sourceTree = "<group>"; };
|
||||
83A3B733283AE6AA00CC6593 /* ColorToValueTransformer.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = ColorToValueTransformer.h; path = Preferences/Preferences/ColorToValueTransformer.h; sourceTree = "<group>"; };
|
||||
83AA7D00279EBC8200087AA4 /* libavcodec.59.dylib */ = {isa = PBXFileReference; lastKnownFileType = "compiled.mach-o.dylib"; name = libavcodec.59.dylib; path = ThirdParty/ffmpeg/lib/libavcodec.59.dylib; sourceTree = "<group>"; };
|
||||
83AA7D01279EBC8200087AA4 /* libswresample.4.dylib */ = {isa = PBXFileReference; lastKnownFileType = "compiled.mach-o.dylib"; name = libswresample.4.dylib; path = ThirdParty/ffmpeg/lib/libswresample.4.dylib; sourceTree = "<group>"; };
|
||||
83AA7D02279EBC8200087AA4 /* libavutil.57.dylib */ = {isa = PBXFileReference; lastKnownFileType = "compiled.mach-o.dylib"; name = libavutil.57.dylib; path = ThirdParty/ffmpeg/lib/libavutil.57.dylib; sourceTree = "<group>"; };
|
||||
83AA7D03279EBC8300087AA4 /* libavformat.59.dylib */ = {isa = PBXFileReference; lastKnownFileType = "compiled.mach-o.dylib"; name = libavformat.59.dylib; path = ThirdParty/ffmpeg/lib/libavformat.59.dylib; sourceTree = "<group>"; };
|
||||
83AA7D00279EBC8200087AA4 /* libavcodec.61.dylib */ = {isa = PBXFileReference; lastKnownFileType = "compiled.mach-o.dylib"; name = libavcodec.61.dylib; path = ThirdParty/ffmpeg/lib/libavcodec.61.dylib; sourceTree = "<group>"; };
|
||||
83AA7D01279EBC8200087AA4 /* libswresample.5.dylib */ = {isa = PBXFileReference; lastKnownFileType = "compiled.mach-o.dylib"; name = libswresample.5.dylib; path = ThirdParty/ffmpeg/lib/libswresample.5.dylib; sourceTree = "<group>"; };
|
||||
83AA7D02279EBC8200087AA4 /* libavutil.59.dylib */ = {isa = PBXFileReference; lastKnownFileType = "compiled.mach-o.dylib"; name = libavutil.59.dylib; path = ThirdParty/ffmpeg/lib/libavutil.59.dylib; sourceTree = "<group>"; };
|
||||
83AA7D03279EBC8300087AA4 /* libavformat.61.dylib */ = {isa = PBXFileReference; lastKnownFileType = "compiled.mach-o.dylib"; name = libavformat.61.dylib; path = ThirdParty/ffmpeg/lib/libavformat.61.dylib; sourceTree = "<group>"; };
|
||||
83AB9031237CEFD300A433D5 /* MediaPlayer.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = MediaPlayer.framework; path = System/Library/Frameworks/MediaPlayer.framework; sourceTree = SDKROOT; };
|
||||
83B0669C180D5668008E3612 /* MIDI.xcodeproj */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.pb-project"; name = MIDI.xcodeproj; path = Plugins/MIDI/MIDI.xcodeproj; sourceTree = "<group>"; };
|
||||
83B61E2329A8296500CD0580 /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.xib; name = Base; path = Base.lproj/LyricsWindow.xib; sourceTree = "<group>"; };
|
||||
|
@ -1173,10 +1173,10 @@
|
|||
836EF0C627BB91AB00BF35B2 /* libvorbisfile.3.dylib */,
|
||||
836EF0C427BB919300BF35B2 /* libogg.0.dylib */,
|
||||
83B72E2A279044F6006007A3 /* libfdk-aac.2.dylib */,
|
||||
83AA7D00279EBC8200087AA4 /* libavcodec.59.dylib */,
|
||||
83AA7D03279EBC8300087AA4 /* libavformat.59.dylib */,
|
||||
83AA7D02279EBC8200087AA4 /* libavutil.57.dylib */,
|
||||
83AA7D01279EBC8200087AA4 /* libswresample.4.dylib */,
|
||||
83AA7D00279EBC8200087AA4 /* libavcodec.61.dylib */,
|
||||
83AA7D03279EBC8300087AA4 /* libavformat.61.dylib */,
|
||||
83AA7D02279EBC8200087AA4 /* libavutil.59.dylib */,
|
||||
83AA7D01279EBC8200087AA4 /* libswresample.5.dylib */,
|
||||
83059634277F011100EBFAAE /* File_Extractor.xcodeproj */,
|
||||
17BB5EA50B8A87850009ACB1 /* IOKit.framework */,
|
||||
17BB5CF60B8A86350009ACB1 /* AudioUnit.framework */,
|
||||
|
|
|
@ -637,10 +637,10 @@
|
|||
83AA5D241F6E2F9C0020821C /* awc.c in Sources */ = {isa = PBXBuildFile; fileRef = 83AA5D201F6E2F9B0020821C /* awc.c */; };
|
||||
83AA5D251F6E2F9C0020821C /* hca_keys.h in Headers */ = {isa = PBXBuildFile; fileRef = 83AA5D211F6E2F9C0020821C /* hca_keys.h */; };
|
||||
83AA5D271F6E2F9C0020821C /* stma.c in Sources */ = {isa = PBXBuildFile; fileRef = 83AA5D231F6E2F9C0020821C /* stma.c */; };
|
||||
83AA7D17279EBD0400087AA4 /* libavcodec.59.dylib in Frameworks */ = {isa = PBXBuildFile; fileRef = 83AA7D13279EBCF900087AA4 /* libavcodec.59.dylib */; };
|
||||
83AA7D18279EBD0900087AA4 /* libavformat.59.dylib in Frameworks */ = {isa = PBXBuildFile; fileRef = 83AA7D14279EBCF900087AA4 /* libavformat.59.dylib */; };
|
||||
83AA7D19279EBD0B00087AA4 /* libavutil.57.dylib in Frameworks */ = {isa = PBXBuildFile; fileRef = 83AA7D16279EBCF900087AA4 /* libavutil.57.dylib */; };
|
||||
83AA7D1A279EBD0D00087AA4 /* libswresample.4.dylib in Frameworks */ = {isa = PBXBuildFile; fileRef = 83AA7D15279EBCF900087AA4 /* libswresample.4.dylib */; };
|
||||
83AA7D17279EBD0400087AA4 /* libavcodec.61.dylib in Frameworks */ = {isa = PBXBuildFile; fileRef = 83AA7D13279EBCF900087AA4 /* libavcodec.61.dylib */; };
|
||||
83AA7D18279EBD0900087AA4 /* libavformat.61.dylib in Frameworks */ = {isa = PBXBuildFile; fileRef = 83AA7D14279EBCF900087AA4 /* libavformat.61.dylib */; };
|
||||
83AA7D19279EBD0B00087AA4 /* libavutil.59.dylib in Frameworks */ = {isa = PBXBuildFile; fileRef = 83AA7D16279EBCF900087AA4 /* libavutil.59.dylib */; };
|
||||
83AA7D1A279EBD0D00087AA4 /* libswresample.5.dylib in Frameworks */ = {isa = PBXBuildFile; fileRef = 83AA7D15279EBCF900087AA4 /* libswresample.5.dylib */; };
|
||||
83AA7F7D2519C042004C5298 /* dsb.c in Sources */ = {isa = PBXBuildFile; fileRef = 83AA7F742519C041004C5298 /* dsb.c */; };
|
||||
83AA7F7E2519C042004C5298 /* svag_kcet.c in Sources */ = {isa = PBXBuildFile; fileRef = 83AA7F752519C041004C5298 /* svag_kcet.c */; };
|
||||
83AA7F7F2519C042004C5298 /* bsf.c in Sources */ = {isa = PBXBuildFile; fileRef = 83AA7F762519C042004C5298 /* bsf.c */; };
|
||||
|
@ -1485,10 +1485,10 @@
|
|||
83AA5D201F6E2F9B0020821C /* awc.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = awc.c; sourceTree = "<group>"; };
|
||||
83AA5D211F6E2F9C0020821C /* hca_keys.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = hca_keys.h; sourceTree = "<group>"; };
|
||||
83AA5D231F6E2F9C0020821C /* stma.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = stma.c; sourceTree = "<group>"; };
|
||||
83AA7D13279EBCF900087AA4 /* libavcodec.59.dylib */ = {isa = PBXFileReference; lastKnownFileType = "compiled.mach-o.dylib"; name = libavcodec.59.dylib; path = ../../ThirdParty/ffmpeg/lib/libavcodec.59.dylib; sourceTree = "<group>"; };
|
||||
83AA7D14279EBCF900087AA4 /* libavformat.59.dylib */ = {isa = PBXFileReference; lastKnownFileType = "compiled.mach-o.dylib"; name = libavformat.59.dylib; path = ../../ThirdParty/ffmpeg/lib/libavformat.59.dylib; sourceTree = "<group>"; };
|
||||
83AA7D15279EBCF900087AA4 /* libswresample.4.dylib */ = {isa = PBXFileReference; lastKnownFileType = "compiled.mach-o.dylib"; name = libswresample.4.dylib; path = ../../ThirdParty/ffmpeg/lib/libswresample.4.dylib; sourceTree = "<group>"; };
|
||||
83AA7D16279EBCF900087AA4 /* libavutil.57.dylib */ = {isa = PBXFileReference; lastKnownFileType = "compiled.mach-o.dylib"; name = libavutil.57.dylib; path = ../../ThirdParty/ffmpeg/lib/libavutil.57.dylib; sourceTree = "<group>"; };
|
||||
83AA7D13279EBCF900087AA4 /* libavcodec.61.dylib */ = {isa = PBXFileReference; lastKnownFileType = "compiled.mach-o.dylib"; name = libavcodec.61.dylib; path = ../../ThirdParty/ffmpeg/lib/libavcodec.61.dylib; sourceTree = "<group>"; };
|
||||
83AA7D14279EBCF900087AA4 /* libavformat.61.dylib */ = {isa = PBXFileReference; lastKnownFileType = "compiled.mach-o.dylib"; name = libavformat.61.dylib; path = ../../ThirdParty/ffmpeg/lib/libavformat.61.dylib; sourceTree = "<group>"; };
|
||||
83AA7D15279EBCF900087AA4 /* libswresample.5.dylib */ = {isa = PBXFileReference; lastKnownFileType = "compiled.mach-o.dylib"; name = libswresample.5.dylib; path = ../../ThirdParty/ffmpeg/lib/libswresample.5.dylib; sourceTree = "<group>"; };
|
||||
83AA7D16279EBCF900087AA4 /* libavutil.59.dylib */ = {isa = PBXFileReference; lastKnownFileType = "compiled.mach-o.dylib"; name = libavutil.59.dylib; path = ../../ThirdParty/ffmpeg/lib/libavutil.59.dylib; sourceTree = "<group>"; };
|
||||
83AA7F742519C041004C5298 /* dsb.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = dsb.c; sourceTree = "<group>"; };
|
||||
83AA7F752519C041004C5298 /* svag_kcet.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = svag_kcet.c; sourceTree = "<group>"; };
|
||||
83AA7F762519C042004C5298 /* bsf.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = bsf.c; sourceTree = "<group>"; };
|
||||
|
@ -1606,10 +1606,10 @@
|
|||
files = (
|
||||
836EF0DD27BB97C500BF35B2 /* libvorbisfile.3.dylib in Frameworks */,
|
||||
836EF0DB27BB975900BF35B2 /* libvorbis.0.dylib in Frameworks */,
|
||||
83AA7D1A279EBD0D00087AA4 /* libswresample.4.dylib in Frameworks */,
|
||||
83AA7D19279EBD0B00087AA4 /* libavutil.57.dylib in Frameworks */,
|
||||
83AA7D18279EBD0900087AA4 /* libavformat.59.dylib in Frameworks */,
|
||||
83AA7D17279EBD0400087AA4 /* libavcodec.59.dylib in Frameworks */,
|
||||
83AA7D1A279EBD0D00087AA4 /* libswresample.5.dylib in Frameworks */,
|
||||
83AA7D19279EBD0B00087AA4 /* libavutil.59.dylib in Frameworks */,
|
||||
83AA7D18279EBD0900087AA4 /* libavformat.61.dylib in Frameworks */,
|
||||
83AA7D17279EBD0400087AA4 /* libavcodec.61.dylib in Frameworks */,
|
||||
83B72E3A27904589006007A3 /* libfdk-aac.2.dylib in Frameworks */,
|
||||
83E22FC32772FD16000015EE /* AudioToolbox.framework in Frameworks */,
|
||||
83E22FC12772FD06000015EE /* libbz2.tbd in Frameworks */,
|
||||
|
@ -1782,10 +1782,10 @@
|
|||
836EF0DC27BB97BA00BF35B2 /* libvorbisfile.3.dylib */,
|
||||
836EF0D027BB960A00BF35B2 /* libvorbis.0.dylib */,
|
||||
83B72E342790452C006007A3 /* libfdk-aac.2.dylib */,
|
||||
83AA7D13279EBCF900087AA4 /* libavcodec.59.dylib */,
|
||||
83AA7D14279EBCF900087AA4 /* libavformat.59.dylib */,
|
||||
83AA7D16279EBCF900087AA4 /* libavutil.57.dylib */,
|
||||
83AA7D15279EBCF900087AA4 /* libswresample.4.dylib */,
|
||||
83AA7D13279EBCF900087AA4 /* libavcodec.61.dylib */,
|
||||
83AA7D14279EBCF900087AA4 /* libavformat.61.dylib */,
|
||||
83AA7D16279EBCF900087AA4 /* libavutil.59.dylib */,
|
||||
83AA7D15279EBCF900087AA4 /* libswresample.5.dylib */,
|
||||
8315868C26F58AF900803A3A /* libspeex.a */,
|
||||
83D731381A74968900CA1366 /* g719.xcodeproj */,
|
||||
835FC6C123F62AEE006960FA /* libatrac9.xcodeproj */,
|
||||
|
|
|
@ -17,10 +17,10 @@
|
|||
8352D49D1CDDB8C0009D16AA /* CoreMedia.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 8352D49C1CDDB8C0009D16AA /* CoreMedia.framework */; };
|
||||
8352D49F1CDDB8D7009D16AA /* CoreVideo.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 8352D49E1CDDB8D7009D16AA /* CoreVideo.framework */; };
|
||||
8356BCE927B37C6F0074E50C /* NSDictionary+Merge.m in Sources */ = {isa = PBXBuildFile; fileRef = 8356BCE727B37C6F0074E50C /* NSDictionary+Merge.m */; };
|
||||
83AA7D0C279EBCC600087AA4 /* libavcodec.59.dylib in Frameworks */ = {isa = PBXBuildFile; fileRef = 83AA7D08279EBCC600087AA4 /* libavcodec.59.dylib */; };
|
||||
83AA7D0D279EBCC600087AA4 /* libavutil.57.dylib in Frameworks */ = {isa = PBXBuildFile; fileRef = 83AA7D09279EBCC600087AA4 /* libavutil.57.dylib */; };
|
||||
83AA7D0E279EBCC600087AA4 /* libswresample.4.dylib in Frameworks */ = {isa = PBXBuildFile; fileRef = 83AA7D0A279EBCC600087AA4 /* libswresample.4.dylib */; };
|
||||
83AA7D0F279EBCC600087AA4 /* libavformat.59.dylib in Frameworks */ = {isa = PBXBuildFile; fileRef = 83AA7D0B279EBCC600087AA4 /* libavformat.59.dylib */; };
|
||||
83AA7D0C279EBCC600087AA4 /* libavcodec.61.dylib in Frameworks */ = {isa = PBXBuildFile; fileRef = 83AA7D08279EBCC600087AA4 /* libavcodec.61.dylib */; };
|
||||
83AA7D0D279EBCC600087AA4 /* libavutil.59.dylib in Frameworks */ = {isa = PBXBuildFile; fileRef = 83AA7D09279EBCC600087AA4 /* libavutil.59.dylib */; };
|
||||
83AA7D0E279EBCC600087AA4 /* libswresample.5.dylib in Frameworks */ = {isa = PBXBuildFile; fileRef = 83AA7D0A279EBCC600087AA4 /* libswresample.5.dylib */; };
|
||||
83AA7D0F279EBCC600087AA4 /* libavformat.61.dylib in Frameworks */ = {isa = PBXBuildFile; fileRef = 83AA7D0B279EBCC600087AA4 /* libavformat.61.dylib */; };
|
||||
83B72E3927904557006007A3 /* libfdk-aac.2.dylib in Frameworks */ = {isa = PBXBuildFile; fileRef = 83B72E3827904557006007A3 /* libfdk-aac.2.dylib */; };
|
||||
83CBC5AA2866F75B00F2753B /* FFMPEGContainer.m in Sources */ = {isa = PBXBuildFile; fileRef = 83CBC5A92866F75B00F2753B /* FFMPEGContainer.m */; };
|
||||
83E22FC62772FD32000015EE /* libbz2.tbd in Frameworks */ = {isa = PBXBuildFile; fileRef = 83E22FC52772FD32000015EE /* libbz2.tbd */; };
|
||||
|
@ -61,10 +61,10 @@
|
|||
8356BD1A27B3D06F0074E50C /* HTTPSource.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = HTTPSource.h; path = ../HTTPSource/HTTPSource.h; sourceTree = "<group>"; };
|
||||
83747C542862DD4D0021245F /* Shared.xcconfig */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xcconfig; path = Shared.xcconfig; sourceTree = "<group>"; };
|
||||
8384913818081F6C00E7332D /* Logging.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = Logging.h; path = ../../Utils/Logging.h; sourceTree = "<group>"; };
|
||||
83AA7D08279EBCC600087AA4 /* libavcodec.59.dylib */ = {isa = PBXFileReference; lastKnownFileType = "compiled.mach-o.dylib"; name = libavcodec.59.dylib; path = ../../ThirdParty/ffmpeg/lib/libavcodec.59.dylib; sourceTree = "<group>"; };
|
||||
83AA7D09279EBCC600087AA4 /* libavutil.57.dylib */ = {isa = PBXFileReference; lastKnownFileType = "compiled.mach-o.dylib"; name = libavutil.57.dylib; path = ../../ThirdParty/ffmpeg/lib/libavutil.57.dylib; sourceTree = "<group>"; };
|
||||
83AA7D0A279EBCC600087AA4 /* libswresample.4.dylib */ = {isa = PBXFileReference; lastKnownFileType = "compiled.mach-o.dylib"; name = libswresample.4.dylib; path = ../../ThirdParty/ffmpeg/lib/libswresample.4.dylib; sourceTree = "<group>"; };
|
||||
83AA7D0B279EBCC600087AA4 /* libavformat.59.dylib */ = {isa = PBXFileReference; lastKnownFileType = "compiled.mach-o.dylib"; name = libavformat.59.dylib; path = ../../ThirdParty/ffmpeg/lib/libavformat.59.dylib; sourceTree = "<group>"; };
|
||||
83AA7D08279EBCC600087AA4 /* libavcodec.61.dylib */ = {isa = PBXFileReference; lastKnownFileType = "compiled.mach-o.dylib"; name = libavcodec.61.dylib; path = ../../ThirdParty/ffmpeg/lib/libavcodec.61.dylib; sourceTree = "<group>"; };
|
||||
83AA7D09279EBCC600087AA4 /* libavutil.59.dylib */ = {isa = PBXFileReference; lastKnownFileType = "compiled.mach-o.dylib"; name = libavutil.59.dylib; path = ../../ThirdParty/ffmpeg/lib/libavutil.59.dylib; sourceTree = "<group>"; };
|
||||
83AA7D0A279EBCC600087AA4 /* libswresample.5.dylib */ = {isa = PBXFileReference; lastKnownFileType = "compiled.mach-o.dylib"; name = libswresample.5.dylib; path = ../../ThirdParty/ffmpeg/lib/libswresample.5.dylib; sourceTree = "<group>"; };
|
||||
83AA7D0B279EBCC600087AA4 /* libavformat.61.dylib */ = {isa = PBXFileReference; lastKnownFileType = "compiled.mach-o.dylib"; name = libavformat.61.dylib; path = ../../ThirdParty/ffmpeg/lib/libavformat.61.dylib; sourceTree = "<group>"; };
|
||||
83B72E3827904557006007A3 /* libfdk-aac.2.dylib */ = {isa = PBXFileReference; lastKnownFileType = "compiled.mach-o.dylib"; name = "libfdk-aac.2.dylib"; path = "../../ThirdParty/fdk-aac/lib/libfdk-aac.2.dylib"; sourceTree = "<group>"; };
|
||||
83CBC5A82866F75B00F2753B /* FFMPEGContainer.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = FFMPEGContainer.h; sourceTree = "<group>"; };
|
||||
83CBC5A92866F75B00F2753B /* FFMPEGContainer.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = FFMPEGContainer.m; sourceTree = "<group>"; };
|
||||
|
@ -84,17 +84,17 @@
|
|||
buildActionMask = 2147483647;
|
||||
files = (
|
||||
83B72E3927904557006007A3 /* libfdk-aac.2.dylib in Frameworks */,
|
||||
83AA7D0C279EBCC600087AA4 /* libavcodec.59.dylib in Frameworks */,
|
||||
83AA7D0C279EBCC600087AA4 /* libavcodec.61.dylib in Frameworks */,
|
||||
83E22FC82772FD3A000015EE /* AudioToolbox.framework in Frameworks */,
|
||||
83AA7D0E279EBCC600087AA4 /* libswresample.4.dylib in Frameworks */,
|
||||
83AA7D0E279EBCC600087AA4 /* libswresample.5.dylib in Frameworks */,
|
||||
83E22FC62772FD32000015EE /* libbz2.tbd in Frameworks */,
|
||||
83AA7D0D279EBCC600087AA4 /* libavutil.57.dylib in Frameworks */,
|
||||
83AA7D0D279EBCC600087AA4 /* libavutil.59.dylib in Frameworks */,
|
||||
8352D4991CDDB06A009D16AA /* libz.tbd in Frameworks */,
|
||||
8352D4971CDDB05E009D16AA /* Security.framework in Frameworks */,
|
||||
8352D4911CDDB02A009D16AA /* VideoDecodeAcceleration.framework in Frameworks */,
|
||||
8352D49F1CDDB8D7009D16AA /* CoreVideo.framework in Frameworks */,
|
||||
8352D4931CDDB034009D16AA /* QuartzCore.framework in Frameworks */,
|
||||
83AA7D0F279EBCC600087AA4 /* libavformat.59.dylib in Frameworks */,
|
||||
83AA7D0F279EBCC600087AA4 /* libavformat.61.dylib in Frameworks */,
|
||||
8352D49D1CDDB8C0009D16AA /* CoreMedia.framework in Frameworks */,
|
||||
8352D49B1CDDB8B2009D16AA /* VideoToolbox.framework in Frameworks */,
|
||||
8352D48F1CDDB023009D16AA /* CoreFoundation.framework in Frameworks */,
|
||||
|
@ -123,10 +123,10 @@
|
|||
isa = PBXGroup;
|
||||
children = (
|
||||
83B72E3827904557006007A3 /* libfdk-aac.2.dylib */,
|
||||
83AA7D08279EBCC600087AA4 /* libavcodec.59.dylib */,
|
||||
83AA7D0B279EBCC600087AA4 /* libavformat.59.dylib */,
|
||||
83AA7D09279EBCC600087AA4 /* libavutil.57.dylib */,
|
||||
83AA7D0A279EBCC600087AA4 /* libswresample.4.dylib */,
|
||||
83AA7D08279EBCC600087AA4 /* libavcodec.61.dylib */,
|
||||
83AA7D0B279EBCC600087AA4 /* libavformat.61.dylib */,
|
||||
83AA7D09279EBCC600087AA4 /* libavutil.59.dylib */,
|
||||
83AA7D0A279EBCC600087AA4 /* libswresample.5.dylib */,
|
||||
8352D4981CDDB06A009D16AA /* libz.tbd */,
|
||||
8352D4941CDDB03E009D16AA /* libiconv.tbd */,
|
||||
1058C7ACFEA557BF11CA2CBB /* Linked Frameworks */,
|
||||
|
|
|
@ -14,7 +14,7 @@
|
|||
#include <libavformat/avformat.h>
|
||||
|
||||
extern int ffmpeg_read(void *opaque, uint8_t *buf, int buf_size);
|
||||
extern int ffmpeg_write(void *opaque, uint8_t *buf, int buf_size);
|
||||
extern int ffmpeg_write(void *opaque, const uint8_t *buf, int buf_size);
|
||||
int64_t ffmpeg_seek(void *opaque, int64_t offset, int whence);
|
||||
|
||||
@interface FFMPEGDecoder : NSObject <CogDecoder> {
|
||||
|
|
|
@ -27,7 +27,7 @@ int ffmpeg_read(void *opaque, uint8_t *buf, int buf_size) {
|
|||
return (int)sizeRead;
|
||||
}
|
||||
|
||||
int ffmpeg_write(void *opaque, uint8_t *buf, int buf_size) {
|
||||
int ffmpeg_write(void *opaque, const uint8_t *buf, int buf_size) {
|
||||
return -1;
|
||||
}
|
||||
|
||||
|
|
1173
ThirdParty/ffmpeg/include/libavcodec/avcodec.h
vendored
1173
ThirdParty/ffmpeg/include/libavcodec/avcodec.h
vendored
File diff suppressed because it is too large
Load diff
31
ThirdParty/ffmpeg/include/libavcodec/avfft.h
vendored
31
ThirdParty/ffmpeg/include/libavcodec/avfft.h
vendored
|
@ -19,6 +19,10 @@
|
|||
#ifndef AVCODEC_AVFFT_H
|
||||
#define AVCODEC_AVFFT_H
|
||||
|
||||
#include "libavutil/attributes.h"
|
||||
#include "version_major.h"
|
||||
#if FF_API_AVFFT
|
||||
|
||||
/**
|
||||
* @file
|
||||
* @ingroup lavc_fft
|
||||
|
@ -44,26 +48,42 @@ typedef struct FFTContext FFTContext;
|
|||
* Set up a complex FFT.
|
||||
* @param nbits log2 of the length of the input array
|
||||
* @param inverse if 0 perform the forward transform, if 1 perform the inverse
|
||||
* @deprecated use av_tx_init from libavutil/tx.h with a type of AV_TX_FLOAT_FFT
|
||||
*/
|
||||
attribute_deprecated
|
||||
FFTContext *av_fft_init(int nbits, int inverse);
|
||||
|
||||
/**
|
||||
* Do the permutation needed BEFORE calling ff_fft_calc().
|
||||
* @deprecated without replacement
|
||||
*/
|
||||
attribute_deprecated
|
||||
void av_fft_permute(FFTContext *s, FFTComplex *z);
|
||||
|
||||
/**
|
||||
* Do a complex FFT with the parameters defined in av_fft_init(). The
|
||||
* input data must be permuted before. No 1.0/sqrt(n) normalization is done.
|
||||
* @deprecated use the av_tx_fn value returned by av_tx_init, which also does permutation
|
||||
*/
|
||||
attribute_deprecated
|
||||
void av_fft_calc(FFTContext *s, FFTComplex *z);
|
||||
|
||||
attribute_deprecated
|
||||
void av_fft_end(FFTContext *s);
|
||||
|
||||
/**
|
||||
* @deprecated use av_tx_init from libavutil/tx.h with a type of AV_TX_FLOAT_MDCT,
|
||||
* with a flag of AV_TX_FULL_IMDCT for a replacement to av_imdct_calc.
|
||||
*/
|
||||
attribute_deprecated
|
||||
FFTContext *av_mdct_init(int nbits, int inverse, double scale);
|
||||
attribute_deprecated
|
||||
void av_imdct_calc(FFTContext *s, FFTSample *output, const FFTSample *input);
|
||||
attribute_deprecated
|
||||
void av_imdct_half(FFTContext *s, FFTSample *output, const FFTSample *input);
|
||||
attribute_deprecated
|
||||
void av_mdct_calc(FFTContext *s, FFTSample *output, const FFTSample *input);
|
||||
attribute_deprecated
|
||||
void av_mdct_end(FFTContext *s);
|
||||
|
||||
/* Real Discrete Fourier Transform */
|
||||
|
@ -81,9 +101,14 @@ typedef struct RDFTContext RDFTContext;
|
|||
* Set up a real FFT.
|
||||
* @param nbits log2 of the length of the input array
|
||||
* @param trans the type of transform
|
||||
*
|
||||
* @deprecated use av_tx_init from libavutil/tx.h with a type of AV_TX_FLOAT_RDFT
|
||||
*/
|
||||
attribute_deprecated
|
||||
RDFTContext *av_rdft_init(int nbits, enum RDFTransformType trans);
|
||||
attribute_deprecated
|
||||
void av_rdft_calc(RDFTContext *s, FFTSample *data);
|
||||
attribute_deprecated
|
||||
void av_rdft_end(RDFTContext *s);
|
||||
|
||||
/* Discrete Cosine Transform */
|
||||
|
@ -106,13 +131,19 @@ enum DCTTransformType {
|
|||
* @param type the type of transform
|
||||
*
|
||||
* @note the first element of the input of DST-I is ignored
|
||||
*
|
||||
* @deprecated use av_tx_init from libavutil/tx.h with an appropriate type of AV_TX_FLOAT_DCT
|
||||
*/
|
||||
attribute_deprecated
|
||||
DCTContext *av_dct_init(int nbits, enum DCTTransformType type);
|
||||
attribute_deprecated
|
||||
void av_dct_calc(DCTContext *s, FFTSample *data);
|
||||
attribute_deprecated
|
||||
void av_dct_end (DCTContext *s);
|
||||
|
||||
/**
|
||||
* @}
|
||||
*/
|
||||
|
||||
#endif /* FF_API_AVFFT */
|
||||
#endif /* AVCODEC_AVFFT_H */
|
||||
|
|
38
ThirdParty/ffmpeg/include/libavcodec/codec.h
vendored
38
ThirdParty/ffmpeg/include/libavcodec/codec.h
vendored
|
@ -50,12 +50,6 @@
|
|||
* avcodec_default_get_buffer2 or avcodec_default_get_encode_buffer.
|
||||
*/
|
||||
#define AV_CODEC_CAP_DR1 (1 << 1)
|
||||
#if FF_API_FLAG_TRUNCATED
|
||||
/**
|
||||
* @deprecated Use parsers to always send proper frames.
|
||||
*/
|
||||
#define AV_CODEC_CAP_TRUNCATED (1 << 3)
|
||||
#endif
|
||||
/**
|
||||
* Encoder or decoder requires flushing with NULL input at the end in order to
|
||||
* give the complete and correct output.
|
||||
|
@ -86,6 +80,7 @@
|
|||
*/
|
||||
#define AV_CODEC_CAP_SMALL_LAST_FRAME (1 << 6)
|
||||
|
||||
#if FF_API_SUBFRAMES
|
||||
/**
|
||||
* Codec can output multiple frames per AVPacket
|
||||
* Normally demuxers return one frame at a time, demuxers which do not do
|
||||
|
@ -98,6 +93,8 @@
|
|||
* as a last resort.
|
||||
*/
|
||||
#define AV_CODEC_CAP_SUBFRAMES (1 << 8)
|
||||
#endif
|
||||
|
||||
/**
|
||||
* Codec is experimental and is thus avoided in favor of non experimental
|
||||
* encoders
|
||||
|
@ -125,9 +122,6 @@
|
|||
* multithreading-capable external libraries.
|
||||
*/
|
||||
#define AV_CODEC_CAP_OTHER_THREADS (1 << 15)
|
||||
#if FF_API_AUTO_THREADS
|
||||
#define AV_CODEC_CAP_AUTO_THREADS AV_CODEC_CAP_OTHER_THREADS
|
||||
#endif
|
||||
/**
|
||||
* Audio encoder supports receiving a different number of samples in each call.
|
||||
*/
|
||||
|
@ -143,17 +137,6 @@
|
|||
*/
|
||||
#define AV_CODEC_CAP_AVOID_PROBING (1 << 17)
|
||||
|
||||
#if FF_API_UNUSED_CODEC_CAPS
|
||||
/**
|
||||
* Deprecated and unused. Use AVCodecDescriptor.props instead
|
||||
*/
|
||||
#define AV_CODEC_CAP_INTRA_ONLY 0x40000000
|
||||
/**
|
||||
* Deprecated and unused. Use AVCodecDescriptor.props instead
|
||||
*/
|
||||
#define AV_CODEC_CAP_LOSSLESS 0x80000000
|
||||
#endif
|
||||
|
||||
/**
|
||||
* Codec is backed by a hardware implementation. Typically used to
|
||||
* identify a non-hwaccel hardware decoder. For information about hwaccels, use
|
||||
|
@ -169,9 +152,9 @@
|
|||
#define AV_CODEC_CAP_HYBRID (1 << 19)
|
||||
|
||||
/**
|
||||
* This codec takes the reordered_opaque field from input AVFrames
|
||||
* and returns it in the corresponding field in AVCodecContext after
|
||||
* encoding.
|
||||
* This encoder can reorder user opaque values from input AVFrames and return
|
||||
* them with corresponding output packets.
|
||||
* @see AV_CODEC_FLAG_COPY_OPAQUE
|
||||
*/
|
||||
#define AV_CODEC_CAP_ENCODER_REORDERED_OPAQUE (1 << 20)
|
||||
|
||||
|
@ -226,15 +209,8 @@ typedef struct AVCodec {
|
|||
const enum AVPixelFormat *pix_fmts; ///< array of supported pixel formats, or NULL if unknown, array is terminated by -1
|
||||
const int *supported_samplerates; ///< array of supported audio samplerates, or NULL if unknown, array is terminated by 0
|
||||
const enum AVSampleFormat *sample_fmts; ///< array of supported sample formats, or NULL if unknown, array is terminated by -1
|
||||
#if FF_API_OLD_CHANNEL_LAYOUT
|
||||
/**
|
||||
* @deprecated use ch_layouts instead
|
||||
*/
|
||||
attribute_deprecated
|
||||
const uint64_t *channel_layouts; ///< array of support channel layouts, or NULL if unknown. array is terminated by 0
|
||||
#endif
|
||||
const AVClass *priv_class; ///< AVClass for the private context
|
||||
const AVProfile *profiles; ///< array of recognized profiles, or NULL if unknown, array is terminated by {FF_PROFILE_UNKNOWN}
|
||||
const AVProfile *profiles; ///< array of recognized profiles, or NULL if unknown, array is terminated by {AV_PROFILE_UNKNOWN}
|
||||
|
||||
/**
|
||||
* Group name of the codec implementation.
|
||||
|
|
|
@ -60,7 +60,7 @@ typedef struct AVCodecDescriptor {
|
|||
const char *const *mime_types;
|
||||
/**
|
||||
* If non-NULL, an array of profiles recognized for this codec.
|
||||
* Terminated with FF_PROFILE_UNKNOWN.
|
||||
* Terminated with AV_PROFILE_UNKNOWN.
|
||||
*/
|
||||
const struct AVProfile *profiles;
|
||||
} AVCodecDescriptor;
|
||||
|
@ -90,6 +90,12 @@ typedef struct AVCodecDescriptor {
|
|||
* equal.
|
||||
*/
|
||||
#define AV_CODEC_PROP_REORDER (1 << 3)
|
||||
|
||||
/**
|
||||
* Video codec supports separate coding of fields in interlaced frames.
|
||||
*/
|
||||
#define AV_CODEC_PROP_FIELDS (1 << 4)
|
||||
|
||||
/**
|
||||
* Subtitle codec is bitmap based
|
||||
* Decoded AVSubtitle data can be read from the AVSubtitleRect->pict field.
|
||||
|
|
28
ThirdParty/ffmpeg/include/libavcodec/codec_id.h
vendored
28
ThirdParty/ffmpeg/include/libavcodec/codec_id.h
vendored
|
@ -253,9 +253,6 @@ enum AVCodecID {
|
|||
AV_CODEC_ID_AVRP,
|
||||
AV_CODEC_ID_012V,
|
||||
AV_CODEC_ID_AVUI,
|
||||
#if FF_API_AYUV_CODECID
|
||||
AV_CODEC_ID_AYUV,
|
||||
#endif
|
||||
AV_CODEC_ID_TARGA_Y216,
|
||||
AV_CODEC_ID_V308,
|
||||
AV_CODEC_ID_V408,
|
||||
|
@ -319,6 +316,12 @@ enum AVCodecID {
|
|||
AV_CODEC_ID_RADIANCE_HDR,
|
||||
AV_CODEC_ID_WBMP,
|
||||
AV_CODEC_ID_MEDIA100,
|
||||
AV_CODEC_ID_VQC,
|
||||
AV_CODEC_ID_PDV,
|
||||
AV_CODEC_ID_EVC,
|
||||
AV_CODEC_ID_RTV1,
|
||||
AV_CODEC_ID_VMIX,
|
||||
AV_CODEC_ID_LEAD,
|
||||
|
||||
/* various PCM "codecs" */
|
||||
AV_CODEC_ID_FIRST_AUDIO = 0x10000, ///< A dummy id pointing at the start of audio codecs
|
||||
|
@ -412,6 +415,7 @@ enum AVCodecID {
|
|||
AV_CODEC_ID_ADPCM_IMA_CUNNING,
|
||||
AV_CODEC_ID_ADPCM_IMA_MOFLEX,
|
||||
AV_CODEC_ID_ADPCM_IMA_ACORN,
|
||||
AV_CODEC_ID_ADPCM_XMD,
|
||||
|
||||
/* AMR */
|
||||
AV_CODEC_ID_AMR_NB = 0x12000,
|
||||
|
@ -429,6 +433,8 @@ enum AVCodecID {
|
|||
AV_CODEC_ID_SDX2_DPCM,
|
||||
AV_CODEC_ID_GREMLIN_DPCM,
|
||||
AV_CODEC_ID_DERF_DPCM,
|
||||
AV_CODEC_ID_WADY_DPCM,
|
||||
AV_CODEC_ID_CBD2_DPCM,
|
||||
|
||||
/* audio codecs */
|
||||
AV_CODEC_ID_MP2 = 0x15000,
|
||||
|
@ -532,6 +538,11 @@ enum AVCodecID {
|
|||
AV_CODEC_ID_MISC4,
|
||||
AV_CODEC_ID_APAC,
|
||||
AV_CODEC_ID_FTR,
|
||||
AV_CODEC_ID_WAVARC,
|
||||
AV_CODEC_ID_RKA,
|
||||
AV_CODEC_ID_AC4,
|
||||
AV_CODEC_ID_OSQ,
|
||||
AV_CODEC_ID_QOA,
|
||||
|
||||
/* subtitle codecs */
|
||||
AV_CODEC_ID_FIRST_SUBTITLE = 0x17000, ///< A dummy ID pointing at the start of subtitle codecs.
|
||||
|
@ -576,6 +587,7 @@ enum AVCodecID {
|
|||
AV_CODEC_ID_DVD_NAV,
|
||||
AV_CODEC_ID_TIMED_ID3,
|
||||
AV_CODEC_ID_BIN_DATA,
|
||||
AV_CODEC_ID_SMPTE_2038,
|
||||
|
||||
|
||||
AV_CODEC_ID_PROBE = 0x19000, ///< codec_id is not known (like AV_CODEC_ID_NONE) but lavf should attempt to identify it
|
||||
|
@ -586,6 +598,16 @@ enum AVCodecID {
|
|||
* stream (only used by libavformat) */
|
||||
AV_CODEC_ID_FFMETADATA = 0x21000, ///< Dummy codec for streams containing only metadata information.
|
||||
AV_CODEC_ID_WRAPPED_AVFRAME = 0x21001, ///< Passthrough codec, AVFrames wrapped in AVPacket
|
||||
/**
|
||||
* Dummy null video codec, useful mainly for development and debugging.
|
||||
* Null encoder/decoder discard all input and never return any output.
|
||||
*/
|
||||
AV_CODEC_ID_VNULL,
|
||||
/**
|
||||
* Dummy null audio codec, useful mainly for development and debugging.
|
||||
* Null encoder/decoder discard all input and never return any output.
|
||||
*/
|
||||
AV_CODEC_ID_ANULL,
|
||||
};
|
||||
|
||||
/**
|
||||
|
|
57
ThirdParty/ffmpeg/include/libavcodec/codec_par.h
vendored
57
ThirdParty/ffmpeg/include/libavcodec/codec_par.h
vendored
|
@ -29,21 +29,14 @@
|
|||
#include "libavutil/pixfmt.h"
|
||||
|
||||
#include "codec_id.h"
|
||||
#include "defs.h"
|
||||
#include "packet.h"
|
||||
|
||||
/**
|
||||
* @addtogroup lavc_core
|
||||
* @{
|
||||
*/
|
||||
|
||||
enum AVFieldOrder {
|
||||
AV_FIELD_UNKNOWN,
|
||||
AV_FIELD_PROGRESSIVE,
|
||||
AV_FIELD_TT, ///< Top coded_first, top displayed first
|
||||
AV_FIELD_BB, ///< Bottom coded first, bottom displayed first
|
||||
AV_FIELD_TB, ///< Top coded first, bottom displayed first
|
||||
AV_FIELD_BT, ///< Bottom coded first, top displayed first
|
||||
};
|
||||
|
||||
/**
|
||||
* This struct describes the properties of an encoded stream.
|
||||
*
|
||||
|
@ -79,6 +72,19 @@ typedef struct AVCodecParameters {
|
|||
*/
|
||||
int extradata_size;
|
||||
|
||||
/**
|
||||
* Additional data associated with the entire stream.
|
||||
*
|
||||
* Should be allocated with av_packet_side_data_new() or
|
||||
* av_packet_side_data_add(), and will be freed by avcodec_parameters_free().
|
||||
*/
|
||||
AVPacketSideData *coded_side_data;
|
||||
|
||||
/**
|
||||
* Amount of entries in @ref coded_side_data.
|
||||
*/
|
||||
int nb_coded_side_data;
|
||||
|
||||
/**
|
||||
* - video: the pixel format, the value corresponds to enum AVPixelFormat.
|
||||
* - audio: the sample format, the value corresponds to enum AVSampleFormat.
|
||||
|
@ -137,6 +143,18 @@ typedef struct AVCodecParameters {
|
|||
*/
|
||||
AVRational sample_aspect_ratio;
|
||||
|
||||
/**
|
||||
* Video only. Number of frames per second, for streams with constant frame
|
||||
* durations. Should be set to { 0, 1 } when some frames have differing
|
||||
* durations or if the value is not known.
|
||||
*
|
||||
* @note This field correponds to values that are stored in codec-level
|
||||
* headers and is typically overridden by container/transport-layer
|
||||
* timestamps, when available. It should thus be used only as a last resort,
|
||||
* when no higher-level timing information is available.
|
||||
*/
|
||||
AVRational framerate;
|
||||
|
||||
/**
|
||||
* Video only. The order of the fields in interlaced video.
|
||||
*/
|
||||
|
@ -156,22 +174,10 @@ typedef struct AVCodecParameters {
|
|||
*/
|
||||
int video_delay;
|
||||
|
||||
#if FF_API_OLD_CHANNEL_LAYOUT
|
||||
/**
|
||||
* Audio only. The channel layout bitmask. May be 0 if the channel layout is
|
||||
* unknown or unspecified, otherwise the number of bits set must be equal to
|
||||
* the channels field.
|
||||
* @deprecated use ch_layout
|
||||
* Audio only. The channel layout and number of channels.
|
||||
*/
|
||||
attribute_deprecated
|
||||
uint64_t channel_layout;
|
||||
/**
|
||||
* Audio only. The number of audio channels.
|
||||
* @deprecated use ch_layout.nb_channels
|
||||
*/
|
||||
attribute_deprecated
|
||||
int channels;
|
||||
#endif
|
||||
AVChannelLayout ch_layout;
|
||||
/**
|
||||
* Audio only. The number of audio samples per second.
|
||||
*/
|
||||
|
@ -206,11 +212,6 @@ typedef struct AVCodecParameters {
|
|||
* Audio only. Number of samples to skip after a discontinuity.
|
||||
*/
|
||||
int seek_preroll;
|
||||
|
||||
/**
|
||||
* Audio only. The channel layout and number of channels.
|
||||
*/
|
||||
AVChannelLayout ch_layout;
|
||||
} AVCodecParameters;
|
||||
|
||||
/**
|
||||
|
|
|
@ -45,9 +45,6 @@
|
|||
* @{
|
||||
*/
|
||||
|
||||
#define FF_DXVA2_WORKAROUND_SCALING_LIST_ZIGZAG 1 ///< Work around for Direct3D11 and old UVD/UVD+ ATI video cards
|
||||
#define FF_DXVA2_WORKAROUND_INTEL_CLEARVIDEO 2 ///< Work around for Direct3D11 and old Intel GPUs with ClearVideo interface
|
||||
|
||||
/**
|
||||
* This structure is used to provides the necessary configurations and data
|
||||
* to the Direct3D11 FFmpeg HWAccel implementation.
|
||||
|
|
143
ThirdParty/ffmpeg/include/libavcodec/defs.h
vendored
143
ThirdParty/ffmpeg/include/libavcodec/defs.h
vendored
|
@ -61,6 +61,149 @@
|
|||
#define FF_COMPLIANCE_UNOFFICIAL -1 ///< Allow unofficial extensions
|
||||
#define FF_COMPLIANCE_EXPERIMENTAL -2 ///< Allow nonstandardized experimental things.
|
||||
|
||||
|
||||
#define AV_PROFILE_UNKNOWN -99
|
||||
#define AV_PROFILE_RESERVED -100
|
||||
|
||||
#define AV_PROFILE_AAC_MAIN 0
|
||||
#define AV_PROFILE_AAC_LOW 1
|
||||
#define AV_PROFILE_AAC_SSR 2
|
||||
#define AV_PROFILE_AAC_LTP 3
|
||||
#define AV_PROFILE_AAC_HE 4
|
||||
#define AV_PROFILE_AAC_HE_V2 28
|
||||
#define AV_PROFILE_AAC_LD 22
|
||||
#define AV_PROFILE_AAC_ELD 38
|
||||
#define AV_PROFILE_MPEG2_AAC_LOW 128
|
||||
#define AV_PROFILE_MPEG2_AAC_HE 131
|
||||
|
||||
#define AV_PROFILE_DNXHD 0
|
||||
#define AV_PROFILE_DNXHR_LB 1
|
||||
#define AV_PROFILE_DNXHR_SQ 2
|
||||
#define AV_PROFILE_DNXHR_HQ 3
|
||||
#define AV_PROFILE_DNXHR_HQX 4
|
||||
#define AV_PROFILE_DNXHR_444 5
|
||||
|
||||
#define AV_PROFILE_DTS 20
|
||||
#define AV_PROFILE_DTS_ES 30
|
||||
#define AV_PROFILE_DTS_96_24 40
|
||||
#define AV_PROFILE_DTS_HD_HRA 50
|
||||
#define AV_PROFILE_DTS_HD_MA 60
|
||||
#define AV_PROFILE_DTS_EXPRESS 70
|
||||
#define AV_PROFILE_DTS_HD_MA_X 61
|
||||
#define AV_PROFILE_DTS_HD_MA_X_IMAX 62
|
||||
|
||||
#define AV_PROFILE_EAC3_DDP_ATMOS 30
|
||||
|
||||
#define AV_PROFILE_TRUEHD_ATMOS 30
|
||||
|
||||
#define AV_PROFILE_MPEG2_422 0
|
||||
#define AV_PROFILE_MPEG2_HIGH 1
|
||||
#define AV_PROFILE_MPEG2_SS 2
|
||||
#define AV_PROFILE_MPEG2_SNR_SCALABLE 3
|
||||
#define AV_PROFILE_MPEG2_MAIN 4
|
||||
#define AV_PROFILE_MPEG2_SIMPLE 5
|
||||
|
||||
#define AV_PROFILE_H264_CONSTRAINED (1<<9) // 8+1; constraint_set1_flag
|
||||
#define AV_PROFILE_H264_INTRA (1<<11) // 8+3; constraint_set3_flag
|
||||
|
||||
#define AV_PROFILE_H264_BASELINE 66
|
||||
#define AV_PROFILE_H264_CONSTRAINED_BASELINE (66|AV_PROFILE_H264_CONSTRAINED)
|
||||
#define AV_PROFILE_H264_MAIN 77
|
||||
#define AV_PROFILE_H264_EXTENDED 88
|
||||
#define AV_PROFILE_H264_HIGH 100
|
||||
#define AV_PROFILE_H264_HIGH_10 110
|
||||
#define AV_PROFILE_H264_HIGH_10_INTRA (110|AV_PROFILE_H264_INTRA)
|
||||
#define AV_PROFILE_H264_MULTIVIEW_HIGH 118
|
||||
#define AV_PROFILE_H264_HIGH_422 122
|
||||
#define AV_PROFILE_H264_HIGH_422_INTRA (122|AV_PROFILE_H264_INTRA)
|
||||
#define AV_PROFILE_H264_STEREO_HIGH 128
|
||||
#define AV_PROFILE_H264_HIGH_444 144
|
||||
#define AV_PROFILE_H264_HIGH_444_PREDICTIVE 244
|
||||
#define AV_PROFILE_H264_HIGH_444_INTRA (244|AV_PROFILE_H264_INTRA)
|
||||
#define AV_PROFILE_H264_CAVLC_444 44
|
||||
|
||||
#define AV_PROFILE_VC1_SIMPLE 0
|
||||
#define AV_PROFILE_VC1_MAIN 1
|
||||
#define AV_PROFILE_VC1_COMPLEX 2
|
||||
#define AV_PROFILE_VC1_ADVANCED 3
|
||||
|
||||
#define AV_PROFILE_MPEG4_SIMPLE 0
|
||||
#define AV_PROFILE_MPEG4_SIMPLE_SCALABLE 1
|
||||
#define AV_PROFILE_MPEG4_CORE 2
|
||||
#define AV_PROFILE_MPEG4_MAIN 3
|
||||
#define AV_PROFILE_MPEG4_N_BIT 4
|
||||
#define AV_PROFILE_MPEG4_SCALABLE_TEXTURE 5
|
||||
#define AV_PROFILE_MPEG4_SIMPLE_FACE_ANIMATION 6
|
||||
#define AV_PROFILE_MPEG4_BASIC_ANIMATED_TEXTURE 7
|
||||
#define AV_PROFILE_MPEG4_HYBRID 8
|
||||
#define AV_PROFILE_MPEG4_ADVANCED_REAL_TIME 9
|
||||
#define AV_PROFILE_MPEG4_CORE_SCALABLE 10
|
||||
#define AV_PROFILE_MPEG4_ADVANCED_CODING 11
|
||||
#define AV_PROFILE_MPEG4_ADVANCED_CORE 12
|
||||
#define AV_PROFILE_MPEG4_ADVANCED_SCALABLE_TEXTURE 13
|
||||
#define AV_PROFILE_MPEG4_SIMPLE_STUDIO 14
|
||||
#define AV_PROFILE_MPEG4_ADVANCED_SIMPLE 15
|
||||
|
||||
#define AV_PROFILE_JPEG2000_CSTREAM_RESTRICTION_0 1
|
||||
#define AV_PROFILE_JPEG2000_CSTREAM_RESTRICTION_1 2
|
||||
#define AV_PROFILE_JPEG2000_CSTREAM_NO_RESTRICTION 32768
|
||||
#define AV_PROFILE_JPEG2000_DCINEMA_2K 3
|
||||
#define AV_PROFILE_JPEG2000_DCINEMA_4K 4
|
||||
|
||||
#define AV_PROFILE_VP9_0 0
|
||||
#define AV_PROFILE_VP9_1 1
|
||||
#define AV_PROFILE_VP9_2 2
|
||||
#define AV_PROFILE_VP9_3 3
|
||||
|
||||
#define AV_PROFILE_HEVC_MAIN 1
|
||||
#define AV_PROFILE_HEVC_MAIN_10 2
|
||||
#define AV_PROFILE_HEVC_MAIN_STILL_PICTURE 3
|
||||
#define AV_PROFILE_HEVC_REXT 4
|
||||
#define AV_PROFILE_HEVC_SCC 9
|
||||
|
||||
#define AV_PROFILE_VVC_MAIN_10 1
|
||||
#define AV_PROFILE_VVC_MAIN_10_444 33
|
||||
|
||||
#define AV_PROFILE_AV1_MAIN 0
|
||||
#define AV_PROFILE_AV1_HIGH 1
|
||||
#define AV_PROFILE_AV1_PROFESSIONAL 2
|
||||
|
||||
#define AV_PROFILE_MJPEG_HUFFMAN_BASELINE_DCT 0xc0
|
||||
#define AV_PROFILE_MJPEG_HUFFMAN_EXTENDED_SEQUENTIAL_DCT 0xc1
|
||||
#define AV_PROFILE_MJPEG_HUFFMAN_PROGRESSIVE_DCT 0xc2
|
||||
#define AV_PROFILE_MJPEG_HUFFMAN_LOSSLESS 0xc3
|
||||
#define AV_PROFILE_MJPEG_JPEG_LS 0xf7
|
||||
|
||||
#define AV_PROFILE_SBC_MSBC 1
|
||||
|
||||
#define AV_PROFILE_PRORES_PROXY 0
|
||||
#define AV_PROFILE_PRORES_LT 1
|
||||
#define AV_PROFILE_PRORES_STANDARD 2
|
||||
#define AV_PROFILE_PRORES_HQ 3
|
||||
#define AV_PROFILE_PRORES_4444 4
|
||||
#define AV_PROFILE_PRORES_XQ 5
|
||||
|
||||
#define AV_PROFILE_ARIB_PROFILE_A 0
|
||||
#define AV_PROFILE_ARIB_PROFILE_C 1
|
||||
|
||||
#define AV_PROFILE_KLVA_SYNC 0
|
||||
#define AV_PROFILE_KLVA_ASYNC 1
|
||||
|
||||
#define AV_PROFILE_EVC_BASELINE 0
|
||||
#define AV_PROFILE_EVC_MAIN 1
|
||||
|
||||
|
||||
#define AV_LEVEL_UNKNOWN -99
|
||||
|
||||
enum AVFieldOrder {
|
||||
AV_FIELD_UNKNOWN,
|
||||
AV_FIELD_PROGRESSIVE,
|
||||
AV_FIELD_TT, ///< Top coded_first, top displayed first
|
||||
AV_FIELD_BB, ///< Bottom coded first, bottom displayed first
|
||||
AV_FIELD_TB, ///< Top coded first, bottom displayed first
|
||||
AV_FIELD_BT, ///< Bottom coded first, top displayed first
|
||||
};
|
||||
|
||||
/**
|
||||
* @ingroup lavc_decoding
|
||||
*/
|
||||
|
|
6
ThirdParty/ffmpeg/include/libavcodec/dirac.h
vendored
6
ThirdParty/ffmpeg/include/libavcodec/dirac.h
vendored
|
@ -31,7 +31,11 @@
|
|||
* @author Jordi Ortiz
|
||||
*/
|
||||
|
||||
#include "avcodec.h"
|
||||
#include <stddef.h>
|
||||
#include <stdint.h>
|
||||
|
||||
#include "libavutil/pixfmt.h"
|
||||
#include "libavutil/rational.h"
|
||||
|
||||
/**
|
||||
* The spec limits the number of wavelet decompositions to 4 for both
|
||||
|
|
3
ThirdParty/ffmpeg/include/libavcodec/dxva2.h
vendored
3
ThirdParty/ffmpeg/include/libavcodec/dxva2.h
vendored
|
@ -45,9 +45,6 @@
|
|||
* @{
|
||||
*/
|
||||
|
||||
#define FF_DXVA2_WORKAROUND_SCALING_LIST_ZIGZAG 1 ///< Work around for DXVA2 and old UVD/UVD+ ATI video cards
|
||||
#define FF_DXVA2_WORKAROUND_INTEL_CLEARVIDEO 2 ///< Work around for DXVA2 and old Intel GPUs with ClearVideo interface
|
||||
|
||||
/**
|
||||
* This structure is used to provides the necessary configurations and data
|
||||
* to the DXVA2 FFmpeg HWAccel implementation.
|
||||
|
|
21
ThirdParty/ffmpeg/include/libavcodec/jni.h
vendored
21
ThirdParty/ffmpeg/include/libavcodec/jni.h
vendored
|
@ -43,4 +43,25 @@ int av_jni_set_java_vm(void *vm, void *log_ctx);
|
|||
*/
|
||||
void *av_jni_get_java_vm(void *log_ctx);
|
||||
|
||||
/*
|
||||
* Set the Android application context which will be used to retrieve the Android
|
||||
* content resolver to handle content uris.
|
||||
*
|
||||
* This function is only available on Android.
|
||||
*
|
||||
* @param app_ctx global JNI reference to the Android application context
|
||||
* @return 0 on success, < 0 otherwise
|
||||
*/
|
||||
int av_jni_set_android_app_ctx(void *app_ctx, void *log_ctx);
|
||||
|
||||
/*
|
||||
* Get the Android application context that has been set with
|
||||
* av_jni_set_android_app_ctx.
|
||||
*
|
||||
* This function is only available on Android.
|
||||
*
|
||||
* @return a pointer the the Android application context
|
||||
*/
|
||||
void *av_jni_get_android_app_ctx(void);
|
||||
|
||||
#endif /* AVCODEC_JNI_H */
|
||||
|
|
163
ThirdParty/ffmpeg/include/libavcodec/packet.h
vendored
163
ThirdParty/ffmpeg/include/libavcodec/packet.h
vendored
|
@ -33,9 +33,9 @@
|
|||
#include "libavcodec/version_major.h"
|
||||
|
||||
/**
|
||||
* @defgroup lavc_packet AVPacket
|
||||
* @defgroup lavc_packet_side_data AVPacketSideData
|
||||
*
|
||||
* Types and functions for working with AVPacket.
|
||||
* Types and functions for working with AVPacketSideData.
|
||||
* @{
|
||||
*/
|
||||
enum AVPacketSideDataType {
|
||||
|
@ -161,7 +161,7 @@ enum AVPacketSideDataType {
|
|||
* the packet may contain "dual mono" audio specific to Japanese DTV
|
||||
* and if it is true, recommends only the selected channel to be used.
|
||||
* @code
|
||||
* u8 selected channels (0=mail/left, 1=sub/right, 2=both)
|
||||
* u8 selected channels (0=main/left, 1=sub/right, 2=both)
|
||||
* @endcode
|
||||
*/
|
||||
AV_PKT_DATA_JP_DUALMONO,
|
||||
|
@ -299,6 +299,37 @@ enum AVPacketSideDataType {
|
|||
*/
|
||||
AV_PKT_DATA_DYNAMIC_HDR10_PLUS,
|
||||
|
||||
/**
|
||||
* IAMF Mix Gain Parameter Data associated with the audio frame. This metadata
|
||||
* is in the form of the AVIAMFParamDefinition struct and contains information
|
||||
* defined in sections 3.6.1 and 3.8.1 of the Immersive Audio Model and
|
||||
* Formats standard.
|
||||
*/
|
||||
AV_PKT_DATA_IAMF_MIX_GAIN_PARAM,
|
||||
|
||||
/**
|
||||
* IAMF Demixing Info Parameter Data associated with the audio frame. This
|
||||
* metadata is in the form of the AVIAMFParamDefinition struct and contains
|
||||
* information defined in sections 3.6.1 and 3.8.2 of the Immersive Audio Model
|
||||
* and Formats standard.
|
||||
*/
|
||||
AV_PKT_DATA_IAMF_DEMIXING_INFO_PARAM,
|
||||
|
||||
/**
|
||||
* IAMF Recon Gain Info Parameter Data associated with the audio frame. This
|
||||
* metadata is in the form of the AVIAMFParamDefinition struct and contains
|
||||
* information defined in sections 3.6.1 and 3.8.3 of the Immersive Audio Model
|
||||
* and Formats standard.
|
||||
*/
|
||||
AV_PKT_DATA_IAMF_RECON_GAIN_INFO_PARAM,
|
||||
|
||||
/**
|
||||
* Ambient viewing environment metadata, as defined by H.274. This metadata
|
||||
* should be associated with a video stream and contains data in the form
|
||||
* of the AVAmbientViewingEnvironment struct.
|
||||
*/
|
||||
AV_PKT_DATA_AMBIENT_VIEWING_ENVIRONMENT,
|
||||
|
||||
/**
|
||||
* The number of side data types.
|
||||
* This is not part of the public API/ABI in the sense that it may
|
||||
|
@ -312,12 +343,129 @@ enum AVPacketSideDataType {
|
|||
|
||||
#define AV_PKT_DATA_QUALITY_FACTOR AV_PKT_DATA_QUALITY_STATS //DEPRECATED
|
||||
|
||||
/**
|
||||
* This structure stores auxiliary information for decoding, presenting, or
|
||||
* otherwise processing the coded stream. It is typically exported by demuxers
|
||||
* and encoders and can be fed to decoders and muxers either in a per packet
|
||||
* basis, or as global side data (applying to the entire coded stream).
|
||||
*
|
||||
* Global side data is handled as follows:
|
||||
* - During demuxing, it may be exported through
|
||||
* @ref AVStream.codecpar.side_data "AVStream's codec parameters", which can
|
||||
* then be passed as input to decoders through the
|
||||
* @ref AVCodecContext.coded_side_data "decoder context's side data", for
|
||||
* initialization.
|
||||
* - For muxing, it can be fed through @ref AVStream.codecpar.side_data
|
||||
* "AVStream's codec parameters", typically the output of encoders through
|
||||
* the @ref AVCodecContext.coded_side_data "encoder context's side data", for
|
||||
* initialization.
|
||||
*
|
||||
* Packet specific side data is handled as follows:
|
||||
* - During demuxing, it may be exported through @ref AVPacket.side_data
|
||||
* "AVPacket's side data", which can then be passed as input to decoders.
|
||||
* - For muxing, it can be fed through @ref AVPacket.side_data "AVPacket's
|
||||
* side data", typically the output of encoders.
|
||||
*
|
||||
* Different modules may accept or export different types of side data
|
||||
* depending on media type and codec. Refer to @ref AVPacketSideDataType for a
|
||||
* list of defined types and where they may be found or used.
|
||||
*/
|
||||
typedef struct AVPacketSideData {
|
||||
uint8_t *data;
|
||||
size_t size;
|
||||
enum AVPacketSideDataType type;
|
||||
} AVPacketSideData;
|
||||
|
||||
/**
|
||||
* Allocate a new packet side data.
|
||||
*
|
||||
* @param sd pointer to an array of side data to which the side data should
|
||||
* be added. *sd may be NULL, in which case the array will be
|
||||
* initialized.
|
||||
* @param nb_sd pointer to an integer containing the number of entries in
|
||||
* the array. The integer value will be increased by 1 on success.
|
||||
* @param type side data type
|
||||
* @param size desired side data size
|
||||
* @param flags currently unused. Must be zero
|
||||
*
|
||||
* @return pointer to freshly allocated side data on success, or NULL otherwise.
|
||||
*/
|
||||
AVPacketSideData *av_packet_side_data_new(AVPacketSideData **psd, int *pnb_sd,
|
||||
enum AVPacketSideDataType type,
|
||||
size_t size, int flags);
|
||||
|
||||
/**
|
||||
* Wrap existing data as packet side data.
|
||||
*
|
||||
* @param sd pointer to an array of side data to which the side data should
|
||||
* be added. *sd may be NULL, in which case the array will be
|
||||
* initialized
|
||||
* @param nb_sd pointer to an integer containing the number of entries in
|
||||
* the array. The integer value will be increased by 1 on success.
|
||||
* @param type side data type
|
||||
* @param data a data array. It must be allocated with the av_malloc() family
|
||||
* of functions. The ownership of the data is transferred to the
|
||||
* side data array on success
|
||||
* @param size size of the data array
|
||||
* @param flags currently unused. Must be zero
|
||||
*
|
||||
* @return pointer to freshly allocated side data on success, or NULL otherwise
|
||||
* On failure, the side data array is unchanged and the data remains
|
||||
* owned by the caller.
|
||||
*/
|
||||
AVPacketSideData *av_packet_side_data_add(AVPacketSideData **sd, int *nb_sd,
|
||||
enum AVPacketSideDataType type,
|
||||
void *data, size_t size, int flags);
|
||||
|
||||
/**
|
||||
* Get side information from a side data array.
|
||||
*
|
||||
* @param sd the array from which the side data should be fetched
|
||||
* @param nb_sd value containing the number of entries in the array.
|
||||
* @param type desired side information type
|
||||
*
|
||||
* @return pointer to side data if present or NULL otherwise
|
||||
*/
|
||||
const AVPacketSideData *av_packet_side_data_get(const AVPacketSideData *sd,
|
||||
int nb_sd,
|
||||
enum AVPacketSideDataType type);
|
||||
|
||||
/**
|
||||
* Remove side data of the given type from a side data array.
|
||||
*
|
||||
* @param sd the array from which the side data should be removed
|
||||
* @param nb_sd pointer to an integer containing the number of entries in
|
||||
* the array. Will be reduced by the amount of entries removed
|
||||
* upon return
|
||||
* @param type side information type
|
||||
*/
|
||||
void av_packet_side_data_remove(AVPacketSideData *sd, int *nb_sd,
|
||||
enum AVPacketSideDataType type);
|
||||
|
||||
/**
|
||||
* Convenience function to free all the side data stored in an array, and
|
||||
* the array itself.
|
||||
*
|
||||
* @param sd pointer to array of side data to free. Will be set to NULL
|
||||
* upon return.
|
||||
* @param nb_sd pointer to an integer containing the number of entries in
|
||||
* the array. Will be set to 0 upon return.
|
||||
*/
|
||||
void av_packet_side_data_free(AVPacketSideData **sd, int *nb_sd);
|
||||
|
||||
const char *av_packet_side_data_name(enum AVPacketSideDataType type);
|
||||
|
||||
/**
|
||||
* @}
|
||||
*/
|
||||
|
||||
/**
|
||||
* @defgroup lavc_packet AVPacket
|
||||
*
|
||||
* Types and functions for working with AVPacket.
|
||||
* @{
|
||||
*/
|
||||
|
||||
/**
|
||||
* This structure stores compressed data. It is typically exported by demuxers
|
||||
* and then passed as input to decoders, or received as output from encoders and
|
||||
|
@ -448,13 +596,6 @@ typedef struct AVPacketList {
|
|||
#define AV_PKT_FLAG_DISPOSABLE 0x0010
|
||||
|
||||
enum AVSideDataParamChangeFlags {
|
||||
#if FF_API_OLD_CHANNEL_LAYOUT
|
||||
/**
|
||||
* @deprecated those are not used by any decoder
|
||||
*/
|
||||
AV_SIDE_DATA_PARAM_CHANGE_CHANNEL_COUNT = 0x0001,
|
||||
AV_SIDE_DATA_PARAM_CHANGE_CHANNEL_LAYOUT = 0x0002,
|
||||
#endif
|
||||
AV_SIDE_DATA_PARAM_CHANGE_SAMPLE_RATE = 0x0004,
|
||||
AV_SIDE_DATA_PARAM_CHANGE_DIMENSIONS = 0x0008,
|
||||
};
|
||||
|
@ -603,8 +744,6 @@ int av_packet_shrink_side_data(AVPacket *pkt, enum AVPacketSideDataType type,
|
|||
uint8_t* av_packet_get_side_data(const AVPacket *pkt, enum AVPacketSideDataType type,
|
||||
size_t *size);
|
||||
|
||||
const char *av_packet_side_data_name(enum AVPacketSideDataType type);
|
||||
|
||||
/**
|
||||
* Pack a dictionary for use in side_data.
|
||||
*
|
||||
|
|
24
ThirdParty/ffmpeg/include/libavcodec/vdpau.h
vendored
24
ThirdParty/ffmpeg/include/libavcodec/vdpau.h
vendored
|
@ -66,16 +66,14 @@ typedef int (*AVVDPAU_Render2)(struct AVCodecContext *, struct AVFrame *,
|
|||
/**
|
||||
* This structure is used to share data between the libavcodec library and
|
||||
* the client video application.
|
||||
* The user shall allocate the structure via the av_alloc_vdpau_hwaccel
|
||||
* function and make it available as
|
||||
* AVCodecContext.hwaccel_context. Members can be set by the user once
|
||||
* This structure will be allocated and stored in AVCodecContext.hwaccel_context
|
||||
* by av_vdpau_bind_context(). Members can be set by the user once
|
||||
* during initialization or through each AVCodecContext.get_buffer()
|
||||
* function call. In any case, they must be valid prior to calling
|
||||
* decoding functions.
|
||||
*
|
||||
* The size of this structure is not a part of the public ABI and must not
|
||||
* be used outside of libavcodec. Use av_vdpau_alloc_context() to allocate an
|
||||
* AVVDPAUContext.
|
||||
* be used outside of libavcodec.
|
||||
*/
|
||||
typedef struct AVVDPAUContext {
|
||||
/**
|
||||
|
@ -95,15 +93,27 @@ typedef struct AVVDPAUContext {
|
|||
AVVDPAU_Render2 render2;
|
||||
} AVVDPAUContext;
|
||||
|
||||
#if FF_API_VDPAU_ALLOC_GET_SET
|
||||
/**
|
||||
* @brief allocation function for AVVDPAUContext
|
||||
*
|
||||
* Allows extending the struct without breaking API/ABI
|
||||
* @deprecated use av_vdpau_bind_context() instead
|
||||
*/
|
||||
attribute_deprecated
|
||||
AVVDPAUContext *av_alloc_vdpaucontext(void);
|
||||
|
||||
/**
|
||||
* @deprecated render2 is public and can be accessed directly
|
||||
*/
|
||||
attribute_deprecated
|
||||
AVVDPAU_Render2 av_vdpau_hwaccel_get_render2(const AVVDPAUContext *);
|
||||
/**
|
||||
* @deprecated render2 is public and can be accessed directly
|
||||
*/
|
||||
attribute_deprecated
|
||||
void av_vdpau_hwaccel_set_render2(AVVDPAUContext *, AVVDPAU_Render2);
|
||||
#endif
|
||||
|
||||
/**
|
||||
* Associate a VDPAU device with a codec context for hardware acceleration.
|
||||
|
@ -145,12 +155,16 @@ int av_vdpau_bind_context(AVCodecContext *avctx, VdpDevice device,
|
|||
int av_vdpau_get_surface_parameters(AVCodecContext *avctx, VdpChromaType *type,
|
||||
uint32_t *width, uint32_t *height);
|
||||
|
||||
#if FF_API_VDPAU_ALLOC_GET_SET
|
||||
/**
|
||||
* Allocate an AVVDPAUContext.
|
||||
*
|
||||
* @return Newly-allocated AVVDPAUContext or NULL on failure.
|
||||
* @deprecated use av_vdpau_bind_context() instead
|
||||
*/
|
||||
attribute_deprecated
|
||||
AVVDPAUContext *av_vdpau_alloc_context(void);
|
||||
#endif
|
||||
|
||||
/** @} */
|
||||
|
||||
|
|
|
@ -29,8 +29,8 @@
|
|||
|
||||
#include "version_major.h"
|
||||
|
||||
#define LIBAVCODEC_VERSION_MINOR 50
|
||||
#define LIBAVCODEC_VERSION_MICRO 101
|
||||
#define LIBAVCODEC_VERSION_MINOR 3
|
||||
#define LIBAVCODEC_VERSION_MICRO 100
|
||||
|
||||
#define LIBAVCODEC_VERSION_INT AV_VERSION_INT(LIBAVCODEC_VERSION_MAJOR, \
|
||||
LIBAVCODEC_VERSION_MINOR, \
|
||||
|
|
|
@ -25,7 +25,7 @@
|
|||
* Libavcodec version macros.
|
||||
*/
|
||||
|
||||
#define LIBAVCODEC_VERSION_MAJOR 59
|
||||
#define LIBAVCODEC_VERSION_MAJOR 61
|
||||
|
||||
/**
|
||||
* FF_API_* defines may be placed below to indicate public API that will be
|
||||
|
@ -37,21 +37,15 @@
|
|||
* at once through the bump. This improves the git bisect-ability of the change.
|
||||
*/
|
||||
|
||||
#define FF_API_OPENH264_SLICE_MODE (LIBAVCODEC_VERSION_MAJOR < 60)
|
||||
#define FF_API_OPENH264_CABAC (LIBAVCODEC_VERSION_MAJOR < 60)
|
||||
#define FF_API_UNUSED_CODEC_CAPS (LIBAVCODEC_VERSION_MAJOR < 60)
|
||||
#define FF_API_THREAD_SAFE_CALLBACKS (LIBAVCODEC_VERSION_MAJOR < 60)
|
||||
#define FF_API_DEBUG_MV (LIBAVCODEC_VERSION_MAJOR < 60)
|
||||
#define FF_API_GET_FRAME_CLASS (LIBAVCODEC_VERSION_MAJOR < 60)
|
||||
#define FF_API_AUTO_THREADS (LIBAVCODEC_VERSION_MAJOR < 60)
|
||||
#define FF_API_INIT_PACKET (LIBAVCODEC_VERSION_MAJOR < 60)
|
||||
#define FF_API_AVCTX_TIMEBASE (LIBAVCODEC_VERSION_MAJOR < 60)
|
||||
#define FF_API_FLAG_TRUNCATED (LIBAVCODEC_VERSION_MAJOR < 60)
|
||||
#define FF_API_SUB_TEXT_FORMAT (LIBAVCODEC_VERSION_MAJOR < 60)
|
||||
#define FF_API_IDCT_NONE (LIBAVCODEC_VERSION_MAJOR < 60)
|
||||
#define FF_API_SVTAV1_OPTS (LIBAVCODEC_VERSION_MAJOR < 60)
|
||||
#define FF_API_AYUV_CODECID (LIBAVCODEC_VERSION_MAJOR < 60)
|
||||
#define FF_API_VT_OUTPUT_CALLBACK (LIBAVCODEC_VERSION_MAJOR < 60)
|
||||
#define FF_API_AVCODEC_CHROMA_POS (LIBAVCODEC_VERSION_MAJOR < 60)
|
||||
#define FF_API_INIT_PACKET (LIBAVCODEC_VERSION_MAJOR < 62)
|
||||
#define FF_API_SUBFRAMES (LIBAVCODEC_VERSION_MAJOR < 62)
|
||||
#define FF_API_TICKS_PER_FRAME (LIBAVCODEC_VERSION_MAJOR < 62)
|
||||
#define FF_API_DROPCHANGED (LIBAVCODEC_VERSION_MAJOR < 62)
|
||||
|
||||
#define FF_API_AVFFT (LIBAVCODEC_VERSION_MAJOR < 62)
|
||||
#define FF_API_FF_PROFILE_LEVEL (LIBAVCODEC_VERSION_MAJOR < 62)
|
||||
#define FF_API_AVCODEC_CLOSE (LIBAVCODEC_VERSION_MAJOR < 62)
|
||||
#define FF_API_BUFFER_MIN_SIZE (LIBAVCODEC_VERSION_MAJOR < 62)
|
||||
#define FF_API_VDPAU_ALLOC_GET_SET (LIBAVCODEC_VERSION_MAJOR < 62)
|
||||
|
||||
#endif /* AVCODEC_VERSION_MAJOR_H */
|
||||
|
|
|
@ -57,19 +57,9 @@
|
|||
typedef struct AVVideotoolboxContext {
|
||||
/**
|
||||
* Videotoolbox decompression session object.
|
||||
* Created and freed the caller.
|
||||
*/
|
||||
VTDecompressionSessionRef session;
|
||||
|
||||
#if FF_API_VT_OUTPUT_CALLBACK
|
||||
/**
|
||||
* The output callback that must be passed to the session.
|
||||
* Set by av_videottoolbox_default_init()
|
||||
*/
|
||||
attribute_deprecated
|
||||
VTDecompressionOutputCallback output_callback;
|
||||
#endif
|
||||
|
||||
/**
|
||||
* CVPixelBuffer Format Type that Videotoolbox will use for decoded frames.
|
||||
* set by the caller. If this is set to 0, then no specific format is
|
||||
|
@ -79,61 +69,15 @@ typedef struct AVVideotoolboxContext {
|
|||
|
||||
/**
|
||||
* CoreMedia Format Description that Videotoolbox will use to create the decompression session.
|
||||
* Set by the caller.
|
||||
*/
|
||||
CMVideoFormatDescriptionRef cm_fmt_desc;
|
||||
|
||||
/**
|
||||
* CoreMedia codec type that Videotoolbox will use to create the decompression session.
|
||||
* Set by the caller.
|
||||
*/
|
||||
int cm_codec_type;
|
||||
} AVVideotoolboxContext;
|
||||
|
||||
/**
|
||||
* Allocate and initialize a Videotoolbox context.
|
||||
*
|
||||
* This function should be called from the get_format() callback when the caller
|
||||
* selects the AV_PIX_FMT_VIDETOOLBOX format. The caller must then create
|
||||
* the decoder object (using the output callback provided by libavcodec) that
|
||||
* will be used for Videotoolbox-accelerated decoding.
|
||||
*
|
||||
* When decoding with Videotoolbox is finished, the caller must destroy the decoder
|
||||
* object and free the Videotoolbox context using av_free().
|
||||
*
|
||||
* @return the newly allocated context or NULL on failure
|
||||
*/
|
||||
AVVideotoolboxContext *av_videotoolbox_alloc_context(void);
|
||||
|
||||
/**
|
||||
* This is a convenience function that creates and sets up the Videotoolbox context using
|
||||
* an internal implementation.
|
||||
*
|
||||
* @param avctx the corresponding codec context
|
||||
*
|
||||
* @return >= 0 on success, a negative AVERROR code on failure
|
||||
*/
|
||||
int av_videotoolbox_default_init(AVCodecContext *avctx);
|
||||
|
||||
/**
|
||||
* This is a convenience function that creates and sets up the Videotoolbox context using
|
||||
* an internal implementation.
|
||||
*
|
||||
* @param avctx the corresponding codec context
|
||||
* @param vtctx the Videotoolbox context to use
|
||||
*
|
||||
* @return >= 0 on success, a negative AVERROR code on failure
|
||||
*/
|
||||
int av_videotoolbox_default_init2(AVCodecContext *avctx, AVVideotoolboxContext *vtctx);
|
||||
|
||||
/**
|
||||
* This function must be called to free the Videotoolbox context initialized with
|
||||
* av_videotoolbox_default_init().
|
||||
*
|
||||
* @param avctx the corresponding codec context
|
||||
*/
|
||||
void av_videotoolbox_default_free(AVCodecContext *avctx);
|
||||
|
||||
/**
|
||||
* @}
|
||||
*/
|
||||
|
|
839
ThirdParty/ffmpeg/include/libavformat/avformat.h
vendored
839
ThirdParty/ffmpeg/include/libavformat/avformat.h
vendored
File diff suppressed because it is too large
Load diff
24
ThirdParty/ffmpeg/include/libavformat/avio.h
vendored
24
ThirdParty/ffmpeg/include/libavformat/avio.h
vendored
|
@ -101,13 +101,7 @@ typedef struct AVIODirEntry {
|
|||
int64_t filemode; /**< Unix file mode, -1 if unknown. */
|
||||
} AVIODirEntry;
|
||||
|
||||
#if FF_API_AVIODIRCONTEXT
|
||||
typedef struct AVIODirContext {
|
||||
struct URLContext *url_context;
|
||||
} AVIODirContext;
|
||||
#else
|
||||
typedef struct AVIODirContext AVIODirContext;
|
||||
#endif
|
||||
|
||||
/**
|
||||
* Different data types that can be returned via the AVIO
|
||||
|
@ -238,7 +232,7 @@ typedef struct AVIOContext {
|
|||
void *opaque; /**< A private pointer, passed to the read/write/seek/...
|
||||
functions. */
|
||||
int (*read_packet)(void *opaque, uint8_t *buf, int buf_size);
|
||||
int (*write_packet)(void *opaque, uint8_t *buf, int buf_size);
|
||||
int (*write_packet)(void *opaque, const uint8_t *buf, int buf_size);
|
||||
int64_t (*seek)(void *opaque, int64_t offset, int whence);
|
||||
int64_t pos; /**< position in the file of the current buffer */
|
||||
int eof_reached; /**< true if was unable to read due to error or eof */
|
||||
|
@ -286,7 +280,7 @@ typedef struct AVIOContext {
|
|||
/**
|
||||
* A callback that is used instead of write_packet.
|
||||
*/
|
||||
int (*write_data_type)(void *opaque, uint8_t *buf, int buf_size,
|
||||
int (*write_data_type)(void *opaque, const uint8_t *buf, int buf_size,
|
||||
enum AVIODataMarkerType type, int64_t time);
|
||||
/**
|
||||
* If set, don't call write_data_type separately for AVIO_DATA_MARKER_BOUNDARY_POINT,
|
||||
|
@ -295,16 +289,6 @@ typedef struct AVIOContext {
|
|||
*/
|
||||
int ignore_boundary_point;
|
||||
|
||||
#if FF_API_AVIOCONTEXT_WRITTEN
|
||||
/**
|
||||
* @deprecated field utilized privately by libavformat. For a public
|
||||
* statistic of how many bytes were written out, see
|
||||
* AVIOContext::bytes_written.
|
||||
*/
|
||||
attribute_deprecated
|
||||
int64_t written;
|
||||
#endif
|
||||
|
||||
/**
|
||||
* Maximum reached position before a backward seek in the write buffer,
|
||||
* used keeping track of already written data for a later flush.
|
||||
|
@ -417,7 +401,7 @@ AVIOContext *avio_alloc_context(
|
|||
int write_flag,
|
||||
void *opaque,
|
||||
int (*read_packet)(void *opaque, uint8_t *buf, int buf_size),
|
||||
int (*write_packet)(void *opaque, uint8_t *buf, int buf_size),
|
||||
int (*write_packet)(void *opaque, const uint8_t *buf, int buf_size),
|
||||
int64_t (*seek)(void *opaque, int64_t offset, int whence));
|
||||
|
||||
/**
|
||||
|
@ -541,7 +525,7 @@ int avio_printf(AVIOContext *s, const char *fmt, ...) av_printf_format(2, 3);
|
|||
* Usually you don't need to use this function directly but its macro wrapper,
|
||||
* avio_print.
|
||||
*/
|
||||
void avio_print_string_array(AVIOContext *s, const char *strings[]);
|
||||
void avio_print_string_array(AVIOContext *s, const char * const strings[]);
|
||||
|
||||
/**
|
||||
* Write strings (const char *) to the context.
|
||||
|
|
|
@ -31,8 +31,8 @@
|
|||
|
||||
#include "version_major.h"
|
||||
|
||||
#define LIBAVFORMAT_VERSION_MINOR 34
|
||||
#define LIBAVFORMAT_VERSION_MICRO 101
|
||||
#define LIBAVFORMAT_VERSION_MINOR 1
|
||||
#define LIBAVFORMAT_VERSION_MICRO 100
|
||||
|
||||
#define LIBAVFORMAT_VERSION_INT AV_VERSION_INT(LIBAVFORMAT_VERSION_MAJOR, \
|
||||
LIBAVFORMAT_VERSION_MINOR, \
|
||||
|
|
|
@ -29,7 +29,7 @@
|
|||
|
||||
// Major bumping may affect Ticket5467, 5421, 5451(compatibility with Chromium)
|
||||
// Also please add any ticket numbers that you believe might be affected here
|
||||
#define LIBAVFORMAT_VERSION_MAJOR 59
|
||||
#define LIBAVFORMAT_VERSION_MAJOR 61
|
||||
|
||||
/**
|
||||
* FF_API_* defines may be placed below to indicate public API that will be
|
||||
|
@ -41,14 +41,12 @@
|
|||
* at once through the bump. This improves the git bisect-ability of the change.
|
||||
*
|
||||
*/
|
||||
#define FF_API_LAVF_PRIV_OPT (LIBAVFORMAT_VERSION_MAJOR < 60)
|
||||
#define FF_API_COMPUTE_PKT_FIELDS2 (LIBAVFORMAT_VERSION_MAJOR < 60)
|
||||
#define FF_API_AVIOCONTEXT_WRITTEN (LIBAVFORMAT_VERSION_MAJOR < 60)
|
||||
#define FF_HLS_TS_OPTIONS (LIBAVFORMAT_VERSION_MAJOR < 60)
|
||||
#define FF_API_AVSTREAM_CLASS (LIBAVFORMAT_VERSION_MAJOR > 59)
|
||||
#define FF_API_GET_END_PTS (LIBAVFORMAT_VERSION_MAJOR < 60)
|
||||
#define FF_API_AVIODIRCONTEXT (LIBAVFORMAT_VERSION_MAJOR < 60)
|
||||
#define FF_API_COMPUTE_PKT_FIELDS2 (LIBAVFORMAT_VERSION_MAJOR < 62)
|
||||
#define FF_API_LAVF_SHORTEST (LIBAVFORMAT_VERSION_MAJOR < 62)
|
||||
#define FF_API_ALLOW_FLUSH (LIBAVFORMAT_VERSION_MAJOR < 62)
|
||||
#define FF_API_AVSTREAM_SIDE_DATA (LIBAVFORMAT_VERSION_MAJOR < 62)
|
||||
|
||||
#define FF_API_GET_DUR_ESTIMATE_METHOD (LIBAVFORMAT_VERSION_MAJOR < 62)
|
||||
|
||||
#define FF_API_R_FRAME_RATE 1
|
||||
|
||||
|
|
72
ThirdParty/ffmpeg/include/libavutil/ambient_viewing_environment.h
vendored
Normal file
72
ThirdParty/ffmpeg/include/libavutil/ambient_viewing_environment.h
vendored
Normal file
|
@ -0,0 +1,72 @@
|
|||
/*
|
||||
* Copyright (c) 2023 Jan Ekström <jeebjp@gmail.com>
|
||||
*
|
||||
* This file is part of FFmpeg.
|
||||
*
|
||||
* FFmpeg is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU Lesser General Public
|
||||
* License as published by the Free Software Foundation; either
|
||||
* version 2.1 of the License, or (at your option) any later version.
|
||||
*
|
||||
* FFmpeg is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
* Lesser General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Lesser General Public
|
||||
* License along with FFmpeg; if not, write to the Free Software
|
||||
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
|
||||
*/
|
||||
|
||||
#ifndef AVUTIL_AMBIENT_VIEWING_ENVIRONMENT_H
|
||||
#define AVUTIL_AMBIENT_VIEWING_ENVIRONMENT_H
|
||||
|
||||
#include <stddef.h>
|
||||
#include "frame.h"
|
||||
#include "rational.h"
|
||||
|
||||
/**
|
||||
* Ambient viewing environment metadata as defined by H.274. The values are
|
||||
* saved in AVRationals so that they keep their exactness, while allowing for
|
||||
* easy access to a double value with f.ex. av_q2d.
|
||||
*
|
||||
* @note sizeof(AVAmbientViewingEnvironment) is not part of the public ABI, and
|
||||
* it must be allocated using av_ambient_viewing_environment_alloc.
|
||||
*/
|
||||
typedef struct AVAmbientViewingEnvironment {
|
||||
/**
|
||||
* Environmental illuminance of the ambient viewing environment in lux.
|
||||
*/
|
||||
AVRational ambient_illuminance;
|
||||
|
||||
/**
|
||||
* Normalized x chromaticity coordinate of the environmental ambient light
|
||||
* in the nominal viewing environment according to the CIE 1931 definition
|
||||
* of x and y as specified in ISO/CIE 11664-1.
|
||||
*/
|
||||
AVRational ambient_light_x;
|
||||
|
||||
/**
|
||||
* Normalized y chromaticity coordinate of the environmental ambient light
|
||||
* in the nominal viewing environment according to the CIE 1931 definition
|
||||
* of x and y as specified in ISO/CIE 11664-1.
|
||||
*/
|
||||
AVRational ambient_light_y;
|
||||
} AVAmbientViewingEnvironment;
|
||||
|
||||
/**
|
||||
* Allocate an AVAmbientViewingEnvironment structure.
|
||||
*
|
||||
* @return the newly allocated struct or NULL on failure
|
||||
*/
|
||||
AVAmbientViewingEnvironment *av_ambient_viewing_environment_alloc(size_t *size);
|
||||
|
||||
/**
|
||||
* Allocate and add an AVAmbientViewingEnvironment structure to an existing
|
||||
* AVFrame as side data.
|
||||
*
|
||||
* @return the newly allocated struct, or NULL on failure
|
||||
*/
|
||||
AVAmbientViewingEnvironment *av_ambient_viewing_environment_create_side_data(AVFrame *frame);
|
||||
|
||||
#endif /* AVUTIL_AMBIENT_VIEWING_ENVIRONMENT_H */
|
|
@ -91,7 +91,7 @@ int av_audio_fifo_realloc(AVAudioFifo *af, int nb_samples);
|
|||
* code on failure. If successful, the number of samples
|
||||
* actually written will always be nb_samples.
|
||||
*/
|
||||
int av_audio_fifo_write(AVAudioFifo *af, void **data, int nb_samples);
|
||||
int av_audio_fifo_write(AVAudioFifo *af, void * const *data, int nb_samples);
|
||||
|
||||
/**
|
||||
* Peek data from an AVAudioFifo.
|
||||
|
@ -107,7 +107,7 @@ int av_audio_fifo_write(AVAudioFifo *af, void **data, int nb_samples);
|
|||
* be greater than nb_samples, and will only be less than
|
||||
* nb_samples if av_audio_fifo_size is less than nb_samples.
|
||||
*/
|
||||
int av_audio_fifo_peek(AVAudioFifo *af, void **data, int nb_samples);
|
||||
int av_audio_fifo_peek(const AVAudioFifo *af, void * const *data, int nb_samples);
|
||||
|
||||
/**
|
||||
* Peek data from an AVAudioFifo.
|
||||
|
@ -124,7 +124,8 @@ int av_audio_fifo_peek(AVAudioFifo *af, void **data, int nb_samples);
|
|||
* be greater than nb_samples, and will only be less than
|
||||
* nb_samples if av_audio_fifo_size is less than nb_samples.
|
||||
*/
|
||||
int av_audio_fifo_peek_at(AVAudioFifo *af, void **data, int nb_samples, int offset);
|
||||
int av_audio_fifo_peek_at(const AVAudioFifo *af, void * const *data,
|
||||
int nb_samples, int offset);
|
||||
|
||||
/**
|
||||
* Read data from an AVAudioFifo.
|
||||
|
@ -140,7 +141,7 @@ int av_audio_fifo_peek_at(AVAudioFifo *af, void **data, int nb_samples, int offs
|
|||
* be greater than nb_samples, and will only be less than
|
||||
* nb_samples if av_audio_fifo_size is less than nb_samples.
|
||||
*/
|
||||
int av_audio_fifo_read(AVAudioFifo *af, void **data, int nb_samples);
|
||||
int av_audio_fifo_read(AVAudioFifo *af, void * const *data, int nb_samples);
|
||||
|
||||
/**
|
||||
* Drain data from an AVAudioFifo.
|
||||
|
|
|
@ -28,6 +28,9 @@
|
|||
#define AVUTIL_AVASSERT_H
|
||||
|
||||
#include <stdlib.h>
|
||||
#ifdef HAVE_AV_CONFIG_H
|
||||
# include "config.h"
|
||||
#endif
|
||||
#include "log.h"
|
||||
#include "macros.h"
|
||||
|
||||
|
|
12
ThirdParty/ffmpeg/include/libavutil/avstring.h
vendored
12
ThirdParty/ffmpeg/include/libavutil/avstring.h
vendored
|
@ -24,7 +24,6 @@
|
|||
#include <stddef.h>
|
||||
#include <stdint.h>
|
||||
#include "attributes.h"
|
||||
#include "version.h"
|
||||
|
||||
/**
|
||||
* @addtogroup lavu_string
|
||||
|
@ -157,15 +156,6 @@ static inline size_t av_strnlen(const char *s, size_t len)
|
|||
*/
|
||||
char *av_asprintf(const char *fmt, ...) av_printf_format(1, 2);
|
||||
|
||||
#if FF_API_D2STR
|
||||
/**
|
||||
* Convert a number to an av_malloced string.
|
||||
* @deprecated use av_asprintf() with "%f" or a more specific format
|
||||
*/
|
||||
attribute_deprecated
|
||||
char *av_d2str(double d);
|
||||
#endif
|
||||
|
||||
/**
|
||||
* Unescape the given string until a non escaped terminating char,
|
||||
* and return the token corresponding to the unescaped string.
|
||||
|
@ -274,7 +264,7 @@ int av_strncasecmp(const char *a, const char *b, size_t n);
|
|||
|
||||
/**
|
||||
* Locale-independent strings replace.
|
||||
* @note This means only ASCII-range characters are replace
|
||||
* @note This means only ASCII-range characters are replaced.
|
||||
*/
|
||||
char *av_strireplace(const char *str, const char *from, const char *to);
|
||||
|
||||
|
|
19
ThirdParty/ffmpeg/include/libavutil/avutil.h
vendored
19
ThirdParty/ffmpeg/include/libavutil/avutil.h
vendored
|
@ -257,7 +257,12 @@ const char *av_get_media_type_string(enum AVMediaType media_type);
|
|||
* Internal time base represented as fractional value
|
||||
*/
|
||||
|
||||
#ifdef __cplusplus
|
||||
/* ISO C++ forbids compound-literals. */
|
||||
#define AV_TIME_BASE_Q av_make_q(1, AV_TIME_BASE)
|
||||
#else
|
||||
#define AV_TIME_BASE_Q (AVRational){1, AV_TIME_BASE}
|
||||
#endif
|
||||
|
||||
/**
|
||||
* @}
|
||||
|
@ -294,7 +299,6 @@ char av_get_picture_type_char(enum AVPictureType pict_type);
|
|||
*/
|
||||
|
||||
#include "common.h"
|
||||
#include "error.h"
|
||||
#include "rational.h"
|
||||
#include "version.h"
|
||||
#include "macros.h"
|
||||
|
@ -331,19 +335,6 @@ unsigned av_int_list_length_for_size(unsigned elsize,
|
|||
#define av_int_list_length(list, term) \
|
||||
av_int_list_length_for_size(sizeof(*(list)), list, term)
|
||||
|
||||
#if FF_API_AV_FOPEN_UTF8
|
||||
/**
|
||||
* Open a file using a UTF-8 filename.
|
||||
* The API of this function matches POSIX fopen(), errors are returned through
|
||||
* errno.
|
||||
* @deprecated Avoid using it, as on Windows, the FILE* allocated by this
|
||||
* function may be allocated with a different CRT than the caller
|
||||
* who uses the FILE*. No replacement provided in public API.
|
||||
*/
|
||||
attribute_deprecated
|
||||
FILE *av_fopen_utf8(const char *path, const char *mode);
|
||||
#endif
|
||||
|
||||
/**
|
||||
* Return the fractional representation of the internal time base.
|
||||
*/
|
||||
|
|
15
ThirdParty/ffmpeg/include/libavutil/bprint.h
vendored
15
ThirdParty/ffmpeg/include/libavutil/bprint.h
vendored
|
@ -144,6 +144,9 @@ void av_bprint_init(AVBPrint *buf, unsigned size_init, unsigned size_max);
|
|||
* Init a print buffer using a pre-existing buffer.
|
||||
*
|
||||
* The buffer will not be reallocated.
|
||||
* In case size equals zero, the AVBPrint will be initialized to use
|
||||
* the internal buffer as if using AV_BPRINT_SIZE_COUNT_ONLY with
|
||||
* av_bprint_init().
|
||||
*
|
||||
* @param buf buffer structure to init
|
||||
* @param buffer byte buffer to use for the string data
|
||||
|
@ -169,9 +172,9 @@ void av_bprint_chars(AVBPrint *buf, char c, unsigned n);
|
|||
/**
|
||||
* Append data to a print buffer.
|
||||
*
|
||||
* param buf bprint buffer to use
|
||||
* param data pointer to data
|
||||
* param size size of data
|
||||
* @param buf bprint buffer to use
|
||||
* @param data pointer to data
|
||||
* @param size size of data
|
||||
*/
|
||||
void av_bprint_append_data(AVBPrint *buf, const char *data, unsigned size);
|
||||
|
||||
|
@ -179,9 +182,9 @@ struct tm;
|
|||
/**
|
||||
* Append a formatted date and time to a print buffer.
|
||||
*
|
||||
* param buf bprint buffer to use
|
||||
* param fmt date and time format string, see strftime()
|
||||
* param tm broken-down time structure to translate
|
||||
* @param buf bprint buffer to use
|
||||
* @param fmt date and time format string, see strftime()
|
||||
* @param tm broken-down time structure to translate
|
||||
*
|
||||
* @note due to poor design of the standard strftime function, it may
|
||||
* produce poor results if the format string expands to a very long text and
|
||||
|
|
266
ThirdParty/ffmpeg/include/libavutil/channel_layout.h
vendored
266
ThirdParty/ffmpeg/include/libavutil/channel_layout.h
vendored
|
@ -119,7 +119,7 @@ enum AVChannelOrder {
|
|||
/**
|
||||
* The channel order does not correspond to any other predefined order and
|
||||
* is stored as an explicit map. For example, this could be used to support
|
||||
* layouts with 64 or more channels, or with empty/skipped (AV_CHAN_SILENCE)
|
||||
* layouts with 64 or more channels, or with empty/skipped (AV_CHAN_UNUSED)
|
||||
* channels at arbitrary positions.
|
||||
*/
|
||||
AV_CHANNEL_ORDER_CUSTOM,
|
||||
|
@ -146,6 +146,10 @@ enum AVChannelOrder {
|
|||
* as defined in AmbiX format $ 2.1.
|
||||
*/
|
||||
AV_CHANNEL_ORDER_AMBISONIC,
|
||||
/**
|
||||
* Number of channel orders, not part of ABI/API
|
||||
*/
|
||||
FF_CHANNEL_ORDER_NB
|
||||
};
|
||||
|
||||
|
||||
|
@ -192,16 +196,6 @@ enum AVChannelOrder {
|
|||
#define AV_CH_BOTTOM_FRONT_LEFT (1ULL << AV_CHAN_BOTTOM_FRONT_LEFT )
|
||||
#define AV_CH_BOTTOM_FRONT_RIGHT (1ULL << AV_CHAN_BOTTOM_FRONT_RIGHT )
|
||||
|
||||
#if FF_API_OLD_CHANNEL_LAYOUT
|
||||
/** Channel mask value used for AVCodecContext.request_channel_layout
|
||||
to indicate that the user requests the channel order of the decoder output
|
||||
to be the native codec channel order.
|
||||
@deprecated channel order is now indicated in a special field in
|
||||
AVChannelLayout
|
||||
*/
|
||||
#define AV_CH_LAYOUT_NATIVE 0x8000000000000000ULL
|
||||
#endif
|
||||
|
||||
/**
|
||||
* @}
|
||||
* @defgroup channel_mask_c Audio channel layouts
|
||||
|
@ -224,6 +218,7 @@ enum AVChannelOrder {
|
|||
#define AV_CH_LAYOUT_6POINT0 (AV_CH_LAYOUT_5POINT0|AV_CH_BACK_CENTER)
|
||||
#define AV_CH_LAYOUT_6POINT0_FRONT (AV_CH_LAYOUT_2_2|AV_CH_FRONT_LEFT_OF_CENTER|AV_CH_FRONT_RIGHT_OF_CENTER)
|
||||
#define AV_CH_LAYOUT_HEXAGONAL (AV_CH_LAYOUT_5POINT0_BACK|AV_CH_BACK_CENTER)
|
||||
#define AV_CH_LAYOUT_3POINT1POINT2 (AV_CH_LAYOUT_3POINT1|AV_CH_TOP_FRONT_LEFT|AV_CH_TOP_FRONT_RIGHT)
|
||||
#define AV_CH_LAYOUT_6POINT1 (AV_CH_LAYOUT_5POINT1|AV_CH_BACK_CENTER)
|
||||
#define AV_CH_LAYOUT_6POINT1_BACK (AV_CH_LAYOUT_5POINT1_BACK|AV_CH_BACK_CENTER)
|
||||
#define AV_CH_LAYOUT_6POINT1_FRONT (AV_CH_LAYOUT_6POINT0_FRONT|AV_CH_LOW_FREQUENCY)
|
||||
|
@ -232,10 +227,19 @@ enum AVChannelOrder {
|
|||
#define AV_CH_LAYOUT_7POINT1 (AV_CH_LAYOUT_5POINT1|AV_CH_BACK_LEFT|AV_CH_BACK_RIGHT)
|
||||
#define AV_CH_LAYOUT_7POINT1_WIDE (AV_CH_LAYOUT_5POINT1|AV_CH_FRONT_LEFT_OF_CENTER|AV_CH_FRONT_RIGHT_OF_CENTER)
|
||||
#define AV_CH_LAYOUT_7POINT1_WIDE_BACK (AV_CH_LAYOUT_5POINT1_BACK|AV_CH_FRONT_LEFT_OF_CENTER|AV_CH_FRONT_RIGHT_OF_CENTER)
|
||||
#define AV_CH_LAYOUT_5POINT1POINT2_BACK (AV_CH_LAYOUT_5POINT1_BACK|AV_CH_TOP_FRONT_LEFT|AV_CH_TOP_FRONT_RIGHT)
|
||||
#define AV_CH_LAYOUT_OCTAGONAL (AV_CH_LAYOUT_5POINT0|AV_CH_BACK_LEFT|AV_CH_BACK_CENTER|AV_CH_BACK_RIGHT)
|
||||
#define AV_CH_LAYOUT_CUBE (AV_CH_LAYOUT_QUAD|AV_CH_TOP_FRONT_LEFT|AV_CH_TOP_FRONT_RIGHT|AV_CH_TOP_BACK_LEFT|AV_CH_TOP_BACK_RIGHT)
|
||||
#define AV_CH_LAYOUT_5POINT1POINT4_BACK (AV_CH_LAYOUT_5POINT1POINT2_BACK|AV_CH_TOP_BACK_LEFT|AV_CH_TOP_BACK_RIGHT)
|
||||
#define AV_CH_LAYOUT_7POINT1POINT2 (AV_CH_LAYOUT_7POINT1|AV_CH_TOP_FRONT_LEFT|AV_CH_TOP_FRONT_RIGHT)
|
||||
#define AV_CH_LAYOUT_7POINT1POINT4_BACK (AV_CH_LAYOUT_7POINT1POINT2|AV_CH_TOP_BACK_LEFT|AV_CH_TOP_BACK_RIGHT)
|
||||
#define AV_CH_LAYOUT_7POINT2POINT3 (AV_CH_LAYOUT_7POINT1POINT2|AV_CH_TOP_BACK_CENTER|AV_CH_LOW_FREQUENCY_2)
|
||||
#define AV_CH_LAYOUT_9POINT1POINT4_BACK (AV_CH_LAYOUT_7POINT1POINT4_BACK|AV_CH_FRONT_LEFT_OF_CENTER|AV_CH_FRONT_RIGHT_OF_CENTER)
|
||||
#define AV_CH_LAYOUT_HEXADECAGONAL (AV_CH_LAYOUT_OCTAGONAL|AV_CH_WIDE_LEFT|AV_CH_WIDE_RIGHT|AV_CH_TOP_BACK_LEFT|AV_CH_TOP_BACK_RIGHT|AV_CH_TOP_BACK_CENTER|AV_CH_TOP_FRONT_CENTER|AV_CH_TOP_FRONT_LEFT|AV_CH_TOP_FRONT_RIGHT)
|
||||
#define AV_CH_LAYOUT_STEREO_DOWNMIX (AV_CH_STEREO_LEFT|AV_CH_STEREO_RIGHT)
|
||||
#define AV_CH_LAYOUT_22POINT2 (AV_CH_LAYOUT_5POINT1_BACK|AV_CH_FRONT_LEFT_OF_CENTER|AV_CH_FRONT_RIGHT_OF_CENTER|AV_CH_BACK_CENTER|AV_CH_LOW_FREQUENCY_2|AV_CH_SIDE_LEFT|AV_CH_SIDE_RIGHT|AV_CH_TOP_FRONT_LEFT|AV_CH_TOP_FRONT_RIGHT|AV_CH_TOP_FRONT_CENTER|AV_CH_TOP_CENTER|AV_CH_TOP_BACK_LEFT|AV_CH_TOP_BACK_RIGHT|AV_CH_TOP_SIDE_LEFT|AV_CH_TOP_SIDE_RIGHT|AV_CH_TOP_BACK_CENTER|AV_CH_BOTTOM_FRONT_CENTER|AV_CH_BOTTOM_FRONT_LEFT|AV_CH_BOTTOM_FRONT_RIGHT)
|
||||
#define AV_CH_LAYOUT_22POINT2 (AV_CH_LAYOUT_7POINT1POINT4_BACK|AV_CH_FRONT_LEFT_OF_CENTER|AV_CH_FRONT_RIGHT_OF_CENTER|AV_CH_BACK_CENTER|AV_CH_LOW_FREQUENCY_2|AV_CH_TOP_FRONT_CENTER|AV_CH_TOP_CENTER|AV_CH_TOP_SIDE_LEFT|AV_CH_TOP_SIDE_RIGHT|AV_CH_TOP_BACK_CENTER|AV_CH_BOTTOM_FRONT_CENTER|AV_CH_BOTTOM_FRONT_LEFT|AV_CH_BOTTOM_FRONT_RIGHT)
|
||||
|
||||
#define AV_CH_LAYOUT_7POINT1_TOP_BACK AV_CH_LAYOUT_5POINT1POINT2_BACK
|
||||
|
||||
enum AVMatrixEncoding {
|
||||
AV_MATRIX_ENCODING_NONE,
|
||||
|
@ -356,8 +360,16 @@ typedef struct AVChannelLayout {
|
|||
void *opaque;
|
||||
} AVChannelLayout;
|
||||
|
||||
/**
|
||||
* Macro to define native channel layouts
|
||||
*
|
||||
* @note This doesn't use designated initializers for compatibility with C++ 17 and older.
|
||||
*/
|
||||
#define AV_CHANNEL_LAYOUT_MASK(nb, m) \
|
||||
{ .order = AV_CHANNEL_ORDER_NATIVE, .nb_channels = (nb), .u = { .mask = (m) }}
|
||||
{ /* .order */ AV_CHANNEL_ORDER_NATIVE, \
|
||||
/* .nb_channels */ (nb), \
|
||||
/* .u.mask */ { m }, \
|
||||
/* .opaque */ NULL }
|
||||
|
||||
/**
|
||||
* @name Common pre-defined channel layouts
|
||||
|
@ -379,6 +391,7 @@ typedef struct AVChannelLayout {
|
|||
#define AV_CHANNEL_LAYOUT_5POINT1_BACK AV_CHANNEL_LAYOUT_MASK(6, AV_CH_LAYOUT_5POINT1_BACK)
|
||||
#define AV_CHANNEL_LAYOUT_6POINT0 AV_CHANNEL_LAYOUT_MASK(6, AV_CH_LAYOUT_6POINT0)
|
||||
#define AV_CHANNEL_LAYOUT_6POINT0_FRONT AV_CHANNEL_LAYOUT_MASK(6, AV_CH_LAYOUT_6POINT0_FRONT)
|
||||
#define AV_CHANNEL_LAYOUT_3POINT1POINT2 AV_CHANNEL_LAYOUT_MASK(6, AV_CH_LAYOUT_3POINT1POINT2)
|
||||
#define AV_CHANNEL_LAYOUT_HEXAGONAL AV_CHANNEL_LAYOUT_MASK(6, AV_CH_LAYOUT_HEXAGONAL)
|
||||
#define AV_CHANNEL_LAYOUT_6POINT1 AV_CHANNEL_LAYOUT_MASK(7, AV_CH_LAYOUT_6POINT1)
|
||||
#define AV_CHANNEL_LAYOUT_6POINT1_BACK AV_CHANNEL_LAYOUT_MASK(7, AV_CH_LAYOUT_6POINT1_BACK)
|
||||
|
@ -388,156 +401,29 @@ typedef struct AVChannelLayout {
|
|||
#define AV_CHANNEL_LAYOUT_7POINT1 AV_CHANNEL_LAYOUT_MASK(8, AV_CH_LAYOUT_7POINT1)
|
||||
#define AV_CHANNEL_LAYOUT_7POINT1_WIDE AV_CHANNEL_LAYOUT_MASK(8, AV_CH_LAYOUT_7POINT1_WIDE)
|
||||
#define AV_CHANNEL_LAYOUT_7POINT1_WIDE_BACK AV_CHANNEL_LAYOUT_MASK(8, AV_CH_LAYOUT_7POINT1_WIDE_BACK)
|
||||
#define AV_CHANNEL_LAYOUT_5POINT1POINT2_BACK AV_CHANNEL_LAYOUT_MASK(8, AV_CH_LAYOUT_5POINT1POINT2_BACK)
|
||||
#define AV_CHANNEL_LAYOUT_OCTAGONAL AV_CHANNEL_LAYOUT_MASK(8, AV_CH_LAYOUT_OCTAGONAL)
|
||||
#define AV_CHANNEL_LAYOUT_CUBE AV_CHANNEL_LAYOUT_MASK(8, AV_CH_LAYOUT_CUBE)
|
||||
#define AV_CHANNEL_LAYOUT_5POINT1POINT4_BACK AV_CHANNEL_LAYOUT_MASK(10, AV_CH_LAYOUT_5POINT1POINT4_BACK)
|
||||
#define AV_CHANNEL_LAYOUT_7POINT1POINT2 AV_CHANNEL_LAYOUT_MASK(10, AV_CH_LAYOUT_7POINT1POINT2)
|
||||
#define AV_CHANNEL_LAYOUT_7POINT1POINT4_BACK AV_CHANNEL_LAYOUT_MASK(12, AV_CH_LAYOUT_7POINT1POINT4_BACK)
|
||||
#define AV_CHANNEL_LAYOUT_7POINT2POINT3 AV_CHANNEL_LAYOUT_MASK(12, AV_CH_LAYOUT_7POINT2POINT3)
|
||||
#define AV_CHANNEL_LAYOUT_9POINT1POINT4_BACK AV_CHANNEL_LAYOUT_MASK(14, AV_CH_LAYOUT_9POINT1POINT4_BACK)
|
||||
#define AV_CHANNEL_LAYOUT_HEXADECAGONAL AV_CHANNEL_LAYOUT_MASK(16, AV_CH_LAYOUT_HEXADECAGONAL)
|
||||
#define AV_CHANNEL_LAYOUT_STEREO_DOWNMIX AV_CHANNEL_LAYOUT_MASK(2, AV_CH_LAYOUT_STEREO_DOWNMIX)
|
||||
#define AV_CHANNEL_LAYOUT_22POINT2 AV_CHANNEL_LAYOUT_MASK(24, AV_CH_LAYOUT_22POINT2)
|
||||
|
||||
#define AV_CHANNEL_LAYOUT_7POINT1_TOP_BACK AV_CHANNEL_LAYOUT_5POINT1POINT2_BACK
|
||||
|
||||
#define AV_CHANNEL_LAYOUT_AMBISONIC_FIRST_ORDER \
|
||||
{ .order = AV_CHANNEL_ORDER_AMBISONIC, .nb_channels = 4, .u = { .mask = 0 }}
|
||||
{ /* .order */ AV_CHANNEL_ORDER_AMBISONIC, \
|
||||
/* .nb_channels */ 4, \
|
||||
/* .u.mask */ { 0 }, \
|
||||
/* .opaque */ NULL }
|
||||
/** @} */
|
||||
|
||||
struct AVBPrint;
|
||||
|
||||
#if FF_API_OLD_CHANNEL_LAYOUT
|
||||
/**
|
||||
* @name Deprecated Functions
|
||||
* @{
|
||||
*/
|
||||
|
||||
/**
|
||||
* Return a channel layout id that matches name, or 0 if no match is found.
|
||||
*
|
||||
* name can be one or several of the following notations,
|
||||
* separated by '+' or '|':
|
||||
* - the name of an usual channel layout (mono, stereo, 4.0, quad, 5.0,
|
||||
* 5.0(side), 5.1, 5.1(side), 7.1, 7.1(wide), downmix);
|
||||
* - the name of a single channel (FL, FR, FC, LFE, BL, BR, FLC, FRC, BC,
|
||||
* SL, SR, TC, TFL, TFC, TFR, TBL, TBC, TBR, DL, DR);
|
||||
* - a number of channels, in decimal, followed by 'c', yielding
|
||||
* the default channel layout for that number of channels (@see
|
||||
* av_get_default_channel_layout);
|
||||
* - a channel layout mask, in hexadecimal starting with "0x" (see the
|
||||
* AV_CH_* macros).
|
||||
*
|
||||
* Example: "stereo+FC" = "2c+FC" = "2c+1c" = "0x7"
|
||||
*
|
||||
* @deprecated use av_channel_layout_from_string()
|
||||
*/
|
||||
attribute_deprecated
|
||||
uint64_t av_get_channel_layout(const char *name);
|
||||
|
||||
/**
|
||||
* Return a channel layout and the number of channels based on the specified name.
|
||||
*
|
||||
* This function is similar to (@see av_get_channel_layout), but can also parse
|
||||
* unknown channel layout specifications.
|
||||
*
|
||||
* @param[in] name channel layout specification string
|
||||
* @param[out] channel_layout parsed channel layout (0 if unknown)
|
||||
* @param[out] nb_channels number of channels
|
||||
*
|
||||
* @return 0 on success, AVERROR(EINVAL) if the parsing fails.
|
||||
* @deprecated use av_channel_layout_from_string()
|
||||
*/
|
||||
attribute_deprecated
|
||||
int av_get_extended_channel_layout(const char *name, uint64_t* channel_layout, int* nb_channels);
|
||||
|
||||
/**
|
||||
* Return a description of a channel layout.
|
||||
* If nb_channels is <= 0, it is guessed from the channel_layout.
|
||||
*
|
||||
* @param buf put here the string containing the channel layout
|
||||
* @param buf_size size in bytes of the buffer
|
||||
* @param nb_channels number of channels
|
||||
* @param channel_layout channel layout bitset
|
||||
* @deprecated use av_channel_layout_describe()
|
||||
*/
|
||||
attribute_deprecated
|
||||
void av_get_channel_layout_string(char *buf, int buf_size, int nb_channels, uint64_t channel_layout);
|
||||
|
||||
/**
|
||||
* Append a description of a channel layout to a bprint buffer.
|
||||
* @deprecated use av_channel_layout_describe()
|
||||
*/
|
||||
attribute_deprecated
|
||||
void av_bprint_channel_layout(struct AVBPrint *bp, int nb_channels, uint64_t channel_layout);
|
||||
|
||||
/**
|
||||
* Return the number of channels in the channel layout.
|
||||
* @deprecated use AVChannelLayout.nb_channels
|
||||
*/
|
||||
attribute_deprecated
|
||||
int av_get_channel_layout_nb_channels(uint64_t channel_layout);
|
||||
|
||||
/**
|
||||
* Return default channel layout for a given number of channels.
|
||||
*
|
||||
* @deprecated use av_channel_layout_default()
|
||||
*/
|
||||
attribute_deprecated
|
||||
int64_t av_get_default_channel_layout(int nb_channels);
|
||||
|
||||
/**
|
||||
* Get the index of a channel in channel_layout.
|
||||
*
|
||||
* @param channel_layout channel layout bitset
|
||||
* @param channel a channel layout describing exactly one channel which must be
|
||||
* present in channel_layout.
|
||||
*
|
||||
* @return index of channel in channel_layout on success, a negative AVERROR
|
||||
* on error.
|
||||
*
|
||||
* @deprecated use av_channel_layout_index_from_channel()
|
||||
*/
|
||||
attribute_deprecated
|
||||
int av_get_channel_layout_channel_index(uint64_t channel_layout,
|
||||
uint64_t channel);
|
||||
|
||||
/**
|
||||
* Get the channel with the given index in channel_layout.
|
||||
* @deprecated use av_channel_layout_channel_from_index()
|
||||
*/
|
||||
attribute_deprecated
|
||||
uint64_t av_channel_layout_extract_channel(uint64_t channel_layout, int index);
|
||||
|
||||
/**
|
||||
* Get the name of a given channel.
|
||||
*
|
||||
* @return channel name on success, NULL on error.
|
||||
*
|
||||
* @deprecated use av_channel_name()
|
||||
*/
|
||||
attribute_deprecated
|
||||
const char *av_get_channel_name(uint64_t channel);
|
||||
|
||||
/**
|
||||
* Get the description of a given channel.
|
||||
*
|
||||
* @param channel a channel layout with a single channel
|
||||
* @return channel description on success, NULL on error
|
||||
* @deprecated use av_channel_description()
|
||||
*/
|
||||
attribute_deprecated
|
||||
const char *av_get_channel_description(uint64_t channel);
|
||||
|
||||
/**
|
||||
* Get the value and name of a standard channel layout.
|
||||
*
|
||||
* @param[in] index index in an internal list, starting at 0
|
||||
* @param[out] layout channel layout mask
|
||||
* @param[out] name name of the layout
|
||||
* @return 0 if the layout exists,
|
||||
* <0 if index is beyond the limits
|
||||
* @deprecated use av_channel_layout_standard()
|
||||
*/
|
||||
attribute_deprecated
|
||||
int av_get_standard_channel_layout(unsigned index, uint64_t *layout,
|
||||
const char **name);
|
||||
/**
|
||||
* @}
|
||||
*/
|
||||
#endif
|
||||
|
||||
/**
|
||||
* Get a human readable string in an abbreviated form describing a given channel.
|
||||
* This is the inverse function of @ref av_channel_from_string().
|
||||
|
@ -585,6 +471,23 @@ void av_channel_description_bprint(struct AVBPrint *bp, enum AVChannel channel_i
|
|||
*/
|
||||
enum AVChannel av_channel_from_string(const char *name);
|
||||
|
||||
/**
|
||||
* Initialize a custom channel layout with the specified number of channels.
|
||||
* The channel map will be allocated and the designation of all channels will
|
||||
* be set to AV_CHAN_UNKNOWN.
|
||||
*
|
||||
* This is only a convenience helper function, a custom channel layout can also
|
||||
* be constructed without using this.
|
||||
*
|
||||
* @param channel_layout the layout structure to be initialized
|
||||
* @param nb_channels the number of channels
|
||||
*
|
||||
* @return 0 on success
|
||||
* AVERROR(EINVAL) if the number of channels <= 0
|
||||
* AVERROR(ENOMEM) if the channel map could not be allocated
|
||||
*/
|
||||
int av_channel_layout_custom_init(AVChannelLayout *channel_layout, int nb_channels);
|
||||
|
||||
/**
|
||||
* Initialize a native channel layout from a bitmask indicating which channels
|
||||
* are present.
|
||||
|
@ -609,10 +512,14 @@ int av_channel_layout_from_mask(AVChannelLayout *channel_layout, uint64_t mask);
|
|||
* - the number of unordered channels (eg. "4C" or "4 channels")
|
||||
* - the ambisonic order followed by optional non-diegetic channels (eg.
|
||||
* "ambisonic 2+stereo")
|
||||
* On error, the channel layout will remain uninitialized, but not necessarily
|
||||
* untouched.
|
||||
*
|
||||
* @param channel_layout input channel layout
|
||||
* @param channel_layout uninitialized channel layout for the result
|
||||
* @param str string describing the channel layout
|
||||
* @return 0 channel layout was detected, AVERROR_INVALIDATATA otherwise
|
||||
* @return 0 on success parsing the channel layout
|
||||
* AVERROR(EINVAL) if an invalid channel layout string was provided
|
||||
* AVERROR(ENOMEM) if there was not enough memory
|
||||
*/
|
||||
int av_channel_layout_from_string(AVChannelLayout *channel_layout,
|
||||
const char *str);
|
||||
|
@ -772,6 +679,53 @@ int av_channel_layout_check(const AVChannelLayout *channel_layout);
|
|||
*/
|
||||
int av_channel_layout_compare(const AVChannelLayout *chl, const AVChannelLayout *chl1);
|
||||
|
||||
/**
|
||||
* The conversion must be lossless.
|
||||
*/
|
||||
#define AV_CHANNEL_LAYOUT_RETYPE_FLAG_LOSSLESS (1 << 0)
|
||||
|
||||
/**
|
||||
* The specified retype target order is ignored and the simplest possible
|
||||
* (canonical) order is used for which the input layout can be losslessy
|
||||
* represented.
|
||||
*/
|
||||
#define AV_CHANNEL_LAYOUT_RETYPE_FLAG_CANONICAL (1 << 1)
|
||||
|
||||
/**
|
||||
* Change the AVChannelOrder of a channel layout.
|
||||
*
|
||||
* Change of AVChannelOrder can be either lossless or lossy. In case of a
|
||||
* lossless conversion all the channel designations and the associated channel
|
||||
* names (if any) are kept. On a lossy conversion the channel names and channel
|
||||
* designations might be lost depending on the capabilities of the desired
|
||||
* AVChannelOrder. Note that some conversions are simply not possible in which
|
||||
* case this function returns AVERROR(ENOSYS).
|
||||
*
|
||||
* The following conversions are supported:
|
||||
*
|
||||
* Any -> Custom : Always possible, always lossless.
|
||||
* Any -> Unspecified: Always possible, lossless if channel designations
|
||||
* are all unknown and channel names are not used, lossy otherwise.
|
||||
* Custom -> Ambisonic : Possible if it contains ambisonic channels with
|
||||
* optional non-diegetic channels in the end. Lossy if the channels have
|
||||
* custom names, lossless otherwise.
|
||||
* Custom -> Native : Possible if it contains native channels in native
|
||||
* order. Lossy if the channels have custom names, lossless otherwise.
|
||||
*
|
||||
* On error this function keeps the original channel layout untouched.
|
||||
*
|
||||
* @param channel_layout channel layout which will be changed
|
||||
* @param order the desired channel layout order
|
||||
* @param flags a combination of AV_CHANNEL_LAYOUT_RETYPE_FLAG_* constants
|
||||
* @return 0 if the conversion was successful and lossless or if the channel
|
||||
* layout was already in the desired order
|
||||
* >0 if the conversion was successful but lossy
|
||||
* AVERROR(ENOSYS) if the conversion was not possible (or would be
|
||||
* lossy and AV_CHANNEL_LAYOUT_RETYPE_FLAG_LOSSLESS was specified)
|
||||
* AVERROR(EINVAL), AVERROR(ENOMEM) on error
|
||||
*/
|
||||
int av_channel_layout_retype(AVChannelLayout *channel_layout, enum AVChannelOrder order, int flags);
|
||||
|
||||
/**
|
||||
* @}
|
||||
*/
|
||||
|
|
21
ThirdParty/ffmpeg/include/libavutil/common.h
vendored
21
ThirdParty/ffmpeg/include/libavutil/common.h
vendored
|
@ -40,7 +40,15 @@
|
|||
#include <string.h>
|
||||
|
||||
#include "attributes.h"
|
||||
#include "error.h"
|
||||
#include "macros.h"
|
||||
#include "mem.h"
|
||||
|
||||
#ifdef HAVE_AV_CONFIG_H
|
||||
# include "config.h"
|
||||
# include "intmath.h"
|
||||
# include "internal.h"
|
||||
#endif /* HAVE_AV_CONFIG_H */
|
||||
|
||||
//rounded division & shift
|
||||
#define RSHIFT(a,b) ((a) > 0 ? ((a) + ((1<<(b))>>1))>>(b) : ((a) + ((1<<(b))>>1)-1)>>(b))
|
||||
|
@ -83,11 +91,6 @@
|
|||
|
||||
/* misc math functions */
|
||||
|
||||
#ifdef HAVE_AV_CONFIG_H
|
||||
# include "config.h"
|
||||
# include "intmath.h"
|
||||
#endif
|
||||
|
||||
#ifndef av_ceil_log2
|
||||
# define av_ceil_log2 av_ceil_log2_c
|
||||
#endif
|
||||
|
@ -567,12 +570,4 @@ static av_always_inline av_const int av_parity_c(uint32_t v)
|
|||
}\
|
||||
}\
|
||||
|
||||
|
||||
|
||||
#include "mem.h"
|
||||
|
||||
#ifdef HAVE_AV_CONFIG_H
|
||||
# include "internal.h"
|
||||
#endif /* HAVE_AV_CONFIG_H */
|
||||
|
||||
#endif /* AVUTIL_COMMON_H */
|
||||
|
|
3
ThirdParty/ffmpeg/include/libavutil/cpu.h
vendored
3
ThirdParty/ffmpeg/include/libavutil/cpu.h
vendored
|
@ -69,6 +69,8 @@
|
|||
#define AV_CPU_FLAG_NEON (1 << 5)
|
||||
#define AV_CPU_FLAG_ARMV8 (1 << 6)
|
||||
#define AV_CPU_FLAG_VFP_VM (1 << 7) ///< VFPv2 vector mode, deprecated in ARMv7-A and unavailable in various CPUs implementations
|
||||
#define AV_CPU_FLAG_DOTPROD (1 << 8)
|
||||
#define AV_CPU_FLAG_I8MM (1 << 9)
|
||||
#define AV_CPU_FLAG_SETEND (1 <<16)
|
||||
|
||||
#define AV_CPU_FLAG_MMI (1 << 0)
|
||||
|
@ -87,6 +89,7 @@
|
|||
#define AV_CPU_FLAG_RVV_I64 (1 << 5) ///< Vectors of 64-bit int's */
|
||||
#define AV_CPU_FLAG_RVV_F64 (1 << 6) ///< Vectors of double's
|
||||
#define AV_CPU_FLAG_RVB_BASIC (1 << 7) ///< Basic bit-manipulations
|
||||
#define AV_CPU_FLAG_RVB_ADDR (1 << 8) ///< Address bit-manipulations
|
||||
|
||||
/**
|
||||
* Return the flags which specify extensions supported by the CPU.
|
||||
|
|
39
ThirdParty/ffmpeg/include/libavutil/csp.h
vendored
39
ThirdParty/ffmpeg/include/libavutil/csp.h
vendored
|
@ -1,5 +1,8 @@
|
|||
/*
|
||||
* Copyright (c) 2015 Kevin Wheatley <kevin.j.wheatley@gmail.com>
|
||||
* Copyright (c) 2016 Ronald S. Bultje <rsbultje@gmail.com>
|
||||
* Copyright (c) 2023 Leo Izen <leo.izen@gmail.com>
|
||||
*
|
||||
* This file is part of FFmpeg.
|
||||
*
|
||||
* FFmpeg is free software; you can redistribute it and/or
|
||||
|
@ -29,6 +32,7 @@
|
|||
* @ingroup lavu_math_csp
|
||||
* @author Ronald S. Bultje <rsbultje@gmail.com>
|
||||
* @author Leo Izen <leo.izen@gmail.com>
|
||||
* @author Kevin Wheatley <kevin.j.wheatley@gmail.com>
|
||||
*/
|
||||
|
||||
/**
|
||||
|
@ -76,6 +80,12 @@ typedef struct AVColorPrimariesDesc {
|
|||
AVPrimaryCoefficients prim;
|
||||
} AVColorPrimariesDesc;
|
||||
|
||||
/**
|
||||
* Function pointer representing a double -> double transfer function that performs
|
||||
* an EOTF transfer inversion. This function outputs linear light.
|
||||
*/
|
||||
typedef double (*av_csp_trc_function)(double);
|
||||
|
||||
/**
|
||||
* Retrieves the Luma coefficients necessary to construct a conversion matrix
|
||||
* from an enum constant describing the colorspace.
|
||||
|
@ -104,6 +114,35 @@ const AVColorPrimariesDesc *av_csp_primaries_desc_from_id(enum AVColorPrimaries
|
|||
*/
|
||||
enum AVColorPrimaries av_csp_primaries_id_from_desc(const AVColorPrimariesDesc *prm);
|
||||
|
||||
/**
|
||||
* Determine a suitable 'gamma' value to match the supplied
|
||||
* AVColorTransferCharacteristic.
|
||||
*
|
||||
* See Apple Technical Note TN2257 (https://developer.apple.com/library/mac/technotes/tn2257/_index.html)
|
||||
*
|
||||
* This function returns the gamma exponent for the OETF. For example, sRGB is approximated
|
||||
* by gamma 2.2, not by gamma 0.45455.
|
||||
*
|
||||
* @return Will return an approximation to the simple gamma function matching
|
||||
* the supplied Transfer Characteristic, Will return 0.0 for any
|
||||
* we cannot reasonably match against.
|
||||
*/
|
||||
double av_csp_approximate_trc_gamma(enum AVColorTransferCharacteristic trc);
|
||||
|
||||
/**
|
||||
* Determine the function needed to apply the given
|
||||
* AVColorTransferCharacteristic to linear input.
|
||||
*
|
||||
* The function returned should expect a nominal domain and range of [0.0-1.0]
|
||||
* values outside of this range maybe valid depending on the chosen
|
||||
* characteristic function.
|
||||
*
|
||||
* @return Will return pointer to the function matching the
|
||||
* supplied Transfer Characteristic. If unspecified will
|
||||
* return NULL:
|
||||
*/
|
||||
av_csp_trc_function av_csp_trc_func_from_id(enum AVColorTransferCharacteristic trc);
|
||||
|
||||
/**
|
||||
* @}
|
||||
*/
|
||||
|
|
111
ThirdParty/ffmpeg/include/libavutil/dict.h
vendored
111
ThirdParty/ffmpeg/include/libavutil/dict.h
vendored
|
@ -39,13 +39,15 @@
|
|||
* @brief Simple key:value store
|
||||
*
|
||||
* @{
|
||||
* Dictionaries are used for storing key:value pairs. To create
|
||||
* an AVDictionary, simply pass an address of a NULL pointer to
|
||||
* av_dict_set(). NULL can be used as an empty dictionary wherever
|
||||
* a pointer to an AVDictionary is required.
|
||||
* Use av_dict_get() to retrieve an entry or iterate over all
|
||||
* entries and finally av_dict_free() to free the dictionary
|
||||
* and all its contents.
|
||||
* Dictionaries are used for storing key-value pairs.
|
||||
*
|
||||
* - To **create an AVDictionary**, simply pass an address of a NULL
|
||||
* pointer to av_dict_set(). NULL can be used as an empty dictionary
|
||||
* wherever a pointer to an AVDictionary is required.
|
||||
* - To **insert an entry**, use av_dict_set().
|
||||
* - Use av_dict_get() to **retrieve an entry**.
|
||||
* - To **iterate over all entries**, use av_dict_iterate().
|
||||
* - In order to **free the dictionary and all its contents**, use av_dict_free().
|
||||
*
|
||||
@code
|
||||
AVDictionary *d = NULL; // "create" an empty dictionary
|
||||
|
@ -57,13 +59,18 @@
|
|||
char *v = av_strdup("value"); // you can avoid copying them like this
|
||||
av_dict_set(&d, k, v, AV_DICT_DONT_STRDUP_KEY | AV_DICT_DONT_STRDUP_VAL);
|
||||
|
||||
while (t = av_dict_get(d, "", t, AV_DICT_IGNORE_SUFFIX)) {
|
||||
while ((t = av_dict_iterate(d, t))) {
|
||||
<....> // iterate over all entries in d
|
||||
}
|
||||
av_dict_free(&d);
|
||||
@endcode
|
||||
*/
|
||||
|
||||
/**
|
||||
* @name AVDictionary Flags
|
||||
* Flags that influence behavior of the matching of keys or insertion to the dictionary.
|
||||
* @{
|
||||
*/
|
||||
#define AV_DICT_MATCH_CASE 1 /**< Only get an entry with exact-case key match. Only relevant in av_dict_get(). */
|
||||
#define AV_DICT_IGNORE_SUFFIX 2 /**< Return first entry in a dictionary whose first part corresponds to the search key,
|
||||
ignoring the suffix of the found key string. Only relevant in av_dict_get(). */
|
||||
|
@ -71,10 +78,13 @@
|
|||
allocated with av_malloc() or another memory allocation function. */
|
||||
#define AV_DICT_DONT_STRDUP_VAL 8 /**< Take ownership of a value that's been
|
||||
allocated with av_malloc() or another memory allocation function. */
|
||||
#define AV_DICT_DONT_OVERWRITE 16 ///< Don't overwrite existing entries.
|
||||
#define AV_DICT_DONT_OVERWRITE 16 /**< Don't overwrite existing entries. */
|
||||
#define AV_DICT_APPEND 32 /**< If the entry already exists, append to it. Note that no
|
||||
delimiter is added, the strings are simply concatenated. */
|
||||
#define AV_DICT_MULTIKEY 64 /**< Allow to store several equal keys in the dictionary */
|
||||
/**
|
||||
* @}
|
||||
*/
|
||||
|
||||
typedef struct AVDictionaryEntry {
|
||||
char *key;
|
||||
|
@ -89,18 +99,44 @@ typedef struct AVDictionary AVDictionary;
|
|||
* The returned entry key or value must not be changed, or it will
|
||||
* cause undefined behavior.
|
||||
*
|
||||
* To iterate through all the dictionary entries, you can set the matching key
|
||||
* to the null string "" and set the AV_DICT_IGNORE_SUFFIX flag.
|
||||
*
|
||||
* @param prev Set to the previous matching element to find the next.
|
||||
* If set to NULL the first matching element is returned.
|
||||
* @param key matching key
|
||||
* @param flags a collection of AV_DICT_* flags controlling how the entry is retrieved
|
||||
* @return found entry or NULL in case no matching entry was found in the dictionary
|
||||
* @param key Matching key
|
||||
* @param flags A collection of AV_DICT_* flags controlling how the
|
||||
* entry is retrieved
|
||||
*
|
||||
* @return Found entry or NULL in case no matching entry was found in the dictionary
|
||||
*/
|
||||
AVDictionaryEntry *av_dict_get(const AVDictionary *m, const char *key,
|
||||
const AVDictionaryEntry *prev, int flags);
|
||||
|
||||
/**
|
||||
* Iterate over a dictionary
|
||||
*
|
||||
* Iterates through all entries in the dictionary.
|
||||
*
|
||||
* @warning The returned AVDictionaryEntry key/value must not be changed.
|
||||
*
|
||||
* @warning As av_dict_set() invalidates all previous entries returned
|
||||
* by this function, it must not be called while iterating over the dict.
|
||||
*
|
||||
* Typical usage:
|
||||
* @code
|
||||
* const AVDictionaryEntry *e = NULL;
|
||||
* while ((e = av_dict_iterate(m, e))) {
|
||||
* // ...
|
||||
* }
|
||||
* @endcode
|
||||
*
|
||||
* @param m The dictionary to iterate over
|
||||
* @param prev Pointer to the previous AVDictionaryEntry, NULL initially
|
||||
*
|
||||
* @retval AVDictionaryEntry* The next element in the dictionary
|
||||
* @retval NULL No more elements in the dictionary
|
||||
*/
|
||||
const AVDictionaryEntry *av_dict_iterate(const AVDictionary *m,
|
||||
const AVDictionaryEntry *prev);
|
||||
|
||||
/**
|
||||
* Get number of entries in dictionary.
|
||||
*
|
||||
|
@ -115,23 +151,24 @@ int av_dict_count(const AVDictionary *m);
|
|||
* Note: If AV_DICT_DONT_STRDUP_KEY or AV_DICT_DONT_STRDUP_VAL is set,
|
||||
* these arguments will be freed on error.
|
||||
*
|
||||
* Warning: Adding a new entry to a dictionary invalidates all existing entries
|
||||
* previously returned with av_dict_get.
|
||||
* @warning Adding a new entry to a dictionary invalidates all existing entries
|
||||
* previously returned with av_dict_get() or av_dict_iterate().
|
||||
*
|
||||
* @param pm pointer to a pointer to a dictionary struct. If *pm is NULL
|
||||
* @param pm Pointer to a pointer to a dictionary struct. If *pm is NULL
|
||||
* a dictionary struct is allocated and put in *pm.
|
||||
* @param key entry key to add to *pm (will either be av_strduped or added as a new key depending on flags)
|
||||
* @param value entry value to add to *pm (will be av_strduped or added as a new key depending on flags).
|
||||
* @param key Entry key to add to *pm (will either be av_strduped or added as a new key depending on flags)
|
||||
* @param value Entry value to add to *pm (will be av_strduped or added as a new key depending on flags).
|
||||
* Passing a NULL value will cause an existing entry to be deleted.
|
||||
*
|
||||
* @return >= 0 on success otherwise an error code <0
|
||||
*/
|
||||
int av_dict_set(AVDictionary **pm, const char *key, const char *value, int flags);
|
||||
|
||||
/**
|
||||
* Convenience wrapper for av_dict_set that converts the value to a string
|
||||
* Convenience wrapper for av_dict_set() that converts the value to a string
|
||||
* and stores it.
|
||||
*
|
||||
* Note: If AV_DICT_DONT_STRDUP_KEY is set, key will be freed on error.
|
||||
* Note: If ::AV_DICT_DONT_STRDUP_KEY is set, key will be freed on error.
|
||||
*/
|
||||
int av_dict_set_int(AVDictionary **pm, const char *key, int64_t value, int flags);
|
||||
|
||||
|
@ -141,14 +178,15 @@ int av_dict_set_int(AVDictionary **pm, const char *key, int64_t value, int flags
|
|||
* In case of failure, all the successfully set entries are stored in
|
||||
* *pm. You may need to manually free the created dictionary.
|
||||
*
|
||||
* @param key_val_sep a 0-terminated list of characters used to separate
|
||||
* @param key_val_sep A 0-terminated list of characters used to separate
|
||||
* key from value
|
||||
* @param pairs_sep a 0-terminated list of characters used to separate
|
||||
* @param pairs_sep A 0-terminated list of characters used to separate
|
||||
* two pairs from each other
|
||||
* @param flags flags to use when adding to dictionary.
|
||||
* AV_DICT_DONT_STRDUP_KEY and AV_DICT_DONT_STRDUP_VAL
|
||||
* @param flags Flags to use when adding to the dictionary.
|
||||
* ::AV_DICT_DONT_STRDUP_KEY and ::AV_DICT_DONT_STRDUP_VAL
|
||||
* are ignored since the key/value tokens will always
|
||||
* be duplicated.
|
||||
*
|
||||
* @return 0 on success, negative AVERROR code on failure
|
||||
*/
|
||||
int av_dict_parse_string(AVDictionary **pm, const char *str,
|
||||
|
@ -157,11 +195,14 @@ int av_dict_parse_string(AVDictionary **pm, const char *str,
|
|||
|
||||
/**
|
||||
* Copy entries from one AVDictionary struct into another.
|
||||
* @param dst pointer to a pointer to a AVDictionary struct. If *dst is NULL,
|
||||
*
|
||||
* @note Metadata is read using the ::AV_DICT_IGNORE_SUFFIX flag
|
||||
*
|
||||
* @param dst Pointer to a pointer to a AVDictionary struct to copy into. If *dst is NULL,
|
||||
* this function will allocate a struct for you and put it in *dst
|
||||
* @param src pointer to source AVDictionary struct
|
||||
* @param flags flags to use when setting entries in *dst
|
||||
* @note metadata is read using the AV_DICT_IGNORE_SUFFIX flag
|
||||
* @param src Pointer to the source AVDictionary struct to copy items from.
|
||||
* @param flags Flags to use when setting entries in *dst
|
||||
*
|
||||
* @return 0 on success, negative AVERROR code on failure. If dst was allocated
|
||||
* by this function, callers should free the associated memory.
|
||||
*/
|
||||
|
@ -180,13 +221,15 @@ void av_dict_free(AVDictionary **m);
|
|||
* Such string may be passed back to av_dict_parse_string().
|
||||
* @note String is escaped with backslashes ('\').
|
||||
*
|
||||
* @param[in] m dictionary
|
||||
* @warning Separators cannot be neither '\\' nor '\0'. They also cannot be the same.
|
||||
*
|
||||
* @param[in] m The dictionary
|
||||
* @param[out] buffer Pointer to buffer that will be allocated with string containg entries.
|
||||
* Buffer must be freed by the caller when is no longer needed.
|
||||
* @param[in] key_val_sep character used to separate key from value
|
||||
* @param[in] pairs_sep character used to separate two pairs from each other
|
||||
* @param[in] key_val_sep Character used to separate key from value
|
||||
* @param[in] pairs_sep Character used to separate two pairs from each other
|
||||
*
|
||||
* @return >= 0 on success, negative on error
|
||||
* @warning Separators cannot be neither '\\' nor '\0'. They also cannot be the same.
|
||||
*/
|
||||
int av_dict_get_string(const AVDictionary *m, char **buffer,
|
||||
const char key_val_sep, const char pairs_sep);
|
||||
|
|
67
ThirdParty/ffmpeg/include/libavutil/executor.h
vendored
Normal file
67
ThirdParty/ffmpeg/include/libavutil/executor.h
vendored
Normal file
|
@ -0,0 +1,67 @@
|
|||
/*
|
||||
* Copyright (C) 2023 Nuo Mi
|
||||
*
|
||||
* This file is part of FFmpeg.
|
||||
*
|
||||
* FFmpeg is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU Lesser General Public
|
||||
* License as published by the Free Software Foundation; either
|
||||
* version 2.1 of the License, or (at your option) any later version.
|
||||
*
|
||||
* FFmpeg is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
* Lesser General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Lesser General Public
|
||||
* License along with FFmpeg; if not, write to the Free Software
|
||||
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
|
||||
*/
|
||||
|
||||
#ifndef AVUTIL_EXECUTOR_H
|
||||
#define AVUTIL_EXECUTOR_H
|
||||
|
||||
typedef struct AVExecutor AVExecutor;
|
||||
typedef struct AVTask AVTask;
|
||||
|
||||
struct AVTask {
|
||||
AVTask *next;
|
||||
};
|
||||
|
||||
typedef struct AVTaskCallbacks {
|
||||
void *user_data;
|
||||
|
||||
int local_context_size;
|
||||
|
||||
// return 1 if a's priority > b's priority
|
||||
int (*priority_higher)(const AVTask *a, const AVTask *b);
|
||||
|
||||
// task is ready for run
|
||||
int (*ready)(const AVTask *t, void *user_data);
|
||||
|
||||
// run the task
|
||||
int (*run)(AVTask *t, void *local_context, void *user_data);
|
||||
} AVTaskCallbacks;
|
||||
|
||||
/**
|
||||
* Alloc executor
|
||||
* @param callbacks callback structure for executor
|
||||
* @param thread_count worker thread number
|
||||
* @return return the executor
|
||||
*/
|
||||
AVExecutor* av_executor_alloc(const AVTaskCallbacks *callbacks, int thread_count);
|
||||
|
||||
/**
|
||||
* Free executor
|
||||
* @param e pointer to executor
|
||||
*/
|
||||
void av_executor_free(AVExecutor **e);
|
||||
|
||||
/**
|
||||
* Add task to executor
|
||||
* @param e pointer to executor
|
||||
* @param t pointer to task. If NULL, it will wakeup one work thread
|
||||
*/
|
||||
void av_executor_execute(AVExecutor *e, AVTask *t);
|
||||
|
||||
#endif //AVUTIL_EXECUTOR_H
|
|
@ -1,5 +1,5 @@
|
|||
/* Automatically generated by version.sh, do not manually edit! */
|
||||
#ifndef AVUTIL_FFVERSION_H
|
||||
#define AVUTIL_FFVERSION_H
|
||||
#define FFMPEG_VERSION "N-108709-g3bd0bf76fb"
|
||||
#define FFMPEG_VERSION "7.0"
|
||||
#endif /* AVUTIL_FFVERSION_H */
|
||||
|
|
206
ThirdParty/ffmpeg/include/libavutil/fifo.h
vendored
206
ThirdParty/ffmpeg/include/libavutil/fifo.h
vendored
|
@ -200,7 +200,7 @@ int av_fifo_read_to_cb(AVFifo *f, AVFifoCB write_cb,
|
|||
*
|
||||
* @return a non-negative number on success, a negative error code on failure
|
||||
*/
|
||||
int av_fifo_peek(AVFifo *f, void *buf, size_t nb_elems, size_t offset);
|
||||
int av_fifo_peek(const AVFifo *f, void *buf, size_t nb_elems, size_t offset);
|
||||
|
||||
/**
|
||||
* Feed data from a FIFO into a user-provided callback.
|
||||
|
@ -217,7 +217,7 @@ int av_fifo_peek(AVFifo *f, void *buf, size_t nb_elems, size_t offset);
|
|||
*
|
||||
* @return a non-negative number on success, a negative error code on failure
|
||||
*/
|
||||
int av_fifo_peek_to_cb(AVFifo *f, AVFifoCB write_cb, void *opaque,
|
||||
int av_fifo_peek_to_cb(const AVFifo *f, AVFifoCB write_cb, void *opaque,
|
||||
size_t *nb_elems, size_t offset);
|
||||
|
||||
/**
|
||||
|
@ -239,208 +239,6 @@ void av_fifo_reset2(AVFifo *f);
|
|||
*/
|
||||
void av_fifo_freep2(AVFifo **f);
|
||||
|
||||
|
||||
#if FF_API_FIFO_OLD_API
|
||||
typedef struct AVFifoBuffer {
|
||||
uint8_t *buffer;
|
||||
uint8_t *rptr, *wptr, *end;
|
||||
uint32_t rndx, wndx;
|
||||
} AVFifoBuffer;
|
||||
|
||||
/**
|
||||
* Initialize an AVFifoBuffer.
|
||||
* @param size of FIFO
|
||||
* @return AVFifoBuffer or NULL in case of memory allocation failure
|
||||
* @deprecated use av_fifo_alloc2()
|
||||
*/
|
||||
attribute_deprecated
|
||||
AVFifoBuffer *av_fifo_alloc(unsigned int size);
|
||||
|
||||
/**
|
||||
* Initialize an AVFifoBuffer.
|
||||
* @param nmemb number of elements
|
||||
* @param size size of the single element
|
||||
* @return AVFifoBuffer or NULL in case of memory allocation failure
|
||||
* @deprecated use av_fifo_alloc2()
|
||||
*/
|
||||
attribute_deprecated
|
||||
AVFifoBuffer *av_fifo_alloc_array(size_t nmemb, size_t size);
|
||||
|
||||
/**
|
||||
* Free an AVFifoBuffer.
|
||||
* @param f AVFifoBuffer to free
|
||||
* @deprecated use the AVFifo API with av_fifo_freep2()
|
||||
*/
|
||||
attribute_deprecated
|
||||
void av_fifo_free(AVFifoBuffer *f);
|
||||
|
||||
/**
|
||||
* Free an AVFifoBuffer and reset pointer to NULL.
|
||||
* @param f AVFifoBuffer to free
|
||||
* @deprecated use the AVFifo API with av_fifo_freep2()
|
||||
*/
|
||||
attribute_deprecated
|
||||
void av_fifo_freep(AVFifoBuffer **f);
|
||||
|
||||
/**
|
||||
* Reset the AVFifoBuffer to the state right after av_fifo_alloc, in particular it is emptied.
|
||||
* @param f AVFifoBuffer to reset
|
||||
* @deprecated use av_fifo_reset2() with the new AVFifo-API
|
||||
*/
|
||||
attribute_deprecated
|
||||
void av_fifo_reset(AVFifoBuffer *f);
|
||||
|
||||
/**
|
||||
* Return the amount of data in bytes in the AVFifoBuffer, that is the
|
||||
* amount of data you can read from it.
|
||||
* @param f AVFifoBuffer to read from
|
||||
* @return size
|
||||
* @deprecated use av_fifo_can_read() with the new AVFifo-API
|
||||
*/
|
||||
attribute_deprecated
|
||||
int av_fifo_size(const AVFifoBuffer *f);
|
||||
|
||||
/**
|
||||
* Return the amount of space in bytes in the AVFifoBuffer, that is the
|
||||
* amount of data you can write into it.
|
||||
* @param f AVFifoBuffer to write into
|
||||
* @return size
|
||||
* @deprecated use av_fifo_can_write() with the new AVFifo-API
|
||||
*/
|
||||
attribute_deprecated
|
||||
int av_fifo_space(const AVFifoBuffer *f);
|
||||
|
||||
/**
|
||||
* Feed data at specific position from an AVFifoBuffer to a user-supplied callback.
|
||||
* Similar as av_fifo_gereric_read but without discarding data.
|
||||
* @param f AVFifoBuffer to read from
|
||||
* @param offset offset from current read position
|
||||
* @param buf_size number of bytes to read
|
||||
* @param func generic read function
|
||||
* @param dest data destination
|
||||
*
|
||||
* @return a non-negative number on success, a negative error code on failure
|
||||
*
|
||||
* @deprecated use the new AVFifo-API with av_fifo_peek() when func == NULL,
|
||||
* av_fifo_peek_to_cb() otherwise
|
||||
*/
|
||||
attribute_deprecated
|
||||
int av_fifo_generic_peek_at(AVFifoBuffer *f, void *dest, int offset, int buf_size, void (*func)(void*, void*, int));
|
||||
|
||||
/**
|
||||
* Feed data from an AVFifoBuffer to a user-supplied callback.
|
||||
* Similar as av_fifo_gereric_read but without discarding data.
|
||||
* @param f AVFifoBuffer to read from
|
||||
* @param buf_size number of bytes to read
|
||||
* @param func generic read function
|
||||
* @param dest data destination
|
||||
*
|
||||
* @return a non-negative number on success, a negative error code on failure
|
||||
*
|
||||
* @deprecated use the new AVFifo-API with av_fifo_peek() when func == NULL,
|
||||
* av_fifo_peek_to_cb() otherwise
|
||||
*/
|
||||
attribute_deprecated
|
||||
int av_fifo_generic_peek(AVFifoBuffer *f, void *dest, int buf_size, void (*func)(void*, void*, int));
|
||||
|
||||
/**
|
||||
* Feed data from an AVFifoBuffer to a user-supplied callback.
|
||||
* @param f AVFifoBuffer to read from
|
||||
* @param buf_size number of bytes to read
|
||||
* @param func generic read function
|
||||
* @param dest data destination
|
||||
*
|
||||
* @return a non-negative number on success, a negative error code on failure
|
||||
*
|
||||
* @deprecated use the new AVFifo-API with av_fifo_read() when func == NULL,
|
||||
* av_fifo_read_to_cb() otherwise
|
||||
*/
|
||||
attribute_deprecated
|
||||
int av_fifo_generic_read(AVFifoBuffer *f, void *dest, int buf_size, void (*func)(void*, void*, int));
|
||||
|
||||
/**
|
||||
* Feed data from a user-supplied callback to an AVFifoBuffer.
|
||||
* @param f AVFifoBuffer to write to
|
||||
* @param src data source; non-const since it may be used as a
|
||||
* modifiable context by the function defined in func
|
||||
* @param size number of bytes to write
|
||||
* @param func generic write function; the first parameter is src,
|
||||
* the second is dest_buf, the third is dest_buf_size.
|
||||
* func must return the number of bytes written to dest_buf, or <= 0 to
|
||||
* indicate no more data available to write.
|
||||
* If func is NULL, src is interpreted as a simple byte array for source data.
|
||||
* @return the number of bytes written to the FIFO or a negative error code on failure
|
||||
*
|
||||
* @deprecated use the new AVFifo-API with av_fifo_write() when func == NULL,
|
||||
* av_fifo_write_from_cb() otherwise
|
||||
*/
|
||||
attribute_deprecated
|
||||
int av_fifo_generic_write(AVFifoBuffer *f, void *src, int size, int (*func)(void*, void*, int));
|
||||
|
||||
/**
|
||||
* Resize an AVFifoBuffer.
|
||||
* In case of reallocation failure, the old FIFO is kept unchanged.
|
||||
*
|
||||
* @param f AVFifoBuffer to resize
|
||||
* @param size new AVFifoBuffer size in bytes
|
||||
* @return <0 for failure, >=0 otherwise
|
||||
*
|
||||
* @deprecated use the new AVFifo-API with av_fifo_grow2() to increase FIFO size,
|
||||
* decreasing FIFO size is not supported
|
||||
*/
|
||||
attribute_deprecated
|
||||
int av_fifo_realloc2(AVFifoBuffer *f, unsigned int size);
|
||||
|
||||
/**
|
||||
* Enlarge an AVFifoBuffer.
|
||||
* In case of reallocation failure, the old FIFO is kept unchanged.
|
||||
* The new fifo size may be larger than the requested size.
|
||||
*
|
||||
* @param f AVFifoBuffer to resize
|
||||
* @param additional_space the amount of space in bytes to allocate in addition to av_fifo_size()
|
||||
* @return <0 for failure, >=0 otherwise
|
||||
*
|
||||
* @deprecated use the new AVFifo-API with av_fifo_grow2(); note that unlike
|
||||
* this function it adds to the allocated size, rather than to the used size
|
||||
*/
|
||||
attribute_deprecated
|
||||
int av_fifo_grow(AVFifoBuffer *f, unsigned int additional_space);
|
||||
|
||||
/**
|
||||
* Read and discard the specified amount of data from an AVFifoBuffer.
|
||||
* @param f AVFifoBuffer to read from
|
||||
* @param size amount of data to read in bytes
|
||||
*
|
||||
* @deprecated use the new AVFifo-API with av_fifo_drain2()
|
||||
*/
|
||||
attribute_deprecated
|
||||
void av_fifo_drain(AVFifoBuffer *f, int size);
|
||||
|
||||
#if FF_API_FIFO_PEEK2
|
||||
/**
|
||||
* Return a pointer to the data stored in a FIFO buffer at a certain offset.
|
||||
* The FIFO buffer is not modified.
|
||||
*
|
||||
* @param f AVFifoBuffer to peek at, f must be non-NULL
|
||||
* @param offs an offset in bytes, its absolute value must be less
|
||||
* than the used buffer size or the returned pointer will
|
||||
* point outside to the buffer data.
|
||||
* The used buffer size can be checked with av_fifo_size().
|
||||
* @deprecated use the new AVFifo-API with av_fifo_peek() or av_fifo_peek_to_cb()
|
||||
*/
|
||||
attribute_deprecated
|
||||
static inline uint8_t *av_fifo_peek2(const AVFifoBuffer *f, int offs)
|
||||
{
|
||||
uint8_t *ptr = f->rptr + offs;
|
||||
if (ptr >= f->end)
|
||||
ptr = f->buffer + (ptr - f->end);
|
||||
else if (ptr < f->buffer)
|
||||
ptr = f->end - (f->buffer - ptr);
|
||||
return ptr;
|
||||
}
|
||||
#endif
|
||||
#endif
|
||||
|
||||
/**
|
||||
* @}
|
||||
*/
|
||||
|
|
17
ThirdParty/ffmpeg/include/libavutil/file.h
vendored
17
ThirdParty/ffmpeg/include/libavutil/file.h
vendored
|
@ -60,21 +60,4 @@ int av_file_map(const char *filename, uint8_t **bufptr, size_t *size,
|
|||
*/
|
||||
void av_file_unmap(uint8_t *bufptr, size_t size);
|
||||
|
||||
#if FF_API_AV_FOPEN_UTF8
|
||||
/**
|
||||
* Wrapper to work around the lack of mkstemp() on mingw.
|
||||
* Also, tries to create file in /tmp first, if possible.
|
||||
* *prefix can be a character constant; *filename will be allocated internally.
|
||||
* @return file descriptor of opened file (or negative value corresponding to an
|
||||
* AVERROR code on error)
|
||||
* and opened file name in **filename.
|
||||
* @note On very old libcs it is necessary to set a secure umask before
|
||||
* calling this, av_tempfile() can't call umask itself as it is used in
|
||||
* libraries and could interfere with the calling application.
|
||||
* @deprecated as fd numbers cannot be passed saftely between libs on some platforms
|
||||
*/
|
||||
attribute_deprecated
|
||||
int av_tempfile(const char *prefix, char **filename, int log_offset, void *log_ctx);
|
||||
#endif
|
||||
|
||||
#endif /* AVUTIL_FILE_H */
|
||||
|
|
|
@ -136,20 +136,42 @@ typedef struct AVFilmGrainH274Params {
|
|||
*/
|
||||
int model_id;
|
||||
|
||||
#if FF_API_H274_FILM_GRAIN_VCS
|
||||
/**
|
||||
* TODO: On this ABI bump, please also re-order the fields in
|
||||
* AVFilmGrainParams (see below)
|
||||
*/
|
||||
|
||||
/**
|
||||
* Specifies the bit depth used for the luma component.
|
||||
*
|
||||
* @deprecated use AVFilmGrainParams.bit_depth_luma.
|
||||
*/
|
||||
attribute_deprecated
|
||||
int bit_depth_luma;
|
||||
|
||||
/**
|
||||
* Specifies the bit depth used for the chroma components.
|
||||
*
|
||||
* @deprecated use AVFilmGrainParams.bit_depth_chroma.
|
||||
*/
|
||||
attribute_deprecated
|
||||
int bit_depth_chroma;
|
||||
|
||||
/**
|
||||
* Specifies the video signal characteristics.
|
||||
*
|
||||
* @deprecated use AVFilmGrainParams.color_{range,primaries,trc,space}.
|
||||
*/
|
||||
attribute_deprecated
|
||||
enum AVColorRange color_range;
|
||||
attribute_deprecated
|
||||
enum AVColorPrimaries color_primaries;
|
||||
attribute_deprecated
|
||||
enum AVColorTransferCharacteristic color_trc;
|
||||
attribute_deprecated
|
||||
enum AVColorSpace color_space;
|
||||
#endif
|
||||
|
||||
/**
|
||||
* Specifies the blending mode used to blend the simulated film grain
|
||||
|
@ -231,11 +253,40 @@ typedef struct AVFilmGrainParams {
|
|||
* Additional fields may be added both here and in any structure included.
|
||||
* If a codec's film grain structure differs slightly over another
|
||||
* codec's, fields within may change meaning depending on the type.
|
||||
*
|
||||
* TODO: Move this to the end of the structure, at the next ABI bump.
|
||||
*/
|
||||
union {
|
||||
AVFilmGrainAOMParams aom;
|
||||
AVFilmGrainH274Params h274;
|
||||
} codec;
|
||||
|
||||
/**
|
||||
* Intended display resolution. May be 0 if the codec does not specify
|
||||
* any restrictions.
|
||||
*/
|
||||
|
||||
int width, height;
|
||||
|
||||
/**
|
||||
* Intended subsampling ratio, or 0 for luma-only streams.
|
||||
*/
|
||||
int subsampling_x, subsampling_y;
|
||||
|
||||
/**
|
||||
* Intended video signal characteristics.
|
||||
*/
|
||||
enum AVColorRange color_range;
|
||||
enum AVColorPrimaries color_primaries;
|
||||
enum AVColorTransferCharacteristic color_trc;
|
||||
enum AVColorSpace color_space;
|
||||
|
||||
/**
|
||||
* Intended bit depth, or 0 for unknown/unspecified.
|
||||
*/
|
||||
int bit_depth_luma;
|
||||
int bit_depth_chroma;
|
||||
|
||||
} AVFilmGrainParams;
|
||||
|
||||
/**
|
||||
|
@ -257,4 +308,15 @@ AVFilmGrainParams *av_film_grain_params_alloc(size_t *size);
|
|||
*/
|
||||
AVFilmGrainParams *av_film_grain_params_create_side_data(AVFrame *frame);
|
||||
|
||||
/**
|
||||
* Select the most appropriate film grain parameters set for the frame,
|
||||
* taking into account the frame's format, resolution and video signal
|
||||
* characteristics.
|
||||
*
|
||||
* @note, for H.274, this may select a film grain parameter set with
|
||||
* greater chroma resolution than the frame. Users should take care to
|
||||
* correctly adjust the chroma grain frequency to the frame.
|
||||
*/
|
||||
const AVFilmGrainParams *av_film_grain_params_select(const AVFrame *frame);
|
||||
|
||||
#endif /* AVUTIL_FILM_GRAIN_PARAMS_H */
|
||||
|
|
262
ThirdParty/ffmpeg/include/libavutil/frame.h
vendored
262
ThirdParty/ffmpeg/include/libavutil/frame.h
vendored
|
@ -180,6 +180,10 @@ enum AVFrameSideDataType {
|
|||
/**
|
||||
* Film grain parameters for a frame, described by AVFilmGrainParams.
|
||||
* Must be present for every frame which should have film grain applied.
|
||||
*
|
||||
* May be present multiple times, for example when there are multiple
|
||||
* alternative parameter sets for different video signal characteristics.
|
||||
* The user should select the most appropriate set for the application.
|
||||
*/
|
||||
AV_FRAME_DATA_FILM_GRAIN_PARAMS,
|
||||
|
||||
|
@ -209,6 +213,21 @@ enum AVFrameSideDataType {
|
|||
* volume transform - CUVA 005.1-2021.
|
||||
*/
|
||||
AV_FRAME_DATA_DYNAMIC_HDR_VIVID,
|
||||
|
||||
/**
|
||||
* Ambient viewing environment metadata, as defined by H.274.
|
||||
*/
|
||||
AV_FRAME_DATA_AMBIENT_VIEWING_ENVIRONMENT,
|
||||
|
||||
/**
|
||||
* Provide encoder-specific hinting information about changed/unchanged
|
||||
* portions of a frame. It can be used to pass information about which
|
||||
* macroblocks can be skipped because they didn't change from the
|
||||
* corresponding ones in the previous frame. This could be useful for
|
||||
* applications which know this information in advance to speed up
|
||||
* encoding.
|
||||
*/
|
||||
AV_FRAME_DATA_VIDEO_HINT,
|
||||
};
|
||||
|
||||
enum AVActiveFormatDescription {
|
||||
|
@ -411,10 +430,15 @@ typedef struct AVFrame {
|
|||
*/
|
||||
int format;
|
||||
|
||||
#if FF_API_FRAME_KEY
|
||||
/**
|
||||
* 1 -> keyframe, 0-> not
|
||||
*
|
||||
* @deprecated Use AV_FRAME_FLAG_KEY instead
|
||||
*/
|
||||
attribute_deprecated
|
||||
int key_frame;
|
||||
#endif
|
||||
|
||||
/**
|
||||
* Picture type of the frame.
|
||||
|
@ -446,70 +470,78 @@ typedef struct AVFrame {
|
|||
*/
|
||||
AVRational time_base;
|
||||
|
||||
/**
|
||||
* picture number in bitstream order
|
||||
*/
|
||||
int coded_picture_number;
|
||||
/**
|
||||
* picture number in display order
|
||||
*/
|
||||
int display_picture_number;
|
||||
|
||||
/**
|
||||
* quality (between 1 (good) and FF_LAMBDA_MAX (bad))
|
||||
*/
|
||||
int quality;
|
||||
|
||||
/**
|
||||
* for some private data of the user
|
||||
* Frame owner's private data.
|
||||
*
|
||||
* This field may be set by the code that allocates/owns the frame data.
|
||||
* It is then not touched by any library functions, except:
|
||||
* - it is copied to other references by av_frame_copy_props() (and hence by
|
||||
* av_frame_ref());
|
||||
* - it is set to NULL when the frame is cleared by av_frame_unref()
|
||||
* - on the caller's explicit request. E.g. libavcodec encoders/decoders
|
||||
* will copy this field to/from @ref AVPacket "AVPackets" if the caller sets
|
||||
* @ref AV_CODEC_FLAG_COPY_OPAQUE.
|
||||
*
|
||||
* @see opaque_ref the reference-counted analogue
|
||||
*/
|
||||
void *opaque;
|
||||
|
||||
/**
|
||||
* When decoding, this signals how much the picture must be delayed.
|
||||
* extra_delay = repeat_pict / (2*fps)
|
||||
* Number of fields in this frame which should be repeated, i.e. the total
|
||||
* duration of this frame should be repeat_pict + 2 normal field durations.
|
||||
*
|
||||
* For interlaced frames this field may be set to 1, which signals that this
|
||||
* frame should be presented as 3 fields: beginning with the first field (as
|
||||
* determined by AV_FRAME_FLAG_TOP_FIELD_FIRST being set or not), followed
|
||||
* by the second field, and then the first field again.
|
||||
*
|
||||
* For progressive frames this field may be set to a multiple of 2, which
|
||||
* signals that this frame's duration should be (repeat_pict + 2) / 2
|
||||
* normal frame durations.
|
||||
*
|
||||
* @note This field is computed from MPEG2 repeat_first_field flag and its
|
||||
* associated flags, H.264 pic_struct from picture timing SEI, and
|
||||
* their analogues in other codecs. Typically it should only be used when
|
||||
* higher-layer timing information is not available.
|
||||
*/
|
||||
int repeat_pict;
|
||||
|
||||
#if FF_API_INTERLACED_FRAME
|
||||
/**
|
||||
* The content of the picture is interlaced.
|
||||
*
|
||||
* @deprecated Use AV_FRAME_FLAG_INTERLACED instead
|
||||
*/
|
||||
attribute_deprecated
|
||||
int interlaced_frame;
|
||||
|
||||
/**
|
||||
* If the content is interlaced, is top field displayed first.
|
||||
*
|
||||
* @deprecated Use AV_FRAME_FLAG_TOP_FIELD_FIRST instead
|
||||
*/
|
||||
attribute_deprecated
|
||||
int top_field_first;
|
||||
#endif
|
||||
|
||||
#if FF_API_PALETTE_HAS_CHANGED
|
||||
/**
|
||||
* Tell user application that palette has changed from previous frame.
|
||||
*/
|
||||
attribute_deprecated
|
||||
int palette_has_changed;
|
||||
|
||||
/**
|
||||
* reordered opaque 64 bits (generally an integer or a double precision float
|
||||
* PTS but can be anything).
|
||||
* The user sets AVCodecContext.reordered_opaque to represent the input at
|
||||
* that time,
|
||||
* the decoder reorders values as needed and sets AVFrame.reordered_opaque
|
||||
* to exactly one of the values provided by the user through AVCodecContext.reordered_opaque
|
||||
*/
|
||||
int64_t reordered_opaque;
|
||||
#endif
|
||||
|
||||
/**
|
||||
* Sample rate of the audio data.
|
||||
*/
|
||||
int sample_rate;
|
||||
|
||||
#if FF_API_OLD_CHANNEL_LAYOUT
|
||||
/**
|
||||
* Channel layout of the audio data.
|
||||
* @deprecated use ch_layout instead
|
||||
*/
|
||||
attribute_deprecated
|
||||
uint64_t channel_layout;
|
||||
#endif
|
||||
|
||||
/**
|
||||
* AVBuffer references backing the data for this frame. All the pointers in
|
||||
* data and extended_data must point inside one of the buffers in buf or
|
||||
|
@ -557,10 +589,23 @@ typedef struct AVFrame {
|
|||
* The frame data may be corrupted, e.g. due to decoding errors.
|
||||
*/
|
||||
#define AV_FRAME_FLAG_CORRUPT (1 << 0)
|
||||
/**
|
||||
* A flag to mark frames that are keyframes.
|
||||
*/
|
||||
#define AV_FRAME_FLAG_KEY (1 << 1)
|
||||
/**
|
||||
* A flag to mark the frames which need to be decoded, but shouldn't be output.
|
||||
*/
|
||||
#define AV_FRAME_FLAG_DISCARD (1 << 2)
|
||||
/**
|
||||
* A flag to mark frames whose content is interlaced.
|
||||
*/
|
||||
#define AV_FRAME_FLAG_INTERLACED (1 << 3)
|
||||
/**
|
||||
* A flag to mark frames where the top field is displayed first if the content
|
||||
* is interlaced.
|
||||
*/
|
||||
#define AV_FRAME_FLAG_TOP_FIELD_FIRST (1 << 4)
|
||||
/**
|
||||
* @}
|
||||
*/
|
||||
|
@ -597,24 +642,16 @@ typedef struct AVFrame {
|
|||
*/
|
||||
int64_t best_effort_timestamp;
|
||||
|
||||
#if FF_API_FRAME_PKT
|
||||
/**
|
||||
* reordered pos from the last AVPacket that has been input into the decoder
|
||||
* - encoding: unused
|
||||
* - decoding: Read by user.
|
||||
*/
|
||||
int64_t pkt_pos;
|
||||
|
||||
#if FF_API_PKT_DURATION
|
||||
/**
|
||||
* duration of the corresponding packet, expressed in
|
||||
* AVStream->time_base units, 0 if unknown.
|
||||
* - encoding: unused
|
||||
* - decoding: Read by user.
|
||||
*
|
||||
* @deprecated use duration instead
|
||||
* @deprecated use AV_CODEC_FLAG_COPY_OPAQUE to pass through arbitrary user
|
||||
* data from packets to frames
|
||||
*/
|
||||
attribute_deprecated
|
||||
int64_t pkt_duration;
|
||||
int64_t pkt_pos;
|
||||
#endif
|
||||
|
||||
/**
|
||||
|
@ -637,25 +674,19 @@ typedef struct AVFrame {
|
|||
#define FF_DECODE_ERROR_CONCEALMENT_ACTIVE 4
|
||||
#define FF_DECODE_ERROR_DECODE_SLICES 8
|
||||
|
||||
#if FF_API_OLD_CHANNEL_LAYOUT
|
||||
/**
|
||||
* number of audio channels, only used for audio.
|
||||
* - encoding: unused
|
||||
* - decoding: Read by user.
|
||||
* @deprecated use ch_layout instead
|
||||
*/
|
||||
attribute_deprecated
|
||||
int channels;
|
||||
#endif
|
||||
|
||||
#if FF_API_FRAME_PKT
|
||||
/**
|
||||
* size of the corresponding packet containing the compressed
|
||||
* frame.
|
||||
* It is set to a negative value if unknown.
|
||||
* - encoding: unused
|
||||
* - decoding: set by libavcodec, read by user.
|
||||
* @deprecated use AV_CODEC_FLAG_COPY_OPAQUE to pass through arbitrary user
|
||||
* data from packets to frames
|
||||
*/
|
||||
attribute_deprecated
|
||||
int pkt_size;
|
||||
#endif
|
||||
|
||||
/**
|
||||
* For hwaccel-format frames, this should be a reference to the
|
||||
|
@ -664,13 +695,18 @@ typedef struct AVFrame {
|
|||
AVBufferRef *hw_frames_ctx;
|
||||
|
||||
/**
|
||||
* AVBufferRef for free use by the API user. FFmpeg will never check the
|
||||
* contents of the buffer ref. FFmpeg calls av_buffer_unref() on it when
|
||||
* the frame is unreferenced. av_frame_copy_props() calls create a new
|
||||
* reference with av_buffer_ref() for the target frame's opaque_ref field.
|
||||
* Frame owner's private data.
|
||||
*
|
||||
* This is unrelated to the opaque field, although it serves a similar
|
||||
* purpose.
|
||||
* This field may be set by the code that allocates/owns the frame data.
|
||||
* It is then not touched by any library functions, except:
|
||||
* - a new reference to the underlying buffer is propagated by
|
||||
* av_frame_copy_props() (and hence by av_frame_ref());
|
||||
* - it is unreferenced in av_frame_unref();
|
||||
* - on the caller's explicit request. E.g. libavcodec encoders/decoders
|
||||
* will propagate a new reference to/from @ref AVPacket "AVPackets" if the
|
||||
* caller sets @ref AV_CODEC_FLAG_COPY_OPAQUE.
|
||||
*
|
||||
* @see opaque the plain pointer analogue
|
||||
*/
|
||||
AVBufferRef *opaque_ref;
|
||||
|
||||
|
@ -715,15 +751,6 @@ typedef struct AVFrame {
|
|||
} AVFrame;
|
||||
|
||||
|
||||
#if FF_API_COLORSPACE_NAME
|
||||
/**
|
||||
* Get the name of a colorspace.
|
||||
* @return a static string identifying the colorspace; can be NULL.
|
||||
* @deprecated use av_color_space_name()
|
||||
*/
|
||||
attribute_deprecated
|
||||
const char *av_get_colorspace_name(enum AVColorSpace val);
|
||||
#endif
|
||||
/**
|
||||
* Allocate an AVFrame and set its fields to default values. The resulting
|
||||
* struct must be freed using av_frame_free().
|
||||
|
@ -762,6 +789,19 @@ void av_frame_free(AVFrame **frame);
|
|||
*/
|
||||
int av_frame_ref(AVFrame *dst, const AVFrame *src);
|
||||
|
||||
/**
|
||||
* Ensure the destination frame refers to the same data described by the source
|
||||
* frame, either by creating a new reference for each AVBufferRef from src if
|
||||
* they differ from those in dst, by allocating new buffers and copying data if
|
||||
* src is not reference counted, or by unrefencing it if src is empty.
|
||||
*
|
||||
* Frame properties on dst will be replaced by those from src.
|
||||
*
|
||||
* @return 0 on success, a negative AVERROR on error. On error, dst is
|
||||
* unreferenced.
|
||||
*/
|
||||
int av_frame_replace(AVFrame *dst, const AVFrame *src);
|
||||
|
||||
/**
|
||||
* Create a new frame that references the same data as src.
|
||||
*
|
||||
|
@ -870,7 +910,7 @@ int av_frame_copy_props(AVFrame *dst, const AVFrame *src);
|
|||
* @return the buffer reference that contains the plane or NULL if the input
|
||||
* frame is not valid.
|
||||
*/
|
||||
AVBufferRef *av_frame_get_plane_buffer(AVFrame *frame, int plane);
|
||||
AVBufferRef *av_frame_get_plane_buffer(const AVFrame *frame, int plane);
|
||||
|
||||
/**
|
||||
* Add a new side data to a frame.
|
||||
|
@ -952,6 +992,88 @@ int av_frame_apply_cropping(AVFrame *frame, int flags);
|
|||
*/
|
||||
const char *av_frame_side_data_name(enum AVFrameSideDataType type);
|
||||
|
||||
/**
|
||||
* Free all side data entries and their contents, then zeroes out the
|
||||
* values which the pointers are pointing to.
|
||||
*
|
||||
* @param sd pointer to array of side data to free. Will be set to NULL
|
||||
* upon return.
|
||||
* @param nb_sd pointer to an integer containing the number of entries in
|
||||
* the array. Will be set to 0 upon return.
|
||||
*/
|
||||
void av_frame_side_data_free(AVFrameSideData ***sd, int *nb_sd);
|
||||
|
||||
#define AV_FRAME_SIDE_DATA_FLAG_UNIQUE (1 << 0)
|
||||
|
||||
/**
|
||||
* Add new side data entry to an array.
|
||||
*
|
||||
* @param sd pointer to array of side data to which to add another entry,
|
||||
* or to NULL in order to start a new array.
|
||||
* @param nb_sd pointer to an integer containing the number of entries in
|
||||
* the array.
|
||||
* @param type type of the added side data
|
||||
* @param size size of the side data
|
||||
* @param flags Some combination of AV_FRAME_SIDE_DATA_FLAG_* flags, or 0.
|
||||
*
|
||||
* @return newly added side data on success, NULL on error. In case of
|
||||
* AV_FRAME_SIDE_DATA_FLAG_UNIQUE being set, entries of matching
|
||||
* AVFrameSideDataType will be removed before the addition is
|
||||
* attempted.
|
||||
*/
|
||||
AVFrameSideData *av_frame_side_data_new(AVFrameSideData ***sd, int *nb_sd,
|
||||
enum AVFrameSideDataType type,
|
||||
size_t size, unsigned int flags);
|
||||
|
||||
/**
|
||||
* Add a new side data entry to an array based on existing side data, taking
|
||||
* a reference towards the contained AVBufferRef.
|
||||
*
|
||||
* @param sd pointer to array of side data to which to add another entry,
|
||||
* or to NULL in order to start a new array.
|
||||
* @param nb_sd pointer to an integer containing the number of entries in
|
||||
* the array.
|
||||
* @param src side data to be cloned, with a new reference utilized
|
||||
* for the buffer.
|
||||
* @param flags Some combination of AV_FRAME_SIDE_DATA_FLAG_* flags, or 0.
|
||||
*
|
||||
* @return negative error code on failure, >=0 on success. In case of
|
||||
* AV_FRAME_SIDE_DATA_FLAG_UNIQUE being set, entries of matching
|
||||
* AVFrameSideDataType will be removed before the addition is
|
||||
* attempted.
|
||||
*/
|
||||
int av_frame_side_data_clone(AVFrameSideData ***sd, int *nb_sd,
|
||||
const AVFrameSideData *src, unsigned int flags);
|
||||
|
||||
/**
|
||||
* Get a side data entry of a specific type from an array.
|
||||
*
|
||||
* @param sd array of side data.
|
||||
* @param nb_sd integer containing the number of entries in the array.
|
||||
* @param type type of side data to be queried
|
||||
*
|
||||
* @return a pointer to the side data of a given type on success, NULL if there
|
||||
* is no side data with such type in this set.
|
||||
*/
|
||||
const AVFrameSideData *av_frame_side_data_get_c(const AVFrameSideData * const *sd,
|
||||
const int nb_sd,
|
||||
enum AVFrameSideDataType type);
|
||||
|
||||
/**
|
||||
* Wrapper around av_frame_side_data_get_c() to workaround the limitation
|
||||
* that for any type T the conversion from T * const * to const T * const *
|
||||
* is not performed automatically in C.
|
||||
* @see av_frame_side_data_get_c()
|
||||
*/
|
||||
static inline
|
||||
const AVFrameSideData *av_frame_side_data_get(AVFrameSideData * const *sd,
|
||||
const int nb_sd,
|
||||
enum AVFrameSideDataType type)
|
||||
{
|
||||
return av_frame_side_data_get_c((const AVFrameSideData * const *)sd,
|
||||
nb_sd, type);
|
||||
}
|
||||
|
||||
/**
|
||||
* @}
|
||||
*/
|
||||
|
|
|
@ -340,4 +340,37 @@ AVDynamicHDRPlus *av_dynamic_hdr_plus_alloc(size_t *size);
|
|||
*/
|
||||
AVDynamicHDRPlus *av_dynamic_hdr_plus_create_side_data(AVFrame *frame);
|
||||
|
||||
/**
|
||||
* Parse the user data registered ITU-T T.35 to AVbuffer (AVDynamicHDRPlus).
|
||||
* The T.35 buffer must begin with the application mode, skipping the
|
||||
* country code, terminal provider codes, and application identifier.
|
||||
* @param s A pointer containing the decoded AVDynamicHDRPlus structure.
|
||||
* @param data The byte array containing the raw ITU-T T.35 data.
|
||||
* @param size Size of the data array in bytes.
|
||||
*
|
||||
* @return >= 0 on success. Otherwise, returns the appropriate AVERROR.
|
||||
*/
|
||||
int av_dynamic_hdr_plus_from_t35(AVDynamicHDRPlus *s, const uint8_t *data,
|
||||
size_t size);
|
||||
|
||||
#define AV_HDR_PLUS_MAX_PAYLOAD_SIZE 907
|
||||
|
||||
/**
|
||||
* Serialize dynamic HDR10+ metadata to a user data registered ITU-T T.35 buffer,
|
||||
* excluding the first 48 bytes of the header, and beginning with the application mode.
|
||||
* @param s A pointer containing the decoded AVDynamicHDRPlus structure.
|
||||
* @param[in,out] data A pointer to pointer to a byte buffer to be filled with the
|
||||
* serialized metadata.
|
||||
* If *data is NULL, a buffer be will be allocated and a pointer to
|
||||
* it stored in its place. The caller assumes ownership of the buffer.
|
||||
* May be NULL, in which case the function will only store the
|
||||
* required buffer size in *size.
|
||||
* @param[in,out] size A pointer to a size to be set to the returned buffer's size.
|
||||
* If *data is not NULL, *size must contain the size of the input
|
||||
* buffer. May be NULL only if *data is NULL.
|
||||
*
|
||||
* @return >= 0 on success. Otherwise, returns the appropriate AVERROR.
|
||||
*/
|
||||
int av_dynamic_hdr_plus_to_t35(const AVDynamicHDRPlus *s, uint8_t **data, size_t *size);
|
||||
|
||||
#endif /* AVUTIL_HDR_DYNAMIC_METADATA_H */
|
||||
|
|
|
@ -24,6 +24,52 @@
|
|||
#include "frame.h"
|
||||
#include "rational.h"
|
||||
|
||||
/**
|
||||
* HDR Vivid three spline params.
|
||||
*/
|
||||
typedef struct AVHDRVivid3SplineParams {
|
||||
/**
|
||||
* The mode of three Spline. the value shall be in the range
|
||||
* of 0 to 3, inclusive.
|
||||
*/
|
||||
int th_mode;
|
||||
|
||||
/**
|
||||
* three_Spline_TH_enable_MB is in the range of 0.0 to 1.0, inclusive
|
||||
* and in multiples of 1.0/255.
|
||||
*
|
||||
*/
|
||||
AVRational th_enable_mb;
|
||||
|
||||
/**
|
||||
* 3Spline_TH_enable of three Spline.
|
||||
* The value shall be in the range of 0.0 to 1.0, inclusive.
|
||||
* and in multiples of 1.0/4095.
|
||||
*/
|
||||
AVRational th_enable;
|
||||
|
||||
/**
|
||||
* 3Spline_TH_Delta1 of three Spline.
|
||||
* The value shall be in the range of 0.0 to 0.25, inclusive,
|
||||
* and in multiples of 0.25/1023.
|
||||
*/
|
||||
AVRational th_delta1;
|
||||
|
||||
/**
|
||||
* 3Spline_TH_Delta2 of three Spline.
|
||||
* The value shall be in the range of 0.0 to 0.25, inclusive,
|
||||
* and in multiples of 0.25/1023.
|
||||
*/
|
||||
AVRational th_delta2;
|
||||
|
||||
/**
|
||||
* 3Spline_enable_Strength of three Spline.
|
||||
* The value shall be in the range of 0.0 to 1.0, inclusive,
|
||||
* and in multiples of 1.0/255.
|
||||
*/
|
||||
AVRational enable_strength;
|
||||
} AVHDRVivid3SplineParams;
|
||||
|
||||
/**
|
||||
* Color tone mapping parameters at a processing window in a dynamic metadata for
|
||||
* CUVA 005.1:2021.
|
||||
|
@ -122,46 +168,61 @@ typedef struct AVHDRVividColorToneMappingParams {
|
|||
*/
|
||||
int three_Spline_num;
|
||||
|
||||
#if FF_API_HDR_VIVID_THREE_SPLINE
|
||||
/**
|
||||
* The mode of three Spline. the value shall be in the range
|
||||
* of 0 to 3, inclusive.
|
||||
* @deprecated Use three_spline instead
|
||||
*/
|
||||
attribute_deprecated
|
||||
int three_Spline_TH_mode;
|
||||
|
||||
/**
|
||||
* three_Spline_TH_enable_MB is in the range of 0.0 to 1.0, inclusive
|
||||
* and in multiples of 1.0/255.
|
||||
*
|
||||
* @deprecated Use three_spline instead
|
||||
*/
|
||||
attribute_deprecated
|
||||
AVRational three_Spline_TH_enable_MB;
|
||||
|
||||
/**
|
||||
* 3Spline_TH_enable of three Spline.
|
||||
* The value shall be in the range of 0.0 to 1.0, inclusive.
|
||||
* and in multiples of 1.0/4095.
|
||||
* @deprecated Use three_spline instead
|
||||
*/
|
||||
attribute_deprecated
|
||||
AVRational three_Spline_TH_enable;
|
||||
|
||||
/**
|
||||
* 3Spline_TH_Delta1 of three Spline.
|
||||
* The value shall be in the range of 0.0 to 0.25, inclusive,
|
||||
* and in multiples of 0.25/1023.
|
||||
* @deprecated Use three_spline instead
|
||||
*/
|
||||
attribute_deprecated
|
||||
AVRational three_Spline_TH_Delta1;
|
||||
|
||||
/**
|
||||
* 3Spline_TH_Delta2 of three Spline.
|
||||
* The value shall be in the range of 0.0 to 0.25, inclusive,
|
||||
* and in multiples of 0.25/1023.
|
||||
* @deprecated Use three_spline instead
|
||||
*/
|
||||
attribute_deprecated
|
||||
AVRational three_Spline_TH_Delta2;
|
||||
|
||||
/**
|
||||
* 3Spline_enable_Strength of three Spline.
|
||||
* The value shall be in the range of 0.0 to 1.0, inclusive,
|
||||
* and in multiples of 1.0/255.
|
||||
* @deprecated Use three_spline instead
|
||||
*/
|
||||
attribute_deprecated
|
||||
AVRational three_Spline_enable_Strength;
|
||||
#endif
|
||||
|
||||
AVHDRVivid3SplineParams three_spline[2];
|
||||
} AVHDRVividColorToneMappingParams;
|
||||
|
||||
|
||||
|
|
26
ThirdParty/ffmpeg/include/libavutil/hwcontext.h
vendored
26
ThirdParty/ffmpeg/include/libavutil/hwcontext.h
vendored
|
@ -37,10 +37,9 @@ enum AVHWDeviceType {
|
|||
AV_HWDEVICE_TYPE_OPENCL,
|
||||
AV_HWDEVICE_TYPE_MEDIACODEC,
|
||||
AV_HWDEVICE_TYPE_VULKAN,
|
||||
AV_HWDEVICE_TYPE_D3D12VA,
|
||||
};
|
||||
|
||||
typedef struct AVHWDeviceInternal AVHWDeviceInternal;
|
||||
|
||||
/**
|
||||
* This struct aggregates all the (hardware/vendor-specific) "high-level" state,
|
||||
* i.e. state that is not tied to a concrete processing configuration.
|
||||
|
@ -64,12 +63,6 @@ typedef struct AVHWDeviceContext {
|
|||
*/
|
||||
const AVClass *av_class;
|
||||
|
||||
/**
|
||||
* Private data used internally by libavutil. Must not be accessed in any
|
||||
* way by the caller.
|
||||
*/
|
||||
AVHWDeviceInternal *internal;
|
||||
|
||||
/**
|
||||
* This field identifies the underlying API used for hardware access.
|
||||
*
|
||||
|
@ -109,8 +102,6 @@ typedef struct AVHWDeviceContext {
|
|||
void *user_opaque;
|
||||
} AVHWDeviceContext;
|
||||
|
||||
typedef struct AVHWFramesInternal AVHWFramesInternal;
|
||||
|
||||
/**
|
||||
* This struct describes a set or pool of "hardware" frames (i.e. those with
|
||||
* data not located in normal system memory). All the frames in the pool are
|
||||
|
@ -127,12 +118,6 @@ typedef struct AVHWFramesContext {
|
|||
*/
|
||||
const AVClass *av_class;
|
||||
|
||||
/**
|
||||
* Private data used internally by libavutil. Must not be accessed in any
|
||||
* way by the caller.
|
||||
*/
|
||||
AVHWFramesInternal *internal;
|
||||
|
||||
/**
|
||||
* A reference to the parent AVHWDeviceContext. This reference is owned and
|
||||
* managed by the enclosing AVHWFramesContext, but the caller may derive
|
||||
|
@ -152,9 +137,12 @@ typedef struct AVHWFramesContext {
|
|||
* The format-specific data, allocated and freed automatically along with
|
||||
* this context.
|
||||
*
|
||||
* Should be cast by the user to the format-specific context defined in the
|
||||
* corresponding header (hwframe_*.h) and filled as described in the
|
||||
* documentation before calling av_hwframe_ctx_init().
|
||||
* The user shall ignore this field if the corresponding format-specific
|
||||
* header (hwcontext_*.h) does not define a context to be used as
|
||||
* AVHWFramesContext.hwctx.
|
||||
*
|
||||
* Otherwise, it should be cast by the user to said context and filled
|
||||
* as described in the documentation before calling av_hwframe_ctx_init().
|
||||
*
|
||||
* After any frames using this context are created, the contents of this
|
||||
* struct should not be modified by the caller.
|
||||
|
|
|
@ -62,6 +62,11 @@ typedef struct AVCUDADeviceContext {
|
|||
*/
|
||||
#define AV_CUDA_USE_PRIMARY_CONTEXT (1 << 0)
|
||||
|
||||
/**
|
||||
* Use current device context instead of creating a new one.
|
||||
*/
|
||||
#define AV_CUDA_USE_CURRENT_CONTEXT (1 << 1)
|
||||
|
||||
/**
|
||||
* @}
|
||||
*/
|
||||
|
|
134
ThirdParty/ffmpeg/include/libavutil/hwcontext_d3d12va.h
vendored
Normal file
134
ThirdParty/ffmpeg/include/libavutil/hwcontext_d3d12va.h
vendored
Normal file
|
@ -0,0 +1,134 @@
|
|||
/*
|
||||
* Direct3D 12 HW acceleration.
|
||||
*
|
||||
* copyright (c) 2022-2023 Wu Jianhua <toqsxw@outlook.com>
|
||||
*
|
||||
* This file is part of FFmpeg.
|
||||
*
|
||||
* FFmpeg is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU Lesser General Public
|
||||
* License as published by the Free Software Foundation; either
|
||||
* version 2.1 of the License, or (at your option) any later version.
|
||||
*
|
||||
* FFmpeg is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
* Lesser General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Lesser General Public
|
||||
* License along with FFmpeg; if not, write to the Free Software
|
||||
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
|
||||
*/
|
||||
|
||||
#ifndef AVUTIL_HWCONTEXT_D3D12VA_H
|
||||
#define AVUTIL_HWCONTEXT_D3D12VA_H
|
||||
|
||||
/**
|
||||
* @file
|
||||
* An API-specific header for AV_HWDEVICE_TYPE_D3D12VA.
|
||||
*
|
||||
* AVHWFramesContext.pool must contain AVBufferRefs whose
|
||||
* data pointer points to an AVD3D12VAFrame struct.
|
||||
*/
|
||||
#include <stdint.h>
|
||||
#include <initguid.h>
|
||||
#include <d3d12.h>
|
||||
#include <d3d12sdklayers.h>
|
||||
#include <d3d12video.h>
|
||||
|
||||
/**
|
||||
* @brief This struct is allocated as AVHWDeviceContext.hwctx
|
||||
*
|
||||
*/
|
||||
typedef struct AVD3D12VADeviceContext {
|
||||
/**
|
||||
* Device used for objects creation and access. This can also be
|
||||
* used to set the libavcodec decoding device.
|
||||
*
|
||||
* Can be set by the user. This is the only mandatory field - the other
|
||||
* device context fields are set from this and are available for convenience.
|
||||
*
|
||||
* Deallocating the AVHWDeviceContext will always release this interface,
|
||||
* and it does not matter whether it was user-allocated.
|
||||
*/
|
||||
ID3D12Device *device;
|
||||
|
||||
/**
|
||||
* If unset, this will be set from the device field on init.
|
||||
*
|
||||
* Deallocating the AVHWDeviceContext will always release this interface,
|
||||
* and it does not matter whether it was user-allocated.
|
||||
*/
|
||||
ID3D12VideoDevice *video_device;
|
||||
|
||||
/**
|
||||
* Callbacks for locking. They protect access to the internal staging
|
||||
* texture (for av_hwframe_transfer_data() calls). They do NOT protect
|
||||
* access to hwcontext or decoder state in general.
|
||||
*
|
||||
* If unset on init, the hwcontext implementation will set them to use an
|
||||
* internal mutex.
|
||||
*
|
||||
* The underlying lock must be recursive. lock_ctx is for free use by the
|
||||
* locking implementation.
|
||||
*/
|
||||
void (*lock)(void *lock_ctx);
|
||||
void (*unlock)(void *lock_ctx);
|
||||
void *lock_ctx;
|
||||
} AVD3D12VADeviceContext;
|
||||
|
||||
/**
|
||||
* @brief This struct is used to sync d3d12 execution
|
||||
*
|
||||
*/
|
||||
typedef struct AVD3D12VASyncContext {
|
||||
/**
|
||||
* D3D12 fence object
|
||||
*/
|
||||
ID3D12Fence *fence;
|
||||
|
||||
/**
|
||||
* A handle to the event object that's raised when the fence
|
||||
* reaches a certain value.
|
||||
*/
|
||||
HANDLE event;
|
||||
|
||||
/**
|
||||
* The fence value used for sync
|
||||
*/
|
||||
uint64_t fence_value;
|
||||
} AVD3D12VASyncContext;
|
||||
|
||||
/**
|
||||
* @brief D3D12VA frame descriptor for pool allocation.
|
||||
*
|
||||
*/
|
||||
typedef struct AVD3D12VAFrame {
|
||||
/**
|
||||
* The texture in which the frame is located. The reference count is
|
||||
* managed by the AVBufferRef, and destroying the reference will release
|
||||
* the interface.
|
||||
*/
|
||||
ID3D12Resource *texture;
|
||||
|
||||
/**
|
||||
* The sync context for the texture
|
||||
*
|
||||
* @see: https://learn.microsoft.com/en-us/windows/win32/medfound/direct3d-12-video-overview#directx-12-fences
|
||||
*/
|
||||
AVD3D12VASyncContext sync_ctx;
|
||||
} AVD3D12VAFrame;
|
||||
|
||||
/**
|
||||
* @brief This struct is allocated as AVHWFramesContext.hwctx
|
||||
*
|
||||
*/
|
||||
typedef struct AVD3D12VAFramesContext {
|
||||
/**
|
||||
* DXGI_FORMAT format. MUST be compatible with the pixel format.
|
||||
* If unset, will be automatically set.
|
||||
*/
|
||||
DXGI_FORMAT format;
|
||||
} AVD3D12VAFramesContext;
|
||||
|
||||
#endif /* AVUTIL_HWCONTEXT_D3D12VA_H */
|
|
@ -31,6 +31,31 @@ typedef struct AVMediaCodecDeviceContext {
|
|||
* This is the default surface used by decoders on this device.
|
||||
*/
|
||||
void *surface;
|
||||
|
||||
/**
|
||||
* Pointer to ANativeWindow.
|
||||
*
|
||||
* It both surface and native_window is NULL, try to create it
|
||||
* automatically if create_window is true and OS support
|
||||
* createPersistentInputSurface.
|
||||
*
|
||||
* It can be used as output surface for decoder and input surface for
|
||||
* encoder.
|
||||
*/
|
||||
void *native_window;
|
||||
|
||||
/**
|
||||
* Enable createPersistentInputSurface automatically.
|
||||
*
|
||||
* Disabled by default.
|
||||
*
|
||||
* It can be enabled by setting this flag directly, or by setting
|
||||
* AVDictionary of av_hwdevice_ctx_create(), with "create_window" as key.
|
||||
* The second method is useful for ffmpeg cmdline, e.g., we can enable it
|
||||
* via:
|
||||
* -init_hw_device mediacodec=mediacodec,create_window=1
|
||||
*/
|
||||
int create_window;
|
||||
} AVMediaCodecDeviceContext;
|
||||
|
||||
#endif /* AVUTIL_HWCONTEXT_MEDIACODEC_H */
|
||||
|
|
|
@ -39,10 +39,13 @@
|
|||
* depending on application usage, so it is preferable to let CoreVideo manage
|
||||
* the pool using the default implementation.
|
||||
*
|
||||
* Currently AVHWDeviceContext.hwctx and AVHWFramesContext.hwctx are always
|
||||
* NULL.
|
||||
* Currently AVHWDeviceContext.hwctx are always NULL.
|
||||
*/
|
||||
|
||||
typedef struct AVVTFramesContext {
|
||||
enum AVColorRange color_range;
|
||||
} AVVTFramesContext;
|
||||
|
||||
/**
|
||||
* Convert a VideoToolbox (actually CoreVideo) format to AVPixelFormat.
|
||||
* Returns AV_PIX_FMT_NONE if no known equivalent was found.
|
||||
|
|
|
@ -27,6 +27,8 @@
|
|||
#include "pixfmt.h"
|
||||
#include "frame.h"
|
||||
|
||||
typedef struct AVVkFrame AVVkFrame;
|
||||
|
||||
/**
|
||||
* @file
|
||||
* API-specific header for AV_HWDEVICE_TYPE_VULKAN.
|
||||
|
@ -53,7 +55,7 @@ typedef struct AVVulkanDeviceContext {
|
|||
PFN_vkGetInstanceProcAddr get_proc_addr;
|
||||
|
||||
/**
|
||||
* Vulkan instance. Must be at least version 1.2.
|
||||
* Vulkan instance. Must be at least version 1.3.
|
||||
*/
|
||||
VkInstance inst;
|
||||
|
||||
|
@ -135,6 +137,19 @@ typedef struct AVVulkanDeviceContext {
|
|||
*/
|
||||
int queue_family_decode_index;
|
||||
int nb_decode_queues;
|
||||
|
||||
/**
|
||||
* Locks a queue, preventing other threads from submitting any command
|
||||
* buffers to this queue.
|
||||
* If set to NULL, will be set to lavu-internal functions that utilize a
|
||||
* mutex.
|
||||
*/
|
||||
void (*lock_queue)(struct AVHWDeviceContext *ctx, uint32_t queue_family, uint32_t index);
|
||||
|
||||
/**
|
||||
* Similar to lock_queue(), unlocks a queue. Must only be called after locking.
|
||||
*/
|
||||
void (*unlock_queue)(struct AVHWDeviceContext *ctx, uint32_t queue_family, uint32_t index);
|
||||
} AVVulkanDeviceContext;
|
||||
|
||||
/**
|
||||
|
@ -145,10 +160,14 @@ typedef enum AVVkFrameFlags {
|
|||
* device and tiling during av_hwframe_ctx_init(). */
|
||||
AV_VK_FRAME_FLAG_NONE = (1ULL << 0),
|
||||
|
||||
/* Image planes will be allocated in a single VkDeviceMemory, rather
|
||||
* than as per-plane VkDeviceMemory allocations. Required for exporting
|
||||
* to VAAPI on Intel devices. */
|
||||
#if FF_API_VULKAN_CONTIGUOUS_MEMORY
|
||||
/* DEPRECATED: does nothing. Replaced by multiplane images. */
|
||||
AV_VK_FRAME_FLAG_CONTIGUOUS_MEMORY = (1ULL << 1),
|
||||
#endif
|
||||
|
||||
/* Disables multiplane images.
|
||||
* This is required to export/import images from CUDA. */
|
||||
AV_VK_FRAME_FLAG_DISABLE_MULTIPLANE = (1ULL << 2),
|
||||
} AVVkFrameFlags;
|
||||
|
||||
/**
|
||||
|
@ -156,26 +175,32 @@ typedef enum AVVkFrameFlags {
|
|||
*/
|
||||
typedef struct AVVulkanFramesContext {
|
||||
/**
|
||||
* Controls the tiling of allocated frames. If left as optimal tiling,
|
||||
* then during av_hwframe_ctx_init() will decide based on whether the device
|
||||
* supports DRM modifiers, or if the linear_images flag is set, otherwise
|
||||
* will allocate optimally-tiled images.
|
||||
* Controls the tiling of allocated frames.
|
||||
* If left as VK_IMAGE_TILING_OPTIMAL (0), will use optimal tiling.
|
||||
* Can be set to VK_IMAGE_TILING_LINEAR to force linear images,
|
||||
* or VK_IMAGE_TILING_DRM_FORMAT_MODIFIER_EXT to force DMABUF-backed
|
||||
* images.
|
||||
* @note Imported frames from other APIs ignore this.
|
||||
*/
|
||||
VkImageTiling tiling;
|
||||
|
||||
/**
|
||||
* Defines extra usage of output frames. If left as 0, the following bits
|
||||
* are set: TRANSFER_SRC, TRANSFER_DST. SAMPLED and STORAGE.
|
||||
* Defines extra usage of output frames. If non-zero, all flags MUST be
|
||||
* supported by the VkFormat. Otherwise, will use supported flags amongst:
|
||||
* - VK_IMAGE_USAGE_SAMPLED_BIT
|
||||
* - VK_IMAGE_USAGE_STORAGE_BIT
|
||||
* - VK_IMAGE_USAGE_TRANSFER_SRC_BIT
|
||||
* - VK_IMAGE_USAGE_TRANSFER_DST_BIT
|
||||
*/
|
||||
VkImageUsageFlagBits usage;
|
||||
|
||||
/**
|
||||
* Extension data for image creation.
|
||||
* If VkImageDrmFormatModifierListCreateInfoEXT is present in the chain,
|
||||
* and the device supports DRM modifiers, then images will be allocated
|
||||
* with the specific requested DRM modifiers.
|
||||
* If DRM tiling is used, a VkImageDrmFormatModifierListCreateInfoEXT structure
|
||||
* can be added to specify the exact modifier to use.
|
||||
*
|
||||
* Additional structures may be added at av_hwframe_ctx_init() time,
|
||||
* which will be freed automatically on uninit(), so users need only free
|
||||
* which will be freed automatically on uninit(), so users must only free
|
||||
* any structures they've allocated themselves.
|
||||
*/
|
||||
void *create_pnext;
|
||||
|
@ -195,36 +220,65 @@ typedef struct AVVulkanFramesContext {
|
|||
* av_hwframe_ctx_init().
|
||||
*/
|
||||
AVVkFrameFlags flags;
|
||||
|
||||
/**
|
||||
* Flags to set during image creation. If unset, defaults to
|
||||
* VK_IMAGE_CREATE_ALIAS_BIT.
|
||||
*/
|
||||
VkImageCreateFlags img_flags;
|
||||
|
||||
/**
|
||||
* Vulkan format for each image. MUST be compatible with the pixel format.
|
||||
* If unset, will be automatically set.
|
||||
* There are at most two compatible formats for a frame - a multiplane
|
||||
* format, and a single-plane multi-image format.
|
||||
*/
|
||||
VkFormat format[AV_NUM_DATA_POINTERS];
|
||||
|
||||
/**
|
||||
* Number of layers each image will have.
|
||||
*/
|
||||
int nb_layers;
|
||||
|
||||
/**
|
||||
* Locks a frame, preventing other threads from changing frame properties.
|
||||
* Users SHOULD only ever lock just before command submission in order
|
||||
* to get accurate frame properties, and unlock immediately after command
|
||||
* submission without waiting for it to finish.
|
||||
*
|
||||
* If unset, will be set to lavu-internal functions that utilize a mutex.
|
||||
*/
|
||||
void (*lock_frame)(struct AVHWFramesContext *fc, AVVkFrame *vkf);
|
||||
|
||||
/**
|
||||
* Similar to lock_frame(), unlocks a frame. Must only be called after locking.
|
||||
*/
|
||||
void (*unlock_frame)(struct AVHWFramesContext *fc, AVVkFrame *vkf);
|
||||
} AVVulkanFramesContext;
|
||||
|
||||
/*
|
||||
* Frame structure, the VkFormat of the image will always match
|
||||
* the pool's sw_format.
|
||||
* All frames, imported or allocated, will be created with the
|
||||
* VK_IMAGE_CREATE_ALIAS_BIT flag set, so the memory may be aliased if needed.
|
||||
*
|
||||
* If all queue family indices in the device context are the same,
|
||||
* images will be created with the EXCLUSIVE sharing mode. Otherwise, all images
|
||||
* will be created using the CONCURRENT sharing mode.
|
||||
* Frame structure.
|
||||
*
|
||||
* @note the size of this structure is not part of the ABI, to allocate
|
||||
* you must use @av_vk_frame_alloc().
|
||||
*/
|
||||
typedef struct AVVkFrame {
|
||||
struct AVVkFrame {
|
||||
/**
|
||||
* Vulkan images to which the memory is bound to.
|
||||
* May be one for multiplane formats, or multiple.
|
||||
*/
|
||||
VkImage img[AV_NUM_DATA_POINTERS];
|
||||
|
||||
/**
|
||||
* The same tiling must be used for all images in the frame.
|
||||
* Tiling for the frame.
|
||||
*/
|
||||
VkImageTiling tiling;
|
||||
|
||||
/**
|
||||
* Memory backing the images. Could be less than the amount of planes,
|
||||
* in which case the offset value will indicate the binding offset of
|
||||
* each plane in the memory.
|
||||
* Memory backing the images. Either one, or as many as there are planes
|
||||
* in the sw_format.
|
||||
* In case of having multiple VkImages, but one memory, the offset field
|
||||
* will indicate the bound offset for each image.
|
||||
*/
|
||||
VkDeviceMemory mem[AV_NUM_DATA_POINTERS];
|
||||
size_t size[AV_NUM_DATA_POINTERS];
|
||||
|
@ -235,13 +289,13 @@ typedef struct AVVkFrame {
|
|||
VkMemoryPropertyFlagBits flags;
|
||||
|
||||
/**
|
||||
* Updated after every barrier
|
||||
* Updated after every barrier. One per VkImage.
|
||||
*/
|
||||
VkAccessFlagBits access[AV_NUM_DATA_POINTERS];
|
||||
VkImageLayout layout[AV_NUM_DATA_POINTERS];
|
||||
|
||||
/**
|
||||
* Synchronization timeline semaphores, one for each sw_format plane.
|
||||
* Synchronization timeline semaphores, one for each VkImage.
|
||||
* Must not be freed manually. Must be waited on at every submission using
|
||||
* the value in sem_value, and must be signalled at every submission,
|
||||
* using an incremented value.
|
||||
|
@ -250,6 +304,7 @@ typedef struct AVVkFrame {
|
|||
|
||||
/**
|
||||
* Up to date semaphore value at which each image becomes accessible.
|
||||
* One per VkImage.
|
||||
* Clients must wait on this value when submitting a command queue,
|
||||
* and increment it when signalling.
|
||||
*/
|
||||
|
@ -261,10 +316,18 @@ typedef struct AVVkFrame {
|
|||
struct AVVkFrameInternal *internal;
|
||||
|
||||
/**
|
||||
* Describes the binding offset of each plane to the VkDeviceMemory.
|
||||
* Describes the binding offset of each image to the VkDeviceMemory.
|
||||
* One per VkImage.
|
||||
*/
|
||||
ptrdiff_t offset[AV_NUM_DATA_POINTERS];
|
||||
} AVVkFrame;
|
||||
|
||||
/**
|
||||
* Queue family of the images. Must be VK_QUEUE_FAMILY_IGNORED if
|
||||
* the image was allocated with the CONCURRENT concurrency option.
|
||||
* One per VkImage.
|
||||
*/
|
||||
uint32_t queue_family[AV_NUM_DATA_POINTERS];
|
||||
};
|
||||
|
||||
/**
|
||||
* Allocates a single AVVkFrame and initializes everything as 0.
|
||||
|
@ -273,7 +336,8 @@ typedef struct AVVkFrame {
|
|||
AVVkFrame *av_vk_frame_alloc(void);
|
||||
|
||||
/**
|
||||
* Returns the format of each image up to the number of planes for a given sw_format.
|
||||
* Returns the optimal per-plane Vulkan format for a given sw_format,
|
||||
* one for each plane.
|
||||
* Returns NULL on unsupported formats.
|
||||
*/
|
||||
const VkFormat *av_vkfmt_from_pixfmt(enum AVPixelFormat p);
|
||||
|
|
680
ThirdParty/ffmpeg/include/libavutil/iamf.h
vendored
Normal file
680
ThirdParty/ffmpeg/include/libavutil/iamf.h
vendored
Normal file
|
@ -0,0 +1,680 @@
|
|||
/*
|
||||
* Immersive Audio Model and Formats helper functions and defines
|
||||
*
|
||||
* This file is part of FFmpeg.
|
||||
*
|
||||
* FFmpeg is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU Lesser General Public
|
||||
* License as published by the Free Software Foundation; either
|
||||
* version 2.1 of the License, or (at your option) any later version.
|
||||
*
|
||||
* FFmpeg is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
* Lesser General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Lesser General Public
|
||||
* License along with FFmpeg; if not, write to the Free Software
|
||||
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
|
||||
*/
|
||||
|
||||
#ifndef AVUTIL_IAMF_H
|
||||
#define AVUTIL_IAMF_H
|
||||
|
||||
/**
|
||||
* @file
|
||||
* Immersive Audio Model and Formats API header
|
||||
* @see <a href="https://aomediacodec.github.io/iamf/">Immersive Audio Model and Formats</a>
|
||||
*/
|
||||
|
||||
#include <stdint.h>
|
||||
#include <stddef.h>
|
||||
|
||||
#include "attributes.h"
|
||||
#include "avassert.h"
|
||||
#include "channel_layout.h"
|
||||
#include "dict.h"
|
||||
#include "rational.h"
|
||||
|
||||
/**
|
||||
* @defgroup lavu_iamf_params Parameter Definition
|
||||
* @{
|
||||
* Parameters as defined in section 3.6.1 and 3.8 of IAMF.
|
||||
* @}
|
||||
* @defgroup lavu_iamf_audio Audio Element
|
||||
* @{
|
||||
* Audio Elements as defined in section 3.6 of IAMF.
|
||||
* @}
|
||||
* @defgroup lavu_iamf_mix Mix Presentation
|
||||
* @{
|
||||
* Mix Presentations as defined in section 3.7 of IAMF.
|
||||
* @}
|
||||
*
|
||||
* @}
|
||||
* @addtogroup lavu_iamf_params
|
||||
* @{
|
||||
*/
|
||||
enum AVIAMFAnimationType {
|
||||
AV_IAMF_ANIMATION_TYPE_STEP,
|
||||
AV_IAMF_ANIMATION_TYPE_LINEAR,
|
||||
AV_IAMF_ANIMATION_TYPE_BEZIER,
|
||||
};
|
||||
|
||||
/**
|
||||
* Mix Gain Parameter Data as defined in section 3.8.1 of IAMF.
|
||||
*
|
||||
* @note This struct's size is not a part of the public ABI.
|
||||
*/
|
||||
typedef struct AVIAMFMixGain {
|
||||
const AVClass *av_class;
|
||||
|
||||
/**
|
||||
* Duration for the given subblock, in units of
|
||||
* 1 / @ref AVIAMFParamDefinition.parameter_rate "parameter_rate".
|
||||
* It must not be 0.
|
||||
*/
|
||||
unsigned int subblock_duration;
|
||||
/**
|
||||
* The type of animation applied to the parameter values.
|
||||
*/
|
||||
enum AVIAMFAnimationType animation_type;
|
||||
/**
|
||||
* Parameter value that is applied at the start of the subblock.
|
||||
* Applies to all defined Animation Types.
|
||||
*
|
||||
* Valid range of values is -128.0 to 128.0
|
||||
*/
|
||||
AVRational start_point_value;
|
||||
/**
|
||||
* Parameter value that is applied at the end of the subblock.
|
||||
* Applies only to AV_IAMF_ANIMATION_TYPE_LINEAR and
|
||||
* AV_IAMF_ANIMATION_TYPE_BEZIER Animation Types.
|
||||
*
|
||||
* Valid range of values is -128.0 to 128.0
|
||||
*/
|
||||
AVRational end_point_value;
|
||||
/**
|
||||
* Parameter value of the middle control point of a quadratic Bezier
|
||||
* curve, i.e., its y-axis value.
|
||||
* Applies only to AV_IAMF_ANIMATION_TYPE_BEZIER Animation Type.
|
||||
*
|
||||
* Valid range of values is -128.0 to 128.0
|
||||
*/
|
||||
AVRational control_point_value;
|
||||
/**
|
||||
* Parameter value of the time of the middle control point of a
|
||||
* quadratic Bezier curve, i.e., its x-axis value.
|
||||
* Applies only to AV_IAMF_ANIMATION_TYPE_BEZIER Animation Type.
|
||||
*
|
||||
* Valid range of values is 0.0 to 1.0
|
||||
*/
|
||||
AVRational control_point_relative_time;
|
||||
} AVIAMFMixGain;
|
||||
|
||||
/**
|
||||
* Demixing Info Parameter Data as defined in section 3.8.2 of IAMF.
|
||||
*
|
||||
* @note This struct's size is not a part of the public ABI.
|
||||
*/
|
||||
typedef struct AVIAMFDemixingInfo {
|
||||
const AVClass *av_class;
|
||||
|
||||
/**
|
||||
* Duration for the given subblock, in units of
|
||||
* 1 / @ref AVIAMFParamDefinition.parameter_rate "parameter_rate".
|
||||
* It must not be 0.
|
||||
*/
|
||||
unsigned int subblock_duration;
|
||||
/**
|
||||
* Pre-defined combination of demixing parameters.
|
||||
*/
|
||||
unsigned int dmixp_mode;
|
||||
} AVIAMFDemixingInfo;
|
||||
|
||||
/**
|
||||
* Recon Gain Info Parameter Data as defined in section 3.8.3 of IAMF.
|
||||
*
|
||||
* @note This struct's size is not a part of the public ABI.
|
||||
*/
|
||||
typedef struct AVIAMFReconGain {
|
||||
const AVClass *av_class;
|
||||
|
||||
/**
|
||||
* Duration for the given subblock, in units of
|
||||
* 1 / @ref AVIAMFParamDefinition.parameter_rate "parameter_rate".
|
||||
* It must not be 0.
|
||||
*/
|
||||
unsigned int subblock_duration;
|
||||
|
||||
/**
|
||||
* Array of gain values to be applied to each channel for each layer
|
||||
* defined in the Audio Element referencing the parent Parameter Definition.
|
||||
* Values for layers where the AV_IAMF_LAYER_FLAG_RECON_GAIN flag is not set
|
||||
* are undefined.
|
||||
*
|
||||
* Channel order is: FL, C, FR, SL, SR, TFL, TFR, BL, BR, TBL, TBR, LFE
|
||||
*/
|
||||
uint8_t recon_gain[6][12];
|
||||
} AVIAMFReconGain;
|
||||
|
||||
enum AVIAMFParamDefinitionType {
|
||||
/**
|
||||
* Subblocks are of struct type AVIAMFMixGain
|
||||
*/
|
||||
AV_IAMF_PARAMETER_DEFINITION_MIX_GAIN,
|
||||
/**
|
||||
* Subblocks are of struct type AVIAMFDemixingInfo
|
||||
*/
|
||||
AV_IAMF_PARAMETER_DEFINITION_DEMIXING,
|
||||
/**
|
||||
* Subblocks are of struct type AVIAMFReconGain
|
||||
*/
|
||||
AV_IAMF_PARAMETER_DEFINITION_RECON_GAIN,
|
||||
};
|
||||
|
||||
/**
|
||||
* Parameters as defined in section 3.6.1 of IAMF.
|
||||
*
|
||||
* The struct is allocated by av_iamf_param_definition_alloc() along with an
|
||||
* array of subblocks, its type depending on the value of type.
|
||||
* This array is placed subblocks_offset bytes after the start of this struct.
|
||||
*
|
||||
* @note This struct's size is not a part of the public ABI.
|
||||
*/
|
||||
typedef struct AVIAMFParamDefinition {
|
||||
const AVClass *av_class;
|
||||
|
||||
/**
|
||||
* Offset in bytes from the start of this struct, at which the subblocks
|
||||
* array is located.
|
||||
*/
|
||||
size_t subblocks_offset;
|
||||
/**
|
||||
* Size in bytes of each element in the subblocks array.
|
||||
*/
|
||||
size_t subblock_size;
|
||||
/**
|
||||
* Number of subblocks in the array.
|
||||
*/
|
||||
unsigned int nb_subblocks;
|
||||
|
||||
/**
|
||||
* Parameters type. Determines the type of the subblock elements.
|
||||
*/
|
||||
enum AVIAMFParamDefinitionType type;
|
||||
|
||||
/**
|
||||
* Identifier for the paremeter substream.
|
||||
*/
|
||||
unsigned int parameter_id;
|
||||
/**
|
||||
* Sample rate for the paremeter substream. It must not be 0.
|
||||
*/
|
||||
unsigned int parameter_rate;
|
||||
|
||||
/**
|
||||
* The accumulated duration of all blocks in this parameter definition,
|
||||
* in units of 1 / @ref parameter_rate.
|
||||
*
|
||||
* May be 0, in which case all duration values should be specified in
|
||||
* another parameter definition referencing the same parameter_id.
|
||||
*/
|
||||
unsigned int duration;
|
||||
/**
|
||||
* The duration of every subblock in the case where all subblocks, with
|
||||
* the optional exception of the last subblock, have equal durations.
|
||||
*
|
||||
* Must be 0 if subblocks have different durations.
|
||||
*/
|
||||
unsigned int constant_subblock_duration;
|
||||
} AVIAMFParamDefinition;
|
||||
|
||||
const AVClass *av_iamf_param_definition_get_class(void);
|
||||
|
||||
/**
|
||||
* Allocates memory for AVIAMFParamDefinition, plus an array of {@code nb_subblocks}
|
||||
* amount of subblocks of the given type and initializes the variables. Can be
|
||||
* freed with a normal av_free() call.
|
||||
*
|
||||
* @param size if non-NULL, the size in bytes of the resulting data array is written here.
|
||||
*/
|
||||
AVIAMFParamDefinition *av_iamf_param_definition_alloc(enum AVIAMFParamDefinitionType type,
|
||||
unsigned int nb_subblocks, size_t *size);
|
||||
|
||||
/**
|
||||
* Get the subblock at the specified {@code idx}. Must be between 0 and nb_subblocks - 1.
|
||||
*
|
||||
* The @ref AVIAMFParamDefinition.type "param definition type" defines
|
||||
* the struct type of the returned pointer.
|
||||
*/
|
||||
static av_always_inline void*
|
||||
av_iamf_param_definition_get_subblock(const AVIAMFParamDefinition *par, unsigned int idx)
|
||||
{
|
||||
av_assert0(idx < par->nb_subblocks);
|
||||
return (void *)((uint8_t *)par + par->subblocks_offset + idx * par->subblock_size);
|
||||
}
|
||||
|
||||
/**
|
||||
* @}
|
||||
* @addtogroup lavu_iamf_audio
|
||||
* @{
|
||||
*/
|
||||
|
||||
enum AVIAMFAmbisonicsMode {
|
||||
AV_IAMF_AMBISONICS_MODE_MONO,
|
||||
AV_IAMF_AMBISONICS_MODE_PROJECTION,
|
||||
};
|
||||
|
||||
/**
|
||||
* Recon gain information for the layer is present in AVIAMFReconGain
|
||||
*/
|
||||
#define AV_IAMF_LAYER_FLAG_RECON_GAIN (1 << 0)
|
||||
|
||||
/**
|
||||
* A layer defining a Channel Layout in the Audio Element.
|
||||
*
|
||||
* When @ref AVIAMFAudioElement.audio_element_type "the parent's Audio Element type"
|
||||
* is AV_IAMF_AUDIO_ELEMENT_TYPE_CHANNEL, this corresponds to an Scalable Channel
|
||||
* Layout layer as defined in section 3.6.2 of IAMF.
|
||||
* For AV_IAMF_AUDIO_ELEMENT_TYPE_SCENE, it is an Ambisonics channel
|
||||
* layout as defined in section 3.6.3 of IAMF.
|
||||
*
|
||||
* @note The struct should be allocated with av_iamf_audio_element_add_layer()
|
||||
* and its size is not a part of the public ABI.
|
||||
*/
|
||||
typedef struct AVIAMFLayer {
|
||||
const AVClass *av_class;
|
||||
|
||||
AVChannelLayout ch_layout;
|
||||
|
||||
/**
|
||||
* A bitmask which may contain a combination of AV_IAMF_LAYER_FLAG_* flags.
|
||||
*/
|
||||
unsigned int flags;
|
||||
/**
|
||||
* Output gain channel flags as defined in section 3.6.2 of IAMF.
|
||||
*
|
||||
* This field is defined only if @ref AVIAMFAudioElement.audio_element_type
|
||||
* "the parent's Audio Element type" is AV_IAMF_AUDIO_ELEMENT_TYPE_CHANNEL,
|
||||
* must be 0 otherwise.
|
||||
*/
|
||||
unsigned int output_gain_flags;
|
||||
/**
|
||||
* Output gain as defined in section 3.6.2 of IAMF.
|
||||
*
|
||||
* Must be 0 if @ref output_gain_flags is 0.
|
||||
*/
|
||||
AVRational output_gain;
|
||||
/**
|
||||
* Ambisonics mode as defined in section 3.6.3 of IAMF.
|
||||
*
|
||||
* This field is defined only if @ref AVIAMFAudioElement.audio_element_type
|
||||
* "the parent's Audio Element type" is AV_IAMF_AUDIO_ELEMENT_TYPE_SCENE.
|
||||
*
|
||||
* If AV_IAMF_AMBISONICS_MODE_MONO, channel_mapping is defined implicitly
|
||||
* (Ambisonic Order) or explicitly (Custom Order with ambi channels) in
|
||||
* @ref ch_layout.
|
||||
* If AV_IAMF_AMBISONICS_MODE_PROJECTION, @ref demixing_matrix must be set.
|
||||
*/
|
||||
enum AVIAMFAmbisonicsMode ambisonics_mode;
|
||||
|
||||
/**
|
||||
* Demixing matrix as defined in section 3.6.3 of IAMF.
|
||||
*
|
||||
* The length of the array is ch_layout.nb_channels multiplied by the sum of
|
||||
* the amount of streams in the group plus the amount of streams in the group
|
||||
* that are stereo.
|
||||
*
|
||||
* May be set only if @ref ambisonics_mode == AV_IAMF_AMBISONICS_MODE_PROJECTION,
|
||||
* must be NULL otherwise.
|
||||
*/
|
||||
AVRational *demixing_matrix;
|
||||
} AVIAMFLayer;
|
||||
|
||||
|
||||
enum AVIAMFAudioElementType {
|
||||
AV_IAMF_AUDIO_ELEMENT_TYPE_CHANNEL,
|
||||
AV_IAMF_AUDIO_ELEMENT_TYPE_SCENE,
|
||||
};
|
||||
|
||||
/**
|
||||
* Information on how to combine one or more audio streams, as defined in
|
||||
* section 3.6 of IAMF.
|
||||
*
|
||||
* @note The struct should be allocated with av_iamf_audio_element_alloc()
|
||||
* and its size is not a part of the public ABI.
|
||||
*/
|
||||
typedef struct AVIAMFAudioElement {
|
||||
const AVClass *av_class;
|
||||
|
||||
AVIAMFLayer **layers;
|
||||
/**
|
||||
* Number of layers, or channel groups, in the Audio Element.
|
||||
* There may be 6 layers at most, and for @ref audio_element_type
|
||||
* AV_IAMF_AUDIO_ELEMENT_TYPE_SCENE, there may be exactly 1.
|
||||
*
|
||||
* Set by av_iamf_audio_element_add_layer(), must not be
|
||||
* modified by any other code.
|
||||
*/
|
||||
unsigned int nb_layers;
|
||||
|
||||
/**
|
||||
* Demixing information used to reconstruct a scalable channel audio
|
||||
* representation.
|
||||
* The @ref AVIAMFParamDefinition.type "type" must be
|
||||
* AV_IAMF_PARAMETER_DEFINITION_DEMIXING.
|
||||
*/
|
||||
AVIAMFParamDefinition *demixing_info;
|
||||
/**
|
||||
* Recon gain information used to reconstruct a scalable channel audio
|
||||
* representation.
|
||||
* The @ref AVIAMFParamDefinition.type "type" must be
|
||||
* AV_IAMF_PARAMETER_DEFINITION_RECON_GAIN.
|
||||
*/
|
||||
AVIAMFParamDefinition *recon_gain_info;
|
||||
|
||||
/**
|
||||
* Audio element type as defined in section 3.6 of IAMF.
|
||||
*/
|
||||
enum AVIAMFAudioElementType audio_element_type;
|
||||
|
||||
/**
|
||||
* Default weight value as defined in section 3.6 of IAMF.
|
||||
*/
|
||||
unsigned int default_w;
|
||||
} AVIAMFAudioElement;
|
||||
|
||||
const AVClass *av_iamf_audio_element_get_class(void);
|
||||
|
||||
/**
|
||||
* Allocates a AVIAMFAudioElement, and initializes its fields with default values.
|
||||
* No layers are allocated. Must be freed with av_iamf_audio_element_free().
|
||||
*
|
||||
* @see av_iamf_audio_element_add_layer()
|
||||
*/
|
||||
AVIAMFAudioElement *av_iamf_audio_element_alloc(void);
|
||||
|
||||
/**
|
||||
* Allocate a layer and add it to a given AVIAMFAudioElement.
|
||||
* It is freed by av_iamf_audio_element_free() alongside the rest of the parent
|
||||
* AVIAMFAudioElement.
|
||||
*
|
||||
* @return a pointer to the allocated layer.
|
||||
*/
|
||||
AVIAMFLayer *av_iamf_audio_element_add_layer(AVIAMFAudioElement *audio_element);
|
||||
|
||||
/**
|
||||
* Free an AVIAMFAudioElement and all its contents.
|
||||
*
|
||||
* @param audio_element pointer to pointer to an allocated AVIAMFAudioElement.
|
||||
* upon return, *audio_element will be set to NULL.
|
||||
*/
|
||||
void av_iamf_audio_element_free(AVIAMFAudioElement **audio_element);
|
||||
|
||||
/**
|
||||
* @}
|
||||
* @addtogroup lavu_iamf_mix
|
||||
* @{
|
||||
*/
|
||||
|
||||
enum AVIAMFHeadphonesMode {
|
||||
/**
|
||||
* The referenced Audio Element shall be rendered to stereo loudspeakers.
|
||||
*/
|
||||
AV_IAMF_HEADPHONES_MODE_STEREO,
|
||||
/**
|
||||
* The referenced Audio Element shall be rendered with a binaural renderer.
|
||||
*/
|
||||
AV_IAMF_HEADPHONES_MODE_BINAURAL,
|
||||
};
|
||||
|
||||
/**
|
||||
* Submix element as defined in section 3.7 of IAMF.
|
||||
*
|
||||
* @note The struct should be allocated with av_iamf_submix_add_element()
|
||||
* and its size is not a part of the public ABI.
|
||||
*/
|
||||
typedef struct AVIAMFSubmixElement {
|
||||
const AVClass *av_class;
|
||||
|
||||
/**
|
||||
* The id of the Audio Element this submix element references.
|
||||
*/
|
||||
unsigned int audio_element_id;
|
||||
|
||||
/**
|
||||
* Information required required for applying any processing to the
|
||||
* referenced and rendered Audio Element before being summed with other
|
||||
* processed Audio Elements.
|
||||
* The @ref AVIAMFParamDefinition.type "type" must be
|
||||
* AV_IAMF_PARAMETER_DEFINITION_MIX_GAIN.
|
||||
*/
|
||||
AVIAMFParamDefinition *element_mix_config;
|
||||
|
||||
/**
|
||||
* Default mix gain value to apply when there are no AVIAMFParamDefinition
|
||||
* with @ref element_mix_config "element_mix_config's"
|
||||
* @ref AVIAMFParamDefinition.parameter_id "parameter_id" available for a
|
||||
* given audio frame.
|
||||
*/
|
||||
AVRational default_mix_gain;
|
||||
|
||||
/**
|
||||
* A value that indicates whether the referenced channel-based Audio Element
|
||||
* shall be rendered to stereo loudspeakers or spatialized with a binaural
|
||||
* renderer when played back on headphones.
|
||||
* If the Audio Element is not of @ref AVIAMFAudioElement.audio_element_type
|
||||
* "type" AV_IAMF_AUDIO_ELEMENT_TYPE_CHANNEL, then this field is undefined.
|
||||
*/
|
||||
enum AVIAMFHeadphonesMode headphones_rendering_mode;
|
||||
|
||||
/**
|
||||
* A dictionary of strings describing the submix in different languages.
|
||||
* Must have the same amount of entries as
|
||||
* @ref AVIAMFMixPresentation.annotations "the mix's annotations", stored
|
||||
* in the same order, and with the same key strings.
|
||||
*
|
||||
* @ref AVDictionaryEntry.key "key" is a string conforming to BCP-47 that
|
||||
* specifies the language for the string stored in
|
||||
* @ref AVDictionaryEntry.value "value".
|
||||
*/
|
||||
AVDictionary *annotations;
|
||||
} AVIAMFSubmixElement;
|
||||
|
||||
enum AVIAMFSubmixLayoutType {
|
||||
/**
|
||||
* The layout follows the loudspeaker sound system convention of ITU-2051-3.
|
||||
*/
|
||||
AV_IAMF_SUBMIX_LAYOUT_TYPE_LOUDSPEAKERS = 2,
|
||||
/**
|
||||
* The layout is binaural.
|
||||
*/
|
||||
AV_IAMF_SUBMIX_LAYOUT_TYPE_BINAURAL = 3,
|
||||
};
|
||||
|
||||
/**
|
||||
* Submix layout as defined in section 3.7.6 of IAMF.
|
||||
*
|
||||
* @note The struct should be allocated with av_iamf_submix_add_layout()
|
||||
* and its size is not a part of the public ABI.
|
||||
*/
|
||||
typedef struct AVIAMFSubmixLayout {
|
||||
const AVClass *av_class;
|
||||
|
||||
enum AVIAMFSubmixLayoutType layout_type;
|
||||
|
||||
/**
|
||||
* Channel layout matching one of Sound Systems A to J of ITU-2051-3, plus
|
||||
* 7.1.2ch and 3.1.2ch
|
||||
* If layout_type is not AV_IAMF_SUBMIX_LAYOUT_TYPE_LOUDSPEAKERS, this field
|
||||
* is undefined.
|
||||
*/
|
||||
AVChannelLayout sound_system;
|
||||
/**
|
||||
* The program integrated loudness information, as defined in
|
||||
* ITU-1770-4.
|
||||
*/
|
||||
AVRational integrated_loudness;
|
||||
/**
|
||||
* The digital (sampled) peak value of the audio signal, as defined
|
||||
* in ITU-1770-4.
|
||||
*/
|
||||
AVRational digital_peak;
|
||||
/**
|
||||
* The true peak of the audio signal, as defined in ITU-1770-4.
|
||||
*/
|
||||
AVRational true_peak;
|
||||
/**
|
||||
* The Dialogue loudness information, as defined in ITU-1770-4.
|
||||
*/
|
||||
AVRational dialogue_anchored_loudness;
|
||||
/**
|
||||
* The Album loudness information, as defined in ITU-1770-4.
|
||||
*/
|
||||
AVRational album_anchored_loudness;
|
||||
} AVIAMFSubmixLayout;
|
||||
|
||||
/**
|
||||
* Submix layout as defined in section 3.7 of IAMF.
|
||||
*
|
||||
* @note The struct should be allocated with av_iamf_mix_presentation_add_submix()
|
||||
* and its size is not a part of the public ABI.
|
||||
*/
|
||||
typedef struct AVIAMFSubmix {
|
||||
const AVClass *av_class;
|
||||
|
||||
/**
|
||||
* Array of submix elements.
|
||||
*
|
||||
* Set by av_iamf_submix_add_element(), must not be modified by any
|
||||
* other code.
|
||||
*/
|
||||
AVIAMFSubmixElement **elements;
|
||||
/**
|
||||
* Number of elements in the submix.
|
||||
*
|
||||
* Set by av_iamf_submix_add_element(), must not be modified by any
|
||||
* other code.
|
||||
*/
|
||||
unsigned int nb_elements;
|
||||
|
||||
/**
|
||||
* Array of submix layouts.
|
||||
*
|
||||
* Set by av_iamf_submix_add_layout(), must not be modified by any
|
||||
* other code.
|
||||
*/
|
||||
AVIAMFSubmixLayout **layouts;
|
||||
/**
|
||||
* Number of layouts in the submix.
|
||||
*
|
||||
* Set by av_iamf_submix_add_layout(), must not be modified by any
|
||||
* other code.
|
||||
*/
|
||||
unsigned int nb_layouts;
|
||||
|
||||
/**
|
||||
* Information required for post-processing the mixed audio signal to
|
||||
* generate the audio signal for playback.
|
||||
* The @ref AVIAMFParamDefinition.type "type" must be
|
||||
* AV_IAMF_PARAMETER_DEFINITION_MIX_GAIN.
|
||||
*/
|
||||
AVIAMFParamDefinition *output_mix_config;
|
||||
|
||||
/**
|
||||
* Default mix gain value to apply when there are no AVIAMFParamDefinition
|
||||
* with @ref output_mix_config "output_mix_config's"
|
||||
* @ref AVIAMFParamDefinition.parameter_id "parameter_id" available for a
|
||||
* given audio frame.
|
||||
*/
|
||||
AVRational default_mix_gain;
|
||||
} AVIAMFSubmix;
|
||||
|
||||
/**
|
||||
* Information on how to render and mix one or more AVIAMFAudioElement to generate
|
||||
* the final audio output, as defined in section 3.7 of IAMF.
|
||||
*
|
||||
* @note The struct should be allocated with av_iamf_mix_presentation_alloc()
|
||||
* and its size is not a part of the public ABI.
|
||||
*/
|
||||
typedef struct AVIAMFMixPresentation {
|
||||
const AVClass *av_class;
|
||||
|
||||
/**
|
||||
* Array of submixes.
|
||||
*
|
||||
* Set by av_iamf_mix_presentation_add_submix(), must not be modified
|
||||
* by any other code.
|
||||
*/
|
||||
AVIAMFSubmix **submixes;
|
||||
/**
|
||||
* Number of submixes in the presentation.
|
||||
*
|
||||
* Set by av_iamf_mix_presentation_add_submix(), must not be modified
|
||||
* by any other code.
|
||||
*/
|
||||
unsigned int nb_submixes;
|
||||
|
||||
/**
|
||||
* A dictionary of strings describing the mix in different languages.
|
||||
* Must have the same amount of entries as every
|
||||
* @ref AVIAMFSubmixElement.annotations "Submix element annotations",
|
||||
* stored in the same order, and with the same key strings.
|
||||
*
|
||||
* @ref AVDictionaryEntry.key "key" is a string conforming to BCP-47
|
||||
* that specifies the language for the string stored in
|
||||
* @ref AVDictionaryEntry.value "value".
|
||||
*/
|
||||
AVDictionary *annotations;
|
||||
} AVIAMFMixPresentation;
|
||||
|
||||
const AVClass *av_iamf_mix_presentation_get_class(void);
|
||||
|
||||
/**
|
||||
* Allocates a AVIAMFMixPresentation, and initializes its fields with default
|
||||
* values. No submixes are allocated.
|
||||
* Must be freed with av_iamf_mix_presentation_free().
|
||||
*
|
||||
* @see av_iamf_mix_presentation_add_submix()
|
||||
*/
|
||||
AVIAMFMixPresentation *av_iamf_mix_presentation_alloc(void);
|
||||
|
||||
/**
|
||||
* Allocate a submix and add it to a given AVIAMFMixPresentation.
|
||||
* It is freed by av_iamf_mix_presentation_free() alongside the rest of the
|
||||
* parent AVIAMFMixPresentation.
|
||||
*
|
||||
* @return a pointer to the allocated submix.
|
||||
*/
|
||||
AVIAMFSubmix *av_iamf_mix_presentation_add_submix(AVIAMFMixPresentation *mix_presentation);
|
||||
|
||||
/**
|
||||
* Allocate a submix element and add it to a given AVIAMFSubmix.
|
||||
* It is freed by av_iamf_mix_presentation_free() alongside the rest of the
|
||||
* parent AVIAMFSubmix.
|
||||
*
|
||||
* @return a pointer to the allocated submix.
|
||||
*/
|
||||
AVIAMFSubmixElement *av_iamf_submix_add_element(AVIAMFSubmix *submix);
|
||||
|
||||
/**
|
||||
* Allocate a submix layout and add it to a given AVIAMFSubmix.
|
||||
* It is freed by av_iamf_mix_presentation_free() alongside the rest of the
|
||||
* parent AVIAMFSubmix.
|
||||
*
|
||||
* @return a pointer to the allocated submix.
|
||||
*/
|
||||
AVIAMFSubmixLayout *av_iamf_submix_add_layout(AVIAMFSubmix *submix);
|
||||
|
||||
/**
|
||||
* Free an AVIAMFMixPresentation and all its contents.
|
||||
*
|
||||
* @param mix_presentation pointer to pointer to an allocated AVIAMFMixPresentation.
|
||||
* upon return, *mix_presentation will be set to NULL.
|
||||
*/
|
||||
void av_iamf_mix_presentation_free(AVIAMFMixPresentation **mix_presentation);
|
||||
/**
|
||||
* @}
|
||||
*/
|
||||
|
||||
#endif /* AVUTIL_IAMF_H */
|
56
ThirdParty/ffmpeg/include/libavutil/imgutils.h
vendored
56
ThirdParty/ffmpeg/include/libavutil/imgutils.h
vendored
|
@ -170,10 +170,26 @@ void av_image_copy_plane_uc_from(uint8_t *dst, ptrdiff_t dst_linesize,
|
|||
* @param width width of the image in pixels
|
||||
* @param height height of the image in pixels
|
||||
*/
|
||||
void av_image_copy(uint8_t *dst_data[4], int dst_linesizes[4],
|
||||
const uint8_t *src_data[4], const int src_linesizes[4],
|
||||
void av_image_copy(uint8_t * const dst_data[4], const int dst_linesizes[4],
|
||||
const uint8_t * const src_data[4], const int src_linesizes[4],
|
||||
enum AVPixelFormat pix_fmt, int width, int height);
|
||||
|
||||
/**
|
||||
* Wrapper around av_image_copy() to workaround the limitation
|
||||
* that the conversion from uint8_t * const * to const uint8_t * const *
|
||||
* is not performed automatically in C.
|
||||
* @see av_image_copy()
|
||||
*/
|
||||
static inline
|
||||
void av_image_copy2(uint8_t * const dst_data[4], const int dst_linesizes[4],
|
||||
uint8_t * const src_data[4], const int src_linesizes[4],
|
||||
enum AVPixelFormat pix_fmt, int width, int height)
|
||||
{
|
||||
av_image_copy(dst_data, dst_linesizes,
|
||||
(const uint8_t * const *)src_data, src_linesizes,
|
||||
pix_fmt, width, height);
|
||||
}
|
||||
|
||||
/**
|
||||
* Copy image data located in uncacheable (e.g. GPU mapped) memory. Where
|
||||
* available, this function will use special functionality for reading from such
|
||||
|
@ -188,8 +204,8 @@ void av_image_copy(uint8_t *dst_data[4], int dst_linesizes[4],
|
|||
* @note On x86, the linesizes currently need to be aligned to the cacheline
|
||||
* size (i.e. 64) to get improved performance.
|
||||
*/
|
||||
void av_image_copy_uc_from(uint8_t *dst_data[4], const ptrdiff_t dst_linesizes[4],
|
||||
const uint8_t *src_data[4], const ptrdiff_t src_linesizes[4],
|
||||
void av_image_copy_uc_from(uint8_t * const dst_data[4], const ptrdiff_t dst_linesizes[4],
|
||||
const uint8_t * const src_data[4], const ptrdiff_t src_linesizes[4],
|
||||
enum AVPixelFormat pix_fmt, int width, int height);
|
||||
|
||||
/**
|
||||
|
@ -319,10 +335,40 @@ int av_image_check_sar(unsigned int w, unsigned int h, AVRational sar);
|
|||
* @param height the height of the image in pixels
|
||||
* @return 0 if the image data was cleared, a negative AVERROR code otherwise
|
||||
*/
|
||||
int av_image_fill_black(uint8_t *dst_data[4], const ptrdiff_t dst_linesize[4],
|
||||
int av_image_fill_black(uint8_t * const dst_data[4], const ptrdiff_t dst_linesize[4],
|
||||
enum AVPixelFormat pix_fmt, enum AVColorRange range,
|
||||
int width, int height);
|
||||
|
||||
/**
|
||||
* Overwrite the image data with a color. This is suitable for filling a
|
||||
* sub-rectangle of an image, meaning the padding between the right most pixel
|
||||
* and the left most pixel on the next line will not be overwritten. For some
|
||||
* formats, the image size might be rounded up due to inherent alignment.
|
||||
*
|
||||
* If the pixel format has alpha, it is also replaced. Color component values
|
||||
* are interpreted as native integers (or intfloats) regardless of actual pixel
|
||||
* format endianness.
|
||||
*
|
||||
* This can return an error if the pixel format is not supported. Normally, all
|
||||
* non-hwaccel pixel formats should be supported.
|
||||
*
|
||||
* Passing NULL for dst_data is allowed. Then the function returns whether the
|
||||
* operation would have succeeded. (It can return an error if the pix_fmt is
|
||||
* not supported.)
|
||||
*
|
||||
* @param dst_data data pointers to destination image
|
||||
* @param dst_linesize linesizes for the destination image
|
||||
* @param pix_fmt the pixel format of the image
|
||||
* @param color the color components to be used for the fill
|
||||
* @param width the width of the image in pixels
|
||||
* @param height the height of the image in pixels
|
||||
* @param flags currently unused
|
||||
* @return 0 if the image data was filled, a negative AVERROR code otherwise
|
||||
*/
|
||||
int av_image_fill_color(uint8_t * const dst_data[4], const ptrdiff_t dst_linesize[4],
|
||||
enum AVPixelFormat pix_fmt, const uint32_t color[4],
|
||||
int width, int height, int flags);
|
||||
|
||||
/**
|
||||
* @}
|
||||
*/
|
||||
|
|
|
@ -72,8 +72,6 @@ typedef union {
|
|||
# include "mips/intreadwrite.h"
|
||||
#elif ARCH_PPC
|
||||
# include "ppc/intreadwrite.h"
|
||||
#elif ARCH_TOMI
|
||||
# include "tomi/intreadwrite.h"
|
||||
#elif ARCH_X86
|
||||
# include "x86/intreadwrite.h"
|
||||
#endif
|
||||
|
@ -215,7 +213,7 @@ typedef union {
|
|||
* by per-arch headers.
|
||||
*/
|
||||
|
||||
#if defined(__GNUC__)
|
||||
#if defined(__GNUC__) || defined(__clang__)
|
||||
|
||||
union unaligned_64 { uint64_t l; } __attribute__((packed)) av_alias;
|
||||
union unaligned_32 { uint32_t l; } __attribute__((packed)) av_alias;
|
||||
|
@ -585,9 +583,7 @@ union unaligned_16 { uint16_t l; } __attribute__((packed)) av_alias;
|
|||
#endif
|
||||
|
||||
/* Parameters for AV_COPY*, AV_SWAP*, AV_ZERO* must be
|
||||
* naturally aligned. They may be implemented using MMX,
|
||||
* so emms_c() must be called before using any float code
|
||||
* afterwards.
|
||||
* naturally aligned.
|
||||
*/
|
||||
|
||||
#define AV_COPY(n, d, s) \
|
||||
|
|
|
@ -36,30 +36,81 @@
|
|||
#ifndef M_E
|
||||
#define M_E 2.7182818284590452354 /* e */
|
||||
#endif
|
||||
#ifndef M_Ef
|
||||
#define M_Ef 2.7182818284590452354f /* e */
|
||||
#endif
|
||||
#ifndef M_LN2
|
||||
#define M_LN2 0.69314718055994530942 /* log_e 2 */
|
||||
#endif
|
||||
#ifndef M_LN2f
|
||||
#define M_LN2f 0.69314718055994530942f /* log_e 2 */
|
||||
#endif
|
||||
#ifndef M_LN10
|
||||
#define M_LN10 2.30258509299404568402 /* log_e 10 */
|
||||
#endif
|
||||
#ifndef M_LN10f
|
||||
#define M_LN10f 2.30258509299404568402f /* log_e 10 */
|
||||
#endif
|
||||
#ifndef M_LOG2_10
|
||||
#define M_LOG2_10 3.32192809488736234787 /* log_2 10 */
|
||||
#endif
|
||||
#ifndef M_LOG2_10f
|
||||
#define M_LOG2_10f 3.32192809488736234787f /* log_2 10 */
|
||||
#endif
|
||||
#ifndef M_PHI
|
||||
#define M_PHI 1.61803398874989484820 /* phi / golden ratio */
|
||||
#endif
|
||||
#ifndef M_PHIf
|
||||
#define M_PHIf 1.61803398874989484820f /* phi / golden ratio */
|
||||
#endif
|
||||
#ifndef M_PI
|
||||
#define M_PI 3.14159265358979323846 /* pi */
|
||||
#endif
|
||||
#ifndef M_PIf
|
||||
#define M_PIf 3.14159265358979323846f /* pi */
|
||||
#endif
|
||||
#ifndef M_PI_2
|
||||
#define M_PI_2 1.57079632679489661923 /* pi/2 */
|
||||
#endif
|
||||
#ifndef M_PI_2f
|
||||
#define M_PI_2f 1.57079632679489661923f /* pi/2 */
|
||||
#endif
|
||||
#ifndef M_PI_4
|
||||
#define M_PI_4 0.78539816339744830962 /* pi/4 */
|
||||
#endif
|
||||
#ifndef M_PI_4f
|
||||
#define M_PI_4f 0.78539816339744830962f /* pi/4 */
|
||||
#endif
|
||||
#ifndef M_1_PI
|
||||
#define M_1_PI 0.31830988618379067154 /* 1/pi */
|
||||
#endif
|
||||
#ifndef M_1_PIf
|
||||
#define M_1_PIf 0.31830988618379067154f /* 1/pi */
|
||||
#endif
|
||||
#ifndef M_2_PI
|
||||
#define M_2_PI 0.63661977236758134308 /* 2/pi */
|
||||
#endif
|
||||
#ifndef M_2_PIf
|
||||
#define M_2_PIf 0.63661977236758134308f /* 2/pi */
|
||||
#endif
|
||||
#ifndef M_2_SQRTPI
|
||||
#define M_2_SQRTPI 1.12837916709551257390 /* 2/sqrt(pi) */
|
||||
#endif
|
||||
#ifndef M_2_SQRTPIf
|
||||
#define M_2_SQRTPIf 1.12837916709551257390f /* 2/sqrt(pi) */
|
||||
#endif
|
||||
#ifndef M_SQRT1_2
|
||||
#define M_SQRT1_2 0.70710678118654752440 /* 1/sqrt(2) */
|
||||
#endif
|
||||
#ifndef M_SQRT1_2f
|
||||
#define M_SQRT1_2f 0.70710678118654752440f /* 1/sqrt(2) */
|
||||
#endif
|
||||
#ifndef M_SQRT2
|
||||
#define M_SQRT2 1.41421356237309504880 /* sqrt(2) */
|
||||
#endif
|
||||
#ifndef M_SQRT2f
|
||||
#define M_SQRT2f 1.41421356237309504880f /* sqrt(2) */
|
||||
#endif
|
||||
#ifndef NAN
|
||||
#define NAN av_int2float(0x7fc00000)
|
||||
#endif
|
||||
|
@ -237,6 +288,10 @@ int64_t av_rescale_delta(AVRational in_tb, int64_t in_ts, AVRational fs_tb, int
|
|||
*/
|
||||
int64_t av_add_stable(AVRational ts_tb, int64_t ts, AVRational inc_tb, int64_t inc);
|
||||
|
||||
/**
|
||||
* 0th order modified bessel function of the first kind.
|
||||
*/
|
||||
double av_bessel_i0(double x);
|
||||
|
||||
/**
|
||||
* @}
|
||||
|
|
92
ThirdParty/ffmpeg/include/libavutil/mem.h
vendored
92
ThirdParty/ffmpeg/include/libavutil/mem.h
vendored
|
@ -27,12 +27,10 @@
|
|||
#ifndef AVUTIL_MEM_H
|
||||
#define AVUTIL_MEM_H
|
||||
|
||||
#include <limits.h>
|
||||
#include <stddef.h>
|
||||
#include <stdint.h>
|
||||
|
||||
#include "attributes.h"
|
||||
#include "avutil.h"
|
||||
#include "version.h"
|
||||
|
||||
/**
|
||||
* @addtogroup lavu_mem
|
||||
|
@ -51,86 +49,6 @@
|
|||
* @{
|
||||
*/
|
||||
|
||||
#if FF_API_DECLARE_ALIGNED
|
||||
/**
|
||||
*
|
||||
* @defgroup lavu_mem_macros Alignment Macros
|
||||
* Helper macros for declaring aligned variables.
|
||||
* @{
|
||||
*/
|
||||
|
||||
/**
|
||||
* @def DECLARE_ALIGNED(n,t,v)
|
||||
* Declare a variable that is aligned in memory.
|
||||
*
|
||||
* @code{.c}
|
||||
* DECLARE_ALIGNED(16, uint16_t, aligned_int) = 42;
|
||||
* DECLARE_ALIGNED(32, uint8_t, aligned_array)[128];
|
||||
*
|
||||
* // The default-alignment equivalent would be
|
||||
* uint16_t aligned_int = 42;
|
||||
* uint8_t aligned_array[128];
|
||||
* @endcode
|
||||
*
|
||||
* @param n Minimum alignment in bytes
|
||||
* @param t Type of the variable (or array element)
|
||||
* @param v Name of the variable
|
||||
*/
|
||||
|
||||
/**
|
||||
* @def DECLARE_ASM_ALIGNED(n,t,v)
|
||||
* Declare an aligned variable appropriate for use in inline assembly code.
|
||||
*
|
||||
* @code{.c}
|
||||
* DECLARE_ASM_ALIGNED(16, uint64_t, pw_08) = UINT64_C(0x0008000800080008);
|
||||
* @endcode
|
||||
*
|
||||
* @param n Minimum alignment in bytes
|
||||
* @param t Type of the variable (or array element)
|
||||
* @param v Name of the variable
|
||||
*/
|
||||
|
||||
/**
|
||||
* @def DECLARE_ASM_CONST(n,t,v)
|
||||
* Declare a static constant aligned variable appropriate for use in inline
|
||||
* assembly code.
|
||||
*
|
||||
* @code{.c}
|
||||
* DECLARE_ASM_CONST(16, uint64_t, pw_08) = UINT64_C(0x0008000800080008);
|
||||
* @endcode
|
||||
*
|
||||
* @param n Minimum alignment in bytes
|
||||
* @param t Type of the variable (or array element)
|
||||
* @param v Name of the variable
|
||||
*/
|
||||
|
||||
#if defined(__INTEL_COMPILER) && __INTEL_COMPILER < 1110 || defined(__SUNPRO_C)
|
||||
#define DECLARE_ALIGNED(n,t,v) t __attribute__ ((aligned (n))) v
|
||||
#define DECLARE_ASM_ALIGNED(n,t,v) t __attribute__ ((aligned (n))) v
|
||||
#define DECLARE_ASM_CONST(n,t,v) const t __attribute__ ((aligned (n))) v
|
||||
#elif defined(__DJGPP__)
|
||||
#define DECLARE_ALIGNED(n,t,v) t __attribute__ ((aligned (FFMIN(n, 16)))) v
|
||||
#define DECLARE_ASM_ALIGNED(n,t,v) t av_used __attribute__ ((aligned (FFMIN(n, 16)))) v
|
||||
#define DECLARE_ASM_CONST(n,t,v) static const t av_used __attribute__ ((aligned (FFMIN(n, 16)))) v
|
||||
#elif defined(__GNUC__) || defined(__clang__)
|
||||
#define DECLARE_ALIGNED(n,t,v) t __attribute__ ((aligned (n))) v
|
||||
#define DECLARE_ASM_ALIGNED(n,t,v) t av_used __attribute__ ((aligned (n))) v
|
||||
#define DECLARE_ASM_CONST(n,t,v) static const t av_used __attribute__ ((aligned (n))) v
|
||||
#elif defined(_MSC_VER)
|
||||
#define DECLARE_ALIGNED(n,t,v) __declspec(align(n)) t v
|
||||
#define DECLARE_ASM_ALIGNED(n,t,v) __declspec(align(n)) t v
|
||||
#define DECLARE_ASM_CONST(n,t,v) __declspec(align(n)) static const t v
|
||||
#else
|
||||
#define DECLARE_ALIGNED(n,t,v) t v
|
||||
#define DECLARE_ASM_ALIGNED(n,t,v) t v
|
||||
#define DECLARE_ASM_CONST(n,t,v) static const t v
|
||||
#endif
|
||||
|
||||
/**
|
||||
* @}
|
||||
*/
|
||||
#endif
|
||||
|
||||
/**
|
||||
* @defgroup lavu_mem_attrs Function Attributes
|
||||
* Function attributes applicable to memory handling functions.
|
||||
|
@ -239,14 +157,6 @@ av_alloc_size(1, 2) void *av_malloc_array(size_t nmemb, size_t size);
|
|||
*/
|
||||
void *av_calloc(size_t nmemb, size_t size) av_malloc_attrib av_alloc_size(1, 2);
|
||||
|
||||
#if FF_API_AV_MALLOCZ_ARRAY
|
||||
/**
|
||||
* @deprecated use av_calloc()
|
||||
*/
|
||||
attribute_deprecated
|
||||
void *av_mallocz_array(size_t nmemb, size_t size) av_malloc_attrib av_alloc_size(1, 2);
|
||||
#endif
|
||||
|
||||
/**
|
||||
* Allocate, reallocate, or free a block of memory.
|
||||
*
|
||||
|
|
607
ThirdParty/ffmpeg/include/libavutil/opt.h
vendored
607
ThirdParty/ffmpeg/include/libavutil/opt.h
vendored
|
@ -43,6 +43,16 @@
|
|||
* ("objects"). An option can have a help text, a type and a range of possible
|
||||
* values. Options may then be enumerated, read and written to.
|
||||
*
|
||||
* There are two modes of access to members of AVOption and its child structs.
|
||||
* One is called 'native access', and refers to access from the code that
|
||||
* declares the AVOption in question. The other is 'foreign access', and refers
|
||||
* to access from other code.
|
||||
*
|
||||
* Certain struct members in this header are documented as 'native access only'
|
||||
* or similar - it means that only the code that declared the AVOption in
|
||||
* question is allowed to access the field. This allows us to extend the
|
||||
* semantics of those fields without breaking API compatibility.
|
||||
*
|
||||
* @section avoptions_implement Implementing AVOptions
|
||||
* This section describes how to add AVOptions capabilities to a struct.
|
||||
*
|
||||
|
@ -221,7 +231,7 @@
|
|||
*/
|
||||
|
||||
enum AVOptionType{
|
||||
AV_OPT_TYPE_FLAGS,
|
||||
AV_OPT_TYPE_FLAGS = 1,
|
||||
AV_OPT_TYPE_INT,
|
||||
AV_OPT_TYPE_INT64,
|
||||
AV_OPT_TYPE_DOUBLE,
|
||||
|
@ -238,13 +248,98 @@ enum AVOptionType{
|
|||
AV_OPT_TYPE_VIDEO_RATE, ///< offset must point to AVRational
|
||||
AV_OPT_TYPE_DURATION,
|
||||
AV_OPT_TYPE_COLOR,
|
||||
#if FF_API_OLD_CHANNEL_LAYOUT
|
||||
AV_OPT_TYPE_CHANNEL_LAYOUT,
|
||||
#endif
|
||||
AV_OPT_TYPE_BOOL,
|
||||
AV_OPT_TYPE_CHLAYOUT,
|
||||
|
||||
/**
|
||||
* May be combined with another regular option type to declare an array
|
||||
* option.
|
||||
*
|
||||
* For array options, @ref AVOption.offset should refer to a pointer
|
||||
* corresponding to the option type. The pointer should be immediately
|
||||
* followed by an unsigned int that will store the number of elements in the
|
||||
* array.
|
||||
*/
|
||||
AV_OPT_TYPE_FLAG_ARRAY = (1 << 16),
|
||||
};
|
||||
|
||||
/**
|
||||
* A generic parameter which can be set by the user for muxing or encoding.
|
||||
*/
|
||||
#define AV_OPT_FLAG_ENCODING_PARAM (1 << 0)
|
||||
/**
|
||||
* A generic parameter which can be set by the user for demuxing or decoding.
|
||||
*/
|
||||
#define AV_OPT_FLAG_DECODING_PARAM (1 << 1)
|
||||
#define AV_OPT_FLAG_AUDIO_PARAM (1 << 3)
|
||||
#define AV_OPT_FLAG_VIDEO_PARAM (1 << 4)
|
||||
#define AV_OPT_FLAG_SUBTITLE_PARAM (1 << 5)
|
||||
/**
|
||||
* The option is intended for exporting values to the caller.
|
||||
*/
|
||||
#define AV_OPT_FLAG_EXPORT (1 << 6)
|
||||
/**
|
||||
* The option may not be set through the AVOptions API, only read.
|
||||
* This flag only makes sense when AV_OPT_FLAG_EXPORT is also set.
|
||||
*/
|
||||
#define AV_OPT_FLAG_READONLY (1 << 7)
|
||||
/**
|
||||
* A generic parameter which can be set by the user for bit stream filtering.
|
||||
*/
|
||||
#define AV_OPT_FLAG_BSF_PARAM (1 << 8)
|
||||
|
||||
/**
|
||||
* A generic parameter which can be set by the user at runtime.
|
||||
*/
|
||||
#define AV_OPT_FLAG_RUNTIME_PARAM (1 << 15)
|
||||
/**
|
||||
* A generic parameter which can be set by the user for filtering.
|
||||
*/
|
||||
#define AV_OPT_FLAG_FILTERING_PARAM (1 << 16)
|
||||
/**
|
||||
* Set if option is deprecated, users should refer to AVOption.help text for
|
||||
* more information.
|
||||
*/
|
||||
#define AV_OPT_FLAG_DEPRECATED (1 << 17)
|
||||
/**
|
||||
* Set if option constants can also reside in child objects.
|
||||
*/
|
||||
#define AV_OPT_FLAG_CHILD_CONSTS (1 << 18)
|
||||
|
||||
/**
|
||||
* May be set as default_val for AV_OPT_TYPE_FLAG_ARRAY options.
|
||||
*/
|
||||
typedef struct AVOptionArrayDef {
|
||||
/**
|
||||
* Native access only.
|
||||
*
|
||||
* Default value of the option, as would be serialized by av_opt_get() (i.e.
|
||||
* using the value of sep as the separator).
|
||||
*/
|
||||
const char *def;
|
||||
|
||||
/**
|
||||
* Minimum number of elements in the array. When this field is non-zero, def
|
||||
* must be non-NULL and contain at least this number of elements.
|
||||
*/
|
||||
unsigned size_min;
|
||||
/**
|
||||
* Maximum number of elements in the array, 0 when unlimited.
|
||||
*/
|
||||
unsigned size_max;
|
||||
|
||||
/**
|
||||
* Separator between array elements in string representations of this
|
||||
* option, used by av_opt_set() and av_opt_get(). It must be a printable
|
||||
* ASCII character, excluding alphanumeric and the backslash. A comma is
|
||||
* used when sep=0.
|
||||
*
|
||||
* The separator and the backslash must be backslash-escaped in order to
|
||||
* appear in string representations of the option value.
|
||||
*/
|
||||
char sep;
|
||||
} AVOptionArrayDef;
|
||||
|
||||
/**
|
||||
* AVOption
|
||||
*/
|
||||
|
@ -258,6 +353,8 @@ typedef struct AVOption {
|
|||
const char *help;
|
||||
|
||||
/**
|
||||
* Native access only.
|
||||
*
|
||||
* The offset relative to the context structure where the option
|
||||
* value is stored. It should be 0 for named constants.
|
||||
*/
|
||||
|
@ -265,6 +362,7 @@ typedef struct AVOption {
|
|||
enum AVOptionType type;
|
||||
|
||||
/**
|
||||
* Native access only, except when documented otherwise.
|
||||
* the default value for scalar options
|
||||
*/
|
||||
union {
|
||||
|
@ -273,31 +371,22 @@ typedef struct AVOption {
|
|||
const char *str;
|
||||
/* TODO those are unused now */
|
||||
AVRational q;
|
||||
|
||||
/**
|
||||
* Used for AV_OPT_TYPE_FLAG_ARRAY options. May be NULL.
|
||||
*
|
||||
* Foreign access to some members allowed, as noted in AVOptionArrayDef
|
||||
* documentation.
|
||||
*/
|
||||
const AVOptionArrayDef *arr;
|
||||
} default_val;
|
||||
double min; ///< minimum valid value for the option
|
||||
double max; ///< maximum valid value for the option
|
||||
|
||||
/**
|
||||
* A combination of AV_OPT_FLAG_*.
|
||||
*/
|
||||
int flags;
|
||||
#define AV_OPT_FLAG_ENCODING_PARAM 1 ///< a generic parameter which can be set by the user for muxing or encoding
|
||||
#define AV_OPT_FLAG_DECODING_PARAM 2 ///< a generic parameter which can be set by the user for demuxing or decoding
|
||||
#define AV_OPT_FLAG_AUDIO_PARAM 8
|
||||
#define AV_OPT_FLAG_VIDEO_PARAM 16
|
||||
#define AV_OPT_FLAG_SUBTITLE_PARAM 32
|
||||
/**
|
||||
* The option is intended for exporting values to the caller.
|
||||
*/
|
||||
#define AV_OPT_FLAG_EXPORT 64
|
||||
/**
|
||||
* The option may not be set through the AVOptions API, only read.
|
||||
* This flag only makes sense when AV_OPT_FLAG_EXPORT is also set.
|
||||
*/
|
||||
#define AV_OPT_FLAG_READONLY 128
|
||||
#define AV_OPT_FLAG_BSF_PARAM (1<<8) ///< a generic parameter which can be set by the user for bit stream filtering
|
||||
#define AV_OPT_FLAG_RUNTIME_PARAM (1<<15) ///< a generic parameter which can be set by the user at runtime
|
||||
#define AV_OPT_FLAG_FILTERING_PARAM (1<<16) ///< a generic parameter which can be set by the user for filtering
|
||||
#define AV_OPT_FLAG_DEPRECATED (1<<17) ///< set if option is deprecated, users should refer to AVOption.help text for more information
|
||||
#define AV_OPT_FLAG_CHILD_CONSTS (1<<18) ///< set if option constants can also reside in child objects
|
||||
//FIXME think about enc-audio, ... style flags
|
||||
|
||||
/**
|
||||
* The logical unit to which the option belongs. Non-constant
|
||||
|
@ -376,15 +465,9 @@ typedef struct AVOptionRanges {
|
|||
} AVOptionRanges;
|
||||
|
||||
/**
|
||||
* Show the obj options.
|
||||
*
|
||||
* @param req_flags requested flags for the options to show. Show only the
|
||||
* options for which it is opt->flags & req_flags.
|
||||
* @param rej_flags rejected flags for the options to show. Show only the
|
||||
* options for which it is !(opt->flags & req_flags).
|
||||
* @param av_log_obj log context to use for showing the options
|
||||
* @defgroup opt_mng AVOption (un)initialization and inspection.
|
||||
* @{
|
||||
*/
|
||||
int av_opt_show2(void *obj, void *av_log_obj, int req_flags, int rej_flags);
|
||||
|
||||
/**
|
||||
* Set the values of all AVOption fields to their default values.
|
||||
|
@ -404,161 +487,37 @@ void av_opt_set_defaults(void *s);
|
|||
*/
|
||||
void av_opt_set_defaults2(void *s, int mask, int flags);
|
||||
|
||||
/**
|
||||
* Parse the key/value pairs list in opts. For each key/value pair
|
||||
* found, stores the value in the field in ctx that is named like the
|
||||
* key. ctx must be an AVClass context, storing is done using
|
||||
* AVOptions.
|
||||
*
|
||||
* @param opts options string to parse, may be NULL
|
||||
* @param key_val_sep a 0-terminated list of characters used to
|
||||
* separate key from value
|
||||
* @param pairs_sep a 0-terminated list of characters used to separate
|
||||
* two pairs from each other
|
||||
* @return the number of successfully set key/value pairs, or a negative
|
||||
* value corresponding to an AVERROR code in case of error:
|
||||
* AVERROR(EINVAL) if opts cannot be parsed,
|
||||
* the error code issued by av_opt_set() if a key/value pair
|
||||
* cannot be set
|
||||
*/
|
||||
int av_set_options_string(void *ctx, const char *opts,
|
||||
const char *key_val_sep, const char *pairs_sep);
|
||||
|
||||
/**
|
||||
* Parse the key-value pairs list in opts. For each key=value pair found,
|
||||
* set the value of the corresponding option in ctx.
|
||||
*
|
||||
* @param ctx the AVClass object to set options on
|
||||
* @param opts the options string, key-value pairs separated by a
|
||||
* delimiter
|
||||
* @param shorthand a NULL-terminated array of options names for shorthand
|
||||
* notation: if the first field in opts has no key part,
|
||||
* the key is taken from the first element of shorthand;
|
||||
* then again for the second, etc., until either opts is
|
||||
* finished, shorthand is finished or a named option is
|
||||
* found; after that, all options must be named
|
||||
* @param key_val_sep a 0-terminated list of characters used to separate
|
||||
* key from value, for example '='
|
||||
* @param pairs_sep a 0-terminated list of characters used to separate
|
||||
* two pairs from each other, for example ':' or ','
|
||||
* @return the number of successfully set key=value pairs, or a negative
|
||||
* value corresponding to an AVERROR code in case of error:
|
||||
* AVERROR(EINVAL) if opts cannot be parsed,
|
||||
* the error code issued by av_set_string3() if a key/value pair
|
||||
* cannot be set
|
||||
*
|
||||
* Options names must use only the following characters: a-z A-Z 0-9 - . / _
|
||||
* Separators must use characters distinct from option names and from each
|
||||
* other.
|
||||
*/
|
||||
int av_opt_set_from_string(void *ctx, const char *opts,
|
||||
const char *const *shorthand,
|
||||
const char *key_val_sep, const char *pairs_sep);
|
||||
/**
|
||||
* Free all allocated objects in obj.
|
||||
*/
|
||||
void av_opt_free(void *obj);
|
||||
|
||||
/**
|
||||
* Check whether a particular flag is set in a flags field.
|
||||
* Iterate over all AVOptions belonging to obj.
|
||||
*
|
||||
* @param field_name the name of the flag field option
|
||||
* @param flag_name the name of the flag to check
|
||||
* @return non-zero if the flag is set, zero if the flag isn't set,
|
||||
* isn't of the right type, or the flags field doesn't exist.
|
||||
* @param obj an AVOptions-enabled struct or a double pointer to an
|
||||
* AVClass describing it.
|
||||
* @param prev result of the previous call to av_opt_next() on this object
|
||||
* or NULL
|
||||
* @return next AVOption or NULL
|
||||
*/
|
||||
int av_opt_flag_is_set(void *obj, const char *field_name, const char *flag_name);
|
||||
const AVOption *av_opt_next(const void *obj, const AVOption *prev);
|
||||
|
||||
/**
|
||||
* Set all the options from a given dictionary on an object.
|
||||
* Iterate over AVOptions-enabled children of obj.
|
||||
*
|
||||
* @param obj a struct whose first element is a pointer to AVClass
|
||||
* @param options options to process. This dictionary will be freed and replaced
|
||||
* by a new one containing all options not found in obj.
|
||||
* Of course this new dictionary needs to be freed by caller
|
||||
* with av_dict_free().
|
||||
*
|
||||
* @return 0 on success, a negative AVERROR if some option was found in obj,
|
||||
* but could not be set.
|
||||
*
|
||||
* @see av_dict_copy()
|
||||
* @param prev result of a previous call to this function or NULL
|
||||
* @return next AVOptions-enabled child or NULL
|
||||
*/
|
||||
int av_opt_set_dict(void *obj, struct AVDictionary **options);
|
||||
|
||||
void *av_opt_child_next(void *obj, void *prev);
|
||||
|
||||
/**
|
||||
* Set all the options from a given dictionary on an object.
|
||||
* Iterate over potential AVOptions-enabled children of parent.
|
||||
*
|
||||
* @param obj a struct whose first element is a pointer to AVClass
|
||||
* @param options options to process. This dictionary will be freed and replaced
|
||||
* by a new one containing all options not found in obj.
|
||||
* Of course this new dictionary needs to be freed by caller
|
||||
* with av_dict_free().
|
||||
* @param search_flags A combination of AV_OPT_SEARCH_*.
|
||||
*
|
||||
* @return 0 on success, a negative AVERROR if some option was found in obj,
|
||||
* but could not be set.
|
||||
*
|
||||
* @see av_dict_copy()
|
||||
*/
|
||||
int av_opt_set_dict2(void *obj, struct AVDictionary **options, int search_flags);
|
||||
|
||||
/**
|
||||
* Extract a key-value pair from the beginning of a string.
|
||||
*
|
||||
* @param ropts pointer to the options string, will be updated to
|
||||
* point to the rest of the string (one of the pairs_sep
|
||||
* or the final NUL)
|
||||
* @param key_val_sep a 0-terminated list of characters used to separate
|
||||
* key from value, for example '='
|
||||
* @param pairs_sep a 0-terminated list of characters used to separate
|
||||
* two pairs from each other, for example ':' or ','
|
||||
* @param flags flags; see the AV_OPT_FLAG_* values below
|
||||
* @param rkey parsed key; must be freed using av_free()
|
||||
* @param rval parsed value; must be freed using av_free()
|
||||
*
|
||||
* @return >=0 for success, or a negative value corresponding to an
|
||||
* AVERROR code in case of error; in particular:
|
||||
* AVERROR(EINVAL) if no key is present
|
||||
*
|
||||
*/
|
||||
int av_opt_get_key_value(const char **ropts,
|
||||
const char *key_val_sep, const char *pairs_sep,
|
||||
unsigned flags,
|
||||
char **rkey, char **rval);
|
||||
|
||||
enum {
|
||||
|
||||
/**
|
||||
* Accept to parse a value without a key; the key will then be returned
|
||||
* as NULL.
|
||||
*/
|
||||
AV_OPT_FLAG_IMPLICIT_KEY = 1,
|
||||
};
|
||||
|
||||
/**
|
||||
* @defgroup opt_eval_funcs Evaluating option strings
|
||||
* @{
|
||||
* This group of functions can be used to evaluate option strings
|
||||
* and get numbers out of them. They do the same thing as av_opt_set(),
|
||||
* except the result is written into the caller-supplied pointer.
|
||||
*
|
||||
* @param obj a struct whose first element is a pointer to AVClass.
|
||||
* @param o an option for which the string is to be evaluated.
|
||||
* @param val string to be evaluated.
|
||||
* @param *_out value of the string will be written here.
|
||||
*
|
||||
* @return 0 on success, a negative number on failure.
|
||||
*/
|
||||
int av_opt_eval_flags (void *obj, const AVOption *o, const char *val, int *flags_out);
|
||||
int av_opt_eval_int (void *obj, const AVOption *o, const char *val, int *int_out);
|
||||
int av_opt_eval_int64 (void *obj, const AVOption *o, const char *val, int64_t *int64_out);
|
||||
int av_opt_eval_float (void *obj, const AVOption *o, const char *val, float *float_out);
|
||||
int av_opt_eval_double(void *obj, const AVOption *o, const char *val, double *double_out);
|
||||
int av_opt_eval_q (void *obj, const AVOption *o, const char *val, AVRational *q_out);
|
||||
/**
|
||||
* @}
|
||||
* @param iter a pointer where iteration state is stored.
|
||||
* @return AVClass corresponding to next potential child or NULL
|
||||
*/
|
||||
const AVClass *av_opt_child_class_iterate(const AVClass *parent, void **iter);
|
||||
|
||||
#define AV_OPT_SEARCH_CHILDREN (1 << 0) /**< Search in possible children of the
|
||||
given object first. */
|
||||
|
@ -633,31 +592,161 @@ const AVOption *av_opt_find2(void *obj, const char *name, const char *unit,
|
|||
int opt_flags, int search_flags, void **target_obj);
|
||||
|
||||
/**
|
||||
* Iterate over all AVOptions belonging to obj.
|
||||
* Show the obj options.
|
||||
*
|
||||
* @param obj an AVOptions-enabled struct or a double pointer to an
|
||||
* AVClass describing it.
|
||||
* @param prev result of the previous call to av_opt_next() on this object
|
||||
* or NULL
|
||||
* @return next AVOption or NULL
|
||||
* @param req_flags requested flags for the options to show. Show only the
|
||||
* options for which it is opt->flags & req_flags.
|
||||
* @param rej_flags rejected flags for the options to show. Show only the
|
||||
* options for which it is !(opt->flags & req_flags).
|
||||
* @param av_log_obj log context to use for showing the options
|
||||
*/
|
||||
const AVOption *av_opt_next(const void *obj, const AVOption *prev);
|
||||
int av_opt_show2(void *obj, void *av_log_obj, int req_flags, int rej_flags);
|
||||
|
||||
/**
|
||||
* Iterate over AVOptions-enabled children of obj.
|
||||
* Extract a key-value pair from the beginning of a string.
|
||||
*
|
||||
* @param ropts pointer to the options string, will be updated to
|
||||
* point to the rest of the string (one of the pairs_sep
|
||||
* or the final NUL)
|
||||
* @param key_val_sep a 0-terminated list of characters used to separate
|
||||
* key from value, for example '='
|
||||
* @param pairs_sep a 0-terminated list of characters used to separate
|
||||
* two pairs from each other, for example ':' or ','
|
||||
* @param flags flags; see the AV_OPT_FLAG_* values below
|
||||
* @param rkey parsed key; must be freed using av_free()
|
||||
* @param rval parsed value; must be freed using av_free()
|
||||
*
|
||||
* @return >=0 for success, or a negative value corresponding to an
|
||||
* AVERROR code in case of error; in particular:
|
||||
* AVERROR(EINVAL) if no key is present
|
||||
*
|
||||
* @param prev result of a previous call to this function or NULL
|
||||
* @return next AVOptions-enabled child or NULL
|
||||
*/
|
||||
void *av_opt_child_next(void *obj, void *prev);
|
||||
int av_opt_get_key_value(const char **ropts,
|
||||
const char *key_val_sep, const char *pairs_sep,
|
||||
unsigned flags,
|
||||
char **rkey, char **rval);
|
||||
|
||||
enum {
|
||||
|
||||
/**
|
||||
* Iterate over potential AVOptions-enabled children of parent.
|
||||
*
|
||||
* @param iter a pointer where iteration state is stored.
|
||||
* @return AVClass corresponding to next potential child or NULL
|
||||
* Accept to parse a value without a key; the key will then be returned
|
||||
* as NULL.
|
||||
*/
|
||||
const AVClass *av_opt_child_class_iterate(const AVClass *parent, void **iter);
|
||||
AV_OPT_FLAG_IMPLICIT_KEY = 1,
|
||||
};
|
||||
|
||||
/**
|
||||
* @}
|
||||
*/
|
||||
|
||||
/**
|
||||
* @defgroup opt_write Setting and modifying option values
|
||||
* @{
|
||||
*/
|
||||
|
||||
/**
|
||||
* Parse the key/value pairs list in opts. For each key/value pair
|
||||
* found, stores the value in the field in ctx that is named like the
|
||||
* key. ctx must be an AVClass context, storing is done using
|
||||
* AVOptions.
|
||||
*
|
||||
* @param opts options string to parse, may be NULL
|
||||
* @param key_val_sep a 0-terminated list of characters used to
|
||||
* separate key from value
|
||||
* @param pairs_sep a 0-terminated list of characters used to separate
|
||||
* two pairs from each other
|
||||
* @return the number of successfully set key/value pairs, or a negative
|
||||
* value corresponding to an AVERROR code in case of error:
|
||||
* AVERROR(EINVAL) if opts cannot be parsed,
|
||||
* the error code issued by av_opt_set() if a key/value pair
|
||||
* cannot be set
|
||||
*/
|
||||
int av_set_options_string(void *ctx, const char *opts,
|
||||
const char *key_val_sep, const char *pairs_sep);
|
||||
|
||||
/**
|
||||
* Parse the key-value pairs list in opts. For each key=value pair found,
|
||||
* set the value of the corresponding option in ctx.
|
||||
*
|
||||
* @param ctx the AVClass object to set options on
|
||||
* @param opts the options string, key-value pairs separated by a
|
||||
* delimiter
|
||||
* @param shorthand a NULL-terminated array of options names for shorthand
|
||||
* notation: if the first field in opts has no key part,
|
||||
* the key is taken from the first element of shorthand;
|
||||
* then again for the second, etc., until either opts is
|
||||
* finished, shorthand is finished or a named option is
|
||||
* found; after that, all options must be named
|
||||
* @param key_val_sep a 0-terminated list of characters used to separate
|
||||
* key from value, for example '='
|
||||
* @param pairs_sep a 0-terminated list of characters used to separate
|
||||
* two pairs from each other, for example ':' or ','
|
||||
* @return the number of successfully set key=value pairs, or a negative
|
||||
* value corresponding to an AVERROR code in case of error:
|
||||
* AVERROR(EINVAL) if opts cannot be parsed,
|
||||
* the error code issued by av_set_string3() if a key/value pair
|
||||
* cannot be set
|
||||
*
|
||||
* Options names must use only the following characters: a-z A-Z 0-9 - . / _
|
||||
* Separators must use characters distinct from option names and from each
|
||||
* other.
|
||||
*/
|
||||
int av_opt_set_from_string(void *ctx, const char *opts,
|
||||
const char *const *shorthand,
|
||||
const char *key_val_sep, const char *pairs_sep);
|
||||
|
||||
/**
|
||||
* Set all the options from a given dictionary on an object.
|
||||
*
|
||||
* @param obj a struct whose first element is a pointer to AVClass
|
||||
* @param options options to process. This dictionary will be freed and replaced
|
||||
* by a new one containing all options not found in obj.
|
||||
* Of course this new dictionary needs to be freed by caller
|
||||
* with av_dict_free().
|
||||
*
|
||||
* @return 0 on success, a negative AVERROR if some option was found in obj,
|
||||
* but could not be set.
|
||||
*
|
||||
* @see av_dict_copy()
|
||||
*/
|
||||
int av_opt_set_dict(void *obj, struct AVDictionary **options);
|
||||
|
||||
|
||||
/**
|
||||
* Set all the options from a given dictionary on an object.
|
||||
*
|
||||
* @param obj a struct whose first element is a pointer to AVClass
|
||||
* @param options options to process. This dictionary will be freed and replaced
|
||||
* by a new one containing all options not found in obj.
|
||||
* Of course this new dictionary needs to be freed by caller
|
||||
* with av_dict_free().
|
||||
* @param search_flags A combination of AV_OPT_SEARCH_*.
|
||||
*
|
||||
* @return 0 on success, a negative AVERROR if some option was found in obj,
|
||||
* but could not be set.
|
||||
*
|
||||
* @see av_dict_copy()
|
||||
*/
|
||||
int av_opt_set_dict2(void *obj, struct AVDictionary **options, int search_flags);
|
||||
|
||||
/**
|
||||
* Copy options from src object into dest object.
|
||||
*
|
||||
* The underlying AVClass of both src and dest must coincide. The guarantee
|
||||
* below does not apply if this is not fulfilled.
|
||||
*
|
||||
* Options that require memory allocation (e.g. string or binary) are malloc'ed in dest object.
|
||||
* Original memory allocated for such options is freed unless both src and dest options points to the same memory.
|
||||
*
|
||||
* Even on error it is guaranteed that allocated options from src and dest
|
||||
* no longer alias each other afterwards; in particular calling av_opt_free()
|
||||
* on both src and dest is safe afterwards if dest has been memdup'ed from src.
|
||||
*
|
||||
* @param dest Object to copy from
|
||||
* @param src Object to copy into
|
||||
* @return 0 on success, negative on error
|
||||
*/
|
||||
int av_opt_copy(void *dest, const void *src);
|
||||
|
||||
/**
|
||||
* @defgroup opt_set_funcs Option setting functions
|
||||
|
@ -697,10 +786,6 @@ int av_opt_set_image_size(void *obj, const char *name, int w, int h, int search_
|
|||
int av_opt_set_pixel_fmt (void *obj, const char *name, enum AVPixelFormat fmt, int search_flags);
|
||||
int av_opt_set_sample_fmt(void *obj, const char *name, enum AVSampleFormat fmt, int search_flags);
|
||||
int av_opt_set_video_rate(void *obj, const char *name, AVRational val, int search_flags);
|
||||
#if FF_API_OLD_CHANNEL_LAYOUT
|
||||
attribute_deprecated
|
||||
int av_opt_set_channel_layout(void *obj, const char *name, int64_t ch_layout, int search_flags);
|
||||
#endif
|
||||
int av_opt_set_chlayout(void *obj, const char *name, const AVChannelLayout *layout, int search_flags);
|
||||
/**
|
||||
* @note Any old dictionary present is discarded and replaced with a copy of the new one. The
|
||||
|
@ -726,6 +811,12 @@ int av_opt_set_dict_val(void *obj, const char *name, const AVDictionary *val, in
|
|||
|
||||
/**
|
||||
* @}
|
||||
* @}
|
||||
*/
|
||||
|
||||
/**
|
||||
* @defgroup opt_read Reading option values
|
||||
* @{
|
||||
*/
|
||||
|
||||
/**
|
||||
|
@ -756,10 +847,6 @@ int av_opt_get_image_size(void *obj, const char *name, int search_flags, int *w_
|
|||
int av_opt_get_pixel_fmt (void *obj, const char *name, int search_flags, enum AVPixelFormat *out_fmt);
|
||||
int av_opt_get_sample_fmt(void *obj, const char *name, int search_flags, enum AVSampleFormat *out_fmt);
|
||||
int av_opt_get_video_rate(void *obj, const char *name, int search_flags, AVRational *out_val);
|
||||
#if FF_API_OLD_CHANNEL_LAYOUT
|
||||
attribute_deprecated
|
||||
int av_opt_get_channel_layout(void *obj, const char *name, int search_flags, int64_t *ch_layout);
|
||||
#endif
|
||||
int av_opt_get_chlayout(void *obj, const char *name, int search_flags, AVChannelLayout *layout);
|
||||
/**
|
||||
* @param[out] out_val The returned dictionary is a copy of the actual value and must
|
||||
|
@ -769,6 +856,31 @@ int av_opt_get_dict_val(void *obj, const char *name, int search_flags, AVDiction
|
|||
/**
|
||||
* @}
|
||||
*/
|
||||
|
||||
/**
|
||||
* @defgroup opt_eval_funcs Evaluating option strings
|
||||
* @{
|
||||
* This group of functions can be used to evaluate option strings
|
||||
* and get numbers out of them. They do the same thing as av_opt_set(),
|
||||
* except the result is written into the caller-supplied pointer.
|
||||
*
|
||||
* @param obj a struct whose first element is a pointer to AVClass.
|
||||
* @param o an option for which the string is to be evaluated.
|
||||
* @param val string to be evaluated.
|
||||
* @param *_out value of the string will be written here.
|
||||
*
|
||||
* @return 0 on success, a negative number on failure.
|
||||
*/
|
||||
int av_opt_eval_flags (void *obj, const AVOption *o, const char *val, int *flags_out);
|
||||
int av_opt_eval_int (void *obj, const AVOption *o, const char *val, int *int_out);
|
||||
int av_opt_eval_int64 (void *obj, const AVOption *o, const char *val, int64_t *int64_out);
|
||||
int av_opt_eval_float (void *obj, const AVOption *o, const char *val, float *float_out);
|
||||
int av_opt_eval_double(void *obj, const AVOption *o, const char *val, double *double_out);
|
||||
int av_opt_eval_q (void *obj, const AVOption *o, const char *val, AVRational *q_out);
|
||||
/**
|
||||
* @}
|
||||
*/
|
||||
|
||||
/**
|
||||
* Gets a pointer to the requested field in a struct.
|
||||
* This function allows accessing a struct even when its fields are moved or
|
||||
|
@ -779,61 +891,6 @@ int av_opt_get_dict_val(void *obj, const char *name, int search_flags, AVDiction
|
|||
*/
|
||||
void *av_opt_ptr(const AVClass *avclass, void *obj, const char *name);
|
||||
|
||||
/**
|
||||
* Free an AVOptionRanges struct and set it to NULL.
|
||||
*/
|
||||
void av_opt_freep_ranges(AVOptionRanges **ranges);
|
||||
|
||||
/**
|
||||
* Get a list of allowed ranges for the given option.
|
||||
*
|
||||
* The returned list may depend on other fields in obj like for example profile.
|
||||
*
|
||||
* @param flags is a bitmask of flags, undefined flags should not be set and should be ignored
|
||||
* AV_OPT_SEARCH_FAKE_OBJ indicates that the obj is a double pointer to a AVClass instead of a full instance
|
||||
* AV_OPT_MULTI_COMPONENT_RANGE indicates that function may return more than one component, @see AVOptionRanges
|
||||
*
|
||||
* The result must be freed with av_opt_freep_ranges.
|
||||
*
|
||||
* @return number of compontents returned on success, a negative errro code otherwise
|
||||
*/
|
||||
int av_opt_query_ranges(AVOptionRanges **, void *obj, const char *key, int flags);
|
||||
|
||||
/**
|
||||
* Copy options from src object into dest object.
|
||||
*
|
||||
* The underlying AVClass of both src and dest must coincide. The guarantee
|
||||
* below does not apply if this is not fulfilled.
|
||||
*
|
||||
* Options that require memory allocation (e.g. string or binary) are malloc'ed in dest object.
|
||||
* Original memory allocated for such options is freed unless both src and dest options points to the same memory.
|
||||
*
|
||||
* Even on error it is guaranteed that allocated options from src and dest
|
||||
* no longer alias each other afterwards; in particular calling av_opt_free()
|
||||
* on both src and dest is safe afterwards if dest has been memdup'ed from src.
|
||||
*
|
||||
* @param dest Object to copy from
|
||||
* @param src Object to copy into
|
||||
* @return 0 on success, negative on error
|
||||
*/
|
||||
int av_opt_copy(void *dest, const void *src);
|
||||
|
||||
/**
|
||||
* Get a default list of allowed ranges for the given option.
|
||||
*
|
||||
* This list is constructed without using the AVClass.query_ranges() callback
|
||||
* and can be used as fallback from within the callback.
|
||||
*
|
||||
* @param flags is a bitmask of flags, undefined flags should not be set and should be ignored
|
||||
* AV_OPT_SEARCH_FAKE_OBJ indicates that the obj is a double pointer to a AVClass instead of a full instance
|
||||
* AV_OPT_MULTI_COMPONENT_RANGE indicates that function may return more than one component, @see AVOptionRanges
|
||||
*
|
||||
* The result must be freed with av_opt_free_ranges.
|
||||
*
|
||||
* @return number of compontents returned on success, a negative errro code otherwise
|
||||
*/
|
||||
int av_opt_query_ranges_default(AVOptionRanges **, void *obj, const char *key, int flags);
|
||||
|
||||
/**
|
||||
* Check if given option is set to its default value.
|
||||
*
|
||||
|
@ -860,6 +917,15 @@ int av_opt_is_set_to_default(void *obj, const AVOption *o);
|
|||
*/
|
||||
int av_opt_is_set_to_default_by_name(void *obj, const char *name, int search_flags);
|
||||
|
||||
/**
|
||||
* Check whether a particular flag is set in a flags field.
|
||||
*
|
||||
* @param field_name the name of the flag field option
|
||||
* @param flag_name the name of the flag to check
|
||||
* @return non-zero if the flag is set, zero if the flag isn't set,
|
||||
* isn't of the right type, or the flags field doesn't exist.
|
||||
*/
|
||||
int av_opt_flag_is_set(void *obj, const char *field_name, const char *flag_name);
|
||||
|
||||
#define AV_OPT_SERIALIZE_SKIP_DEFAULTS 0x00000001 ///< Serialize options that are not set to default values only.
|
||||
#define AV_OPT_SERIALIZE_OPT_FLAGS_EXACT 0x00000002 ///< Serialize options that exactly match opt_flags only.
|
||||
|
@ -884,6 +950,47 @@ int av_opt_is_set_to_default_by_name(void *obj, const char *name, int search_fla
|
|||
*/
|
||||
int av_opt_serialize(void *obj, int opt_flags, int flags, char **buffer,
|
||||
const char key_val_sep, const char pairs_sep);
|
||||
|
||||
/**
|
||||
* @}
|
||||
*/
|
||||
|
||||
/**
|
||||
* Free an AVOptionRanges struct and set it to NULL.
|
||||
*/
|
||||
void av_opt_freep_ranges(AVOptionRanges **ranges);
|
||||
|
||||
/**
|
||||
* Get a list of allowed ranges for the given option.
|
||||
*
|
||||
* The returned list may depend on other fields in obj like for example profile.
|
||||
*
|
||||
* @param flags is a bitmask of flags, undefined flags should not be set and should be ignored
|
||||
* AV_OPT_SEARCH_FAKE_OBJ indicates that the obj is a double pointer to a AVClass instead of a full instance
|
||||
* AV_OPT_MULTI_COMPONENT_RANGE indicates that function may return more than one component, @see AVOptionRanges
|
||||
*
|
||||
* The result must be freed with av_opt_freep_ranges.
|
||||
*
|
||||
* @return number of compontents returned on success, a negative errro code otherwise
|
||||
*/
|
||||
int av_opt_query_ranges(AVOptionRanges **, void *obj, const char *key, int flags);
|
||||
|
||||
/**
|
||||
* Get a default list of allowed ranges for the given option.
|
||||
*
|
||||
* This list is constructed without using the AVClass.query_ranges() callback
|
||||
* and can be used as fallback from within the callback.
|
||||
*
|
||||
* @param flags is a bitmask of flags, undefined flags should not be set and should be ignored
|
||||
* AV_OPT_SEARCH_FAKE_OBJ indicates that the obj is a double pointer to a AVClass instead of a full instance
|
||||
* AV_OPT_MULTI_COMPONENT_RANGE indicates that function may return more than one component, @see AVOptionRanges
|
||||
*
|
||||
* The result must be freed with av_opt_free_ranges.
|
||||
*
|
||||
* @return number of compontents returned on success, a negative errro code otherwise
|
||||
*/
|
||||
int av_opt_query_ranges_default(AVOptionRanges **, void *obj, const char *key, int flags);
|
||||
|
||||
/**
|
||||
* @}
|
||||
*/
|
||||
|
|
|
@ -157,6 +157,11 @@ typedef struct AVPixFmtDescriptor {
|
|||
*/
|
||||
#define AV_PIX_FMT_FLAG_FLOAT (1 << 9)
|
||||
|
||||
/**
|
||||
* The pixel format contains XYZ-like data (as opposed to YUV/RGB/grayscale).
|
||||
*/
|
||||
#define AV_PIX_FMT_FLAG_XYZ (1 << 10)
|
||||
|
||||
/**
|
||||
* Return the number of bits per pixel used by the pixel format
|
||||
* described by pixdesc. Note that this is not the same as the number
|
||||
|
|
60
ThirdParty/ffmpeg/include/libavutil/pixfmt.h
vendored
60
ThirdParty/ffmpeg/include/libavutil/pixfmt.h
vendored
|
@ -32,6 +32,13 @@
|
|||
#define AVPALETTE_SIZE 1024
|
||||
#define AVPALETTE_COUNT 256
|
||||
|
||||
/**
|
||||
* Maximum number of planes in any pixel format.
|
||||
* This should be used when a maximum is needed, but code should not
|
||||
* be written to require a maximum for no good reason.
|
||||
*/
|
||||
#define AV_VIDEO_MAX_PLANES 4
|
||||
|
||||
/**
|
||||
* Pixel format.
|
||||
*
|
||||
|
@ -83,7 +90,7 @@ enum AVPixelFormat {
|
|||
AV_PIX_FMT_BGR8, ///< packed RGB 3:3:2, 8bpp, (msb)2B 3G 3R(lsb)
|
||||
AV_PIX_FMT_BGR4, ///< packed RGB 1:2:1 bitstream, 4bpp, (msb)1B 2G 1R(lsb), a byte contains two pixels, the first pixel in the byte is the one composed by the 4 msb bits
|
||||
AV_PIX_FMT_BGR4_BYTE, ///< packed RGB 1:2:1, 8bpp, (msb)1B 2G 1R(lsb)
|
||||
AV_PIX_FMT_RGB8, ///< packed RGB 3:3:2, 8bpp, (msb)2R 3G 3B(lsb)
|
||||
AV_PIX_FMT_RGB8, ///< packed RGB 3:3:2, 8bpp, (msb)3R 3G 2B(lsb)
|
||||
AV_PIX_FMT_RGB4, ///< packed RGB 1:2:1 bitstream, 4bpp, (msb)1R 2G 1B(lsb), a byte contains two pixels, the first pixel in the byte is the one composed by the 4 msb bits
|
||||
AV_PIX_FMT_RGB4_BYTE, ///< packed RGB 1:2:1, 8bpp, (msb)1R 2G 1B(lsb)
|
||||
AV_PIX_FMT_NV12, ///< planar YUV 4:2:0, 12bpp, 1 plane for Y and 1 plane for the UV components, which are interleaved (first byte U and the following byte V)
|
||||
|
@ -208,6 +215,34 @@ enum AVPixelFormat {
|
|||
/**
|
||||
* HW acceleration through QSV, data[3] contains a pointer to the
|
||||
* mfxFrameSurface1 structure.
|
||||
*
|
||||
* Before FFmpeg 5.0:
|
||||
* mfxFrameSurface1.Data.MemId contains a pointer when importing
|
||||
* the following frames as QSV frames:
|
||||
*
|
||||
* VAAPI:
|
||||
* mfxFrameSurface1.Data.MemId contains a pointer to VASurfaceID
|
||||
*
|
||||
* DXVA2:
|
||||
* mfxFrameSurface1.Data.MemId contains a pointer to IDirect3DSurface9
|
||||
*
|
||||
* FFmpeg 5.0 and above:
|
||||
* mfxFrameSurface1.Data.MemId contains a pointer to the mfxHDLPair
|
||||
* structure when importing the following frames as QSV frames:
|
||||
*
|
||||
* VAAPI:
|
||||
* mfxHDLPair.first contains a VASurfaceID pointer.
|
||||
* mfxHDLPair.second is always MFX_INFINITE.
|
||||
*
|
||||
* DXVA2:
|
||||
* mfxHDLPair.first contains IDirect3DSurface9 pointer.
|
||||
* mfxHDLPair.second is always MFX_INFINITE.
|
||||
*
|
||||
* D3D11:
|
||||
* mfxHDLPair.first contains a ID3D11Texture2D pointer.
|
||||
* mfxHDLPair.second contains the texture array index of the frame if the
|
||||
* ID3D11Texture2D is an array texture, or always MFX_INFINITE if it is a
|
||||
* normal texture.
|
||||
*/
|
||||
AV_PIX_FMT_QSV,
|
||||
/**
|
||||
|
@ -260,10 +295,6 @@ enum AVPixelFormat {
|
|||
AV_PIX_FMT_BAYER_GRBG16LE, ///< bayer, GRGR..(odd line), BGBG..(even line), 16-bit samples, little-endian
|
||||
AV_PIX_FMT_BAYER_GRBG16BE, ///< bayer, GRGR..(odd line), BGBG..(even line), 16-bit samples, big-endian
|
||||
|
||||
#if FF_API_XVMC
|
||||
AV_PIX_FMT_XVMC,///< XVideo Motion Acceleration via common packet passing
|
||||
#endif
|
||||
|
||||
AV_PIX_FMT_YUV440P10LE, ///< planar YUV 4:4:0,20bpp, (1 Cr & Cb sample per 1x2 Y samples), little-endian
|
||||
AV_PIX_FMT_YUV440P10BE, ///< planar YUV 4:4:0,20bpp, (1 Cr & Cb sample per 1x2 Y samples), big-endian
|
||||
AV_PIX_FMT_YUV440P12LE, ///< planar YUV 4:4:0,24bpp, (1 Cr & Cb sample per 1x2 Y samples), little-endian
|
||||
|
@ -392,6 +423,22 @@ enum AVPixelFormat {
|
|||
AV_PIX_FMT_RGBAF32BE, ///< IEEE-754 single precision packed RGBA 32:32:32:32, 128bpp, RGBARGBA..., big-endian
|
||||
AV_PIX_FMT_RGBAF32LE, ///< IEEE-754 single precision packed RGBA 32:32:32:32, 128bpp, RGBARGBA..., little-endian
|
||||
|
||||
AV_PIX_FMT_P212BE, ///< interleaved chroma YUV 4:2:2, 24bpp, data in the high bits, big-endian
|
||||
AV_PIX_FMT_P212LE, ///< interleaved chroma YUV 4:2:2, 24bpp, data in the high bits, little-endian
|
||||
|
||||
AV_PIX_FMT_P412BE, ///< interleaved chroma YUV 4:4:4, 36bpp, data in the high bits, big-endian
|
||||
AV_PIX_FMT_P412LE, ///< interleaved chroma YUV 4:4:4, 36bpp, data in the high bits, little-endian
|
||||
|
||||
AV_PIX_FMT_GBRAP14BE, ///< planar GBR 4:4:4:4 56bpp, big-endian
|
||||
AV_PIX_FMT_GBRAP14LE, ///< planar GBR 4:4:4:4 56bpp, little-endian
|
||||
|
||||
/**
|
||||
* Hardware surfaces for Direct3D 12.
|
||||
*
|
||||
* data[0] points to an AVD3D12VAFrame
|
||||
*/
|
||||
AV_PIX_FMT_D3D12,
|
||||
|
||||
AV_PIX_FMT_NB ///< number of pixel formats, DO NOT USE THIS if you want to link with shared libav* because the number of formats might differ between versions
|
||||
};
|
||||
|
||||
|
@ -450,6 +497,7 @@ enum AVPixelFormat {
|
|||
#define AV_PIX_FMT_GBRP16 AV_PIX_FMT_NE(GBRP16BE, GBRP16LE)
|
||||
#define AV_PIX_FMT_GBRAP10 AV_PIX_FMT_NE(GBRAP10BE, GBRAP10LE)
|
||||
#define AV_PIX_FMT_GBRAP12 AV_PIX_FMT_NE(GBRAP12BE, GBRAP12LE)
|
||||
#define AV_PIX_FMT_GBRAP14 AV_PIX_FMT_NE(GBRAP14BE, GBRAP14LE)
|
||||
#define AV_PIX_FMT_GBRAP16 AV_PIX_FMT_NE(GBRAP16BE, GBRAP16LE)
|
||||
|
||||
#define AV_PIX_FMT_BAYER_BGGR16 AV_PIX_FMT_NE(BAYER_BGGR16BE, BAYER_BGGR16LE)
|
||||
|
@ -490,6 +538,8 @@ enum AVPixelFormat {
|
|||
|
||||
#define AV_PIX_FMT_P210 AV_PIX_FMT_NE(P210BE, P210LE)
|
||||
#define AV_PIX_FMT_P410 AV_PIX_FMT_NE(P410BE, P410LE)
|
||||
#define AV_PIX_FMT_P212 AV_PIX_FMT_NE(P212BE, P212LE)
|
||||
#define AV_PIX_FMT_P412 AV_PIX_FMT_NE(P412BE, P412LE)
|
||||
#define AV_PIX_FMT_P216 AV_PIX_FMT_NE(P216BE, P216LE)
|
||||
#define AV_PIX_FMT_P416 AV_PIX_FMT_NE(P416BE, P416LE)
|
||||
|
||||
|
|
|
@ -21,6 +21,7 @@
|
|||
#ifndef AVUTIL_RANDOM_SEED_H
|
||||
#define AVUTIL_RANDOM_SEED_H
|
||||
|
||||
#include <stddef.h>
|
||||
#include <stdint.h>
|
||||
/**
|
||||
* @addtogroup lavu_crypto
|
||||
|
@ -36,6 +37,19 @@
|
|||
*/
|
||||
uint32_t av_get_random_seed(void);
|
||||
|
||||
/**
|
||||
* Generate cryptographically secure random data, i.e. suitable for use as
|
||||
* encryption keys and similar.
|
||||
*
|
||||
* @param buf buffer into which the random data will be written
|
||||
* @param len size of buf in bytes
|
||||
*
|
||||
* @retval 0 success, len bytes of random data was written
|
||||
* into buf
|
||||
* @retval "a negative AVERROR code" random data could not be generated
|
||||
*/
|
||||
int av_random_bytes(uint8_t *buf, size_t len);
|
||||
|
||||
/**
|
||||
* @}
|
||||
*/
|
||||
|
|
|
@ -168,6 +168,10 @@ static av_always_inline AVRational av_inv_q(AVRational q)
|
|||
* In case of infinity, the returned value is expressed as `{1, 0}` or
|
||||
* `{-1, 0}` depending on the sign.
|
||||
*
|
||||
* In general rational numbers with |num| <= 1<<26 && |den| <= 1<<26
|
||||
* can be recovered exactly from their double representation.
|
||||
* (no exceptions were found within 1B random ones)
|
||||
*
|
||||
* @param d `double` to convert
|
||||
* @param max Maximum allowed numerator and denominator
|
||||
* @return `d` in AVRational form
|
||||
|
|
|
@ -246,7 +246,7 @@ int av_samples_alloc_array_and_samples(uint8_t ***audio_data, int *linesize, int
|
|||
* @param nb_channels number of audio channels
|
||||
* @param sample_fmt audio sample format
|
||||
*/
|
||||
int av_samples_copy(uint8_t **dst, uint8_t * const *src, int dst_offset,
|
||||
int av_samples_copy(uint8_t * const *dst, uint8_t * const *src, int dst_offset,
|
||||
int src_offset, int nb_samples, int nb_channels,
|
||||
enum AVSampleFormat sample_fmt);
|
||||
|
||||
|
@ -259,7 +259,7 @@ int av_samples_copy(uint8_t **dst, uint8_t * const *src, int dst_offset,
|
|||
* @param nb_channels number of audio channels
|
||||
* @param sample_fmt audio sample format
|
||||
*/
|
||||
int av_samples_set_silence(uint8_t **audio_data, int offset, int nb_samples,
|
||||
int av_samples_set_silence(uint8_t * const *audio_data, int offset, int nb_samples,
|
||||
int nb_channels, enum AVSampleFormat sample_fmt);
|
||||
|
||||
/**
|
||||
|
|
14
ThirdParty/ffmpeg/include/libavutil/timecode.h
vendored
14
ThirdParty/ffmpeg/include/libavutil/timecode.h
vendored
|
@ -98,8 +98,8 @@ uint32_t av_timecode_get_smpte(AVRational rate, int drop, int hh, int mm, int ss
|
|||
/**
|
||||
* Load timecode string in buf.
|
||||
*
|
||||
* @param buf destination buffer, must be at least AV_TIMECODE_STR_SIZE long
|
||||
* @param tc timecode data correctly initialized
|
||||
* @param buf destination buffer, must be at least AV_TIMECODE_STR_SIZE long
|
||||
* @param framenum frame number
|
||||
* @return the buf parameter
|
||||
*
|
||||
|
@ -149,13 +149,13 @@ char *av_timecode_make_mpeg_tc_string(char *buf, uint32_t tc25bit);
|
|||
/**
|
||||
* Init a timecode struct with the passed parameters.
|
||||
*
|
||||
* @param log_ctx a pointer to an arbitrary struct of which the first field
|
||||
* is a pointer to an AVClass struct (used for av_log)
|
||||
* @param tc pointer to an allocated AVTimecode
|
||||
* @param rate frame rate in rational form
|
||||
* @param flags miscellaneous flags such as drop frame, +24 hours, ...
|
||||
* (see AVTimecodeFlag)
|
||||
* @param frame_start the first frame number
|
||||
* @param log_ctx a pointer to an arbitrary struct of which the first field
|
||||
* is a pointer to an AVClass struct (used for av_log)
|
||||
* @return 0 on success, AVERROR otherwise
|
||||
*/
|
||||
int av_timecode_init(AVTimecode *tc, AVRational rate, int flags, int frame_start, void *log_ctx);
|
||||
|
@ -163,8 +163,6 @@ int av_timecode_init(AVTimecode *tc, AVRational rate, int flags, int frame_start
|
|||
/**
|
||||
* Init a timecode struct from the passed timecode components.
|
||||
*
|
||||
* @param log_ctx a pointer to an arbitrary struct of which the first field
|
||||
* is a pointer to an AVClass struct (used for av_log)
|
||||
* @param tc pointer to an allocated AVTimecode
|
||||
* @param rate frame rate in rational form
|
||||
* @param flags miscellaneous flags such as drop frame, +24 hours, ...
|
||||
|
@ -173,6 +171,8 @@ int av_timecode_init(AVTimecode *tc, AVRational rate, int flags, int frame_start
|
|||
* @param mm minutes
|
||||
* @param ss seconds
|
||||
* @param ff frames
|
||||
* @param log_ctx a pointer to an arbitrary struct of which the first field
|
||||
* is a pointer to an AVClass struct (used for av_log)
|
||||
* @return 0 on success, AVERROR otherwise
|
||||
*/
|
||||
int av_timecode_init_from_components(AVTimecode *tc, AVRational rate, int flags, int hh, int mm, int ss, int ff, void *log_ctx);
|
||||
|
@ -180,11 +180,11 @@ int av_timecode_init_from_components(AVTimecode *tc, AVRational rate, int flags,
|
|||
/**
|
||||
* Parse timecode representation (hh:mm:ss[:;.]ff).
|
||||
*
|
||||
* @param log_ctx a pointer to an arbitrary struct of which the first field is a
|
||||
* pointer to an AVClass struct (used for av_log).
|
||||
* @param tc pointer to an allocated AVTimecode
|
||||
* @param rate frame rate in rational form
|
||||
* @param str timecode string which will determine the frame start
|
||||
* @param log_ctx a pointer to an arbitrary struct of which the first field is a
|
||||
* pointer to an AVClass struct (used for av_log).
|
||||
* @return 0 on success, AVERROR otherwise
|
||||
*/
|
||||
int av_timecode_init_from_string(AVTimecode *tc, AVRational rate, const char *str, void *log_ctx);
|
||||
|
|
17
ThirdParty/ffmpeg/include/libavutil/timestamp.h
vendored
17
ThirdParty/ffmpeg/include/libavutil/timestamp.h
vendored
|
@ -24,7 +24,7 @@
|
|||
#ifndef AVUTIL_TIMESTAMP_H
|
||||
#define AVUTIL_TIMESTAMP_H
|
||||
|
||||
#include "common.h"
|
||||
#include "avutil.h"
|
||||
|
||||
#if defined(__cplusplus) && !defined(__STDC_FORMAT_MACROS) && !defined(PRId64)
|
||||
#error missing -D__STDC_FORMAT_MACROS / #define __STDC_FORMAT_MACROS
|
||||
|
@ -62,11 +62,18 @@ static inline char *av_ts_make_string(char *buf, int64_t ts)
|
|||
* @param tb the timebase of the timestamp
|
||||
* @return the buffer in input
|
||||
*/
|
||||
static inline char *av_ts_make_time_string(char *buf, int64_t ts, AVRational *tb)
|
||||
char *av_ts_make_time_string2(char *buf, int64_t ts, AVRational tb);
|
||||
|
||||
/**
|
||||
* Fill the provided buffer with a string containing a timestamp
|
||||
* representation.
|
||||
*
|
||||
* @see av_ts_make_time_string2
|
||||
*/
|
||||
static inline char *av_ts_make_time_string(char *buf, int64_t ts,
|
||||
const AVRational *tb)
|
||||
{
|
||||
if (ts == AV_NOPTS_VALUE) snprintf(buf, AV_TS_MAX_STRING_SIZE, "NOPTS");
|
||||
else snprintf(buf, AV_TS_MAX_STRING_SIZE, "%.6g", av_q2d(*tb) * ts);
|
||||
return buf;
|
||||
return av_ts_make_time_string2(buf, ts, *tb);
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
57
ThirdParty/ffmpeg/include/libavutil/tx.h
vendored
57
ThirdParty/ffmpeg/include/libavutil/tx.h
vendored
|
@ -75,7 +75,9 @@ enum AVTXType {
|
|||
* the double variant, it's a 'double'. If scale is NULL, 1.0 will be used
|
||||
* as a default.
|
||||
*
|
||||
* The stride parameter must be set to the size of a single sample in bytes.
|
||||
* For forward transforms (R2C), stride must be the spacing between two
|
||||
* samples in bytes. For inverse transforms, the stride must be set
|
||||
* to the spacing between two complex values in bytes.
|
||||
*
|
||||
* The forward transform performs a real-to-complex DFT of N samples to
|
||||
* N/2+1 complex values.
|
||||
|
@ -89,6 +91,44 @@ enum AVTXType {
|
|||
AV_TX_DOUBLE_RDFT = 7,
|
||||
AV_TX_INT32_RDFT = 8,
|
||||
|
||||
/**
|
||||
* Real to real (DCT) transforms.
|
||||
*
|
||||
* The forward transform is a DCT-II.
|
||||
* The inverse transform is a DCT-III.
|
||||
*
|
||||
* The input array is always overwritten. DCT-III requires that the
|
||||
* input be padded with 2 extra samples. Stride must be set to the
|
||||
* spacing between two samples in bytes.
|
||||
*/
|
||||
AV_TX_FLOAT_DCT = 9,
|
||||
AV_TX_DOUBLE_DCT = 10,
|
||||
AV_TX_INT32_DCT = 11,
|
||||
|
||||
/**
|
||||
* Discrete Cosine Transform I
|
||||
*
|
||||
* The forward transform is a DCT-I.
|
||||
* The inverse transform is a DCT-I multiplied by 2/(N + 1).
|
||||
*
|
||||
* The input array is always overwritten.
|
||||
*/
|
||||
AV_TX_FLOAT_DCT_I = 12,
|
||||
AV_TX_DOUBLE_DCT_I = 13,
|
||||
AV_TX_INT32_DCT_I = 14,
|
||||
|
||||
/**
|
||||
* Discrete Sine Transform I
|
||||
*
|
||||
* The forward transform is a DST-I.
|
||||
* The inverse transform is a DST-I multiplied by 2/(N + 1).
|
||||
*
|
||||
* The input array is always overwritten.
|
||||
*/
|
||||
AV_TX_FLOAT_DST_I = 15,
|
||||
AV_TX_DOUBLE_DST_I = 16,
|
||||
AV_TX_INT32_DST_I = 17,
|
||||
|
||||
/* Not part of the API, do not use */
|
||||
AV_TX_NB,
|
||||
};
|
||||
|
@ -115,9 +155,8 @@ typedef void (*av_tx_fn)(AVTXContext *s, void *out, void *in, ptrdiff_t stride);
|
|||
*/
|
||||
enum AVTXFlags {
|
||||
/**
|
||||
* Performs an in-place transformation on the input. The output argument
|
||||
* of av_tn_fn() MUST match the input. May be unsupported or slower for some
|
||||
* transform types.
|
||||
* Allows for in-place transformations, where input == output.
|
||||
* May be unsupported or slower for some transform types.
|
||||
*/
|
||||
AV_TX_INPLACE = 1ULL << 0,
|
||||
|
||||
|
@ -134,6 +173,16 @@ enum AVTXFlags {
|
|||
* Ignored for all transforms but inverse MDCTs.
|
||||
*/
|
||||
AV_TX_FULL_IMDCT = 1ULL << 2,
|
||||
|
||||
/**
|
||||
* Perform a real to half-complex RDFT.
|
||||
* Only the real, or imaginary coefficients will
|
||||
* be output, depending on the flag used. Only available for forward RDFTs.
|
||||
* Output array must have enough space to hold N complex values
|
||||
* (regular size for a real to complex transform).
|
||||
*/
|
||||
AV_TX_REAL_TO_REAL = 1ULL << 3,
|
||||
AV_TX_REAL_TO_IMAGINARY = 1ULL << 4,
|
||||
};
|
||||
|
||||
/**
|
||||
|
|
23
ThirdParty/ffmpeg/include/libavutil/version.h
vendored
23
ThirdParty/ffmpeg/include/libavutil/version.h
vendored
|
@ -78,9 +78,9 @@
|
|||
* @{
|
||||
*/
|
||||
|
||||
#define LIBAVUTIL_VERSION_MAJOR 57
|
||||
#define LIBAVUTIL_VERSION_MINOR 39
|
||||
#define LIBAVUTIL_VERSION_MICRO 101
|
||||
#define LIBAVUTIL_VERSION_MAJOR 59
|
||||
#define LIBAVUTIL_VERSION_MINOR 8
|
||||
#define LIBAVUTIL_VERSION_MICRO 100
|
||||
|
||||
#define LIBAVUTIL_VERSION_INT AV_VERSION_INT(LIBAVUTIL_VERSION_MAJOR, \
|
||||
LIBAVUTIL_VERSION_MINOR, \
|
||||
|
@ -105,16 +105,13 @@
|
|||
* @{
|
||||
*/
|
||||
|
||||
#define FF_API_D2STR (LIBAVUTIL_VERSION_MAJOR < 58)
|
||||
#define FF_API_DECLARE_ALIGNED (LIBAVUTIL_VERSION_MAJOR < 58)
|
||||
#define FF_API_COLORSPACE_NAME (LIBAVUTIL_VERSION_MAJOR < 58)
|
||||
#define FF_API_AV_MALLOCZ_ARRAY (LIBAVUTIL_VERSION_MAJOR < 58)
|
||||
#define FF_API_FIFO_PEEK2 (LIBAVUTIL_VERSION_MAJOR < 58)
|
||||
#define FF_API_FIFO_OLD_API (LIBAVUTIL_VERSION_MAJOR < 58)
|
||||
#define FF_API_XVMC (LIBAVUTIL_VERSION_MAJOR < 58)
|
||||
#define FF_API_OLD_CHANNEL_LAYOUT (LIBAVUTIL_VERSION_MAJOR < 58)
|
||||
#define FF_API_AV_FOPEN_UTF8 (LIBAVUTIL_VERSION_MAJOR < 58)
|
||||
#define FF_API_PKT_DURATION (LIBAVUTIL_VERSION_MAJOR < 58)
|
||||
#define FF_API_HDR_VIVID_THREE_SPLINE (LIBAVUTIL_VERSION_MAJOR < 60)
|
||||
#define FF_API_FRAME_PKT (LIBAVUTIL_VERSION_MAJOR < 60)
|
||||
#define FF_API_INTERLACED_FRAME (LIBAVUTIL_VERSION_MAJOR < 60)
|
||||
#define FF_API_FRAME_KEY (LIBAVUTIL_VERSION_MAJOR < 60)
|
||||
#define FF_API_PALETTE_HAS_CHANGED (LIBAVUTIL_VERSION_MAJOR < 60)
|
||||
#define FF_API_VULKAN_CONTIGUOUS_MEMORY (LIBAVUTIL_VERSION_MAJOR < 60)
|
||||
#define FF_API_H274_FILM_GRAIN_VCS (LIBAVUTIL_VERSION_MAJOR < 60)
|
||||
|
||||
/**
|
||||
* @}
|
||||
|
|
|
@ -136,8 +136,8 @@ typedef struct AVVideoBlockParams {
|
|||
int32_t delta_qp;
|
||||
} AVVideoBlockParams;
|
||||
|
||||
/*
|
||||
* Get the block at the specified {@code idx}. Must be between 0 and nb_blocks.
|
||||
/**
|
||||
* Get the block at the specified {@code idx}. Must be between 0 and nb_blocks - 1.
|
||||
*/
|
||||
static av_always_inline AVVideoBlockParams*
|
||||
av_video_enc_params_block(AVVideoEncParams *par, unsigned int idx)
|
||||
|
|
107
ThirdParty/ffmpeg/include/libavutil/video_hint.h
vendored
Normal file
107
ThirdParty/ffmpeg/include/libavutil/video_hint.h
vendored
Normal file
|
@ -0,0 +1,107 @@
|
|||
/**
|
||||
* Copyright 2023 Elias Carotti <eliascrt at amazon dot it>
|
||||
*
|
||||
* This file is part of FFmpeg.
|
||||
*
|
||||
* FFmpeg is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU Lesser General Public
|
||||
* License as published by the Free Software Foundation; either
|
||||
* version 2.1 of the License, or (at your option) any later version.
|
||||
*
|
||||
* FFmpeg is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
* Lesser General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Lesser General Public
|
||||
* License along with FFmpeg; if not, write to the Free Software
|
||||
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
|
||||
*/
|
||||
|
||||
#ifndef AVUTIL_VIDEO_HINT_H
|
||||
#define AVUTIL_VIDEO_HINT_H
|
||||
|
||||
#include <stddef.h>
|
||||
#include <stdint.h>
|
||||
#include "libavutil/avassert.h"
|
||||
#include "libavutil/frame.h"
|
||||
|
||||
typedef struct AVVideoRect {
|
||||
uint32_t x, y;
|
||||
uint32_t width, height;
|
||||
} AVVideoRect;
|
||||
|
||||
typedef enum AVVideoHintType {
|
||||
/* rectangled delimit the constant areas (unchanged), default is changed */
|
||||
AV_VIDEO_HINT_TYPE_CONSTANT,
|
||||
|
||||
/* rectangled delimit the constant areas (changed), default is not changed */
|
||||
AV_VIDEO_HINT_TYPE_CHANGED,
|
||||
} AVVideoHintType;
|
||||
|
||||
typedef struct AVVideoHint {
|
||||
/**
|
||||
* Number of AVVideoRect present.
|
||||
*
|
||||
* May be 0, in which case no per-rectangle information is present. In this
|
||||
* case the values of rect_offset / rect_size are unspecified and should
|
||||
* not be accessed.
|
||||
*/
|
||||
size_t nb_rects;
|
||||
|
||||
/**
|
||||
* Offset in bytes from the beginning of this structure at which the array
|
||||
* of AVVideoRect starts.
|
||||
*/
|
||||
size_t rect_offset;
|
||||
|
||||
/**
|
||||
* Size in bytes of AVVideoRect.
|
||||
*/
|
||||
size_t rect_size;
|
||||
|
||||
AVVideoHintType type;
|
||||
} AVVideoHint;
|
||||
|
||||
static av_always_inline AVVideoRect *
|
||||
av_video_hint_rects(const AVVideoHint *hints) {
|
||||
return (AVVideoRect *)((uint8_t *)hints + hints->rect_offset);
|
||||
}
|
||||
|
||||
static av_always_inline AVVideoRect *
|
||||
av_video_hint_get_rect(const AVVideoHint *hints, size_t idx) {
|
||||
return (AVVideoRect *)((uint8_t *)hints + hints->rect_offset + idx * hints->rect_size);
|
||||
}
|
||||
|
||||
/**
|
||||
* Allocate memory for the AVVideoHint struct along with an nb_rects-sized
|
||||
* arrays of AVVideoRect.
|
||||
*
|
||||
* The side data contains a list of rectangles for the portions of the frame
|
||||
* which changed from the last encoded one (and the remainder are assumed to be
|
||||
* changed), or, alternately (depending on the type parameter) the unchanged
|
||||
* ones (and the remanining ones are those which changed).
|
||||
* Macroblocks will thus be hinted either to be P_SKIP-ped or go through the
|
||||
* regular encoding procedure.
|
||||
*
|
||||
* It's responsibility of the caller to fill the AVRects accordingly, and to set
|
||||
* the proper AVVideoHintType field.
|
||||
*
|
||||
* @param out_size if non-NULL, the size in bytes of the resulting data array is
|
||||
* written here
|
||||
*
|
||||
* @return newly allocated AVVideoHint struct (must be freed by the caller using
|
||||
* av_free()) on success, NULL on memory allocation failure
|
||||
*/
|
||||
AVVideoHint *av_video_hint_alloc(size_t nb_rects,
|
||||
size_t *out_size);
|
||||
|
||||
/**
|
||||
* Same as av_video_hint_alloc(), except newly-allocated AVVideoHint is attached
|
||||
* as side data of type AV_FRAME_DATA_VIDEO_HINT_INFO to frame.
|
||||
*/
|
||||
AVVideoHint *av_video_hint_create_side_data(AVFrame *frame,
|
||||
size_t nb_rects);
|
||||
|
||||
|
||||
#endif /* AVUTIL_VIDEO_HINT_H */
|
|
@ -234,35 +234,6 @@ int swr_init(struct SwrContext *s);
|
|||
*/
|
||||
int swr_is_initialized(struct SwrContext *s);
|
||||
|
||||
#if FF_API_OLD_CHANNEL_LAYOUT
|
||||
/**
|
||||
* Allocate SwrContext if needed and set/reset common parameters.
|
||||
*
|
||||
* This function does not require s to be allocated with swr_alloc(). On the
|
||||
* other hand, swr_alloc() can use swr_alloc_set_opts() to set the parameters
|
||||
* on the allocated context.
|
||||
*
|
||||
* @param s existing Swr context if available, or NULL if not
|
||||
* @param out_ch_layout output channel layout (AV_CH_LAYOUT_*)
|
||||
* @param out_sample_fmt output sample format (AV_SAMPLE_FMT_*).
|
||||
* @param out_sample_rate output sample rate (frequency in Hz)
|
||||
* @param in_ch_layout input channel layout (AV_CH_LAYOUT_*)
|
||||
* @param in_sample_fmt input sample format (AV_SAMPLE_FMT_*).
|
||||
* @param in_sample_rate input sample rate (frequency in Hz)
|
||||
* @param log_offset logging level offset
|
||||
* @param log_ctx parent logging context, can be NULL
|
||||
*
|
||||
* @see swr_init(), swr_free()
|
||||
* @return NULL on error, allocated context otherwise
|
||||
* @deprecated use @ref swr_alloc_set_opts2()
|
||||
*/
|
||||
attribute_deprecated
|
||||
struct SwrContext *swr_alloc_set_opts(struct SwrContext *s,
|
||||
int64_t out_ch_layout, enum AVSampleFormat out_sample_fmt, int out_sample_rate,
|
||||
int64_t in_ch_layout, enum AVSampleFormat in_sample_fmt, int in_sample_rate,
|
||||
int log_offset, void *log_ctx);
|
||||
#endif
|
||||
|
||||
/**
|
||||
* Allocate SwrContext if needed and set/reset common parameters.
|
||||
*
|
||||
|
@ -340,8 +311,8 @@ void swr_close(struct SwrContext *s);
|
|||
*
|
||||
* @return number of samples output per channel, negative value on error
|
||||
*/
|
||||
int swr_convert(struct SwrContext *s, uint8_t **out, int out_count,
|
||||
const uint8_t **in , int in_count);
|
||||
int swr_convert(struct SwrContext *s, uint8_t * const *out, int out_count,
|
||||
const uint8_t * const *in , int in_count);
|
||||
|
||||
/**
|
||||
* Convert the next timestamp from input to output
|
||||
|
@ -399,40 +370,6 @@ int swr_set_compensation(struct SwrContext *s, int sample_delta, int compensatio
|
|||
*/
|
||||
int swr_set_channel_mapping(struct SwrContext *s, const int *channel_map);
|
||||
|
||||
#if FF_API_OLD_CHANNEL_LAYOUT
|
||||
/**
|
||||
* Generate a channel mixing matrix.
|
||||
*
|
||||
* This function is the one used internally by libswresample for building the
|
||||
* default mixing matrix. It is made public just as a utility function for
|
||||
* building custom matrices.
|
||||
*
|
||||
* @param in_layout input channel layout
|
||||
* @param out_layout output channel layout
|
||||
* @param center_mix_level mix level for the center channel
|
||||
* @param surround_mix_level mix level for the surround channel(s)
|
||||
* @param lfe_mix_level mix level for the low-frequency effects channel
|
||||
* @param rematrix_maxval if 1.0, coefficients will be normalized to prevent
|
||||
* overflow. if INT_MAX, coefficients will not be
|
||||
* normalized.
|
||||
* @param[out] matrix mixing coefficients; matrix[i + stride * o] is
|
||||
* the weight of input channel i in output channel o.
|
||||
* @param stride distance between adjacent input channels in the
|
||||
* matrix array
|
||||
* @param matrix_encoding matrixed stereo downmix mode (e.g. dplii)
|
||||
* @param log_ctx parent logging context, can be NULL
|
||||
* @return 0 on success, negative AVERROR code on failure
|
||||
* @deprecated use @ref swr_build_matrix2()
|
||||
*/
|
||||
attribute_deprecated
|
||||
int swr_build_matrix(uint64_t in_layout, uint64_t out_layout,
|
||||
double center_mix_level, double surround_mix_level,
|
||||
double lfe_mix_level, double rematrix_maxval,
|
||||
double rematrix_volume, double *matrix,
|
||||
int stride, enum AVMatrixEncoding matrix_encoding,
|
||||
void *log_ctx);
|
||||
#endif
|
||||
|
||||
/**
|
||||
* Generate a channel mixing matrix.
|
||||
*
|
||||
|
|
|
@ -30,7 +30,7 @@
|
|||
|
||||
#include "version_major.h"
|
||||
|
||||
#define LIBSWRESAMPLE_VERSION_MINOR 9
|
||||
#define LIBSWRESAMPLE_VERSION_MINOR 1
|
||||
#define LIBSWRESAMPLE_VERSION_MICRO 100
|
||||
|
||||
#define LIBSWRESAMPLE_VERSION_INT AV_VERSION_INT(LIBSWRESAMPLE_VERSION_MAJOR, \
|
||||
|
|
|
@ -26,6 +26,6 @@
|
|||
* Libswresample version macros
|
||||
*/
|
||||
|
||||
#define LIBSWRESAMPLE_VERSION_MAJOR 4
|
||||
#define LIBSWRESAMPLE_VERSION_MAJOR 5
|
||||
|
||||
#endif /* SWRESAMPLE_VERSION_MAJOR_H */
|
||||
|
|
BIN
ThirdParty/libraries-debug-overlay.tar.xz
vendored
BIN
ThirdParty/libraries-debug-overlay.tar.xz
vendored
Binary file not shown.
BIN
ThirdParty/libraries.tar.xz
vendored
BIN
ThirdParty/libraries.tar.xz
vendored
Binary file not shown.
5
ThirdParty/soxr/README.md
vendored
5
ThirdParty/soxr/README.md
vendored
|
@ -12,11 +12,6 @@ cmake .. -DCMAKE_OSX_ARCHITECTURES="arm64" -DCMAKE_OSX_DEPLOYMENT_TARGET="11.0"
|
|||
|
||||
(Release|Debug) means one or the other for the separate release/debug builds
|
||||
|
||||
And some minor tweaks with `install_name_tool -id` to make sure that the
|
||||
resulting libsoxr.0.dylib imported libavutil properly, as it seems to want
|
||||
to use that for CPU detection on ARM, even though the only feature being
|
||||
detected is NEON, which is mandatory on the supported Apple Silicon platforms.
|
||||
|
||||
Version 0.1.3 was retrieved from:
|
||||
|
||||
https://downloads.sourceforge.net/project/soxr/soxr-0.1.3-Source.tar.xz
|
||||
|
|
Loading…
Reference in a new issue