mirror of
https://github.com/nyanmisaka/mpp.git
synced 2025-10-04 16:52:40 +08:00
[mpi_dec_test]: Support jpeg loop decoding
usage: -n -1 Signed-off-by: Yandong Lin <yandong.lin@rock-chips.com> Change-Id: Ic184142f771b1e9c68344b3162e491f18d4d33fc
This commit is contained in:
@@ -411,10 +411,14 @@ static int decode_advanced(MpiDecLoopData *data)
|
||||
size_t read_size = fread(buf, 1, data->packet_size, data->fp_input);
|
||||
|
||||
if (read_size != data->packet_size || feof(data->fp_input)) {
|
||||
mpp_log("%p found last packet\n", ctx);
|
||||
|
||||
// setup eos flag
|
||||
data->eos = pkt_eos = 1;
|
||||
if (data->frame_num < 0) {
|
||||
clearerr(data->fp_input);
|
||||
rewind(data->fp_input);
|
||||
} else {
|
||||
mpp_log("%p found last packet\n", ctx);
|
||||
// setup eos flag
|
||||
data->eos = pkt_eos = 1;
|
||||
}
|
||||
}
|
||||
|
||||
// reset pos
|
||||
@@ -478,7 +482,13 @@ static int decode_advanced(MpiDecLoopData *data)
|
||||
if (mpp_frame_get_eos(frame_out))
|
||||
mpp_log("%p found eos frame\n", ctx);
|
||||
}
|
||||
|
||||
if (data->frame_num > 0 && data->frame_count < data->frame_num) {
|
||||
data->eos = 0;
|
||||
clearerr(data->fp_input);
|
||||
rewind(data->fp_input);
|
||||
} else {
|
||||
data->eos = 1;
|
||||
}
|
||||
/* output queue */
|
||||
ret = mpi->enqueue(ctx, MPP_PORT_OUTPUT, task);
|
||||
if (ret)
|
||||
|
Reference in New Issue
Block a user