[x264-devel] Re: parallising the encoder

champ yen champ.yen at gmail.com
Thu Apr 7 02:09:44 CEST 2005


> x264 doesn't do slices yet, but it's mostly working at
> http://students.washington.edu/lorenm/src/x264/x264_slices.3.diff
> (based on a patch by Champ Yen).
> --Loren Merritt
Dear All:
   I'm glad that Loren mentioned it. I have said that, I will make
x264 threaded. Now, the implementation is done. It can be download as
the URL belowed.

http://www.ccns.ncku.edu.tw/~champ/x264-champ-18x.tar.gz

   Same as previous multislice implementation, it works only on CAVLC.
It will disable cabac automatically when you enable multislice. I will
keep on working to make cabac work. As Loren aspected, The bitrate
will increase about 1~2% when multislice/thread is enabled.

   Currently, the performance gain is poor (About 10~20% on SMP with 2
P4 2.4G CPUs), I will tune it for more performance. I remebered that
it is based on 183r. However, I changed the code quite a lot to make
it threaded.(Data Structure, API parameters...) I know, the parameters
of internal APIs look quite messy in it. It is because I want to make
something independent. (ok, I have to said, I do not alter RD
implementation, and RD doesn't work corrently. If you encode a
sequence by N thread with M kbps. The result will be NMkbps. If you
want to produce Mkbps, you sould specified M/N as bitrate parameter.)

    Here, I mentioned what method I used in it. I parallized x264 by
encode each slice with a thread. However, original x264 wrapped all
information in x264_t and access structure members by writing
h->xxxx.xxx or h->xxxx->xxxx. In order to make MB encoding
independent, I altered the APIs' parameters passed only specific
pointers. In encoder/encoder.c, you can see that I also split the
bitstream output for each slice. It will be "flushed" to all nal after
all threads finish their job. I create nal_thread_start,
nal_thread_end & nal_thread_flush 3 internal APIs for this purpose.

Sincerely yours.

Champ Yen
==
http://www.ccns.ncku.edu.tw/~champ/
Champ Yen

-- 
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