avplay: Accept cpuflags option

Quite useful for debugging.

Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
h264_parser: Fix order of operations

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
h264_parser: Use ff_h264_reset_sei()

Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
vf_fieldorder: log when processing is skipped

Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
fate: add fieldorder filter test

Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
wip: extended logging
avplay: Support selecting codecs

Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
lavc: Add private API to manipulate AVPacketList
lavf: use ff_packet_list API
lavc: introduce CODEC_CAP_PKT_TS

Codecs with internal parallelism need to set the pkt_pts/pkt_dts
by themselves.
wip: qsv decoders

Originally written by Luca Barbato <lu_zero@gentoo.org>.
Further contributions by Yukinori Yamazoe <drocon11@gmail.com>.

qsv: Smaller fixes
qsv: Flush cached frames when EOF

Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
qsv: Add behavior when device busy

Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
qsv: Add behavior when PicStruct is tripling and doubling

Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
qsv: Change to dynamic surface allocate

Changed to dynamic surface allocate in get_surface(), because number of surfaces may be insufficient when it is a fixed value.
And reduced number of memcpy when output frame.

Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
qsv: Change to dynamic timestamps allocate

Change to dynamic timestamps allocate, because the number of timestamps may be insufficient when it is a fixed value.
The number of timestamps depends on the number of packets required before outputting the frame, and the number to be reserved for frame reordering.
The number of packets which QSV decoder needs cannot be guessed before starting to output first frame, because it depends on the video stream.
The number to be reserved for frame reordering from H.264 specification is 32.
(Max B frame) * (Max picture per frame) = 16 * 2 = 32 (1 picture = 1 packet)
After first frame is output, the number of timestamps can be determined.

In the following cases, the value is changed.
1. If the number of timestamps is insufficient, it is increased until first frame is output.
2. Add 32 to the number of timestamps in use after first frame is output.

Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
qsv: Support video parameter changed

Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
qsv: Add AVOption async_depth

Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
qsv: Add MPEG-2 video decoding support

Signed-off-by: Luca Barbato <lu_zero@gentoo.org>