Matthieu Bouron
0ea58059d6
lavc/h264_ps: add ff_h264_ps_uninit and use it
9 years ago
Clément Bœsch
38a2d9aeec
lavc/h264_parser: replace AVCodecContext with logging ctx in scan_mmco_reset()
9 years ago
Clément Bœsch
4fdea02d68
lavc/h264: add a logging ctx to ff_h264_pred_weight_table()
9 years ago
Clément Bœsch
34ec084b84
lavc/h264: move history parsing variable to H264ParseContext
...
This makes h264_find_frame_end() not depend on H264Context anymore.
9 years ago
Clément Bœsch
48ea5433c8
lavc/h264_parser: pass logctx to h264_find_frame_end()
...
This helps removing the H264Context from the H264ParseContext.
9 years ago
Vittorio Giovara
41ed7ab45f
cosmetics: Fix spelling mistakes
...
Signed-off-by: Diego Biurrun <diego@biurrun.de>
9 years ago
Anton Khirnov
72da8d9bb2
h264_parser: remove the remaining dependencies on the h264 decoder
9 years ago
Anton Khirnov
98c97994c5
h264: decouple extradata parsing from the decoder
...
This will allow decoupling the parser from the decoder.
9 years ago
Anton Khirnov
728d90a0c1
h264: decouple h264_sei from the h264 decoder
...
Make the SEI parsing independent of the H264Context, to allow
decoupling the parser from the decoder.
9 years ago
Anton Khirnov
c8dcff0cdb
h264: factor out calculating the POC count into a separate file
...
This will allow decoupling the parser from the decoder.
9 years ago
Anton Khirnov
113aeee6ae
h264_parser: move the H264DSPContext to the parser context
9 years ago
Anton Khirnov
3176217c60
h264: decouple h264_ps from the h264 decoder
...
Make the SPS/PPS parsing independent of the H264Context, to allow
decoupling the parser from the decoder. The change is modelled after the
one done earlier for HEVC.
Move the dequant buffers to the PPS to avoid complex checks whether they
changed and an expensive copy for frame threads.
9 years ago
Anton Khirnov
44d16df413
h264_parser: eliminate H264SliceContext usage
...
It is no longer needed for anything.
9 years ago
Anton Khirnov
a6e27f7add
h264: factor out parsing the reference count into a separate file
...
This will allow decoupling the parser from the decoder.
9 years ago
Anton Khirnov
e9f884416c
h264: move reading direct_spatial_mv_pred out of ff_set_ref_count()
...
It has nothing to do with the reference count and so does not belong in
this function.
9 years ago
Anton Khirnov
8d0cc8ca97
h264_parser: switch to h2645_parse for NAL unescaping
...
Remove now unused ff_h264_decode_nal().
9 years ago
Anton Khirnov
e481458bc3
h264: factor out pred weight table parsing into a separate file
...
This will allow decoupling the parser from the decoder.
9 years ago
Diego Biurrun
a7da517f6a
h264data: Move all data tables from a header to a .c file
9 years ago
Diego Biurrun
02cd8bb9cb
h264: Clean up #includes
9 years ago
Mark Harris
c51c08e0e7
avcodec: Use get_ue_golomb_long() when needed
...
get_ue_golomb() cannot decode values larger than 8190 (the maximum
value that can be golomb encoded in 25 bits) and produces the error
"Invalid UE golomb code" if a larger value is encountered. Use
get_ue_golomb_long() instead (which supports 63 bits, up to 4294967294)
when valid h264/hevc values can exceed 8190.
This updates decoding of the following values: (maximum)
first_mb_in_slice 36863* for level 5.2
abs_diff_pic_num_minus1 131071
difference_of_pic_nums_minus1 131071
idr_pic_id 65535
recovery_frame_cnt 65535
frame_packing_arrangement_id 4294967294
frame_packing_arrangement_repetition_period 16384
display_orientation_repetition_period 16384
An alternative would be to modify get_ue_golomb() to handle encoded
values of up to 49 bits as was done for get_se_golomb() in a92816c
.
In that case get_ue_golomb() could continue to be used for all of
these except frame_packing_arrangement_id.
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
9 years ago
Diego Biurrun
8161220eee
h264_parser: Rename close() to h264_close()
...
At least on AIX it conflicts with the close() libc function from unistd.h.
9 years ago
Michael Niedermayer
bc48c88918
avcodec/h264: Do not fail with randomly truncated VUIs
...
Fixes Ticket4445
Tested-by: Vittorio Giovara <vittorio.giovara@gmail.com>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
10 years ago
Anton Khirnov
5bf3c0fa49
h264: drop the now unused per-slice H264Contexts
10 years ago
Anton Khirnov
3178f4d33f
h264: move rbsp_buffer into the per-slice context
10 years ago
Anton Khirnov
f42485dbce
h264: use a separate GetBitContext for slice data
10 years ago
Anton Khirnov
95eb35f305
h264: move the ref lists variables into the per-slice context
10 years ago
Anton Khirnov
56febc993b
h264: move the slice type variables into the per-slice context
10 years ago
Anton Khirnov
92c6c2a605
h264: split weighted pred-related vars into per-slice context
10 years ago
Anton Khirnov
31d2039cb4
h264_parser: export video format and dimensions
10 years ago
Zhaoxiu Zeng
2a72b1664d
avcodec/h264: use avpriv_find_start_code() in h264_split()
...
This also allows replacing several literal numbers by named constants
And it should be faster, the function is not speed relevant though as it is
generally only called a few times at the streams start.
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
10 years ago
Michael Niedermayer
ccaa5dcb31
avcodec/h264_parser: Rename close()
...
This avoids a potential conflict with the equally named function for closing files
It also could reduce confusion in debugger backtraces
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
10 years ago
Anton Khirnov
58ae8d5957
h264_parser: restore a comment lost in 0268a54
10 years ago
Anton Khirnov
9404a47a2d
h264: move parser-only variables to their own context
10 years ago
Michael Niedermayer
9d6ad68fa4
avcodec/h264_parser: Avoid adding SEI to the global header
...
Only consider SEI when no PPS has been found yet
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
10 years ago
John Stebbins
1b66726906
h264_parser: don't stop on SPS_EXT in split
...
Add SPS_EXT, SEI, and subset SPS to codes that are skipped during split.
These codes can come before the PPS and results in incomplete extradata.
10 years ago
Michael Niedermayer
fc8d59fa6f
avcodec/h264_parser: Use av_freep() to avoid leaving stale pointers
...
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
10 years ago
Michael Niedermayer
69a9a90d2e
avcodec/h264_parser: rewrite the parse_nal_units() loop logic based on h264.c
...
Fixes Ticket4011
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
10 years ago
Michael Niedermayer
09450c5509
avcodec/h264: fix time_base and framerate
...
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>
10 years ago
Gabriel Dume
f929ab0569
cosmetics: Write NULL pointer equality checks more compactly
...
Signed-off-by: Diego Biurrun <diego@biurrun.de>
11 years ago
Ben Avison
db7f1c7c5a
h264: Move start code search functions into separate source files.
...
This permits re-use with parsers for codecs which use similar start codes.
Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
11 years ago
Michael Niedermayer
92be540636
avcodec/h264_parser: remove redundant assignment
...
Found-by: CSA
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
11 years ago
Michael Niedermayer
0782fb6bcb
libavcodec/h264_parser: Increase parse_history, fix huge resolutions
...
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
11 years ago
Vittorio Giovara
e0c16e4e32
mpegvideo: move mpegvideo formats-related defines to mpegutils.h
11 years ago
Vittorio Giovara
dc971acf4a
h264_parser: use enum values in h264_find_frame_end()
11 years ago
Vittorio Giovara
73e8fab31d
h264: print values in case of error
...
Also make error style consistent and drop redundant information.
11 years ago
Michael Niedermayer
e0b2bdd37a
avcodec/h264_parser: heuristically detect non marked keyframes
...
Fixes Ticket3083
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
11 years ago
Yusuke Nakamura
103d073dd7
h264_parser: Use ff_h264_reset_sei()
...
Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
11 years ago
Michael Niedermayer
19f5384000
h264_parser: Fix order of operations
...
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
11 years ago
Michael Niedermayer
9c0fe487c7
avcodec/h264_parser: fix order of operations
...
Fixes CID1108576
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
11 years ago
Yusuke Nakamura
4baba6c813
h264_parser: Fix POC parsing for the case where MMCO_RESET is present.
...
Signed-off-by: Anton Khirnov <anton@khirnov.net>
11 years ago