[FFmpeg-devel] [PATCH] adding xavs encoding support
Sat Jul 24 18:35:04 CEST 2010
On Fri, Jul 23, 2010 at 2:21 AM, Stefan Gehrer <stefan.gehrer at gmx.de> wrote:
> On 07/22/2010 04:24 PM, jianwen chen wrote:
>> On Thu, Jul 22, 2010 at 1:59 AM, Stefan Gehrer<stefan.gehrer at gmx.de>
>>> libavcodec/libxavs.c in your patch calls a function
>>> xavs_param_default(), which was removed from xavs.h with revision 20.
>>> According to
>>> this was six months ago.
>>> Re-adding the line
>>> void xavs_param_default( xavs_param_t * );
>>> to xavs.h fixes this.
>>> If I do this manually I can compile, but when I try to encode I get
>>> segmentation faults in xavs_encoder_encode() without a usable
>>> backtrace. Command line I used:
>>> ffmpeg -s cif -i foreman.yuv -vcodec libxavs out.avi
>>> Could you please check?
>>> Dear Stefan,
>> Thanks for point out the mistakes. Now the bugs of xavs are fixed.
>> The xavs version which I used is ok:)
>> Please check out the latest version xavs code
>> svn co https://xavs.svn.sourceforge.net/svnroot/xavs/trunk xavs
>> And the ffmpeg patch is no problem and the latest is in the previous
>> And it works well now.
> I can confirm that the build works now, and that I can basically encode.
> The encoded stream can be decoded with the ffmpeg-decoder, which makes
> me happy.
> Just two smaller things:
> - At the end of encoding, I get a "Video encoding failed" message,
> it seems the last call to encode_frame returns an error
This is a small bug in XAVS, I have fixed and checked in the code. Thanks.
> - You pass CODEC_FLAG_PSNR to the library, but even if it is specified
> there is no output of PSNR values. Could you please add it to the
> library or if the wrapper has access to the reconstructed frames you
> could also do it there, see mpegvideo_enc.c for an example.
> That would help testing a lot.
For PSNR, it is also provided with the -psnr option:
./ffmpeg -s cif -i /mnt/d/sequences/ak.yuv -psnr -vcodec libxavs test.avs
[libxavs @ 0x94fdc90] using cpu capabilities
[libxavs @ 0x94fdc90] profile JiZhun, level 6.4
Output #0, cavsvideo, to 'test.avs':
encoder : Lavf52.73.0
Stream #0.0: Video: libxavs, yuv420p, 352x288, q=2-31, 200 kb/s, 90k
tbn, 25 tbc
frame= 300 fps= 24 q=-11062240.7 LPSNR=Y:inf U:inf V:inf *:inf size=
338kB time=12.00 bitrate= 230.9kbits/s
video:338kB audio:0kB global headers:0kB muxing overhead 0.000000%
[libxavs @ 0x94fdc90] slice I:25 Avg QP:28.16 size: 8419 PSNR Mean
Y:45.53 U:48.25 V:49.33 Avg:46.36 Global:46.30
[libxavs @ 0x94fdc90] slice P:275 Avg QP:31.00 size: 493 PSNR Mean
Y:43.84 U:47.39 V:48.65 Avg:44.84 Global:44.77
[libxavs @ 0x94fdc90] mb I I16..4: 0.0% 100.0% 0.0%
[libxavs @ 0x94fdc90] mb P I16..4: 0.0% 0.0% 0.0% P16..4: 10.4% 3.5%
1.5% 0.0% 0.0% skip:84.6%
[libxavs @ 0x94fdc90] final ratefactor: 24.99
[libxavs @ 0x94fdc90] 8x8 transform intra:100.0% inter:100.0%
[libxavs @ 0x94fdc90] PSNR Mean Y:43.985 U:47.466 V:48.710 Avg:44.964
Please use the latest xavs code for testing and checking.
> ffmpeg-devel mailing list
> ffmpeg-devel at mplayerhq.hu
More information about the ffmpeg-devel