#include "libavutil/opt.h"#include "libavutil/pixdesc.h"#include "avcodec.h"#include "internal.h"#include <x264.h>#include <float.h>#include <math.h>#include <stdio.h>#include <stdlib.h>#include <string.h>Go to the source code of this file.
| Data Structures | |
| struct | X264Context | 
| Defines | |
| #define | OPT_STR(opt, param) | 
| #define | PARSE_X264_OPT(name, var) | 
| #define | OFFSET(x) offsetof(X264Context, x) | 
| #define | VE AV_OPT_FLAG_VIDEO_PARAM | AV_OPT_FLAG_ENCODING_PARAM | 
| Functions | |
| static void | X264_log (void *p, int level, const char *fmt, va_list args) | 
| static int | encode_nals (AVCodecContext *ctx, uint8_t *buf, int size, x264_nal_t *nals, int nnal, int skip_sei) | 
| static int | avfmt2_num_planes (int avfmt) | 
| static int | X264_frame (AVCodecContext *ctx, uint8_t *buf, int orig_bufsize, void *data) | 
| static av_cold int | X264_close (AVCodecContext *avctx) | 
| static int | convert_pix_fmt (enum PixelFormat pix_fmt) | 
| static av_cold int | X264_init (AVCodecContext *avctx) | 
| static av_cold void | X264_init_static (AVCodec *codec) | 
| Variables | |
| static enum PixelFormat | pix_fmts_8bit [] | 
| static enum PixelFormat | pix_fmts_9bit [] | 
| static enum PixelFormat | pix_fmts_10bit [] | 
| static enum PixelFormat | pix_fmts_8bit_rgb [] | 
| static const AVOption | options [] | 
| class { | |
| class_name = "libx264" | |
| item_name = av_default_item_name | |
| option = options | |
| version = LIBAVUTIL_VERSION_INT | |
| }; | |
| static const AVClass | rgbclass | 
| static const AVCodecDefault | x264_defaults [] | 
| AVCodec | ff_libx264_encoder | 
| AVCodec | ff_libx264rgb_encoder | 
| #define OFFSET | ( | x | ) | offsetof(X264Context, x) | 
| #define OPT_STR | ( | opt, | |||
| param | ) | 
Value:
do { \ int ret; \ if (param && (ret = x264_param_parse(&x4->params, opt, param)) < 0) { \ if(ret == X264_PARAM_BAD_NAME) \ av_log(avctx, AV_LOG_ERROR, \ "bad option '%s': '%s'\n", opt, param); \ else \ av_log(avctx, AV_LOG_ERROR, \ "bad value for '%s': '%s'\n", opt, param); \ return -1; \ } \ } while (0);
Definition at line 236 of file libx264.c.
Referenced by X264_init().
| #define PARSE_X264_OPT | ( | name, | |||
| var | ) | 
Value:
if (x4->var && x264_param_parse(&x4->params, name, x4->var) < 0) {\ av_log(avctx, AV_LOG_ERROR, "Error parsing option '%s' with value '%s'.\n", name, x4->var);\ return AVERROR(EINVAL);\ }
Definition at line 273 of file libx264.c.
Referenced by X264_init().
| #define VE AV_OPT_FLAG_VIDEO_PARAM | AV_OPT_FLAG_ENCODING_PARAM | 
| static int avfmt2_num_planes | ( | int | avfmt | ) |  [static] | 
| static int convert_pix_fmt | ( | enum PixelFormat | pix_fmt | ) |  [static] | 
| static int encode_nals | ( | AVCodecContext * | ctx, | |
| uint8_t * | buf, | |||
| int | size, | |||
| x264_nal_t * | nals, | |||
| int | nnal, | |||
| int | skip_sei | |||
| ) |  [static] | 
Definition at line 91 of file libx264.c.
Referenced by X264_frame(), X264_init(), XAVS_frame(), and XAVS_init().
| static av_cold int X264_close | ( | AVCodecContext * | avctx | ) |  [static] | 
| static int X264_frame | ( | AVCodecContext * | ctx, | |
| uint8_t * | buf, | |||
| int | orig_bufsize, | |||
| void * | data | |||
| ) |  [static] | 
| static av_cold int X264_init | ( | AVCodecContext * | avctx | ) |  [static] | 
| static av_cold void X264_init_static | ( | AVCodec * | codec | ) |  [static] | 
| static void X264_log | ( | void * | p, | |
| int | level, | |||
| const char * | fmt, | |||
| va_list | args | |||
| ) |  [static] | 
| const { ... }  [static] | 
| class_name = "libx264" | 
Initial value:
 {
    .name           = "libx264",
    .type           = AVMEDIA_TYPE_VIDEO,
    .id             = CODEC_ID_H264,
    .priv_data_size = sizeof(X264Context),
    .init           = X264_init,
    .encode         = X264_frame,
    .close          = X264_close,
    .capabilities   = CODEC_CAP_DELAY,
    .long_name      = NULL_IF_CONFIG_SMALL("libx264 H.264 / AVC / MPEG-4 AVC / MPEG-4 part 10"),
    .priv_class     = &class,
    .defaults       = x264_defaults,
    .init_static_data = X264_init_static,
}
Initial value:
 {
    .name           = "libx264rgb",
    .type           = AVMEDIA_TYPE_VIDEO,
    .id             = CODEC_ID_H264,
    .priv_data_size = sizeof(X264Context),
    .init           = X264_init,
    .encode         = X264_frame,
    .close          = X264_close,
    .capabilities   = CODEC_CAP_DELAY,
    .long_name      = NULL_IF_CONFIG_SMALL("libx264 H.264 / AVC / MPEG-4 AVC / MPEG-4 part 10 RGB"),
    .priv_class     = &rgbclass,
    .defaults       = x264_defaults,
    .pix_fmts       = pix_fmts_8bit_rgb,
}
| enum PixelFormat pix_fmts_10bit[]  [static] | 
| enum PixelFormat pix_fmts_8bit[]  [static] | 
| enum PixelFormat pix_fmts_8bit_rgb[]  [static] | 
| enum PixelFormat pix_fmts_9bit[]  [static] | 
Initial value:
 {
    .class_name = "libx264rgb",
    .item_name  = av_default_item_name,
    .option     = options,
    .version    = LIBAVUTIL_VERSION_INT,
}
| const AVCodecDefault x264_defaults[]  [static] | 
Initial value:
 {
    { "b",                "0" },
    { "bf",               "-1" },
    { "flags2",           "0" },
    { "g",                "-1" },
    { "qmin",             "-1" },
    { "qmax",             "-1" },
    { "qdiff",            "-1" },
    { "qblur",            "-1" },
    { "qcomp",            "-1" },
    { "rc_lookahead",     "-1" },
    { "refs",             "-1" },
    { "sc_threshold",     "-1" },
    { "trellis",          "-1" },
    { "nr",               "-1" },
    { "me_range",         "-1" },
    { "me_method",        "-1" },
    { "subq",             "-1" },
    { "b_strategy",       "-1" },
    { "keyint_min",       "-1" },
    { "coder",            "-1" },
    { "cmp",              "-1" },
    { "threads",          AV_STRINGIFY(X264_THREADS_AUTO) },
    { NULL },
}
 1.5.8
 1.5.8