Giter VIP home page Giter VIP logo

Comments (7)

fwanghuan490 avatar fwanghuan490 commented on May 30, 2024

纠正一下,应该是从第4帧解码开始出现的错误打印

from mpp.

fwanghuan490 avatar fwanghuan490 commented on May 30, 2024

这个问题请问大概是什么原因造成的?

from mpp.

HermanChen avatar HermanChen commented on May 30, 2024

麻烦提供一下测试文件?

from mpp.

fwanghuan490 avatar fwanghuan490 commented on May 30, 2024

好的,就连续的解码这个jpg文件就可以了:
百度网盘链接:https://pan.baidu.com/s/1LbM2zQX4k95EYlIvIZvLoA
提取码:r4z0

为了测试连续解码,我把demo中的代码增加了几行:
在mpi_dec_test.c文件中的mpi_dec_test_decode()函数中大概第677行中的while (!data.eos)里面,新增了多次调用decode_advanced(),具体如下:
while (!data.eos) {
mpp_err_f("the 1 decode\n");
decode_advanced(&data);
fseek(data.fp_input, 0L, SEEK_END);
file_size = ftell(data.fp_input);
rewind(data.fp_input);
mpp_err_f("the 2 decode\n");
decode_advanced(&data);
fseek(data.fp_input, 0L, SEEK_END);
file_size = ftell(data.fp_input);
rewind(data.fp_input);
mpp_err_f("the 3 decode\n");
decode_advanced(&data);
fseek(data.fp_input, 0L, SEEK_END);
file_size = ftell(data.fp_input);
rewind(data.fp_input);
mpp_err_f("the 4 decode\n");
decode_advanced(&data);
fseek(data.fp_input, 0L, SEEK_END);
file_size = ftell(data.fp_input);
rewind(data.fp_input);
mpp_err_f("the 5 decode\n");
decode_advanced(&data);
mpp_err_f("the final decode over\n");
}

from mpp.

FumasterLin avatar FumasterLin commented on May 30, 2024

Hi:
你提供的百度网盘链接失效了,麻烦重新提供下

from mpp.

fwanghuan490 avatar fwanghuan490 commented on May 30, 2024

你好,Jpg文件新的百度网盘链接如下:

链接:https://pan.baidu.com/s/1Mpg0URLYLUwBa0c5WsYL1g
提取码:16lw

from mpp.

FumasterLin avatar FumasterLin commented on May 30, 2024

Hi:
提供下你本地最新mpp的版本信息?
另外,要测试连续解同一帧jpeg的话,请合入如下修改,再进一步测试下看看。

用以下命令测试(加入-n 参数 指定重复编多少帧):
mpi_dec_test -i t2020.jpg -w 2448 -h 2048 -t 8 -n 10 -o 2448x2048.yuv

diff --git a/test/mpi_dec_test.c b/test/mpi_dec_test.c
index f8c9557c..cd5f0d22 100644
--- a/test/mpi_dec_test.c
+++ b/test/mpi_dec_test.c
@@ -473,6 +473,14 @@ static int decode_advanced(MpiDecLoopData *data)
                 dump_mpp_frame_to_file(frame, data->fp_output);
 
             mpp_log("%p decoded frame %d\n", ctx, data->frame_count);
+
+            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;
+            }
             data->frame_count++;
 
             if (mpp_frame_get_eos(frame_out))

from mpp.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.