Re: [Libav-user] Force low-delay handling? question + feature suggestion

2011-11-24 Thread Carl Eugen Hoyos
Camera Man i.like.privacy.too@... writes:

 would it work to patch ff_h264_decode_init() and decode_postinit() to also
 check the AV_DISCARD mode, and if we are discarding B and/or nonref frames,
 would set avctx-has_b_frames=0 and low_delay=1 ?

I don't know but I suggest that you write such a patch (optionally test it on
streams with B-frames) and post it on ffmpeg-devel where it can be discussed.

Carl Eugen

PS: Your mail is nearly unreadable here. In case you are sending HTML-mails:
Please don't do that.

___
Libav-user mailing list
Libav-user@ffmpeg.org
http://ffmpeg.org/mailman/listinfo/libav-user


Re: [Libav-user] Unable to compile i386 compatible ffmpeg dylibs on Mac OS X

2011-11-24 Thread Carl Eugen Hoyos
Simon Daniels simondaniels23@... writes:

 Thanks guys but omitting -fomit-frame-pointer in the last gcc call or
 replacing it with -fno-omit-frame-pointer resulted in the same error
 (trying both gcc and clang).

[...]

 make V=1 of clang is:
 clang -m32 -I. -I/Users/user/Downloads/ffmpeg-0.8.7 -D_ISOC99_SOURCE
 -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -DPIC -DHAVE_AV_CONFIG_H
 -std=c99 -mdynamic-no-pic -fomit-frame-pointer -fPIC -g
 -Wdeclaration-after-statement -Wall -Wno-parentheses -Wno-switch
 -Wdisabled-optimization -Wpointer-arith -Wredundant-decls
 -Wno-pointer-sign -Wcast-qual -Wwrite-strings -Wtype-limits -Wundef
 -Wmissing-prototypes -Wno-pointer-to-int-cast -O3 -fno-math-errno
 -fno-signed-zeros -mllvm -stack-alignment=16 -Qunused-arguments  -MMD
 -c -o libavcodec/h264_cabac.o libavcodec/h264_cabac.c

This does not look as if you omitted -fomit-frame-pointer or replaced it with
-fno-omit-frame-pointer ;-(

Please:
Configure with one of the mentioned configure lines (either gcc or clang, it is
possible that one of them fails at another point in the compilation, to save
time you can test this preliminary with configure --disable-decoder=h264)

Run make (it fails)

Run make V=1

Copy everything from gcc/clang to libavcodec/h264_cabac.c and paste it
into your shell. Add -fno-omit-frame-pointer to the end (this should be
sufficient since iirc later compiling options overwrite earlier ones) / remove
-fomit-frame-pointer from the pasted command (this may actually not work because
I believe -O3 implies -fomit-frame-pointer) / replace -fomit-frame-pointer with
-fno-omit-frame-pointer. Press enter. If the compilation does not succeed,
report back, there are other things you can try.

Run make.

Carl Eugen

PS: Please use current git head, the releases are only for distributors, and I
suspect you are a user.

___
Libav-user mailing list
Libav-user@ffmpeg.org
http://ffmpeg.org/mailman/listinfo/libav-user


[Libav-user] Creating a standard MP4 file using exisiting H264 Elementary stream

2011-11-24 Thread Shachar Arieli
Hi,

I have an application which is required to create a video file (only video no 
audio) which is readable by the Microsoft media player (latest version). 
The video data is pre encoded (received from a hardware encoder) H264 
Elementary stream. 
Currently I have a version that is able to create an AVI wrapper around that 
stream and save it to file. The file is readable by media player.
When I change the format passed into av_guess_format function from avi to 
mp4 the file is still created but now it is only readable by VLC and is no 
longer playable using media player.

Can anyone advice why is the MP4 file created is no longer compatible with the 
windows media player?

Thanks,
Shachar
___
Libav-user mailing list
Libav-user@ffmpeg.org
http://ffmpeg.org/mailman/listinfo/libav-user


Re: [Libav-user] Force low-delay handling? question + feature suggestion

2011-11-24 Thread Alex Cohn
On Thu, Nov 24, 2011 at 12:06, Carl Eugen Hoyos ceho...@ag.or.at wrote:
 Camera Man i.like.privacy.too@... writes:

 would it work to patch ff_h264_decode_init() and decode_postinit() to also
 check the AV_DISCARD mode, and if we are discarding B and/or nonref frames,
 would set avctx-has_b_frames=0 and low_delay=1 ?

 I don't know but I suggest that you write such a patch (optionally test it on
 streams with B-frames) and post it on ffmpeg-devel where it can be discussed.

Maybe I am missing something, but if you discard B frames you may have
problems with the P frames that follow (and that until you get the
next I frame). Also, note that the codecs check
avctx-skip_loop_filter not as bitfield, but priority. Thus,
AVDISCARD_BIDIR means also AVDISCARD_NONREF, which is probably not
what you want.

I believe that the correct way to fix is to modify SPS/PPS, because
these are simply wrong in your case.

BR,
Alex Cohn
___
Libav-user mailing list
Libav-user@ffmpeg.org
http://ffmpeg.org/mailman/listinfo/libav-user


Re: [Libav-user] Unable to compile i386 compatible ffmpeg dylibs on Mac OS X

2011-11-24 Thread Simon Daniels
Hi Carl,

Apologies - I had tried without -fomit-frame-pointer and replacing it
with -fno-omit-frame-pointer but that wasn't what I pasted in the
email. I'll be more detailed this time.

Here's what I did this time. I'm sticking to ffmpeg-0.8.7 because I am
a distributor.

1. Ran ./configure --cc=gcc -m32 --disable-decoder=h264

2. Ran make. Resulted in:
CC  libavcodec/h264_cabac.o
cc1: error in backend: Ran out of registers during register allocation!
make: *** [libavcodec/h264_cabac.o] Error 1

3. Ran make V=1. Resulted in:
gcc -m32 -I. -I/Users/user/Downloads/ffmpeg-0.8.7 -D_ISOC99_SOURCE
-D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -DHAVE_AV_CONFIG_H -std=c99
-mdynamic-no-pic -fomit-frame-pointer -g -Wdeclaration-after-statement
-Wall -Wno-parentheses -Wno-switch -Wdisabled-optimization
-Wpointer-arith -Wredundant-decls -Wno-pointer-sign -Wcast-qual
-Wwrite-strings -Wundef -Wmissing-prototypes -Wno-pointer-to-int-cast
-O3 -fno-math-errno -mllvm -stack-alignment=16  -MMD -MF
libavcodec/h264_cabac.d -MT libavcodec/h264_cabac.o -c -o
libavcodec/h264_cabac.o libavcodec/h264_cabac.c
cc1: error in backend: Ran out of registers during register allocation!
make: *** [libavcodec/h264_cabac.o] Error 1

4. Added -fno-omit-frame-pointer to end and ran gcc -m32 -I.
-I/Users/user/Downloads/ffmpeg-0.8.7 -D_ISOC99_SOURCE
-D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -DHAVE_AV_CONFIG_H -std=c99
-mdynamic-no-pic -fomit-frame-pointer -g -Wdeclaration-after-statement
-Wall -Wno-parentheses -Wno-switch -Wdisabled-optimization
-Wpointer-arith -Wredundant-decls -Wno-pointer-sign -Wcast-qual
-Wwrite-strings -Wundef -Wmissing-prototypes -Wno-pointer-to-int-cast
-O3 -fno-math-errno -mllvm -stack-alignment=16  -MMD -MF
libavcodec/h264_cabac.d -MT libavcodec/h264_cabac.o -c -o
libavcodec/h264_cabac.o -fno-omit-frame-pointer
libavcodec/h264_cabac.c

Resulted in:
cc1: error in backend: Ran out of registers during register allocation!

5. Tried removing -fomit-frame-pointer from original command and ran
gcc -m32 -I. -I/Users/user/Downloads/ffmpeg-0.8.7 -D_ISOC99_SOURCE
-D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -DHAVE_AV_CONFIG_H -std=c99
-mdynamic-no-pic -g -Wdeclaration-after-statement -Wall
-Wno-parentheses -Wno-switch -Wdisabled-optimization -Wpointer-arith
-Wredundant-decls -Wno-pointer-sign -Wcast-qual -Wwrite-strings
-Wundef -Wmissing-prototypes -Wno-pointer-to-int-cast -O3
-fno-math-errno -mllvm -stack-alignment=16  -MMD -MF
libavcodec/h264_cabac.d -MT libavcodec/h264_cabac.o -c -o
libavcodec/h264_cabac.o libavcodec/h264_cabac.c

Resulted in:
cc1: error in backend: Ran out of registers during register allocation!

6. Tried replacing -fomit-frame-pointer with -fno-omit-frame-pointer
and ran gcc -m32 -I. -I/Users/user/Downloads/ffmpeg-0.8.7
-D_ISOC99_SOURCE -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE
-DHAVE_AV_CONFIG_H -std=c99 -mdynamic-no-pic -fno-omit-frame-pointer
-g -Wdeclaration-after-statement -Wall -Wno-parentheses -Wno-switch
-Wdisabled-optimization -Wpointer-arith -Wredundant-decls
-Wno-pointer-sign -Wcast-qual -Wwrite-strings -Wundef
-Wmissing-prototypes -Wno-pointer-to-int-cast -O3 -fno-math-errno
-mllvm -stack-alignment=16  -MMD -MF libavcodec/h264_cabac.d -MT
libavcodec/h264_cabac.o -c -o libavcodec/h264_cabac.o
libavcodec/h264_cabac.c

Resulted in:
cc1: error in backend: Ran out of registers during register allocation!

7. I'm repeating steps 1-6 now using clang. Ran ./configure
--cc=clang -m32 --disable-decoder=h264

8. Run make. Resulted in:
CC  libavcodec/h264_cabac.o
fatal error: error in backend: Ran out of registers during register allocation!
Cannot allocate: %vreg6948,inf = [162608u,162612d:0)  0@162608u
Please check your inline asm statement for invalid constraints:
INLINEASM es:movl ${6:a}($5), $2
movl ${7:a}($5), $1
movzbl ($4), $0
mov$2 , $3
and$$0xC0   , $2
movzbl _ff_h264_lps_range($0, $2, 2), $2
sub$2 , $3
mov$3   , %ecx
shl$$17 , $3
sub$1   , $3
sar$$31 , $3
sub%ecx   , $2
and$3   , $2
add%ecx   , $2
shl$$17 , %ecx
and$3   , %ecx
sub%ecx   , $1
xor$3   , $0
movzbl _ff_h264_norm_shift($2), %ecx
shl%cl, $2
movzbl _ff_h264_mlps_state+128($0), $3
mov${3:b}   , ($4)
shl%cl, $1
test   ${1:w}   , ${1:w}
 jnz   1f
mov ${8:a}($5), %ecx
movzwl (%ecx) , $3
bswap  $3
shr$$15 , $3
sub$$0x , $3
add$$2  , %ecx
mov%ecx   , ${8:a}($5)
lea-1($1)   , %ecx
xor$1   , %ecx
shr$$15 , %ecx
movzbl _ff_h264_norm_shift(%ecx), %ecx
neg%ecx
add$$7  , %ecx
shl%cl, $3

Re: [Libav-user] Creating a standard MP4 file using exisiting H264 Elementary stream

2011-11-24 Thread Carl Eugen Hoyos
Shachar Arieli shachara@... writes:

 I have an application which is required to create a video file (only video no
 audio) which is readable by the Microsoft media player (latest version).

Which version?

Carl Eugen

___
Libav-user mailing list
Libav-user@ffmpeg.org
http://ffmpeg.org/mailman/listinfo/libav-user


Re: [Libav-user] Unable to compile i386 compatible ffmpeg dylibs on Mac OS X

2011-11-24 Thread Simon Daniels
Hi Carl,

1. ./configure --cc=gcc -m32 --disable-decoder=h264,svq3
--disable-parser=h264 completed just fine without any errors on 0.8.7.

2. I ran ./configure --cc=gcc-m32 on the current git head and got
the same error as before.

3. Ran last gcc command with O1 and O2 and got same error on current
git head (with -fno-omit-frame-pointer at the end).

4. Repeated #2 and #3 with clang on current git head and got the same errors

Thanks!



On Thu, Nov 24, 2011 at 12:32 PM, Carl Eugen Hoyos ceho...@ag.or.at wrote:
 Simon Daniels simondaniels23@... writes:

 Here's what I did this time. I'm sticking to ffmpeg-0.8.7 because I am
 a distributor.

 Does it work with current git head? If yes, we could backport the change...

 1. Ran ./configure --cc=gcc -m32 --disable-decoder=h264

 Should have been --disable-decoder=h264,svq3 --disable-parser=h264 (sorry for
 not testing myself).

 [...]

 4. Added -fno-omit-frame-pointer to end and ran gcc -m32 -I.
 -I/Users/user/Downloads/ffmpeg-0.8.7 -D_ISOC99_SOURCE
 -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -DHAVE_AV_CONFIG_H -std=c99
 -mdynamic-no-pic -fomit-frame-pointer -g -Wdeclaration-after-statement
 -Wall -Wno-parentheses -Wno-switch -Wdisabled-optimization
 -Wpointer-arith -Wredundant-decls -Wno-pointer-sign -Wcast-qual
 -Wwrite-strings -Wundef -Wmissing-prototypes -Wno-pointer-to-int-cast
 -O3 -fno-math-errno -mllvm -stack-alignment=16  -MMD -MF
 libavcodec/h264_cabac.d -MT libavcodec/h264_cabac.o -c -o
 libavcodec/h264_cabac.o -fno-omit-frame-pointer
 libavcodec/h264_cabac.c

 You can try to replace -O3 with -O2 (or -O1)

 Carl Eugen

 ___
 Libav-user mailing list
 Libav-user@ffmpeg.org
 http://ffmpeg.org/mailman/listinfo/libav-user

___
Libav-user mailing list
Libav-user@ffmpeg.org
http://ffmpeg.org/mailman/listinfo/libav-user