They are not just inverses of each other.
This should restore behavior to before the introduction of framerate
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
When decoding, this field holds the inverse of the framerate that can be
written in the headers for some codecs. Using a field called 'time_base'
for this is very misleading, as there are no timestamps associated with
it. Furthermore, this field is used for a very different purpose during
encoding.
Add a new field, called 'framerate', to replace the use of time_base for
decoding.
Also move the declaration to internal.h, and add restrict qualifiers
to the declaration (as in the implementation).
Signed-off-by: Martin Storsjö <martin@martin.st>
In ISO/IEC 13818-2, bit rate is differently determined according to video type
1) MPEG1 Video
Bit_rate and vbv_delay are set to 3FFFF and FFFF respectively
to indicate variable bitrate. Other values are for constant bitrate.
VBV is only defined for constant bit rate operation.
Ths STD supersedes the VBV model for vbr.
2) MPEG2 Video
Even if the bitrate is constant, the value of bit_rate may not be the actual bitrate
since bit_rate need only be an upper bound to that actual bitrate.
VBV is only defined for variable bit rate operation.
Constant bit rate is viewed as a special case of vbr.
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
mpegvideo parser sometime get wrong stream bit rate which is 0x3FFFF*400.
But maximum bit rate of MPEG2 video is up to 80 Mbps in case 1920x1080 resolution.
When bit rate is 0x3FFFF*400, set bit rate zero.
* Problematic link
https://docs.google.com/open?id=0B6r7ZfWFIypCUkhPa0dyTGdFSE0
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
This table doesn't need to be shared with libavformat any longer.
Add mpeg12 to the name to make it less ambiguous, while renaming it.
Signed-off-by: Martin Storsjö <martin@martin.st>
Signed-off-by: Wolfram Gloger <wmglo@dent.med.uni-muenchen.de>
Modify the parser initialization so that parsers can
set pict_type themselves. Use this in the mpegvideo parser
so that initial frames are not unconditionally I frames.
I have had this in my tree for several years.
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
In most places where it's used, it's as a pointless write-only field.
Only rv10 decoder actually reads from it, but it stores some internal
version info in it. There is no reason for it to be in a public field.
None of these symbols should be accessed directly, so declare them as
hidden.
Signed-off-by: Mans Rullgard <mans@mansr.com>
(cherry picked from commit d36beb3f69)
r12684 | michael | 2008-04-04 02:43:34 +0200 (Fri, 04 Apr 2008) | 2 lines
Disable the split function. This should end the mpeg1/2 global header issues.
The split function is essential for -ss to work
Fixes issue1226
If this breaks something please tell me, also if someoen remembers what problem
this originally caused tell me too, i searched but couldnt find it.
Originally committed as revision 21621 to svn://svn.ffmpeg.org/ffmpeg/trunk
of calling it at the end of a frame with a large negative offset.
This significantly reduces the maximal distance in container packets between
the point where the first byte of the "access unit" was stored and where
we call ff_fetch_timestamp() thus reducing the constraints on our parser.
Also change the parser from next_frame_offset to cur, this is needed
because now the reference is from container packet start instead of
frame start. (i previously misinterpreted this as bug)
Originally committed as revision 17731 to svn://svn.ffmpeg.org/ffmpeg/trunk
contains the first picture startcode that commences in the PES
packet, instead of the first access unit that commences in the
PES packet. Fix the parser to
handle that properly. This was a very long standing bug ...
The change to the seek regressions is because the mpeg ts muxer
stores too many invalid and randomized timestamps which overflow
the 4 entry buffer we use in the parser.
Originally committed as revision 13643 to svn://svn.ffmpeg.org/ffmpeg/trunk
Log:
Make timestamp interpolation work with mpeg2 field pictures.
Cleaner/simpler solutions are welcome.
----
A IMHO cleaner solution has been implemented.
Originally committed as revision 12162 to svn://svn.ffmpeg.org/ffmpeg/trunk