[x264-devel] Re: few quick questions

champ yen champ.yen at gmail.com
Tue Apr 12 19:38:44 CEST 2005


On Apr 12, 2005 7:41 PM, Tom Jacobs <T.R.Jacobs at lboro.ac.uk> wrote:
> a few quick questions so u can get a can get a good base to understand the
> encoder.
>  what actually is nal.  i have seen it on xvid to and never worked it out. i
> think it is where the actual compressed data is stored but not sure exactly.
NAL: Network Abstract Layer
It's a concept layer for storage & transmission.
Yes, compressed data is stored in NAL units.
However, some information is also stored in NAL units (ex. SEI, SPS,
PPS, AUD....)

> i am thinking that x264_encoder_encode is the main encoding function. the
> whole frame and all its slices (am using Champ Yen parallel version,   very
> much appreciated btw) are encoded from this point. but i am not sure exactly
> how it works from there on. i am guessing somewhere it will have to be
> broken down to a MB level.

encoder_encode() is still a high-level API.
slice_write() is the core of encoder_encode().

slice_write() encodes the macroblocks of a whole frame by raster scan order.
It has three important steps.
1. macroblock_analyse()
2. macroblock_encode()
3. macorblock_write_cabac[or cavlc]()

> if i have got this right in my head, for each MB the different number of sub
> MB sizes are tested to see which gives the best approximation to the
> original image. once all the test are done it is then compressed using that
> size block.
Yeah, this is done in macroblock_analyse()
It depends on the type of the slice.
All possible modes(depends on the specified parameters) will be
checked and the best mode will be selected.

> from the parallel version of the encoder the main different i see is within
> the slice_init start and write. is this where the programme flow goes
> deeper into the encoding process?
parallel version will generate 2-4 threads, each thread excute a
altered version slice_write() to encode a slice.

In the altered slice_write() it will caculated the start and end
macroblock address and encode the macroblocks. However, it depends on
multislice implementation, since motion vectors and intra predictions
can not generated by previous slice. It's the main difference between
parallel version and official version.

Detailly, I also altered the way to generate bitstream.

> for sayin i only had a few questions it has turned into a long post.  any
> help would be much appreciated
> 
> Tom
I hope that it will be helpful for you.
I'm a Taiwaness with poor English.

Currently, I'm working on making FFMpeg support multislice decoding.
Nextstep, I will write a C++ version x264. and make it more standard compatible.

sincerely yours
champ yen
==
Where there is will, there is a way.
http://www.ccns.ncku.edu.tw/~champ/

-- 
This is the x264-devel mailing-list
To unsubscribe, go to: http://developers.videolan.org/lists.html



More information about the x264-devel mailing list