[x264-devel] Re: parallising the encoder
Tom Jacobs
T.R.Jacobs at lboro.ac.uk
Thu Apr 21 14:48:20 CEST 2005
hi
ive just actually tried to playback some vids encoded using multislice
(thanks to Guillaume for pointing out mplay can actually do it) and they
seam corrupted. i encoded the forman sequence using the following command
./x264 --multislice 2 -o output_large.264 bin/foreman.qcif 176x144
the encoder didnt though up any errors but when i come to play it in mplayer
i get these
Starting playback...
[h264 @ 0x8602720]concealing 165 errors
VDec: vo config request - 176 x 144 (preferred csp: Planar YV12)
VDec: using Planar YV12 as output csp (no 0)
Movie-Aspect is undefined - no prescaling applied.
VO: [xv] 176x144 => 176x144 Planar YV12
[h264 @ 0x8602720]out of range intra chroma pred mode at 2 4
[h264 @ 0x8602720]error while decoding MB 2 4
[h264 @ 0x8602720]concealing 2147483647 errors
[h264 @ 0x8602720]concealing 165 errors
[h264 @ 0x8602720]concealing 2147483647 errors
[h264 @ 0x8602720]concealing 165 errors
[h264 @ 0x8602720]P sub_mb_type 6 out of range at 9 4
[h264 @ 0x8602720]error while decoding MB 9 4
[h264 @ 0x8602720]concealing 2147483647 errors
[h264 @ 0x8602720]concealing 165 errors
these errors repeat themselves for the length of the vid.
am i doing something wrong? this explains why my version of the code isnt
producing results either.
having a look through the code i am concerned with two parts. in
x264_slice_thread_write where the MB in the slice are being looped through
the annalysis and encode functions are called for both. from what is passed
in mb and i_thread_fisrt_mb are the only arguments that are individual to
the specific slice, the rest are in shared memory with the other slices.
should pred and stat be shared between them all? dont these get written to
during both function.
is this correct?
many thanks
Tom
Quoting champ yen <champ.yen at gmail.com>:
> > 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
>
>
--
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