mirror of
https://mirror.skon.top/https://github.com/FFmpeg/FFmpeg
synced 2026-04-20 21:00:41 +08:00
avcodec/encode: Use enum AVPictureType in ff_encode_add_stats_side_data
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
This commit is contained in:
committed by
James Almer
parent
08e75b8211
commit
a2210902ff
@@ -916,7 +916,7 @@ AVCPBProperties *ff_encode_add_cpb_side_data(AVCodecContext *avctx)
|
||||
}
|
||||
|
||||
int ff_encode_add_stats_side_data(AVPacket *pkt, int quality, const int64_t error[],
|
||||
int error_count, int pict_type)
|
||||
int error_count, enum AVPictureType pict_type)
|
||||
{
|
||||
uint8_t *side_data;
|
||||
size_t side_data_size;
|
||||
|
||||
@@ -85,7 +85,7 @@ int ff_encode_encode_cb(AVCodecContext *avctx, AVPacket *avpkt,
|
||||
AVCPBProperties *ff_encode_add_cpb_side_data(AVCodecContext *avctx);
|
||||
|
||||
int ff_encode_add_stats_side_data(AVPacket *pkt, int quality, const int64_t error[],
|
||||
int error_count, int pict_type);
|
||||
int error_count, enum AVPictureType pict_type);
|
||||
|
||||
/**
|
||||
* Rescale from sample rate to AVCodecContext.time_base.
|
||||
|
||||
@@ -172,7 +172,6 @@ static int libkvazaar_encode(AVCodecContext *avctx,
|
||||
kvz_data_chunk *data_out = NULL;
|
||||
uint32_t len_out = 0;
|
||||
int retval = 0;
|
||||
int pict_type;
|
||||
|
||||
*got_packet_ptr = 0;
|
||||
|
||||
@@ -266,6 +265,7 @@ static int libkvazaar_encode(AVCodecContext *avctx,
|
||||
avpkt->flags |= AV_PKT_FLAG_KEY;
|
||||
}
|
||||
|
||||
enum AVPictureType pict_type;
|
||||
switch (frame_info.slice_type) {
|
||||
case KVZ_SLICE_I:
|
||||
pict_type = AV_PICTURE_TYPE_I;
|
||||
|
||||
@@ -590,7 +590,7 @@ static int eb_receive_packet(AVCodecContext *avctx, AVPacket *pkt)
|
||||
AVFrame *frame = svt_enc->frame;
|
||||
EbErrorType svt_ret;
|
||||
AVBufferRef *ref;
|
||||
int ret = 0, pict_type;
|
||||
int ret = 0;
|
||||
|
||||
if (svt_enc->eos_flag == EOS_RECEIVED)
|
||||
return AVERROR_EOF;
|
||||
@@ -636,6 +636,7 @@ static int eb_receive_packet(AVCodecContext *avctx, AVPacket *pkt)
|
||||
pkt->pts = headerPtr->pts;
|
||||
pkt->dts = headerPtr->dts;
|
||||
|
||||
enum AVPictureType pict_type;
|
||||
switch (headerPtr->pic_type) {
|
||||
case EB_AV1_KEY_PICTURE:
|
||||
pkt->flags |= AV_PKT_FLAG_KEY;
|
||||
|
||||
@@ -1323,7 +1323,7 @@ static int storeframe(AVCodecContext *avctx, struct FrameListData *cx_frame,
|
||||
VPxContext *ctx = avctx->priv_data;
|
||||
int ret = ff_get_encode_buffer(avctx, pkt, cx_frame->sz, 0);
|
||||
uint8_t *side_data;
|
||||
int pict_type;
|
||||
enum AVPictureType pict_type;
|
||||
int quality;
|
||||
|
||||
if (ret < 0)
|
||||
|
||||
@@ -613,7 +613,7 @@ static int X264_frame(AVCodecContext *ctx, AVPacket *pkt, const AVFrame *frame,
|
||||
x264_nal_t *nal;
|
||||
int nnal, ret;
|
||||
x264_picture_t pic_out = {0}, *pic_in;
|
||||
int pict_type;
|
||||
enum AVPictureType pict_type;
|
||||
int64_t wallclock = 0;
|
||||
X264Opaque *out_opaque;
|
||||
|
||||
|
||||
@@ -693,7 +693,6 @@ static int libx265_encode_frame(AVCodecContext *avctx, AVPacket *pkt,
|
||||
x265_nal *nal;
|
||||
x265_sei *sei;
|
||||
uint8_t *dst;
|
||||
int pict_type;
|
||||
int payload = 0;
|
||||
int nnal;
|
||||
int ret;
|
||||
@@ -869,6 +868,7 @@ static int libx265_encode_frame(AVCodecContext *avctx, AVPacket *pkt,
|
||||
pkt->pts = x265pic_out->pts;
|
||||
pkt->dts = x265pic_out->dts;
|
||||
|
||||
enum AVPictureType pict_type;
|
||||
switch (x265pic_out->sliceType) {
|
||||
case X265_TYPE_IDR:
|
||||
case X265_TYPE_I:
|
||||
|
||||
@@ -126,7 +126,6 @@ static int XAVS_frame(AVCodecContext *avctx, AVPacket *pkt,
|
||||
xavs_nal_t *nal;
|
||||
int nnal, i, ret;
|
||||
xavs_picture_t pic_out;
|
||||
int pict_type;
|
||||
|
||||
x4->pic.img.i_csp = XAVS_CSP_I420;
|
||||
x4->pic.img.i_plane = 3;
|
||||
@@ -177,6 +176,7 @@ static int XAVS_frame(AVCodecContext *avctx, AVPacket *pkt,
|
||||
} else
|
||||
pkt->dts = pkt->pts;
|
||||
|
||||
enum AVPictureType pict_type;
|
||||
switch (pic_out.i_type) {
|
||||
case XAVS_TYPE_IDR:
|
||||
case XAVS_TYPE_I:
|
||||
|
||||
@@ -467,8 +467,6 @@ static int libxeve_encode(AVCodecContext *avctx, AVPacket *avpkt,
|
||||
*got_packet = 0;
|
||||
return 0;
|
||||
} else if (ret == XEVE_OK) {
|
||||
int av_pic_type;
|
||||
|
||||
if (xectx->stat.write > 0) {
|
||||
|
||||
ret = ff_get_encode_buffer(avctx, avpkt, xectx->stat.write, 0);
|
||||
@@ -483,6 +481,7 @@ static int libxeve_encode(AVCodecContext *avctx, AVPacket *avpkt,
|
||||
avpkt->pts = xectx->bitb.ts[XEVE_TS_PTS];
|
||||
avpkt->dts = xectx->bitb.ts[XEVE_TS_DTS];
|
||||
|
||||
enum AVPictureType av_pic_type;
|
||||
switch(xectx->stat.stype) {
|
||||
case XEVE_ST_I:
|
||||
av_pic_type = AV_PICTURE_TYPE_I;
|
||||
|
||||
@@ -817,7 +817,7 @@ static int xvid_encode_frame(AVCodecContext *avctx, AVPacket *pkt,
|
||||
}
|
||||
|
||||
if (xerr > 0) {
|
||||
int pict_type;
|
||||
enum AVPictureType pict_type;
|
||||
|
||||
*got_packet = 1;
|
||||
|
||||
|
||||
@@ -154,7 +154,7 @@ typedef struct MpegEncContext {
|
||||
|
||||
int qscale; ///< QP
|
||||
int chroma_qscale; ///< chroma QP
|
||||
int pict_type; ///< AV_PICTURE_TYPE_I, AV_PICTURE_TYPE_P, AV_PICTURE_TYPE_B, ...
|
||||
enum AVPictureType pict_type; ///< AV_PICTURE_TYPE_I, AV_PICTURE_TYPE_P, AV_PICTURE_TYPE_B, ...
|
||||
int droppable;
|
||||
|
||||
BlockDSPContext bdsp;
|
||||
|
||||
Reference in New Issue
Block a user