1. ffmpeg常见的string处理文件
libavutil/avstring.c
av_strstart
av_stristart
av_stristr
av_strnstr
av_strlcpy
av_strlcat
av_strlcatf
av_asprintf
av_d2str
av_get_token
av_strtok
av_strcasecmp
av_strncasecmp
av_strireplace
av_basename
av_dirname
2. ffmpeg中的utils文件
libavformat/utils.c
libavutil/utils.c
libavresample/utils.c
tests/utils.c
libavdevice/utils.c
libswscale/utils.c
libavcodec/utils.c
libavcodec/tests/utils.c
比如avcodec相关的就可以在libavcodec/utils.c中找到:
av_get_profile_name
avcodec_profile_name
avcodec_get_name
3. codec的描述表
libavcodec/codec_desc.c
static const AVCodecDescriptor codec_descriptors[] = {
{
.id = AV_CODEC_ID_H264,
.type = AVMEDIA_TYPE_VIDEO,
.name = "h264",
.long_name = NULL_IF_CONFIG_SMALL("H.264 / AVC / MPEG-4 AVC / MPEG-4 part 10"),
.props = AV_CODEC_PROP_LOSSY | AV_CODEC_PROP_LOSSLESS | AV_CODEC_PROP_REORDER,
.profiles = NULL_IF_CONFIG_SMALL(ff_h264_profiles),
},
4. pixformat的描述表
libavutil/pixdesc.c
static const AVPixFmtDescriptor av_pix_fmt_descriptors[AV_PIX_FMT_NB] = {
[AV_PIX_FMT_YUV420P] = {
.name = "yuv420p",
.nb_components = 3,
.log2_chroma_w = 1,
.log2_chroma_h = 1,
.comp = {
{ 0, 1, 0, 0, 8, 0, 7, 1 }, /* Y */
{ 1, 1, 0, 0, 8, 0, 7, 1 }, /* U */
{ 2, 1, 0, 0, 8, 0, 7, 1 }, /* V */
},
.flags = AV_PIX_FMT_FLAG_PLANAR,
},
// ...
};
5. codec id定义
libavcodec/avcodec.h
AV_CODEC_ID_H261,
AV_CODEC_ID_H263,
AV_CODEC_ID_RV10,
AV_CODEC_ID_RV20,
AV_CODEC_ID_MJPEG,
AV_CODEC_ID_MJPEGB,
6. pixel format定义
libavutil/pixfmt.h
enum AVPixelFormat {
AV_PIX_FMT_NONE = -1,
AV_PIX_FMT_YUV420P, ///< planar YUV 4:2:0, 12bpp, (1 Cr & Cb sample per 2x2 Y samples)
AV_PIX_FMT_YUYV422, ///< packed YUV 4:2:2, 16bpp, Y0 Cb Y1 Cr
AV_PIX_FMT_RGB24, ///< packed RGB 8:8:8, 24bpp, RGBRGB...
AV_PIX_FMT_BGR24, ///< packed RGB 8:8:8, 24bpp, BGRBGR...
AV_PIX_FMT_YUV422P, ///< planar YUV 4:2:2, 16bpp, (1 Cr & Cb sample per 2x1 Y samples)
AV_PIX_FMT_YUV444P, ///< planar YUV 4:4:4, 24bpp, (1 Cr & Cb sample per 1x1 Y samples)
AV_PIX_FMT_YUV410P, ///< planar YUV 4:1:0, 9bpp, (1 Cr & Cb sample per 4x4 Y samples)
AV_PIX_FMT_YUV411P, ///< planar YUV 4:1:1, 12bpp, (1 Cr & Cb sample per 4x1 Y samples)
AV_PIX_FMT_GRAY8, ///< Y , 8bpp
// ...
}
7. 注册所有codec
libavcodec/allcodecs.c
static void register_all(void)
{
/* hardware accelerators */
REGISTER_HWACCEL(H263_VAAPI, h263_vaapi);
REGISTER_HWACCEL(H263_VIDEOTOOLBOX, h263_videotoolbox);
REGISTER_HWACCEL(H264_CUVID, h264_cuvid);
REGISTER_HWACCEL(H264_D3D11VA, h264_d3d11va);
REGISTER_HWACCEL(H264_D3D11VA2, h264_d3d11va2);
REGISTER_HWACCEL(H264_DXVA2, h264_dxva2);
REGISTER_HWACCEL(H264_MEDIACODEC, h264_mediacodec);
REGISTER_HWACCEL(H264_MMAL, h264_mmal);
REGISTER_HWACCEL(H264_QSV, h264_qsv);
REGISTER_HWACCEL(H264_VAAPI, h264_vaapi);
REGISTER_HWACCEL(H264_VDA, h264_vda);
REGISTER_HWACCEL(H264_VDA_OLD, h264_vda_old);
REGISTER_HWACCEL(H264_VDPAU, h264_vdpau);
REGISTER_HWACCEL(H264_VIDEOTOOLBOX, h264_videotoolbox);
// ...
}
8. 注册所有filter
libavfilter/allfilters.c
static void register_all(void)
{
REGISTER_FILTER(ABENCH, abench, af);
REGISTER_FILTER(ACOMPRESSOR, acompressor, af);
REGISTER_FILTER(ACOPY, acopy, af);
REGISTER_FILTER(ACROSSFADE, acrossfade, af);
REGISTER_FILTER(ACRUSHER, acrusher, af);
REGISTER_FILTER(ADELAY, adelay, af);
REGISTER_FILTER(AECHO, aecho, af);
REGISTER_FILTER(AEMPHASIS, aemphasis, af);
REGISTER_FILTER(AEVAL, aeval, af);
REGISTER_FILTER(AFADE, afade, af);
REGISTER_FILTER(AFFTFILT, afftfilt, af);
// ...
}
9. 注册所有format
libavformat/allformats.c
static void register_all(void)
{
avcodec_register_all();
/* (de)muxers */
REGISTER_MUXER (A64, a64);
REGISTER_DEMUXER (AA, aa);
REGISTER_DEMUXER (AAC, aac);
REGISTER_MUXDEMUX(AC3, ac3);
REGISTER_DEMUXER (ACM, acm);
REGISTER_DEMUXER (ACT, act);
REGISTER_DEMUXER (ADF, adf);
REGISTER_DEMUXER (ADP, adp);
REGISTER_DEMUXER (ADS, ads);
REGISTER_MUXER (ADTS, adts);
// ...
}
网友评论