|
Libav 0.7.1
|
VP8 encoder support via libvpx. More...
#include <vpx/vpx_encoder.h>#include <vpx/vp8cx.h>#include "avcodec.h"#include "libavutil/base64.h"#include "libavutil/mathematics.h"Go to the source code of this file.
Data Structures | |
| struct | FrameListData |
| Portion of struct vpx_codec_cx_pkt from vpx_encoder.h. More... | |
| struct | VP8EncoderContext |
Defines | |
| #define | VPX_DISABLE_CTRL_TYPECHECKS 1 |
| #define | VPX_CODEC_DISABLE_COMPAT 1 |
Typedefs | |
| typedef struct VP8EncoderContext | VP8Context |
Functions | |
| static av_cold void | log_encoder_error (AVCodecContext *avctx, const char *desc) |
| static av_cold void | dump_enc_cfg (AVCodecContext *avctx, const struct vpx_codec_enc_cfg *cfg) |
| static void | coded_frame_add (void *list, struct FrameListData *cx_frame) |
| static av_cold void | free_coded_frame (struct FrameListData *cx_frame) |
| static av_cold void | free_frame_list (struct FrameListData *list) |
| static av_cold int | codecctl_int (AVCodecContext *avctx, enum vp8e_enc_control_id id, int val) |
| static av_cold int | vp8_free (AVCodecContext *avctx) |
| static av_cold int | vp8_init (AVCodecContext *avctx) |
| static void | cx_pktcpy (struct FrameListData *dst, const struct vpx_codec_cx_pkt *src) |
| static int | storeframe (AVCodecContext *avctx, struct FrameListData *cx_frame, uint8_t *buf, int buf_size, AVFrame *coded_frame) |
| Store coded frame information in format suitable for return from encode(). | |
| static int | queue_frames (AVCodecContext *avctx, uint8_t *buf, int buf_size, AVFrame *coded_frame) |
| Queue multiple output frames from the encoder, returning the front-most. | |
| static int | vp8_encode (AVCodecContext *avctx, uint8_t *buf, int buf_size, void *data) |
Variables | |
| static const char * | ctlidstr [] |
| String mappings for enum vp8e_enc_control_id. | |
| AVCodec | ff_libvpx_encoder |
VP8 encoder support via libvpx.
Definition in file libvpxenc.c.
| #define VPX_CODEC_DISABLE_COMPAT 1 |
Definition at line 27 of file libvpxenc.c.
| #define VPX_DISABLE_CTRL_TYPECHECKS 1 |
Definition at line 26 of file libvpxenc.c.
| typedef struct VP8EncoderContext VP8Context |
| static av_cold int codecctl_int | ( | AVCodecContext * | avctx, |
| enum vp8e_enc_control_id | id, | ||
| int | val | ||
| ) | [static] |
Definition at line 171 of file libvpxenc.c.
Referenced by vp8_init().
| static void coded_frame_add | ( | void * | list, |
| struct FrameListData * | cx_frame | ||
| ) | [static] |
Definition at line 144 of file libvpxenc.c.
Referenced by queue_frames().
| static void cx_pktcpy | ( | struct FrameListData * | dst, |
| const struct vpx_codec_cx_pkt * | src | ||
| ) | [inline, static] |
Definition at line 330 of file libvpxenc.c.
Referenced by queue_frames().
| static av_cold void dump_enc_cfg | ( | AVCodecContext * | avctx, |
| const struct vpx_codec_enc_cfg * | cfg | ||
| ) | [static] |
Definition at line 89 of file libvpxenc.c.
Referenced by vp8_init().
| static av_cold void free_coded_frame | ( | struct FrameListData * | cx_frame | ) | [static] |
Definition at line 154 of file libvpxenc.c.
Referenced by free_frame_list(), and queue_frames().
| static av_cold void free_frame_list | ( | struct FrameListData * | list | ) | [static] |
Definition at line 160 of file libvpxenc.c.
Referenced by vp8_free().
| static av_cold void log_encoder_error | ( | AVCodecContext * | avctx, |
| const char * | desc | ||
| ) | [static] |
Definition at line 78 of file libvpxenc.c.
Referenced by codecctl_int(), vp8_encode(), and vp8_init().
| static int queue_frames | ( | AVCodecContext * | avctx, |
| uint8_t * | buf, | ||
| int | buf_size, | ||
| AVFrame * | coded_frame | ||
| ) | [static] |
Queue multiple output frames from the encoder, returning the front-most.
In cases where vpx_codec_get_cx_data() returns more than 1 frame append the frame queue. Return the head frame if available.
Definition at line 378 of file libvpxenc.c.
Referenced by vp8_encode().
| static int storeframe | ( | AVCodecContext * | avctx, |
| struct FrameListData * | cx_frame, | ||
| uint8_t * | buf, | ||
| int | buf_size, | ||
| AVFrame * | coded_frame | ||
| ) | [static] |
Store coded frame information in format suitable for return from encode().
Write buffer information from cx_frame to buf & buf_size. Timing/frame details to coded_frame.
Definition at line 348 of file libvpxenc.c.
Referenced by queue_frames().
| static int vp8_encode | ( | AVCodecContext * | avctx, |
| uint8_t * | buf, | ||
| int | buf_size, | ||
| void * | data | ||
| ) | [static] |
Definition at line 456 of file libvpxenc.c.
| static av_cold int vp8_free | ( | AVCodecContext * | avctx | ) | [static] |
Definition at line 192 of file libvpxenc.c.
Referenced by vp8_init().
| static av_cold int vp8_init | ( | AVCodecContext * | avctx | ) | [static] |
Definition at line 204 of file libvpxenc.c.
const char* ctlidstr[] [static] |
{
[VP8E_UPD_ENTROPY] = "VP8E_UPD_ENTROPY",
[VP8E_UPD_REFERENCE] = "VP8E_UPD_REFERENCE",
[VP8E_USE_REFERENCE] = "VP8E_USE_REFERENCE",
[VP8E_SET_ROI_MAP] = "VP8E_SET_ROI_MAP",
[VP8E_SET_ACTIVEMAP] = "VP8E_SET_ACTIVEMAP",
[VP8E_SET_SCALEMODE] = "VP8E_SET_SCALEMODE",
[VP8E_SET_CPUUSED] = "VP8E_SET_CPUUSED",
[VP8E_SET_ENABLEAUTOALTREF] = "VP8E_SET_ENABLEAUTOALTREF",
[VP8E_SET_NOISE_SENSITIVITY] = "VP8E_SET_NOISE_SENSITIVITY",
[VP8E_SET_SHARPNESS] = "VP8E_SET_SHARPNESS",
[VP8E_SET_STATIC_THRESHOLD] = "VP8E_SET_STATIC_THRESHOLD",
[VP8E_SET_TOKEN_PARTITIONS] = "VP8E_SET_TOKEN_PARTITIONS",
[VP8E_GET_LAST_QUANTIZER] = "VP8E_GET_LAST_QUANTIZER",
[VP8E_SET_ARNR_MAXFRAMES] = "VP8E_SET_ARNR_MAXFRAMES",
[VP8E_SET_ARNR_STRENGTH] = "VP8E_SET_ARNR_STRENGTH",
[VP8E_SET_ARNR_TYPE] = "VP8E_SET_ARNR_TYPE",
}
String mappings for enum vp8e_enc_control_id.
Definition at line 59 of file libvpxenc.c.
Referenced by codecctl_int().
{
"libvpx",
AVMEDIA_TYPE_VIDEO,
CODEC_ID_VP8,
sizeof(VP8Context),
vp8_init,
vp8_encode,
vp8_free,
NULL,
CODEC_CAP_DELAY,
.pix_fmts = (const enum PixelFormat[]){PIX_FMT_YUV420P, PIX_FMT_NONE},
.long_name = NULL_IF_CONFIG_SMALL("libvpx VP8"),
}
Definition at line 499 of file libvpxenc.c.
1.7.4