vlc 0.9.8a - how can i enable multithreaded decoding x264

*nix specific usage questions
rafalm23
Blank Cone
Blank Cone
Posts: 11
Joined: 25 Dec 2008 17:24

vlc 0.9.8a - how can i enable multithreaded decoding x264

Postby rafalm23 » 25 Dec 2008 17:28

Hello,
Newest version of ffmpeg/libavcodec x264 decoder has support for multithreaded decoding, how can i enable it in vlc 0.9.8a?

Thank You,
R.M.

Jean-Baptiste Kempf
Site Administrator
Site Administrator
Posts: 37523
Joined: 22 Jul 2005 15:29
VLC version: 4.0.0-git
Operating System: Linux, Windows, Mac
Location: Cone, France
Contact:

Re: vlc 0.9.8a - how can i enable multithreaded decoding x264

Postby Jean-Baptiste Kempf » 26 Dec 2008 14:42

No, newest version of libavcodec isn't multithreaded.
Jean-Baptiste Kempf
http://www.jbkempf.com/ - http://www.jbkempf.com/blog/category/Videolan
VLC media player developer, VideoLAN President and Sites administrator
If you want an answer to your question, just be specific and precise. Don't use Private Messages.

rafalm23
Blank Cone
Blank Cone
Posts: 11
Joined: 25 Dec 2008 17:24

Re: vlc 0.9.8a - how can i enable multithreaded decoding x264

Postby rafalm23 » 28 Dec 2008 20:23

No, newest version of libavcodec isn't multithreaded.
fmpeg/libavcodec/h264.c:

static void free_tables(H264Context *h){
[...]
for(i = 0; i < h->s.avctx->thread_count; i++) {
[...]
}
}

static int frame_start(H264Context *h){
{
[...]
for(i = 0; i < s->avctx->thread_count; i++)
[...]
}

"as the title says, thanks to Andreas Öman libavcodec now can make use of dual core processors when decoding h.264"
http://svn.mplayerhq.hu/ffmpeg/trunk/li ... e&view=log

"Fix problem with multithreaded decoding, introduced by r11214.
Patch by Reinhard Nissl: rnissl gmx de"

http://svn.mplayerhq.hu/ffmpeg/trunk/li ... e&view=log

http://img228.imageshack.us/img228/1434 ... efeae3.png

Rémi Denis-Courmont
Developer
Developer
Posts: 15266
Joined: 07 Jun 2004 16:01
VLC version: master
Operating System: Linux
Contact:

Re: vlc 0.9.8a - how can i enable multithreaded decoding x264

Postby Rémi Denis-Courmont » 28 Dec 2008 20:45

VLC does not support this at the moment.
Rémi Denis-Courmont
https://www.remlab.net/
Private messages soliciting support will be systematically discarded

rafalm23
Blank Cone
Blank Cone
Posts: 11
Joined: 25 Dec 2008 17:24

Re: vlc 0.9.8a - how can i enable multithreaded decoding x264

Postby rafalm23 » 28 Dec 2008 20:50

VLC does not support this at the moment.
i' m added to function decode_init:

static av_cold int decode_init(AVCodecContext *avctx){
avctx->thread_count = 2;
[...]
}

but this dosn't work

maybe you know? where to add "avctx->thread_count = 2" ? (for fast support multithreaded x264 vlc decoding)?

Jean-Baptiste Kempf
Site Administrator
Site Administrator
Posts: 37523
Joined: 22 Jul 2005 15:29
VLC version: 4.0.0-git
Operating System: Linux, Windows, Mac
Location: Cone, France
Contact:

Re: vlc 0.9.8a - how can i enable multithreaded decoding x264

Postby Jean-Baptiste Kempf » 30 Dec 2008 17:26

Isn't that only for slice-based decoding?
Jean-Baptiste Kempf
http://www.jbkempf.com/ - http://www.jbkempf.com/blog/category/Videolan
VLC media player developer, VideoLAN President and Sites administrator
If you want an answer to your question, just be specific and precise. Don't use Private Messages.

rafalm23
Blank Cone
Blank Cone
Posts: 11
Joined: 25 Dec 2008 17:24

Re: vlc 0.9.8a - how can i enable multithreaded decoding x264

Postby rafalm23 » 02 Jan 2009 15:02

Isn't that only for slice-based decoding?
yes :(

Jean-Baptiste Kempf
Site Administrator
Site Administrator
Posts: 37523
Joined: 22 Jul 2005 15:29
VLC version: 4.0.0-git
Operating System: Linux, Windows, Mac
Location: Cone, France
Contact:

Re: vlc 0.9.8a - how can i enable multithreaded decoding x264

Postby Jean-Baptiste Kempf » 02 Jan 2009 16:09

Well, x264 doesn't encode in slices, so I am not sure this is very usefull.
Jean-Baptiste Kempf
http://www.jbkempf.com/ - http://www.jbkempf.com/blog/category/Videolan
VLC media player developer, VideoLAN President and Sites administrator
If you want an answer to your question, just be specific and precise. Don't use Private Messages.

rafalm23
Blank Cone
Blank Cone
Posts: 11
Joined: 25 Dec 2008 17:24

Re: vlc 0.9.8a - how can i enable multithreaded decoding x264

Postby rafalm23 » 03 Jan 2009 10:01

I would like to implement 2-threaded single-slice ffh264 decoding, but I need basic information "how to"

h264.c:

static int decode_slice(struct AVCodecContext *avctx, void *arg)
{
[...]

s->mb_y = 20; //this is my - when i set this video have atrifacts (next field is based on previous?)
for(;;){
[...]

}

rafalm23
Blank Cone
Blank Cone
Posts: 11
Joined: 25 Dec 2008 17:24

Re: vlc 0.9.8a - how can i enable multithreaded decoding x264

Postby rafalm23 » 03 Jan 2009 17:51

Hello,
I added to function decoded_slice(...) mb_y = 20 before for(;;)

oryginal: http://img393.imageshack.us/img393/7206/screenav5.png
with mb_y=20: http://img371.imageshack.us/img371/3759 ... mbyqs1.png
should be: http://img387.imageshack.us/img387/8664 ... dbeci7.png

ok, i know, i must increment variable (pointer to compressed data), but
i can't find it, can you help me?

regards,
R.M.

Jean-Baptiste Kempf
Site Administrator
Site Administrator
Posts: 37523
Joined: 22 Jul 2005 15:29
VLC version: 4.0.0-git
Operating System: Linux, Windows, Mac
Location: Cone, France
Contact:

Re: vlc 0.9.8a - how can i enable multithreaded decoding x264

Postby Jean-Baptiste Kempf » 03 Jan 2009 18:34

Ask on vlc-devel mailing list!
Jean-Baptiste Kempf
http://www.jbkempf.com/ - http://www.jbkempf.com/blog/category/Videolan
VLC media player developer, VideoLAN President and Sites administrator
If you want an answer to your question, just be specific and precise. Don't use Private Messages.


Return to “VLC media player for Linux and friends Troubleshooting”

Who is online

Users browsing this forum: No registered users and 25 guests