| |

VerySource

 Forgot password?
 Register
Search
View: 10|Reply: 7

How to solve the error of Division by zero or Access violation when xvid decodes?

[Copy link]

1

Threads

4

Posts

5

Credits

Newbie

Rank: 1

Credits
5

 United States

Post time: 2020-2-9 18:30:01
| Show all posts |Read mode
1. I use the xvid mpeg-4 codec filter to encode the data sent by the network and receive the data from the network to decode using the xvid mpeg-4 video decoder filter. Even if the encoding parameters use the default values, as long as there are b frames, the second one appears when decoding. There will be a Division by zero error when i-frames are set. Setting max_bframes to 0 will not cause any problems. In fact, it is also forbidden to encode b-frames. When decoding, it can be guaranteed to start decoding from i-frames and the data is free of errors.

2. When I do not use the xvid filter, but directly use the API provided by xvidcore.dll to decompress the data, an Access violation error occurs. The error occurs in the xvidcore
decoder_bframe (dec,&bs, quant, fcode_forward, fcode_backward)
And is
MACROBLOCK * mb =&dec-> mbs [y * dec-> mb_width + x];
MACROBLOCK * last_mb =&dec-> last_mbs [y * dec-> mb_width + x];
mb, some variables in last_mb have no set value.


How do I solve these problems, please remind me.
Thank you.
Reply

Use magic Report

0

Threads

11

Posts

9

Credits

Newbie

Rank: 1

Credits
9

 China

Post time: 2020-4-8 14:15:01
| Show all posts
First of all, the decoder of xvid is definitely not a problem, or it is very unlikely!
So the problem lies in the encoder or network transmission, the latter is very likely!
Reply

Use magic Report

1

Threads

4

Posts

5

Credits

Newbie

Rank: 1

Credits
5

 China

 Author| Post time: 2020-4-11 09:15:01
| Show all posts
to爱萱儿:

In order to avoid problems caused by network transmission, I first did a test, stored the encoded data in a local buf, and then read the data from this buf and decoded it to display, so there should be no problems with the data, even so, the problem still exists.

Thank you for your reply!
Reply

Use magic Report

0

Threads

11

Posts

9

Credits

Newbie

Rank: 1

Credits
9

 China

Post time: 2020-4-14 16:30:01
| Show all posts
First rule out network problems! Simply send the encoded data to the decoder to see if there is a problem!
Reply

Use magic Report

1

Threads

4

Posts

5

Credits

Newbie

Rank: 1

Credits
5

 China

 Author| Post time: 2020-4-19 22:45:01
| Show all posts
to爱萱儿:

"Troubleshoot network problems first! Simply send the encoded data to the decoder to see if there is a problem!"

This is already done, but there are still such problems.
Reply

Use magic Report

0

Threads

11

Posts

9

Credits

Newbie

Rank: 1

Credits
9

 China

Post time: 2020-4-26 19:30:01
| Show all posts
Is that the problem of determining the decoder?
Is that right?
Then you send me the m4v file you recorded, I will help you to see if it is the xvid decoder problem!
Reply

Use magic Report

0

Threads

2

Posts

3

Credits

Newbie

Rank: 1

Credits
3

 China

Post time: 2020-5-4 07:45:01
| Show all posts
There is a bug in the program I wrote, or there is a problem with the xvid setting
Reply

Use magic Report

1

Threads

4

Posts

5

Credits

Newbie

Rank: 1

Credits
5

 China

 Author| Post time: 2020-6-1 03:30:01
| Show all posts
It is my problem. When sending the encoded data to buf, if the buf is full, it is not sent.
There is a problem with decoding.

I would like to ask everyone, can frames with encoding type p and b be discarded? What about i frames?
Reply

Use magic Report

You have to log in before you can reply Login | Register

Points Rules

Contact us|Archive|Mobile|CopyRight © 2008-2020|verysource.com ( 京ICP备17048824号-1 )

Quick Reply To Top Return to the list