|
FFmpeg
|
#include <float.h>#include <stdlib.h>#include <xeve.h>#include "libavutil/internal.h"#include "libavutil/common.h"#include "libavutil/mem.h"#include "libavutil/opt.h"#include "libavutil/pixdesc.h"#include "libavutil/pixfmt.h"#include "libavutil/time.h"#include "libavutil/cpu.h"#include "libavutil/avstring.h"#include "avcodec.h"#include "internal.h"#include "packet_internal.h"#include "codec_internal.h"#include "profiles.h"#include "encode.h"Go to the source code of this file.
Data Structures | |
| struct | XeveContext |
| The structure stores all the states associated with the instance of Xeve MPEG-5 EVC encoder. More... | |
Macros | |
| #define | MAX_BS_BUF (16*1024*1024) |
| #define | XEVE_PARAM_BAD_NAME -100 |
| Error codes. More... | |
| #define | XEVE_PARAM_BAD_VALUE -200 |
| #define | OFFSET(x) offsetof(XeveContext, x) |
| #define | VE AV_OPT_FLAG_VIDEO_PARAM | AV_OPT_FLAG_ENCODING_PARAM |
Enumerations | |
| enum | State { STATE_ENCODING, STATE_BUMPING } |
| Encoder states. More... | |
Functions | |
| static int | libxeve_color_fmt (enum AVPixelFormat av_pix_fmt, int *xeve_col_fmt) |
| Convert FFmpeg pixel format (AVPixelFormat) to XEVE pre-defined color format. More... | |
| static int | libxeve_color_space (enum AVPixelFormat av_pix_fmt) |
| Convert FFmpeg pixel format (AVPixelFormat) into XEVE pre-defined color space. More... | |
| static int | get_conf (AVCodecContext *avctx, XEVE_CDSC *cdsc) |
| The function returns a pointer to the object of the XEVE_CDSC type. More... | |
| static int | set_extra_config (AVCodecContext *avctx, XEVE id, XeveContext *ctx) |
| Set XEVE_CFG_SET_USE_PIC_SIGNATURE for encoder. More... | |
| static int | setup_bumping (XEVE id) |
| Switch encoder to bumping mode. More... | |
| static av_cold int | libxeve_init (AVCodecContext *avctx) |
| Initialize eXtra-fast Essential Video Encoder codec Create an encoder instance and allocate all the needed resources. More... | |
| static int | libxeve_encode (AVCodecContext *avctx, AVPacket *avpkt, const AVFrame *frame, int *got_packet) |
| Encode raw data frame into EVC packet. More... | |
| static av_cold int | libxeve_close (AVCodecContext *avctx) |
| Destroy the encoder and release all the allocated resources. More... | |
Variables | |
| static enum AVPixelFormat | supported_pixel_formats [] |
| static const AVOption | libxeve_options [] |
| static const AVClass | libxeve_class |
| static const FFCodecDefault | libxeve_defaults [] |
| libavcodec generic global options, which can be set on all the encoders and decoders More... | |
| const FFCodec | ff_libxeve_encoder |
| #define OFFSET | ( | x | ) | offsetof(XeveContext, x) |
| #define VE AV_OPT_FLAG_VIDEO_PARAM | AV_OPT_FLAG_ENCODING_PARAM |
| enum State |
|
static |
Convert FFmpeg pixel format (AVPixelFormat) to XEVE pre-defined color format.
| [in] | av_pix_fmt | pixel format ( |
| [out] | xeve_col_fmt | XEVE pre-defined color format ( |
Definition at line 104 of file libxeve.c.
Referenced by get_conf().
|
static |
Convert FFmpeg pixel format (AVPixelFormat) into XEVE pre-defined color space.
| [in] | px_fmt | pixel format ( |
Definition at line 128 of file libxeve.c.
Referenced by libxeve_init().
|
static |
The function returns a pointer to the object of the XEVE_CDSC type.
XEVE_CDSC contains all encoder parameters that should be initialized before the encoder is used.
The field values of the XEVE_CDSC structure are populated based on:
The order of processing input data and populating the XEVE_CDSC structure 1) first, the fields of the AVCodecContext structure corresponding to the provided input options are processed, (i.e -pix_fmt yuv420p -s:v 1920x1080 -r 30 -profile:v 0) 2) then xeve-specific options added as AVOption to the xeve AVCodec implementation (i.e -preset 0)
Keep in mind that, there are options that can be set in different ways. In this case, please follow the above-mentioned order of processing. The most recent assignments overwrite the previous values.
| [in] | avctx | codec context (AVCodecContext) |
| [out] | cdsc | contains all Xeve MPEG-5 EVC encoder encoder parameters that should be initialized before the encoder is use |
Definition at line 177 of file libxeve.c.
Referenced by libxeve_init().
|
static |
Set XEVE_CFG_SET_USE_PIC_SIGNATURE for encoder.
| [in] | logger | context |
| [in] | id | XEVE encodec instance identifier |
| [in] | ctx | the structure stores all the states associated with the instance of Xeve MPEG-5 EVC encoder |
Definition at line 271 of file libxeve.c.
Referenced by libxeve_init().
|
static |
Switch encoder to bumping mode.
| id | XEVE encodec instance identifier |
Definition at line 307 of file libxeve.c.
Referenced by libxeve_encode().
|
static |
|
static |
Encode raw data frame into EVC packet.
| [in] | avctx | codec context |
| [out] | avpkt | output AVPacket containing encoded data |
| [in] | frame | AVFrame containing the raw data to be encoded |
| [out] | got_packet | encoder sets to 0 or 1 to indicate that a non-empty packet was returned in pkt |
|
static |
|
static |
|
static |
|
static |
|
static |
libavcodec generic global options, which can be set on all the encoders and decoders
| const FFCodec ff_libxeve_encoder |
1.8.17