mirror of
https://gitee.com/Vancouver2017/luban-lite-t3e-pro.git
synced 2025-12-17 11:58:54 +00:00
V1.0.5
This commit is contained in:
40
packages/artinchip/mpp/middle_media/base/include/aic_stream.h
Executable file → Normal file
40
packages/artinchip/mpp/middle_media/base/include/aic_stream.h
Executable file → Normal file
@@ -9,7 +9,7 @@
|
||||
#define __AIC_STREAM_H__
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C"{
|
||||
extern "C" {
|
||||
#endif /* __cplusplus */
|
||||
|
||||
#include "mpp_dec_type.h"
|
||||
@@ -29,6 +29,20 @@ struct aic_stream {
|
||||
s64 (*size)(struct aic_stream *stream);
|
||||
};
|
||||
|
||||
#ifndef AIC_RL16
|
||||
# define AIC_RL16(x) \
|
||||
((((const uint8_t*)(x))[1] << 8) | \
|
||||
((const uint8_t*)(x))[0])
|
||||
#endif
|
||||
|
||||
#ifndef AIC_RL32
|
||||
# define AIC_RL32(x) \
|
||||
(((uint32_t)((const uint8_t*)(x))[3] << 24) | \
|
||||
(((const uint8_t*)(x))[2] << 16) | \
|
||||
(((const uint8_t*)(x))[1] << 8) | \
|
||||
((const uint8_t*)(x))[0])
|
||||
#endif
|
||||
|
||||
#define aic_stream_read( \
|
||||
stream, \
|
||||
buf, \
|
||||
@@ -52,6 +66,30 @@ struct aic_stream {
|
||||
|
||||
s32 aic_stream_open(char *uri, struct aic_stream **stream);
|
||||
|
||||
|
||||
|
||||
int aic_stream_skip(struct aic_stream* s, int len);
|
||||
void aic_stream_w8(struct aic_stream* s, int b);
|
||||
void aic_stream_write(struct aic_stream* s, const unsigned char *buf, int size);
|
||||
void aic_stream_wl64(struct aic_stream* s, uint64_t val);
|
||||
void aic_stream_wb64(struct aic_stream* s, uint64_t val);
|
||||
void aic_stream_wl32(struct aic_stream* s, unsigned int val);
|
||||
void aic_stream_wb32(struct aic_stream* s, unsigned int val);
|
||||
void aic_stream_wl24(struct aic_stream* s, unsigned int val);
|
||||
void aic_stream_wb24(struct aic_stream* s, unsigned int val);
|
||||
void aic_stream_wl16(struct aic_stream* s, unsigned int val);
|
||||
void aic_stream_wb16(struct aic_stream* s, unsigned int val);
|
||||
|
||||
int aic_stream_r8 (struct aic_stream* s);
|
||||
unsigned int aic_stream_rl16(struct aic_stream* s);
|
||||
unsigned int aic_stream_rl24(struct aic_stream* s);
|
||||
unsigned int aic_stream_rl32(struct aic_stream* s);
|
||||
uint64_t aic_stream_rl64(struct aic_stream* s);
|
||||
unsigned int aic_stream_rb16(struct aic_stream* s);
|
||||
unsigned int aic_stream_rb24(struct aic_stream* s);
|
||||
unsigned int aic_stream_rb32(struct aic_stream* s);
|
||||
uint64_t aic_stream_rb64(struct aic_stream* s);
|
||||
|
||||
#ifdef __cplusplus
|
||||
#if __cplusplus
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user