#include <bcm_host.h>
#include <interface/mmal/mmal.h>
#include <interface/mmal/mmal_parameters_video.h>
#include <interface/mmal/util/mmal_util.h>
#include <interface/mmal/util/mmal_util_params.h>
#include <interface/mmal/util/mmal_default_components.h>
#include <interface/mmal/vc/mmal_vc_api.h>
#include <stdatomic.h>
#include "avcodec.h"
#include "decode.h"
#include "hwconfig.h"
#include "internal.h"
#include "libavutil/avassert.h"
#include "libavutil/buffer.h"
#include "libavutil/common.h"
#include "libavutil/imgutils.h"
#include "libavutil/opt.h"
#include "libavutil/log.h"
Go to the source code of this file.
|
static void | ffmmal_poolref_unref (FFPoolRef *ref) |
|
static void | ffmmal_release_frame (void *opaque, uint8_t *data) |
|
static int | ffmmal_set_ref (AVFrame *frame, FFPoolRef *pool, MMAL_BUFFER_HEADER_T *buffer) |
|
static void | ffmmal_stop_decoder (AVCodecContext *avctx) |
|
static av_cold int | ffmmal_close_decoder (AVCodecContext *avctx) |
|
static void | input_callback (MMAL_PORT_T *port, MMAL_BUFFER_HEADER_T *buffer) |
|
static void | output_callback (MMAL_PORT_T *port, MMAL_BUFFER_HEADER_T *buffer) |
|
static void | control_port_cb (MMAL_PORT_T *port, MMAL_BUFFER_HEADER_T *buffer) |
|
static int | ffmmal_fill_output_port (AVCodecContext *avctx) |
|
static enum AVColorSpace | ffmmal_csp_to_av_csp (MMAL_FOURCC_T fourcc) |
|
static int | ffmal_update_format (AVCodecContext *avctx) |
|
static av_cold int | ffmmal_init_decoder (AVCodecContext *avctx) |
|
static void | ffmmal_flush (AVCodecContext *avctx) |
|
static int | ffmmal_add_packet (AVCodecContext *avctx, AVPacket *avpkt, int is_extradata) |
|
static int | ffmmal_fill_input_port (AVCodecContext *avctx) |
|
static int | ffmal_copy_frame (AVCodecContext *avctx, AVFrame *frame, MMAL_BUFFER_HEADER_T *buffer) |
|
static int | ffmmal_read_frame (AVCodecContext *avctx, AVFrame *frame, int *got_frame) |
|
static int | ffmmal_decode (AVCodecContext *avctx, void *data, int *got_frame, AVPacket *avpkt) |
|
MMAL Video Decoder
Definition in file mmaldec.c.
◆ MAX_DELAYED_FRAMES
#define MAX_DELAYED_FRAMES 16 |
◆ FFMMAL_DEC_CLASS
#define FFMMAL_DEC_CLASS |
( |
|
NAME | ) |
|
Value: static const AVClass ffmmal_##NAME##_dec_class = { \
};
Definition at line 823 of file mmaldec.c.
◆ FFMMAL_DEC
#define FFMMAL_DEC |
( |
|
NAME, |
|
|
|
ID |
|
) |
| |
Value:
AVCodec ff_##NAME##_mmal_decoder = { \
.name = #NAME "_mmal", \
.priv_class = &ffmmal_##NAME##_dec_class, \
AV_PIX_FMT_YUV420P, \
AV_PIX_FMT_NONE}, \
.wrapper_name = "mmal", \
};
Definition at line 831 of file mmaldec.c.
◆ ffmmal_poolref_unref()
static void ffmmal_poolref_unref |
( |
FFPoolRef * |
ref | ) |
|
|
static |
◆ ffmmal_release_frame()
static void ffmmal_release_frame |
( |
void * |
opaque, |
|
|
uint8_t * |
data |
|
) |
| |
|
static |
◆ ffmmal_set_ref()
◆ ffmmal_stop_decoder()
◆ ffmmal_close_decoder()
◆ input_callback()
static void input_callback |
( |
MMAL_PORT_T * |
port, |
|
|
MMAL_BUFFER_HEADER_T * |
buffer |
|
) |
| |
|
static |
◆ output_callback()
static void output_callback |
( |
MMAL_PORT_T * |
port, |
|
|
MMAL_BUFFER_HEADER_T * |
buffer |
|
) |
| |
|
static |
◆ control_port_cb()
static void control_port_cb |
( |
MMAL_PORT_T * |
port, |
|
|
MMAL_BUFFER_HEADER_T * |
buffer |
|
) |
| |
|
static |
◆ ffmmal_fill_output_port()
◆ ffmmal_csp_to_av_csp()
static enum AVColorSpace ffmmal_csp_to_av_csp |
( |
MMAL_FOURCC_T |
fourcc | ) |
|
|
static |
◆ ffmal_update_format()
◆ ffmmal_init_decoder()
◆ ffmmal_flush()
◆ ffmmal_add_packet()
◆ ffmmal_fill_input_port()
◆ ffmal_copy_frame()
◆ ffmmal_read_frame()
◆ ffmmal_decode()
◆ mmal_hw_configs
◆ options
Initial value:={
{
"extra_buffers",
"extra buffers", 0x42,
AV_OPT_TYPE_INT, {.i64 = 10}, 0, 256, 0},
{
"extra_decoder_buffers",
"extra MMAL internal buffered frames", 0x42,
AV_OPT_TYPE_INT, {.i64 = 10}, 0, 256, 0},
}
Definition at line 817 of file mmaldec.c.
static int ffmmal_decode(AVCodecContext *avctx, void *data, int *got_frame, AVPacket *avpkt)
AVPixelFormat
Pixel format.
#define FF_CODEC_CAP_SETS_PKT_DTS
Decoders marked with FF_CODEC_CAP_SETS_PKT_DTS want to set AVFrame.pkt_dts manually.
static av_cold int init(AVCodecContext *avctx)
#define AV_CODEC_CAP_HARDWARE
Codec is backed by a hardware implementation.
@ AV_PIX_FMT_MMAL
HW acceleration though MMAL, data[3] contains a pointer to the MMAL_BUFFER_HEADER_T structure.
static const AVCodecHWConfigInternal *const mmal_hw_configs[]
static const AVOption options[]
static void decode(AVCodecContext *dec_ctx, AVPacket *pkt, AVFrame *frame, FILE *outfile)
static void ffmmal_flush(AVCodecContext *avctx)
static enum AVPixelFormat pix_fmts[]
static av_cold int ffmmal_init_decoder(AVCodecContext *avctx)
#define LIBAVUTIL_VERSION_INT
Describe the class of an AVClass context structure.
static void flush(AVCodecContext *avctx)
#define FFMMAL_DEC_CLASS(NAME)
const char * av_default_item_name(void *ptr)
Return the context name.
static av_cold int ffmmal_close_decoder(AVCodecContext *avctx)
#define NULL_IF_CONFIG_SMALL(x)
Return NULL if CONFIG_SMALL is true, otherwise the argument without modification.
#define HW_CONFIG_INTERNAL(format)
const char * class_name
The name of the class; usually it is the same name as the context structure type to which the AVClass...
#define AV_CODEC_CAP_DELAY
Encoder or decoder requires flushing with NULL input at the end in order to give the complete and cor...