wangguolei

sdk upgrade

Showing 100 changed files with 1620 additions and 2 deletions

Too many changes to show.

To preserve performance only 100 of 100+ files are displayed.

Pod::Spec.new do |s|
s.name = "HHVDoctorSDK"
s.version = "3.1.4.041314"
s.version = "3.1.4.041315"
s.summary = "和缓视频医生 SDK"
s.description = <<-DESC
... ... @@ -23,7 +23,7 @@ Pod::Spec.new do |s|
base.vendored_frameworks = 'HHVDoctorSDK/*.framework'
base.resources = 'HHVDoctorSDK/resources/*.bundle'
base.frameworks = 'SystemConfiguration', 'MobileCoreServices', 'AVFoundation', 'CoreTelephony', 'VideoToolbox', 'AudioToolbox', 'CoreMedia'
base.frameworks = ['AVFoundation', 'Accelerate', 'MetalKit', 'AudioToolbox', 'VideoToolbox', 'CoreTelephony', 'ReplayKit', 'SystemConfiguration']
base.libraries = 'z', 'sqlite3.0', 'c++', 'resolv.9'
end
... ...
No preview for this file type
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>AvailableLibraries</key>
<array>
<dict>
<key>LibraryIdentifier</key>
<string>ios-arm64_armv7</string>
<key>LibraryPath</key>
<string>TXFFmpeg.framework</string>
<key>SupportedArchitectures</key>
<array>
<string>arm64</string>
<string>armv7</string>
</array>
<key>SupportedPlatform</key>
<string>ios</string>
</dict>
<dict>
<key>LibraryIdentifier</key>
<string>ios-x86_64-simulator</string>
<key>LibraryPath</key>
<string>TXFFmpeg.framework</string>
<key>SupportedArchitectures</key>
<array>
<string>x86_64</string>
</array>
<key>SupportedPlatform</key>
<string>ios</string>
<key>SupportedPlatformVariant</key>
<string>simulator</string>
</dict>
</array>
<key>CFBundlePackageType</key>
<string>XFWK</string>
<key>XCFrameworkFormatVersion</key>
<string>1.0</string>
</dict>
</plist>
... ...
/*
* Copyright (c) 2022 Tencent. All Rights Reserved.
*
*/
#import <TXFFmpeg/ffmpeg_rename_defines.h>
#import <TXFFmpeg/libavutil/adler32.h>
#import <TXFFmpeg/libavutil/aes.h>
#import <TXFFmpeg/libavutil/aes_ctr.h>
#import <TXFFmpeg/libavutil/attributes.h>
#import <TXFFmpeg/libavutil/audio_fifo.h>
#import <TXFFmpeg/libavutil/avassert.h>
#import <TXFFmpeg/libavutil/avstring.h>
#import <TXFFmpeg/libavutil/avutil.h>
#import <TXFFmpeg/libavutil/base64.h>
#import <TXFFmpeg/libavutil/blowfish.h>
#import <TXFFmpeg/libavutil/bprint.h>
#import <TXFFmpeg/libavutil/bswap.h>
#import <TXFFmpeg/libavutil/buffer.h>
#import <TXFFmpeg/libavutil/cast5.h>
#import <TXFFmpeg/libavutil/camellia.h>
#import <TXFFmpeg/libavutil/channel_layout.h>
#import <TXFFmpeg/libavutil/common.h>
#import <TXFFmpeg/libavutil/cpu.h>
#import <TXFFmpeg/libavutil/crc.h>
#import <TXFFmpeg/libavutil/des.h>
#import <TXFFmpeg/libavutil/dict.h>
#import <TXFFmpeg/libavutil/display.h>
#import <TXFFmpeg/libavutil/dovi_meta.h>
#import <TXFFmpeg/libavutil/downmix_info.h>
#import <TXFFmpeg/libavutil/encryption_info.h>
#import <TXFFmpeg/libavutil/error.h>
#import <TXFFmpeg/libavutil/eval.h>
#import <TXFFmpeg/libavutil/fifo.h>
#import <TXFFmpeg/libavutil/file.h>
#import <TXFFmpeg/libavutil/frame.h>
#import <TXFFmpeg/libavutil/hash.h>
#import <TXFFmpeg/libavutil/hmac.h>
#import <TXFFmpeg/libavutil/hwcontext.h>
#import <TXFFmpeg/libavutil/hwcontext_cuda.h>
#import <TXFFmpeg/libavutil/hwcontext_d3d11va.h>
#import <TXFFmpeg/libavutil/hwcontext_drm.h>
#import <TXFFmpeg/libavutil/hwcontext_dxva2.h>
#import <TXFFmpeg/libavutil/hwcontext_qsv.h>
#import <TXFFmpeg/libavutil/hwcontext_mediacodec.h>
#import <TXFFmpeg/libavutil/hwcontext_vaapi.h>
#import <TXFFmpeg/libavutil/hwcontext_videotoolbox.h>
#import <TXFFmpeg/libavutil/hwcontext_vdpau.h>
#import <TXFFmpeg/libavutil/imgutils.h>
#import <TXFFmpeg/libavutil/intfloat.h>
#import <TXFFmpeg/libavutil/intreadwrite.h>
#import <TXFFmpeg/libavutil/lfg.h>
#import <TXFFmpeg/libavutil/log.h>
#import <TXFFmpeg/libavutil/macros.h>
#import <TXFFmpeg/libavutil/mathematics.h>
#import <TXFFmpeg/libavutil/mastering_display_metadata.h>
#import <TXFFmpeg/libavutil/md5.h>
#import <TXFFmpeg/libavutil/mem.h>
#import <TXFFmpeg/libavutil/motion_vector.h>
#import <TXFFmpeg/libavutil/murmur3.h>
#import <TXFFmpeg/libavutil/opt.h>
#import <TXFFmpeg/libavutil/parseutils.h>
#import <TXFFmpeg/libavutil/pixdesc.h>
#import <TXFFmpeg/libavutil/pixfmt.h>
#import <TXFFmpeg/libavutil/random_seed.h>
#import <TXFFmpeg/libavutil/rc4.h>
#import <TXFFmpeg/libavutil/rational.h>
#import <TXFFmpeg/libavutil/replaygain.h>
#import <TXFFmpeg/libavutil/ripemd.h>
#import <TXFFmpeg/libavutil/samplefmt.h>
#import <TXFFmpeg/libavutil/sha.h>
#import <TXFFmpeg/libavutil/sha512.h>
#import <TXFFmpeg/libavutil/spherical.h>
#import <TXFFmpeg/libavutil/stereo3d.h>
#import <TXFFmpeg/libavutil/threadmessage.h>
#import <TXFFmpeg/libavutil/time.h>
#import <TXFFmpeg/libavutil/timecode.h>
#import <TXFFmpeg/libavutil/timestamp.h>
#import <TXFFmpeg/libavutil/tree.h>
#import <TXFFmpeg/libavutil/twofish.h>
#import <TXFFmpeg/libavutil/version.h>
#import <TXFFmpeg/libavutil/xtea.h>
#import <TXFFmpeg/libavutil/tea.h>
#import <TXFFmpeg/libavutil/pthread_helper.h>
#import <TXFFmpeg/libavutil/tx.h>
#import <TXFFmpeg/libavutil/avconfig.h>
#import <TXFFmpeg/libavutil/ffversion.h>
#import <TXFFmpeg/libavutil/lzo.h>
#import <TXFFmpeg/libavfilter/avfilter.h>
#import <TXFFmpeg/libavfilter/version.h>
#import <TXFFmpeg/libavfilter/buffersink.h>
#import <TXFFmpeg/libavfilter/buffersrc.h>
#import <TXFFmpeg/libswresample/swresample.h>
#import <TXFFmpeg/libswresample/version.h>
#import <TXFFmpeg/libswscale/swscale.h>
#import <TXFFmpeg/libswscale/version.h>
#import <TXFFmpeg/libavcodec/ac3_parser.h>
#import <TXFFmpeg/libavcodec/adts_parser.h>
#import <TXFFmpeg/libavcodec/avcodec.h>
#import <TXFFmpeg/libavcodec/avdct.h>
#import <TXFFmpeg/libavcodec/avfft.h>
#import <TXFFmpeg/libavcodec/d3d11va.h>
#import <TXFFmpeg/libavcodec/dirac.h>
#import <TXFFmpeg/libavcodec/dv_profile.h>
#import <TXFFmpeg/libavcodec/dxva2.h>
#import <TXFFmpeg/libavcodec/jni.h>
#import <TXFFmpeg/libavcodec/mediacodec.h>
#import <TXFFmpeg/libavcodec/qsv.h>
#import <TXFFmpeg/libavcodec/vaapi.h>
#import <TXFFmpeg/libavcodec/vdpau.h>
#import <TXFFmpeg/libavcodec/version.h>
#import <TXFFmpeg/libavcodec/videotoolbox.h>
#import <TXFFmpeg/libavcodec/vorbis_parser.h>
#import <TXFFmpeg/libavcodec/xvmc.h>
#import <TXFFmpeg/libavcodec/ass_split.h>
#import <TXFFmpeg/libavcodec/bytestream.h>
#import <TXFFmpeg/libavformat/avformat.h>
#import <TXFFmpeg/libavformat/avio.h>
#import <TXFFmpeg/libavformat/version.h>
#import <TXFFmpeg/libavformat/internal.h>
#import <TXFFmpeg/libavformat/os_support.h>
#import <TXFFmpeg/libavformat/avc.h>
#import <TXFFmpeg/libavformat/url.h>
... ...
#include "third_party/ffmpeg/ffmpeg_rename_defines.h" // add by source_replacer.py
/*
* AC-3 parser prototypes
* Copyright (c) 2003 Fabrice Bellard
* Copyright (c) 2003 Michael Niedermayer
*
* 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 AVCODEC_AC3_PARSER_H
#define AVCODEC_AC3_PARSER_H
#include <stddef.h>
#include <stdint.h>
/**
* Extract the bitstream ID and the frame size from AC-3 data.
*/
int liteav_av_ac3_parse_header(const uint8_t *buf, size_t size,
uint8_t *bitstream_id, uint16_t *frame_size);
#endif /* AVCODEC_AC3_PARSER_H */
... ...
#include "third_party/ffmpeg/ffmpeg_rename_defines.h" // add by source_replacer.py
/*
* 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 AVCODEC_ADTS_PARSER_H
#define AVCODEC_ADTS_PARSER_H
#include <stddef.h>
#include <stdint.h>
#define AV_AAC_ADTS_HEADER_SIZE 7
/**
* Extract the number of samples and frames from AAC data.
* @param[in] buf pointer to AAC data buffer
* @param[out] samples Pointer to where number of samples is written
* @param[out] frames Pointer to where number of frames is written
* @return Returns 0 on success, error code on failure.
*/
int liteav_av_adts_header_parse(const uint8_t *buf, uint32_t *samples,
uint8_t *frames);
#endif /* AVCODEC_ADTS_PARSER_H */
... ...
#include "third_party/ffmpeg/ffmpeg_rename_defines.h" // add by source_replacer.py
/*
* SSA/ASS spliting functions
* Copyright (c) 2010 Aurelien Jacobs <aurel@gnuage.org>
*
* 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 AVCODEC_ASS_SPLIT_H
#define AVCODEC_ASS_SPLIT_H
/**
* fields extracted from the [Script Info] section
*/
typedef struct {
char *script_type; /**< SSA script format version (eg. v4.00) */
char *collisions; /**< how subtitles are moved to prevent collisions */
int play_res_x; /**< video width that ASS coords are referring to */
int play_res_y; /**< video height that ASS coords are referring to */
float timer; /**< time multiplier to apply to SSA clock (in %) */
} ASSScriptInfo;
/**
* fields extracted from the [V4(+) Styles] section
*/
typedef struct {
char *name; /**< name of the tyle (case sensitive) */
char *font_name; /**< font face (case sensitive) */
int font_size; /**< font height */
int primary_color; /**< color that a subtitle will normally appear in */
int secondary_color;
int outline_color; /**< color for outline in ASS, called tertiary in SSA */
int back_color; /**< color of the subtitle outline or shadow */
int bold; /**< whether text is bold (1) or not (0) */
int italic; /**< whether text is italic (1) or not (0) */
int underline; /**< whether text is underlined (1) or not (0) */
int strikeout;
float scalex;
float scaley;
float spacing;
float angle;
int border_style;
float outline;
float shadow;
int alignment; /**< position of the text (left, center, top...),
defined after the layout of the numpad
(1-3 sub, 4-6 mid, 7-9 top) */
int margin_l;
int margin_r;
int margin_v;
int alpha_level;
int encoding;
} ASSStyle;
/**
* fields extracted from the [Events] section
*/
typedef struct {
int readorder;
int layer; /**< higher numbered layers are drawn over lower numbered */
int start; /**< start time of the dialog in centiseconds */
int end; /**< end time of the dialog in centiseconds */
char *style; /**< name of the ASSStyle to use with this dialog */
char *name;
int margin_l;
int margin_r;
int margin_v;
char *effect;
char *text; /**< actual text which will be displayed as a subtitle,
can include style override control codes (see
liteav_ff_ass_split_override_codes()) */
} ASSDialog;
/**
* structure containing the whole split ASS data
*/
typedef struct {
ASSScriptInfo script_info; /**< general information about the SSA script*/
ASSStyle *styles; /**< array of split out styles */
int styles_count; /**< number of ASSStyle in the styles array */
ASSDialog *dialogs; /**< array of split out dialogs */
int dialogs_count; /**< number of ASSDialog in the dialogs array*/
} ASS;
typedef enum {
ASS_STR,
ASS_INT,
ASS_FLT,
ASS_COLOR,
ASS_TIMESTAMP,
ASS_ALGN,
} ASSFieldType;
typedef struct {
const char *name;
int type;
int offset;
} ASSFields;
typedef struct {
const char *section;
const char *format_header;
const char *fields_header;
int size;
int offset;
int offset_count;
ASSFields fields[24];
} ASSSection;
static const ASSSection ass_sections[] = {
{ .section = "Script Info",
.offset = offsetof(ASS, script_info),
.fields = {{"ScriptType", ASS_STR, offsetof(ASSScriptInfo, script_type)},
{"Collisions", ASS_STR, offsetof(ASSScriptInfo, collisions) },
{"PlayResX", ASS_INT, offsetof(ASSScriptInfo, play_res_x) },
{"PlayResY", ASS_INT, offsetof(ASSScriptInfo, play_res_y) },
{"Timer", ASS_FLT, offsetof(ASSScriptInfo, timer) },
{0},
}
},
{ .section = "V4+ Styles",
.format_header = "Format",
.fields_header = "Style",
.size = sizeof(ASSStyle),
.offset = offsetof(ASS, styles),
.offset_count = offsetof(ASS, styles_count),
.fields = {{"Name", ASS_STR, offsetof(ASSStyle, name) },
{"Fontname", ASS_STR, offsetof(ASSStyle, font_name) },
{"Fontsize", ASS_INT, offsetof(ASSStyle, font_size) },
{"PrimaryColour", ASS_COLOR, offsetof(ASSStyle, primary_color) },
{"SecondaryColour", ASS_COLOR, offsetof(ASSStyle, secondary_color)},
{"OutlineColour", ASS_COLOR, offsetof(ASSStyle, outline_color) },
{"BackColour", ASS_COLOR, offsetof(ASSStyle, back_color) },
{"Bold", ASS_INT, offsetof(ASSStyle, bold) },
{"Italic", ASS_INT, offsetof(ASSStyle, italic) },
{"Underline", ASS_INT, offsetof(ASSStyle, underline) },
{"StrikeOut", ASS_INT, offsetof(ASSStyle, strikeout) },
{"ScaleX", ASS_FLT, offsetof(ASSStyle, scalex) },
{"ScaleY", ASS_FLT, offsetof(ASSStyle, scaley) },
{"Spacing", ASS_FLT, offsetof(ASSStyle, spacing) },
{"Angle", ASS_FLT, offsetof(ASSStyle, angle) },
{"BorderStyle", ASS_INT, offsetof(ASSStyle, border_style) },
{"Outline", ASS_FLT, offsetof(ASSStyle, outline) },
{"Shadow", ASS_FLT, offsetof(ASSStyle, shadow) },
{"Alignment", ASS_INT, offsetof(ASSStyle, alignment) },
{"MarginL", ASS_INT, offsetof(ASSStyle, margin_l) },
{"MarginR", ASS_INT, offsetof(ASSStyle, margin_r) },
{"MarginV", ASS_INT, offsetof(ASSStyle, margin_v) },
{"Encoding", ASS_INT, offsetof(ASSStyle, encoding) },
{0},
}
},
{ .section = "V4 Styles",
.format_header = "Format",
.fields_header = "Style",
.size = sizeof(ASSStyle),
.offset = offsetof(ASS, styles),
.offset_count = offsetof(ASS, styles_count),
.fields = {{"Name", ASS_STR, offsetof(ASSStyle, name) },
{"Fontname", ASS_STR, offsetof(ASSStyle, font_name) },
{"Fontsize", ASS_INT, offsetof(ASSStyle, font_size) },
{"PrimaryColour", ASS_COLOR, offsetof(ASSStyle, primary_color) },
{"SecondaryColour", ASS_COLOR, offsetof(ASSStyle, secondary_color)},
{"TertiaryColour", ASS_COLOR, offsetof(ASSStyle, outline_color) },
{"BackColour", ASS_COLOR, offsetof(ASSStyle, back_color) },
{"Bold", ASS_INT, offsetof(ASSStyle, bold) },
{"Italic", ASS_INT, offsetof(ASSStyle, italic) },
{"BorderStyle", ASS_INT, offsetof(ASSStyle, border_style) },
{"Outline", ASS_FLT, offsetof(ASSStyle, outline) },
{"Shadow", ASS_FLT, offsetof(ASSStyle, shadow) },
{"Alignment", ASS_ALGN, offsetof(ASSStyle, alignment) },
{"MarginL", ASS_INT, offsetof(ASSStyle, margin_l) },
{"MarginR", ASS_INT, offsetof(ASSStyle, margin_r) },
{"MarginV", ASS_INT, offsetof(ASSStyle, margin_v) },
{"AlphaLevel", ASS_INT, offsetof(ASSStyle, alpha_level) },
{"Encoding", ASS_INT, offsetof(ASSStyle, encoding) },
{0},
}
},
{ .section = "Events",
.format_header = "Format",
.fields_header = "Dialogue",
.size = sizeof(ASSDialog),
.offset = offsetof(ASS, dialogs),
.offset_count = offsetof(ASS, dialogs_count),
.fields = {{"Layer", ASS_INT, offsetof(ASSDialog, layer) },
{"Start", ASS_TIMESTAMP, offsetof(ASSDialog, start) },
{"End", ASS_TIMESTAMP, offsetof(ASSDialog, end) },
{"Style", ASS_STR, offsetof(ASSDialog, style) },
{"Name", ASS_STR, offsetof(ASSDialog, name) },
{"MarginL", ASS_INT, offsetof(ASSDialog, margin_l)},
{"MarginR", ASS_INT, offsetof(ASSDialog, margin_r)},
{"MarginV", ASS_INT, offsetof(ASSDialog, margin_v)},
{"Effect", ASS_STR, offsetof(ASSDialog, effect) },
{"Text", ASS_STR, offsetof(ASSDialog, text) },
{0},
}
},
};
struct ASSSplitContext {
ASS ass;
int current_section;
int field_number[FF_ARRAY_ELEMS(ass_sections)];
int *field_order[FF_ARRAY_ELEMS(ass_sections)];
};
/**
* This struct can be casted to ASS to access to the split data.
*/
typedef struct ASSSplitContext ASSSplitContext;
/**
* Split a full ASS file or a ASS header from a string buffer and store
* the split structure in a newly allocated context.
*
* @param buf String containing the ASS formatted data.
* @return Newly allocated struct containing split data.
*/
ASSSplitContext *liteav_ff_ass_split(const char *buf);
/**
* Split one or several ASS "Dialogue" lines from a string buffer and store
* them in an already initialized context.
*
* @param ctx Context previously initialized by liteav_ff_ass_split().
* @param buf String containing the ASS "Dialogue" lines.
* @param cache Set to 1 to keep all the previously split ASSDialog in
* the context, or set to 0 to free all the previously split
* ASSDialog.
* @param number If not NULL, the pointed integer will be set to the number
* of split ASSDialog.
* @return Pointer to the first split ASSDialog.
*/
ASSDialog *liteav_ff_ass_split_dialog(ASSSplitContext *ctx, const char *buf,
int cache, int *number);
/**
* Free a dialogue obtained from liteav_ff_ass_split_dialog2().
*/
void liteav_ff_ass_free_dialog(ASSDialog **dialogp);
/**
* Split one ASS Dialogue line from a string buffer.
*
* @param ctx Context previously initialized by liteav_ff_ass_split().
* @param buf String containing the ASS "Dialogue" line.
* @return Pointer to the split ASSDialog. Must be freed with liteav_ff_ass_free_dialog()
*/
ASSDialog *liteav_ff_ass_split_dialog2(ASSSplitContext *ctx, const char *buf);
/**
* Free all the memory allocated for an ASSSplitContext.
*
* @param ctx Context previously initialized by liteav_ff_ass_split().
*/
void liteav_ff_ass_split_free(ASSSplitContext *ctx);
/**
* Set of callback functions corresponding to each override codes that can
* be encountered in a "Dialogue" Text field.
*/
typedef struct {
/**
* @defgroup ass_styles ASS styles
* @{
*/
void (*text)(void *priv, const char *text, int len);
void (*new_line)(void *priv, int forced);
void (*style)(void *priv, char style, int close);
void (*color)(void *priv, unsigned int /* color */, unsigned int color_id);
void (*alpha)(void *priv, int alpha, int alpha_id);
void (*font_name)(void *priv, const char *name);
void (*font_size)(void *priv, int size);
void (*alignment)(void *priv, int alignment);
void (*cancel_overrides)(void *priv, const char *style);
/** @} */
/**
* @defgroup ass_functions ASS functions
* @{
*/
void (*move)(void *priv, int x1, int y1, int x2, int y2, int t1, int t2);
void (*origin)(void *priv, int x, int y);
/** @} */
/**
* @defgroup ass_end end of Dialogue Event
* @{
*/
void (*end)(void *priv);
/** @} */
} ASSCodesCallbacks;
/**
* Split override codes out of a ASS "Dialogue" Text field.
*
* @param callbacks Set of callback functions called for each override code
* encountered.
* @param priv Opaque pointer passed to the callback functions.
* @param buf The ASS "Dialogue" Text field to split.
* @return >= 0 on success otherwise an error code <0
*/
int liteav_ff_ass_split_override_codes(const ASSCodesCallbacks *callbacks, void *priv,
const char *buf);
/**
* Find an ASSStyle structure by its name.
*
* @param ctx Context previously initialized by liteav_ff_ass_split().
* @param style name of the style to search for.
* @return the ASSStyle corresponding to style, or NULL if style can't be found
*/
ASSStyle *liteav_ff_ass_style_get(ASSSplitContext *ctx, const char *style);
#endif /* AVCODEC_ASS_SPLIT_H */
... ...
#include "third_party/ffmpeg/ffmpeg_rename_defines.h" // add by source_replacer.py
/*
* 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 AVCODEC_AVDCT_H
#define AVCODEC_AVDCT_H
#include "libavutil/opt.h"
/**
* AVDCT context.
* @note function pointers can be NULL if the specific features have been
* disabled at build time.
*/
typedef struct AVDCT {
const AVClass *av_class;
void (*idct)(int16_t *block /* align 16 */);
/**
* IDCT input permutation.
* Several optimized IDCTs need a permutated input (relative to the
* normal order of the reference IDCT).
* This permutation must be performed before the idct_put/add.
* Note, normally this can be merged with the zigzag/alternate scan<br>
* An example to avoid confusion:
* - (->decode coeffs -> zigzag reorder -> dequant -> reference IDCT -> ...)
* - (x -> reference DCT -> reference IDCT -> x)
* - (x -> reference DCT -> simple_mmx_perm = idct_permutation
* -> simple_idct_mmx -> x)
* - (-> decode coeffs -> zigzag reorder -> simple_mmx_perm -> dequant
* -> simple_idct_mmx -> ...)
*/
uint8_t idct_permutation[64];
void (*fdct)(int16_t *block /* align 16 */);
/**
* DCT algorithm.
* must use AVOptions to set this field.
*/
int dct_algo;
/**
* IDCT algorithm.
* must use AVOptions to set this field.
*/
int idct_algo;
void (*get_pixels)(int16_t *block /* align 16 */,
const uint8_t *pixels /* align 8 */,
ptrdiff_t line_size);
int bits_per_sample;
} AVDCT;
/**
* Allocates a AVDCT context.
* This needs to be initialized with liteav_avcodec_dct_init() after optionally
* configuring it with AVOptions.
*
* To free it use liteav_av_free()
*/
AVDCT *liteav_avcodec_dct_alloc(void);
int liteav_avcodec_dct_init(AVDCT *);
const AVClass *liteav_avcodec_dct_get_class(void);
#endif /* AVCODEC_AVDCT_H */
... ...
#include "third_party/ffmpeg/ffmpeg_rename_defines.h" // add by source_replacer.py
/*
* 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 AVCODEC_AVFFT_H
#define AVCODEC_AVFFT_H
/**
* @file
* @ingroup lavc_fft
* FFT functions
*/
/**
* @defgroup lavc_fft FFT functions
* @ingroup lavc_misc
*
* @{
*/
typedef float FFTSample;
typedef struct FFTComplex {
FFTSample re, im;
} FFTComplex;
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
*/
FFTContext *liteav_av_fft_init(int nbits, int inverse);
/**
* Do the permutation needed BEFORE calling liteav_ff_fft_calc().
*/
void liteav_av_fft_permute(FFTContext *s, FFTComplex *z);
/**
* Do a complex FFT with the parameters defined in liteav_av_fft_init(). The
* input data must be permuted before. No 1.0/sqrt(n) normalization is done.
*/
void liteav_av_fft_calc(FFTContext *s, FFTComplex *z);
void liteav_av_fft_end(FFTContext *s);
FFTContext *liteav_av_mdct_init(int nbits, int inverse, double scale);
void liteav_av_imdct_calc(FFTContext *s, FFTSample *output, const FFTSample *input);
void liteav_av_imdct_half(FFTContext *s, FFTSample *output, const FFTSample *input);
void liteav_av_mdct_calc(FFTContext *s, FFTSample *output, const FFTSample *input);
void liteav_av_mdct_end(FFTContext *s);
/* Real Discrete Fourier Transform */
enum RDFTransformType {
DFT_R2C,
IDFT_C2R,
IDFT_R2C,
DFT_C2R,
};
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
*/
RDFTContext *liteav_av_rdft_init(int nbits, enum RDFTransformType trans);
void liteav_av_rdft_calc(RDFTContext *s, FFTSample *data);
void liteav_av_rdft_end(RDFTContext *s);
/* Discrete Cosine Transform */
typedef struct DCTContext DCTContext;
enum DCTTransformType {
DCT_II = 0,
DCT_III,
DCT_I,
DST_I,
};
/**
* Set up DCT.
*
* @param nbits size of the input array:
* (1 << nbits) for DCT-II, DCT-III and DST-I
* (1 << nbits) + 1 for DCT-I
* @param type the type of transform
*
* @note the first element of the input of DST-I is ignored
*/
DCTContext *liteav_av_dct_init(int nbits, enum DCTTransformType type);
void liteav_av_dct_calc(DCTContext *s, FFTSample *data);
void liteav_av_dct_end (DCTContext *s);
/**
* @}
*/
#endif /* AVCODEC_AVFFT_H */
... ...
/*
* Bytestream functions
* copyright (c) 2006 Baptiste Coudurier <baptiste.coudurier@free.fr>
* Copyright (c) 2012 Aneesh Dogra (lionaneesh) <lionaneesh@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 AVCODEC_BYTESTREAM_H
#define AVCODEC_BYTESTREAM_H
#include <stdint.h>
#include <string.h>
#include "libavutil/avassert.h"
#include "libavutil/common.h"
#include "libavutil/intreadwrite.h"
typedef struct GetByteContext {
const uint8_t *buffer, *buffer_end, *buffer_start;
} GetByteContext;
typedef struct PutByteContext {
uint8_t *buffer, *buffer_end, *buffer_start;
int eof;
} PutByteContext;
#define DEF(type, name, bytes, read, write) \
static av_always_inline type bytestream_get_ ## name(const uint8_t **b) \
{ \
(*b) += bytes; \
return read(*b - bytes); \
} \
static av_always_inline void bytestream_put_ ## name(uint8_t **b, \
const type value) \
{ \
write(*b, value); \
(*b) += bytes; \
} \
static av_always_inline void bytestream2_put_ ## name ## u(PutByteContext *p, \
const type value) \
{ \
bytestream_put_ ## name(&p->buffer, value); \
} \
static av_always_inline void bytestream2_put_ ## name(PutByteContext *p, \
const type value) \
{ \
if (!p->eof && (p->buffer_end - p->buffer >= bytes)) { \
write(p->buffer, value); \
p->buffer += bytes; \
} else \
p->eof = 1; \
} \
static av_always_inline type bytestream2_get_ ## name ## u(GetByteContext *g) \
{ \
return bytestream_get_ ## name(&g->buffer); \
} \
static av_always_inline type bytestream2_get_ ## name(GetByteContext *g) \
{ \
if (g->buffer_end - g->buffer < bytes) { \
g->buffer = g->buffer_end; \
return 0; \
} \
return bytestream2_get_ ## name ## u(g); \
} \
static av_always_inline type bytestream2_peek_ ## name(GetByteContext *g) \
{ \
if (g->buffer_end - g->buffer < bytes) \
return 0; \
return read(g->buffer); \
}
DEF(uint64_t, le64, 8, AV_RL64, AV_WL64)
DEF(unsigned int, le32, 4, AV_RL32, AV_WL32)
DEF(unsigned int, le24, 3, AV_RL24, AV_WL24)
DEF(unsigned int, le16, 2, AV_RL16, AV_WL16)
DEF(uint64_t, be64, 8, AV_RB64, AV_WB64)
DEF(unsigned int, be32, 4, AV_RB32, AV_WB32)
DEF(unsigned int, be24, 3, AV_RB24, AV_WB24)
DEF(unsigned int, be16, 2, AV_RB16, AV_WB16)
DEF(unsigned int, byte, 1, AV_RB8 , AV_WB8)
#if AV_HAVE_BIGENDIAN
# define bytestream2_get_ne16 bytestream2_get_be16
# define bytestream2_get_ne24 bytestream2_get_be24
# define bytestream2_get_ne32 bytestream2_get_be32
# define bytestream2_get_ne64 bytestream2_get_be64
# define bytestream2_get_ne16u bytestream2_get_be16u
# define bytestream2_get_ne24u bytestream2_get_be24u
# define bytestream2_get_ne32u bytestream2_get_be32u
# define bytestream2_get_ne64u bytestream2_get_be64u
# define bytestream2_put_ne16 bytestream2_put_be16
# define bytestream2_put_ne24 bytestream2_put_be24
# define bytestream2_put_ne32 bytestream2_put_be32
# define bytestream2_put_ne64 bytestream2_put_be64
# define bytestream2_peek_ne16 bytestream2_peek_be16
# define bytestream2_peek_ne24 bytestream2_peek_be24
# define bytestream2_peek_ne32 bytestream2_peek_be32
# define bytestream2_peek_ne64 bytestream2_peek_be64
#else
# define bytestream2_get_ne16 bytestream2_get_le16
# define bytestream2_get_ne24 bytestream2_get_le24
# define bytestream2_get_ne32 bytestream2_get_le32
# define bytestream2_get_ne64 bytestream2_get_le64
# define bytestream2_get_ne16u bytestream2_get_le16u
# define bytestream2_get_ne24u bytestream2_get_le24u
# define bytestream2_get_ne32u bytestream2_get_le32u
# define bytestream2_get_ne64u bytestream2_get_le64u
# define bytestream2_put_ne16 bytestream2_put_le16
# define bytestream2_put_ne24 bytestream2_put_le24
# define bytestream2_put_ne32 bytestream2_put_le32
# define bytestream2_put_ne64 bytestream2_put_le64
# define bytestream2_peek_ne16 bytestream2_peek_le16
# define bytestream2_peek_ne24 bytestream2_peek_le24
# define bytestream2_peek_ne32 bytestream2_peek_le32
# define bytestream2_peek_ne64 bytestream2_peek_le64
#endif
static av_always_inline void bytestream2_init(GetByteContext *g,
const uint8_t *buf,
int buf_size)
{
av_assert0(buf_size >= 0);
g->buffer = buf;
g->buffer_start = buf;
g->buffer_end = buf + buf_size;
}
static av_always_inline void bytestream2_init_writer(PutByteContext *p,
uint8_t *buf,
int buf_size)
{
av_assert0(buf_size >= 0);
p->buffer = buf;
p->buffer_start = buf;
p->buffer_end = buf + buf_size;
p->eof = 0;
}
static av_always_inline unsigned int bytestream2_get_bytes_left(GetByteContext *g)
{
return g->buffer_end - g->buffer;
}
static av_always_inline unsigned int bytestream2_get_bytes_left_p(PutByteContext *p)
{
return p->buffer_end - p->buffer;
}
static av_always_inline void bytestream2_skip(GetByteContext *g,
unsigned int size)
{
g->buffer += FFMIN(g->buffer_end - g->buffer, size);
}
static av_always_inline void bytestream2_skipu(GetByteContext *g,
unsigned int size)
{
g->buffer += size;
}
static av_always_inline void bytestream2_skip_p(PutByteContext *p,
unsigned int size)
{
int size2;
if (p->eof)
return;
size2 = FFMIN(p->buffer_end - p->buffer, size);
if (size2 != size)
p->eof = 1;
p->buffer += size2;
}
static av_always_inline int bytestream2_tell(GetByteContext *g)
{
return (int)(g->buffer - g->buffer_start);
}
static av_always_inline int bytestream2_tell_p(PutByteContext *p)
{
return (int)(p->buffer - p->buffer_start);
}
static av_always_inline int bytestream2_size(GetByteContext *g)
{
return (int)(g->buffer_end - g->buffer_start);
}
static av_always_inline int bytestream2_size_p(PutByteContext *p)
{
return (int)(p->buffer_end - p->buffer_start);
}
static av_always_inline int bytestream2_seek(GetByteContext *g,
int offset,
int whence)
{
switch (whence) {
case SEEK_CUR:
offset = av_clip(offset, -(g->buffer - g->buffer_start),
g->buffer_end - g->buffer);
g->buffer += offset;
break;
case SEEK_END:
offset = av_clip(offset, -(g->buffer_end - g->buffer_start), 0);
g->buffer = g->buffer_end + offset;
break;
case SEEK_SET:
offset = av_clip(offset, 0, g->buffer_end - g->buffer_start);
g->buffer = g->buffer_start + offset;
break;
default:
return AVERROR(EINVAL);
}
return bytestream2_tell(g);
}
static av_always_inline int bytestream2_seek_p(PutByteContext *p,
int offset,
int whence)
{
p->eof = 0;
switch (whence) {
case SEEK_CUR:
if (p->buffer_end - p->buffer < offset)
p->eof = 1;
offset = av_clip(offset, -(p->buffer - p->buffer_start),
p->buffer_end - p->buffer);
p->buffer += offset;
break;
case SEEK_END:
if (offset > 0)
p->eof = 1;
offset = av_clip(offset, -(p->buffer_end - p->buffer_start), 0);
p->buffer = p->buffer_end + offset;
break;
case SEEK_SET:
if (p->buffer_end - p->buffer_start < offset)
p->eof = 1;
offset = av_clip(offset, 0, p->buffer_end - p->buffer_start);
p->buffer = p->buffer_start + offset;
break;
default:
return AVERROR(EINVAL);
}
return bytestream2_tell_p(p);
}
static av_always_inline unsigned int bytestream2_get_buffer(GetByteContext *g,
uint8_t *dst,
unsigned int size)
{
int size2 = FFMIN(g->buffer_end - g->buffer, size);
memcpy(dst, g->buffer, size2);
g->buffer += size2;
return size2;
}
static av_always_inline unsigned int bytestream2_get_bufferu(GetByteContext *g,
uint8_t *dst,
unsigned int size)
{
memcpy(dst, g->buffer, size);
g->buffer += size;
return size;
}
static av_always_inline unsigned int bytestream2_put_buffer(PutByteContext *p,
const uint8_t *src,
unsigned int size)
{
int size2;
if (p->eof)
return 0;
size2 = FFMIN(p->buffer_end - p->buffer, size);
if (size2 != size)
p->eof = 1;
memcpy(p->buffer, src, size2);
p->buffer += size2;
return size2;
}
static av_always_inline unsigned int bytestream2_put_bufferu(PutByteContext *p,
const uint8_t *src,
unsigned int size)
{
memcpy(p->buffer, src, size);
p->buffer += size;
return size;
}
static av_always_inline void bytestream2_set_buffer(PutByteContext *p,
const uint8_t c,
unsigned int size)
{
int size2;
if (p->eof)
return;
size2 = FFMIN(p->buffer_end - p->buffer, size);
if (size2 != size)
p->eof = 1;
memset(p->buffer, c, size2);
p->buffer += size2;
}
static av_always_inline void bytestream2_set_bufferu(PutByteContext *p,
const uint8_t c,
unsigned int size)
{
memset(p->buffer, c, size);
p->buffer += size;
}
static av_always_inline unsigned int bytestream2_get_eof(PutByteContext *p)
{
return p->eof;
}
static av_always_inline unsigned int bytestream2_copy_bufferu(PutByteContext *p,
GetByteContext *g,
unsigned int size)
{
memcpy(p->buffer, g->buffer, size);
p->buffer += size;
g->buffer += size;
return size;
}
static av_always_inline unsigned int bytestream2_copy_buffer(PutByteContext *p,
GetByteContext *g,
unsigned int size)
{
int size2;
if (p->eof)
return 0;
size = FFMIN(g->buffer_end - g->buffer, size);
size2 = FFMIN(p->buffer_end - p->buffer, size);
if (size2 != size)
p->eof = 1;
return bytestream2_copy_bufferu(p, g, size2);
}
static av_always_inline unsigned int bytestream_get_buffer(const uint8_t **b,
uint8_t *dst,
unsigned int size)
{
memcpy(dst, *b, size);
(*b) += size;
return size;
}
static av_always_inline void bytestream_put_buffer(uint8_t **b,
const uint8_t *src,
unsigned int size)
{
memcpy(*b, src, size);
(*b) += size;
}
#endif /* AVCODEC_BYTESTREAM_H */
... ...
#include "third_party/ffmpeg/ffmpeg_rename_defines.h" // add by source_replacer.py
/*
* Direct3D11 HW acceleration
*
* copyright (c) 2009 Laurent Aimar
* copyright (c) 2015 Steve Lhomme
*
* 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 AVCODEC_D3D11VA_H
#define AVCODEC_D3D11VA_H
/**
* @file
* @ingroup lavc_codec_hwaccel_d3d11va
* Public libavcodec D3D11VA header.
*/
#if !defined(_WIN32_WINNT) || _WIN32_WINNT < 0x0602
#undef _WIN32_WINNT
#define _WIN32_WINNT 0x0602
#endif
#include <stdint.h>
#include <d3d11.h>
/**
* @defgroup lavc_codec_hwaccel_d3d11va Direct3D11
* @ingroup lavc_codec_hwaccel
*
* @{
*/
#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.
*
* The application must make it available as AVCodecContext.hwaccel_context.
*
* Use liteav_av_d3d11va_alloc_context() exclusively to allocate an AVD3D11VAContext.
*/
typedef struct AVD3D11VAContext {
/**
* D3D11 decoder object
*/
ID3D11VideoDecoder *decoder;
/**
* D3D11 VideoContext
*/
ID3D11VideoContext *video_context;
/**
* D3D11 configuration used to create the decoder
*/
D3D11_VIDEO_DECODER_CONFIG *cfg;
/**
* The number of surface in the surface array
*/
unsigned surface_count;
/**
* The array of Direct3D surfaces used to create the decoder
*/
ID3D11VideoDecoderOutputView **surface;
/**
* A bit field configuring the workarounds needed for using the decoder
*/
uint64_t workaround;
/**
* Private to the FFmpeg AVHWAccel implementation
*/
unsigned report_id;
/**
* Mutex to access video_context
*/
HANDLE context_mutex;
} AVD3D11VAContext;
/**
* Allocate an AVD3D11VAContext.
*
* @return Newly-allocated AVD3D11VAContext or NULL on failure.
*/
AVD3D11VAContext *liteav_av_d3d11va_alloc_context(void);
/**
* @}
*/
#endif /* AVCODEC_D3D11VA_H */
... ...
#include "third_party/ffmpeg/ffmpeg_rename_defines.h" // add by source_replacer.py
/*
* Copyright (C) 2007 Marco Gerards <marco@gnu.org>
* Copyright (C) 2009 David Conrad
* Copyright (C) 2011 Jordi Ortiz
*
* 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 AVCODEC_DIRAC_H
#define AVCODEC_DIRAC_H
/**
* @file
* Interface to Dirac Decoder/Encoder
* @author Marco Gerards <marco@gnu.org>
* @author David Conrad
* @author Jordi Ortiz
*/
#include "avcodec.h"
/**
* The spec limits the number of wavelet decompositions to 4 for both
* level 1 (VC-2) and 128 (long-gop default).
* 5 decompositions is the maximum before >16-bit buffers are needed.
* Schroedinger allows this for DD 9,7 and 13,7 wavelets only, limiting
* the others to 4 decompositions (or 3 for the fidelity filter).
*
* We use this instead of MAX_DECOMPOSITIONS to save some memory.
*/
#define MAX_DWT_LEVELS 5
/**
* Parse code values:
*
* Dirac Specification ->
* 9.6.1 Table 9.1
*
* VC-2 Specification ->
* 10.4.1 Table 10.1
*/
enum DiracParseCodes {
DIRAC_PCODE_SEQ_HEADER = 0x00,
DIRAC_PCODE_END_SEQ = 0x10,
DIRAC_PCODE_AUX = 0x20,
DIRAC_PCODE_PAD = 0x30,
DIRAC_PCODE_PICTURE_CODED = 0x08,
DIRAC_PCODE_PICTURE_RAW = 0x48,
DIRAC_PCODE_PICTURE_LOW_DEL = 0xC8,
DIRAC_PCODE_PICTURE_HQ = 0xE8,
DIRAC_PCODE_INTER_NOREF_CO1 = 0x0A,
DIRAC_PCODE_INTER_NOREF_CO2 = 0x09,
DIRAC_PCODE_INTER_REF_CO1 = 0x0D,
DIRAC_PCODE_INTER_REF_CO2 = 0x0E,
DIRAC_PCODE_INTRA_REF_CO = 0x0C,
DIRAC_PCODE_INTRA_REF_RAW = 0x4C,
DIRAC_PCODE_INTRA_REF_PICT = 0xCC,
DIRAC_PCODE_MAGIC = 0x42424344,
};
typedef struct DiracVersionInfo {
int major;
int minor;
} DiracVersionInfo;
typedef struct AVDiracSeqHeader {
unsigned width;
unsigned height;
uint8_t chroma_format; ///< 0: 444 1: 422 2: 420
uint8_t interlaced;
uint8_t top_field_first;
uint8_t frame_rate_index; ///< index into dirac_frame_rate[]
uint8_t aspect_ratio_index; ///< index into dirac_aspect_ratio[]
uint16_t clean_width;
uint16_t clean_height;
uint16_t clean_left_offset;
uint16_t clean_right_offset;
uint8_t pixel_range_index; ///< index into dirac_pixel_range_presets[]
uint8_t color_spec_index; ///< index into dirac_color_spec_presets[]
int profile;
int level;
AVRational framerate;
AVRational sample_aspect_ratio;
enum AVPixelFormat pix_fmt;
enum AVColorRange color_range;
enum AVColorPrimaries color_primaries;
enum AVColorTransferCharacteristic color_trc;
enum AVColorSpace colorspace;
DiracVersionInfo version;
int bit_depth;
} AVDiracSeqHeader;
/**
* Parse a Dirac sequence header.
*
* @param dsh this function will allocate and fill an AVDiracSeqHeader struct
* and write it into this pointer. The caller must free it with
* liteav_av_free().
* @param buf the data buffer
* @param buf_size the size of the data buffer in bytes
* @param log_ctx if non-NULL, this function will log errors here
* @return 0 on success, a negative AVERROR code on failure
*/
int liteav_av_dirac_parse_sequence_header(AVDiracSeqHeader **dsh,
const uint8_t *buf, size_t buf_size,
void *log_ctx);
#endif /* AVCODEC_DIRAC_H */
... ...
#include "third_party/ffmpeg/ffmpeg_rename_defines.h" // add by source_replacer.py
/*
* 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 AVCODEC_DV_PROFILE_H
#define AVCODEC_DV_PROFILE_H
#include <stdint.h>
#include "libavutil/pixfmt.h"
#include "libavutil/rational.h"
#include "avcodec.h"
/* minimum number of bytes to read from a DV stream in order to
* determine the profile */
#define DV_PROFILE_BYTES (6 * 80) /* 6 DIF blocks */
/*
* AVDVProfile is used to express the differences between various
* DV flavors. For now it's primarily used for differentiating
* 525/60 and 625/50, but the plans are to use it for various
* DV specs as well (e.g. SMPTE314M vs. IEC 61834).
*/
typedef struct AVDVProfile {
int dsf; /* value of the dsf in the DV header */
int video_stype; /* stype for VAUX source pack */
int frame_size; /* total size of one frame in bytes */
int difseg_size; /* number of DIF segments per DIF channel */
int n_difchan; /* number of DIF channels per frame */
AVRational time_base; /* 1/framerate */
int ltc_divisor; /* FPS from the LTS standpoint */
int height; /* picture height in pixels */
int width; /* picture width in pixels */
AVRational sar[2]; /* sample aspect ratios for 4:3 and 16:9 */
enum AVPixelFormat pix_fmt; /* picture pixel format */
int bpm; /* blocks per macroblock */
const uint8_t *block_sizes; /* AC block sizes, in bits */
int audio_stride; /* size of audio_shuffle table */
int audio_min_samples[3]; /* min amount of audio samples */
/* for 48kHz, 44.1kHz and 32kHz */
int audio_samples_dist[5]; /* how many samples are supposed to be */
/* in each frame in a 5 frames window */
const uint8_t (*audio_shuffle)[9]; /* PCM shuffling table */
} AVDVProfile;
/**
* Get a DV profile for the provided compressed frame.
*
* @param sys the profile used for the previous frame, may be NULL
* @param frame the compressed data buffer
* @param buf_size size of the buffer in bytes
* @return the DV profile for the supplied data or NULL on failure
*/
const AVDVProfile *liteav_av_dv_frame_profile(const AVDVProfile *sys,
const uint8_t *frame, unsigned buf_size);
/**
* Get a DV profile for the provided stream parameters.
*/
const AVDVProfile *liteav_av_dv_codec_profile(int width, int height, enum AVPixelFormat pix_fmt);
/**
* Get a DV profile for the provided stream parameters.
* The frame rate is used as a best-effort parameter.
*/
const AVDVProfile *liteav_av_dv_codec_profile2(int width, int height, enum AVPixelFormat pix_fmt, AVRational frame_rate);
#endif /* AVCODEC_DV_PROFILE_H */
... ...
/*
* DXVA2 HW acceleration
*
* copyright (c) 2009 Laurent Aimar
*
* 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 AVCODEC_DXVA2_H
#define AVCODEC_DXVA2_H
/**
* @file
* @ingroup lavc_codec_hwaccel_dxva2
* Public libavcodec DXVA2 header.
*/
#if !defined(_WIN32_WINNT) || _WIN32_WINNT < 0x0602
#undef _WIN32_WINNT
#define _WIN32_WINNT 0x0602
#endif
#include <stdint.h>
#include <d3d9.h>
#include <dxva2api.h>
/**
* @defgroup lavc_codec_hwaccel_dxva2 DXVA2
* @ingroup lavc_codec_hwaccel
*
* @{
*/
#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.
*
* The application must make it available as AVCodecContext.hwaccel_context.
*/
struct dxva_context {
/**
* DXVA2 decoder object
*/
IDirectXVideoDecoder *decoder;
/**
* DXVA2 configuration used to create the decoder
*/
const DXVA2_ConfigPictureDecode *cfg;
/**
* The number of surface in the surface array
*/
unsigned surface_count;
/**
* The array of Direct3D surfaces used to create the decoder
*/
LPDIRECT3DSURFACE9 *surface;
/**
* A bit field configuring the workarounds needed for using the decoder
*/
uint64_t workaround;
/**
* Private to the FFmpeg AVHWAccel implementation
*/
unsigned report_id;
};
/**
* @}
*/
#endif /* AVCODEC_DXVA2_H */
... ...
#include "third_party/ffmpeg/ffmpeg_rename_defines.h" // add by source_replacer.py
/*
* JNI public API functions
*
* Copyright (c) 2015-2016 Matthieu Bouron <matthieu.bouron stupeflix.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 AVCODEC_JNI_H
#define AVCODEC_JNI_H
/*
* Manually set a Java virtual machine which will be used to retrieve the JNI
* environment. Once a Java VM is set it cannot be changed afterwards, meaning
* you can call multiple times liteav_av_jni_set_java_vm with the same Java VM pointer
* however it will error out if you try to set a different Java VM.
*
* @param vm Java virtual machine
* @param log_ctx context used for logging, can be NULL
* @return 0 on success, < 0 otherwise
*/
int liteav_av_jni_set_java_vm(void *vm, void *log_ctx);
/*
* Get the Java virtual machine which has been set with liteav_av_jni_set_java_vm.
*
* @param vm Java virtual machine
* @return a pointer to the Java virtual machine
*/
void *liteav_av_jni_get_java_vm(void *log_ctx);
#endif /* AVCODEC_JNI_H */
... ...