PDA

View Full Version : My encoder and questions


koliva
18th August 2009, 11:21
Hello,

As I told before, I am trying to write my own CODEC. I am as much stick as possible to the H264 or older standarts. The difference is that I am designing this CODEC for only specific input multiview images. Therefore, I am deriving some motion vectors without any calculations. Although I should normally gain some time, I am losing a lot of time in entropy encoding process. Let me illustrate it with an example.

Normal I-P encoding process.
Steps: ME, MC, Residual, Transformation, Quant., Reordering, Entropy Coding., Coded Data.

For Derived Block: Derive MV, MC, Residual ...


For I-P encoding process, calculating ME takes about 1,8 sec. but at the end of two process these two operation takes nearly same time.

Q1. I am using huffman entropy coder. I know CABAC or CAVLC algorithms are used in H264. Do you think that it takes less time if I use CABAC coder instead of Huffman coder?

Q2. As I know, Motion Estimation is the most time consuming part of encoding process. Why does it take less time than entropy coding? Can you comment on it?

I am open for any suggestions.

Thanks for now.

Dust Signs
18th August 2009, 11:30
Hi,

without any code we cannot really help you determining what slows down your entropy coding. Have you already tried using a profiler to find out?
Besides? Why reinvent the wheel? Take a look at H.264 MVC. Its reference software is also available for research purposes.

Dust Signs

koliva
18th August 2009, 11:55
Hi,

without any code we cannot really help you determining what slows down your entropy coding. Have you already tried using a profiler to find out?
Besides? Why reinvent the wheel? Take a look at H.264 MVC. Its reference software is also available for research purposes.

Dust Signs

I have looked at the profilers but unfortunately it is too late to convert whole project from Matlab to C++. After this project I will definitely use C++.

Most probably the problem is because of the residual data. When I derive the ME, result residual data has little more information then the residual data from first process. When it comes entropy coding, it takes more time to encode the residual data from derived MV. I would expect this time difference but not that much.

Dust Signs
18th August 2009, 12:26
I cannot do anything more than repeat myself: show us your code. As many implementations out there show entropy coding can be performed quite fast. Besides, I think that you are in the wrong section of the forum again (as this is clearly a programming question).

Dust Signs

koliva
18th August 2009, 12:35
I am sure Neuron2 will move my post to the Programming Section as always. Sorry for the mess.

I have asked this question but I could not get any answer yet. Let me repeat it again. Is there any charts or information about the time spent for each process during enconding process. For example, Motion Estimation takes more time than Motion Compensation and so on. I wonder what the expected time for ME, MC and Entropy Coding. Then I can compare it with my results. Thanks.

Dust Signs
18th August 2009, 12:59
This information would not help you at all as your code may be completely different in terms of runtime behaviour. The newer Matlab versions also have profiling features built-in, so why don't you use them in order to discover possible design flaws or potentials for optimization?
If you really think runtime behaviour of different code (even when written with a completely different programming language) go ahead and profile x264. But this won't help you either as there is a nearly infinite number of possibilities to combine the parameters of motion estimation, entropy coding, partitions etc., not to mention that different source material and different resolutions will also yield to completely different runtime behaviour.
So what exactly do you want? Either provide the code so we can help you figuring out what the performance problem might be or provide us what information you really want (detailed specifications in terms of the sequence to test, its resolution, the ME algorithm, the search range,...).

Dust Signs