mirror of
https://gitee.com/Vancouver2017/luban-lite.git
synced 2025-12-21 19:48:55 +00:00
V1.0.6
This commit is contained in:
@@ -1,9 +1,11 @@
|
||||
/*
|
||||
* Copyright (C) 2020-2022 Artinchip Technology Co. Ltd
|
||||
*
|
||||
* author: <qi.xu@artinchip.com>
|
||||
* Desc: interface of decode libs
|
||||
*/
|
||||
* Copyright (C) 2020-2024 Artinchip Technology Co. Ltd
|
||||
*
|
||||
* SPDX-License-Identifier: Apache-2.0
|
||||
*
|
||||
* Author: <qi.xu@artinchip.com>
|
||||
* Desc: interface of decode and encoder libs
|
||||
*/
|
||||
|
||||
#ifndef MPP_CODEC_H
|
||||
#define MPP_CODEC_H
|
||||
@@ -12,6 +14,7 @@
|
||||
#include "frame_manager.h"
|
||||
#include "packet_manager.h"
|
||||
#include "mpp_decoder.h"
|
||||
#include "mpp_encoder.h"
|
||||
#include "frame_allocator.h"
|
||||
|
||||
#define ALIGN_8B(x) (((x) + (7)) & ~(7))
|
||||
@@ -22,16 +25,20 @@ struct mpp_decoder {
|
||||
struct packet_manager* pm;
|
||||
struct frame_manager* fm;
|
||||
struct frame_allocator* allocator;
|
||||
int rotmir_flag; // only used for jpeg
|
||||
int hor_scale; // only used for jpeg
|
||||
int ver_scale; // only used for jpeg
|
||||
int crop_en;
|
||||
int crop_x;
|
||||
int crop_y;
|
||||
int crop_width;
|
||||
int crop_height;
|
||||
int output_x;
|
||||
int output_y;
|
||||
int rotmir_flag; // only used for jpeg
|
||||
int hor_scale; // only used for jpeg
|
||||
int ver_scale; // only used for jpeg
|
||||
int crop_en;
|
||||
int crop_x;
|
||||
int crop_y;
|
||||
int crop_width;
|
||||
int crop_height;
|
||||
int output_x;
|
||||
int output_y;
|
||||
};
|
||||
|
||||
struct mpp_encoder {
|
||||
struct enc_ops *ops;
|
||||
};
|
||||
|
||||
struct dec_ops {
|
||||
@@ -44,4 +51,13 @@ struct dec_ops {
|
||||
int (*reset)(struct mpp_decoder *ctx);
|
||||
};
|
||||
|
||||
struct enc_ops {
|
||||
const char *name;
|
||||
|
||||
int (*init)(struct mpp_encoder *ctx, struct encode_config *config);
|
||||
int (*destory)(struct mpp_encoder *ctx);
|
||||
int (*encode)(struct mpp_encoder *ctx, struct mpp_frame *frame, struct mpp_packet *packet);
|
||||
int (*control)(struct mpp_encoder *ctx, int cmd, void *param);
|
||||
int (*reset)(struct mpp_encoder *ctx);
|
||||
};
|
||||
#endif
|
||||
|
||||
Reference in New Issue
Block a user