[issue1912] WMAPro-in-WMAVoice support not implemented

2011-01-07 Thread Carl Eugen Hoyos

Carl Eugen Hoyos ceho...@rainbow.studorg.tuwien.ac.at added the comment:

Have you already tested incoming/00_LPI Series Intro.wmv?
I suspect it isn't better, so isn't it possible to produce such a file using a
Microsoft encoder?


FFmpeg issue tracker iss...@roundup.ffmpeg.org
https://roundup.ffmpeg.org/issue1912



[issue1912] WMAPro-in-WMAVoice support not implemented

2010-12-29 Thread Ronald S. Bultje

Ronald S. Bultje rsbul...@gmail.com added the comment:

Could you upload the other files showing the message at the start 
somewhere? Maybe one of them has non-zero bits in the wmapro packet.


FFmpeg issue tracker iss...@roundup.ffmpeg.org
https://roundup.ffmpeg.org/issue1912



[issue1912] WMAPro-in-WMAVoice support not implemented

2010-12-27 Thread Ronald S. Bultje

Ronald S. Bultje rsbul...@gmail.com added the comment:

Looking at the pro data in the packets, I doubt this issue can be solved 
with this file:
[00][00][00][00][00][00][00][00][00][00][00][00][00][00][00][00][00][00]
[00][00][00][00][00][00][00][00][00][00][00][00][00][00][00][00][00][00]
[00][00][00][00][00][00][00][00][00][00][00][00][00][00][00][00][00][00]
[00][00][00][00][00][00][00][00][00][00][00][00][00][00][00][00][00][00]
[00][00][00][00][00][00][00][00][00][00][00][00][00][00][00][00][00][00]
[00][00][00][00][00][00][00][00][00][00][00][00][00][00][00][00][00][00]
[00][00][00][00][00][00][00][00][00][00][00][00][00][00][00][00][00][00]
[00][00][00][00][00][00][00][00][00][00][00][00][00][00][00][00][00][00]
[00][00][00][00][00][00][00][00][00][00][00][00][00][00][00][00][00][00]
[00][00][00][00][00][00][00][00][00][00][00][00][00][00][00][00][00][00]
[00][00][00][00][00][00][00][00][00][00][00][00][00][00][00][00][00][00]
[00][00][00][00][00][00][00][00][00][00][00][00][00][00][00][00][00][00]
[00][00][00][00][00][00][00][00][00][00][00][00][00][00][00][00][00][00]
[00][00][00][00][00][00][00][00][00][00][00][00][00][00][00][00][00][00]
[00][00][00][00][00][00][00][00][00][00][00][00][00][00][00][00][00][00]
[00][00][00][00][00][00][00][00][00][00][00][00][00][00][00][00][00][00]
[00][00][00][00][00][00][00][00][00][00][00][00][00][00][00][00][00][00]
[00][00][00][00][00][00][00][00][00][00][00][00][00][00][00][00][00][00]
[00][00][00][00][00][00][00][00][00][00][00][00][00][00][00][00][00][00]
[00][00][00][00][00][00][00][00][00][00][00][00][00][00][00][00][00][00]
[00][00][00][00][00][00][00][00][00][00][00][00][00][00][00][00][00][00]
[00][00][00][00][00][00][00][00][00][00][00][00][00][00][00][00][00][00]
[00][00][00][2:00]
[00][00][00][00][00][00][00][00][00][00][00][00][00][00][00][00][00][00]
[00][00][00][00][00][00][00][00][00][00][00][00][00][00][00][00][00][00]
[00][00][00][00][00][00][00][00][00][00][00][00][00][00][00][00][00][00]
[00][00][00][00][00][00][00][00][00][00][00][00][00][00][00][00][00][00]
[00][00][00][00][00][00][00][00][00][00][00][00][00][00][00][00][00][00]
[00][00][00][00][00][00][00][00][00][00][00][00][00][00][00][00][00][00]
[00][00][00][00][00][00][00][00][00][00][00][00][00][00][00][00][00][00]
[00][00][00][00][00][00][00][00][00][00][00][00][00][00][00][00][00][00]
[00][00][00][00][00][00][00][00][00][00][00][00][00][00][00][00][00][00]
[00][00][00][00][00][00][00][00][00][00][00][00][00][00][00][00][00][00]
[00][00][00][00][00][00][00][00][00][00][00][00][00][00][00][00][00][00]
[00][00][00][00][00][00][4:00]
[00][00][00][00][00][00][00][00][00][00][00][00][00][00][00][00][00][00]
[00][00][00][00][00][00][00][00][00][00][00][00][00][00][00][00][00][00]
[00][00][00][00][00][00][00][00][00][00][00][00][00][00][00][00][00][00]
[00][00][00][00][00][00][00][00][00][00][00][00][00][00][00][00][00][00]
[00][00][00][00][00][00][00][00][00][00][00][00][00][00][00][00][00][00]
[00][00][00][00][00][00][00][00][00][00][00][00][00][00][00][00][00][00]
[00][00][00][00][00][00][00][00][00][00][00][00][00][00][00][00][00][00]
[00][00][00][00][00][00][00][00][00][00][00][00][00][00][00][00][00][00]
[00][00][00][00][00][00][00][00][00][00][00][00][00][00][00][00][00][00]
[00][00][00][00][00][00][00][00][00][00][00][00][00][00][00][00][00][00]
[00][00][00][00][00][00][00][00][00][00][00][00][00][00][00][00][00][00]
[00][00][00][00][00][00][00][00][00][00][00][00][00][00][00][00][00][00]
[00][00][00][00][00][00][00][00][00][00][00][00][00][00]   7.23 A-V:  
0.015 s:0.0 aq=  320KB vq=[00][00][00][00][00][00][00][00][00][00][00]
[00][00][00][00][00][00][00][00][00][00][00][00][00][00][00][00][00][00]
[00][00][00][00][00][00][00][00][00][00][00][00][00][00][00][00][00][00]
[00][00][00][00][00][00][00][00][00][00][00][00][00][00][00][00][00][00]
[00][00][00][00][00][00][00][00][00][00][00][00][00][00][00][00][00][00]
[00][00][00][00][00][00][00][00][00][00][00][00][00][00][00][00][00][00]
[00][00][00][00][00][00][00][00][00][00][00][00][00][00][00][00][00][00]
[00][00][00][00][00][00][00][00][00][00][00][00][00][00][00][00][00][00]
[00][00][00][00][00][00][00][00][00][00][00][00][00][00][00][00][00][00]
[00][00][00][00][00][00][00][00][00][00][00][00][00][00][00][00][00][00]
[00][00][00][00][00][00][00][00][00][00][00][00][00][00][00][00][00][00]
[00][00][00][00][00][00][00][00][00][00][00][00][00][00][00][00][00][00]
[00][00][00][00][00][00][00][00][00][00][00][00][00][00][00][00][00][00]
[00][00][00][00][00][00][00][00][00][00][00][00][00][00][00][00][00][00]
[00][00][00][00][00][00][00][00][00][00][00][00][00][00][00][00][00][00]
[00][00][00][00][00][00][00][00][00][00][00][00][00][00][00][00][00][00]
[00][00][00][00][00][00][00][00][00][00][00][00][00][00][00][00][00][00]
[00][00][00][00][00][00][00][00][00][00][00][00][00][00][00][00][00][00]
[00][00][00][00][00][00][00][00][00][00][00][00][00][00][00][00][00][00]

[issue1912] WMAPro-in-WMAVoice support not implemented

2010-12-27 Thread Carl Eugen Hoyos

Carl Eugen Hoyos ceho...@rainbow.studorg.tuwien.ac.at added the comment:

Sorry, this was the best file afair (all others only showed the upload message
at the start, iirc).


FFmpeg issue tracker iss...@roundup.ffmpeg.org
https://roundup.ffmpeg.org/issue1912



[issue1912] WMAPro-in-WMAVoice support not implemented

2010-12-26 Thread Ronald S. Bultje

Ronald S. Bultje rsbul...@gmail.com added the comment:

Attached patch does the initialization of proper contexts for support of 
WMAPro-in-WMAVoice. The actual decoding doesn't work yet because the 
call to avcodec_decode_audio() is missing. Init fails though:

[wmapro @ 0x101855200] no length prefix
 If you want to help, upload a sample of this file to 
ftp://upload.ffmpeg.org/MPlayer/incoming/ and contact the ffmpeg-devel 
mailing list.

basically, once done correctly, the proper thing to do is to use 
ff_copy_bits() to re-align, then call the WMAPro decoder, count the 
number of bits read and then go back into the WMAVoice decoder and 
subtract that number of bits (not bytes) off of the bit context. 
Shouldn't be too hard once I know what to do with the WMAPro decoder 
init.


FFmpeg issue tracker iss...@roundup.ffmpeg.org
https://roundup.ffmpeg.org/issue1912
Index: libavcodec/wmavoice.c
===
--- libavcodec/wmavoice.c   (revision 26050)
+++ libavcodec/wmavoice.c   (working copy)
@@ -38,6 +38,7 @@
 #include libavutil/lzo.h
 #include avfft.h
 #include fft.h
+#include wma.h
 
 #define MAX_BLOCKS   8   /// maximum number of blocks per frame
 #define MAX_LSPS 16  /// maximum filter order
@@ -256,7 +257,7 @@
 /**
  * @}
  * @defgroup post_filter Postfilter values
- * Varibales used for postfilter implementation, mostly history for
+ * Variables used for postfilter implementation, mostly history for
  * smoothing and so on, and context variables for FFT/iFFT.
  * @{
  */
@@ -283,7 +284,17 @@
   /// synthesis
 /**
  * @}
+ * @defgroup wmapro_in_wmavoice values for supporting WMAPro-in-WMAVoice
+ * Codec context and related information for WMAPro-in-WMAVoice.
+ * @{
  */
+AVCodecContext *proctx;
+int   pro_samples_per_frame;  /// (default) samples per WMAPro 
(super)frame
+int   pro_spf_nbits;  /// number of bits coding for 
samples-per-frame
+  /// when customly specified in bitstream
+/**
+ * @}
+ */
 } WMAVoiceContext;
 
 /**
@@ -1719,7 +1730,7 @@
 {
 WMAVoiceContext *s = ctx-priv_data;
 GetBitContext *gb = s-gb, s_gb;
-int n, res, n_samples = 480;
+int n, res, n_samples, max_samples, is_speech_frame, spf_nbits, shl;
 double lsps[MAX_FRAMES][MAX_LSPS];
 const double *mean_lsf = s-lsps == 16 ?
 wmavoice_mean_lsf16[s-lsp_def_mode] : 
wmavoice_mean_lsf10[s-lsp_def_mode];
@@ -1741,22 +1752,80 @@
 
 /* First bit is speech/music bit, it differentiates between WMAVoice
  * speech samples (the actual codec) and WMAVoice music samples, which
- * are really WMAPro-in-WMAVoice-superframes. I've never seen those in
- * the wild yet. */
-if (!get_bits1(gb)) {
-av_log_missing_feature(ctx, WMAPro-in-WMAVoice support, 1);
-return -1;
+ * are really WMAPro-in-WMAVoice-superframes. */
+if (!(is_speech_frame = get_bits1(gb))) {
+if (!s-pro_spf_nbits) {
+AVCodec *pro;
+
+s-pro_samples_per_frame = 1  
ff_wma_get_frame_len_bits(ctx-sample_rate,
+  3, 
AV_RL16(ctx-extradata + 14));
+s-pro_spf_nbits = av_log2(s-pro_samples_per_frame  4);
+
+/* open decoder on demand, because 1) it's usually not needed and
+ * 2) it will cause thread locking errors when doing it recursively
+ * from within _init(). */
+if (!(pro = avcodec_find_decoder(CODEC_ID_WMAPRO))) {
+av_log(ctx, AV_LOG_WARNING,
+   WMAPro decoder not found, WMAPro-in-WMAVoice will not 
work\n);
+return -1;
+} else {
+/* init wmapro decoder */
+if (!(s-proctx = avcodec_alloc_context())) {
+av_log(ctx, AV_LOG_ERROR,
+   Failed to allocate WMAPro-in-WMAVoice context\n);
+return AVERROR(ENOMEM);
+}
+if ((res = avcodec_copy_context(s-proctx, ctx))  0) {
+av_log(ctx, AV_LOG_ERROR,
+   Failed to copy WMAVoice to WMAPro context\n);
+av_free(s-proctx-extradata);
+av_freep(s-proctx);
+return res;
+}
+s-proctx-codec_id   = CODEC_ID_WMAPRO;
+s-proctx-extradata_size = 18;
+
+if ((res = avcodec_open(s-proctx, pro))  0) {
+av_log(ctx, AV_LOG_ERROR,
+   Failed to open WMAPro-in-WMAVoice decoder\n);
+av_free(s-proctx-extradata);
+av_freep(s-proctx);
+return res;
+  

[issue1912] WMAPro-in-WMAVoice support not implemented

2010-12-25 Thread Ronald S. Bultje

Ronald S. Bultje rsbul...@gmail.com added the comment:

I can't find any file containing agile on incoming, and issue1912/ does 
not exist...


FFmpeg issue tracker iss...@roundup.ffmpeg.org
https://roundup.ffmpeg.org/issue1912



[issue1912] WMAPro-in-WMAVoice support not implemented

2010-12-25 Thread Carl Eugen Hoyos

Carl Eugen Hoyos ceho...@rainbow.studorg.tuwien.ac.at added the comment:

The file is now in samples/ffmpeg-bugs/roundup/issue1912
You can find such files in http://samples.mplayerhq.hu/allsamples.txt


FFmpeg issue tracker iss...@roundup.ffmpeg.org
https://roundup.ffmpeg.org/issue1912



[issue1912] WMAPro-in-WMAVoice support not implemented

2010-05-02 Thread Carl Eugen Hoyos

New submission from Carl Eugen Hoyos ceho...@rainbow.studorg.tuwien.ac.at:

ffmpeg -i agile.wmv test.wav
FFmpeg version SVN-r23011, Copyright (c) 2000-2010 the FFmpeg developers
  built on May  2 2010 23:59:14 with gcc 4.4.3
  configuration: --cc=/usr/local/gcc-4.4.3/bin/gcc
  libavutil 50.15. 0 / 50.15. 0
  libavcodec52.66. 0 / 52.66. 0
  libavformat   52.62. 0 / 52.62. 0
  libavdevice   52. 2. 0 / 52. 2. 0
  libswscale 0.10. 0 /  0.10. 0

Seems stream 1 codec frame rate differs from container frame rate: 1000.00
(1000/1) - 5.00 (5/1)
Input #0, asf, from '../test/agile.wmv':
  Metadata:
WMFSDKVersion   : 9.00.00.2980
WMFSDKNeeded: 0.0.0.
VBR Peak: 360
IsVBR   : 1
Buffer Average  : 414
  Duration: 01:21:47.49, start: 5.00, bitrate: 11 kb/s
Stream #0.0(eng): Audio: wmavoice, 11025 Hz, 1 channels, flt, 10 kb/s
Stream #0.1(eng): Video: wmv3, yuv420p, 1024x768, 120 kb/s, 5 tbr, 1k tbn,
1k tbc
Output #0, wav, to 'test.wav':
  Metadata:
encoder : Lavf52.62.0
Stream #0.0(eng): Audio: pcm_s16le, 11025 Hz, 1 channels, s16, 176 kb/s
Stream mapping:
  Stream #0.0 - #0.0
Press [q] to stop encoding
Multiple frames in a packet from stream 0
[wmavoice @ 0x111aea0]WMAPro-in-WMAVoice support not implemented. Update your
FFmpeg version to the newest one from SVN. If the problem still occurs, it means
that your file has a feature which has not been implemented.If you want to help,
upload a sample of this file to ftp://upload.ffmpeg.org/MPlayer/incoming/ and
contact the ffmpeg-devel mailing list.
Error while decoding stream #0.0
[wmavoice @ 0x111aea0]WMAPro-in-WMAVoice support not implemented. Update your
FFmpeg version to the newest one from SVN. If the problem still occurs, it means
that your file has a feature which has not been implemented.If you want to help,
upload a sample of this file to ftp://upload.ffmpeg.org/MPlayer/incoming/ and
contact the ffmpeg-devel mailing list.
Error while decoding stream #0.0
[wmavoice @ 0x111aea0]WMAPro-in-WMAVoice support not implemented. Update your
FFmpeg version to the newest one from SVN. If the problem still occurs, it means
that your file has a feature which has not been implemented.If you want to help,
upload a sample of this file to ftp://upload.ffmpeg.org/MPlayer/incoming/ and
contact the ffmpeg-devel mailing list.
Error while decoding stream #0.0
[wmavoice @ 0x111aea0]WMAPro-in-WMAVoice support not implemented. Update your
FFmpeg version to the newest one from SVN. If the problem still occurs, it means
that your file has a feature which has not been implemented.If you want to help,
upload a sample of this file to ftp://upload.ffmpeg.org/MPlayer/incoming/ and
contact the ffmpeg-devel mailing list.
Error while decoding stream #0.0
[wmavoice @ 0x111aea0]WMAPro-in-WMAVoice support not implemented. Update your
FFmpeg version to the newest one from SVN. If the problem still occurs, it means
that your file has a feature which has not been implemented.If you want to help,
upload a sample of this file to ftp://upload.ffmpeg.org/MPlayer/incoming/ and
contact the ffmpeg-devel mailing list.
Error while decoding stream #0.0
[wmavoice @ 0x111aea0]WMAPro-in-WMAVoice support not implemented. Update your
FFmpeg version to the newest one from SVN. If the problem still occurs, it means
that your file has a feature which has not been implemented.If you want to help,
upload a sample of this file to ftp://upload.ffmpeg.org/MPlayer/incoming/ and
contact the ffmpeg-devel mailing list.
Error while decoding stream #0.0
[wmavoice @ 0x111aea0]WMAPro-in-WMAVoice support not implemented. Update your
FFmpeg version to the newest one from SVN. If the problem still occurs, it means
that your file has a feature which has not been implemented.If you want to help,
upload a sample of this file to ftp://upload.ffmpeg.org/MPlayer/incoming/ and
contact the ffmpeg-devel mailing list.
Error while decoding stream #0.0
[wmavoice @ 0x111aea0]WMAPro-in-WMAVoice support not implemented. Update your
FFmpeg version to the newest one from SVN. If the problem still occurs, it means
that your file has a feature which has not been implemented.If you want to help,
upload a sample of this file to ftp://upload.ffmpeg.org/MPlayer/incoming/ and
contact the ffmpeg-devel mailing list.
Error while decoding stream #0.0
[wmavoice @ 0x111aea0]WMAPro-in-WMAVoice support not implemented. Update your
FFmpeg version to the newest one from SVN. If the problem still occurs, it means
that your file has a feature which has not been implemented.If you want to help,
upload a sample of this file to ftp://upload.ffmpeg.org/MPlayer/incoming/ and
contact the ffmpeg-devel mailing list.
Error while decoding stream #0.0
size=8986kB time=417.31 bitrate= 176.4kbits/s
video:0kB audio:8986kB global headers:0kB muxing overhead 0.000478%

--
messages: 10325
priority: normal
status: open
substatus: open
title: WMAPro-in-WMAVoice support not implemented
type: 

[issue1912] WMAPro-in-WMAVoice support not implemented

2010-05-02 Thread Carl Eugen Hoyos

Carl Eugen Hoyos ceho...@rainbow.studorg.tuwien.ac.at added the comment:

Sample uploaded to incoming/issue1912

--
priority: normal - wish


FFmpeg issue tracker iss...@roundup.ffmpeg.org
https://roundup.ffmpeg.org/issue1912