Commit Graph

36030 Commits

Author SHA1 Message Date
Hendrik Leppkes
83a940e7fb h2645_parse: don't overread AnnexB NALs within an avc stream
We know the maximum size of an AnnexB NAL, signaling it as the maximum
NAL size allows ff_h2645_extract_rbsp to determine the correct size.
2016-07-08 15:20:20 +02:00
Hendrik Leppkes
c3e9b098e1 h2645_parse: only read avc length code at the correct position
Reading it from any other position would result in a wrong size being
read, instead fallback to the re-sync mechanic in the else clause.
2016-07-08 15:20:16 +02:00
Michael Niedermayer
b450b82514 avcodec/exr: Fix mixed declarations and statements
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2016-07-07 14:53:01 +02:00
Martin Vignali
50747d6b1f libavcodec/exr : indent gray support patch
Reviewed-by: Paul B Mahol <onemda@gmail.com>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2016-07-06 23:53:28 +02:00
Martin Vignali
7ebd13fc8b libavodec/exr : add support for Y and YA file (ticket #5621)
a gray channel in exr, is named Y
we admit that the file need to be interpreted as gray
only if no other channel match (except alpha)

to manage RGB and Y in the color conversion part of decode_block,
the color processing is now made with a for loop.

Reviewed-by: Paul B Mahol <onemda@gmail.com>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2016-07-06 23:52:49 +02:00
Carl Eugen Hoyos
3e4357eb82 lavc/libx265: Support gray encoding.
Gray encoding crashes with libx265 <= 84, so check the library version.
2016-07-06 18:56:19 +02:00
Matthieu Bouron
88d9c30cf5 lavc/mediacodecdec_h264: properly convert extradata to annex-b
H264ParamSets has its SPS/PPS stored raw (SODB) and needs to be
converted to NAL units before sending them to MediaCodec.

This patch adds the missing convertion of the SPS/PPS from SOBP to RBSP
which makes the resulting NAL units correct.

Fixes codec initialization on Nexus 4 and Nexus 7.
2016-07-06 15:10:16 +02:00
Michael Niedermayer
55ef890b29 avcodec/iff: Print error for cols/bpp/bytes being bad in decode_delta_j()
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2016-07-06 11:20:41 +02:00
Michael Niedermayer
fcdbbbd85a avcodec/iff: decode_delta_j: Check that the number of bytes that will be read are available
This should avoid long loops
related to CID1361958

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2016-07-06 11:19:41 +02:00
Carl Eugen Hoyos
420ba222c6 lavc/mjpeg_parser: Allow jpegls parsing.
Fixes ticket #5691.
2016-07-05 23:48:22 +02:00
James Almer
645489cf90 x86/dcadsp: optimize lfe_fir0_float_fma3 on x86_32
About 10% faster.

Signed-off-by: James Almer <jamrial@gmail.com>
2016-07-05 17:48:20 -03:00
James Almer
293484fa5e avcodec: add missing xmm/neon clobber test wrappers for the new decode API
Reviewed-by: Ronald S. Bultje <rsbultje@gmail.com>
Signed-off-by: James Almer <jamrial@gmail.com>
2016-07-03 18:04:30 -03:00
Clément Bœsch
64c619369b lavc/h264_slice: use sps directly when checking for invalid 8x8 inference 2016-07-03 15:11:40 +02:00
Michael Graczyk
37941878f1 libopusenc: Add channel mapping family argument
The default value of -1 indicates that ffmpeg should determine the channel
mapping automatically, which was the behavior before this commit.

Unless the -mapping_family argument is provided, behavior is unchanged.

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2016-07-02 23:31:16 +02:00
Michael Graczyk
a1e3c7cf0f libopusenc: Refactor to simplify forthcoming mapping_family parameter
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2016-07-02 23:31:10 +02:00
Michael Niedermayer
febc862b53 avcodec/h264_parser: Set sps/pps_ref
Fixes use of freed memory
Should fix valgrind failures of fate-h264-skip-nointra

Found-by: logan
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2016-07-02 03:07:23 +02:00
James Almer
77eb05a2f1 avcodec/h264_slice: Only call ff_h264_flush_change() on initialized contexts
Changed by committer to ensure context_initialized is reset
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2016-07-01 21:39:09 +02:00
Clément Bœsch
5565e27111 Merge commit '6e92181bf836f48627a4733b6fd240a99fd36365'
* commit '6e92181bf836f48627a4733b6fd240a99fd36365':
  h264: pass just the PPS to get_chroma_qp()

Merged-by: Clément Bœsch <clement@stupeflix.com>
2016-07-01 14:23:38 +02:00
Clément Bœsch
2021326f99 Merge commit 'd1f539c97e04e7cebecaf6916c5064f243d39fcf'
* commit 'd1f539c97e04e7cebecaf6916c5064f243d39fcf':
  h264: merge the two reinit blocks in slice_header_parse()

Merged-by: Clément Bœsch <clement@stupeflix.com>
2016-07-01 14:19:09 +02:00
Clément Bœsch
99b37f53a1 Merge commit '3fba16ecd978d5bed338b8da643c3435e62b3437'
* commit '3fba16ecd978d5bed338b8da643c3435e62b3437':
  h264: factor starting a new field out of parsing the slice header

Merged-by: Clément Bœsch <clement@stupeflix.com>
2016-07-01 14:02:00 +02:00
Martin Vignali
d9e1e08133 libavcodec/exr : fix decoding piz float file.
fix ticket #5674

the size of data to process in piz_uncompress, is now calc
using the pixel type of each channel.

the data reorganization, alos take care about the size of
each channel

Reviewed-by: Paul B Mahol <onemda@gmail.com>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2016-06-30 12:16:52 +02:00
Clément Bœsch
f48aea66dd Merge commit 'bec993381cfec72051b0d9f12ac9d9bb9c750983'
* commit 'bec993381cfec72051b0d9f12ac9d9bb9c750983':
  h264: postpone generating the implicit MMCOs

Merged-by: Clément Bœsch <clement@stupeflix.com>
2016-06-30 10:24:03 +02:00
Clément Bœsch
d407e76c42 Merge commit '2d410ebbaa1e760d6837cb434a6d1d4c3c6f0d85'
* commit '2d410ebbaa1e760d6837cb434a6d1d4c3c6f0d85':
  h264: decode the MMCOs into per-slice contexts

Merged-by: Clément Bœsch <clement@stupeflix.com>
2016-06-30 10:15:51 +02:00
Benoit Fouet
879330c561 h264: make H264ParamSets sps const 2016-06-30 09:24:39 +02:00
Benoit Fouet
4cc1ce4a91 h264: straighten dimensions check ff_h264_decode_seq_parameter_set
The MBS only flag was not taken into account when checking macroblock dimensions.
Also removes the unneeded check in init_dimensions for slices.
2016-06-30 09:24:39 +02:00
Benoit Fouet
3e8cda1eb1 h264_ps: change decode_scaling_matrices so that it takes const {s,p}ps
In order to be able to make SPS const in H264ParamSets,
modify decode_scaling_matrices so that it returns if the scaling
matrix are present in the SPS, instead of altering the input SPS
structure.
2016-06-30 09:24:39 +02:00
Clément Bœsch
57d30fde9e Merge commit '39ab2ea53121b9976a619cd545fbd3464b908696'
* commit '39ab2ea53121b9976a619cd545fbd3464b908696':
  h264: rename mmco_index to nb_mmco

Merged-by: Clément Bœsch <u@pkh.me>
2016-06-29 20:07:52 +02:00
Clément Bœsch
c28aecc56a Merge commit '7ab5d577a9affe3397c08b032f983f9bf7101865'
* commit '7ab5d577a9affe3397c08b032f983f9bf7101865':
  h264: move initializing the slice start out of h264_slice_header_parse()

Merged-by: Clément Bœsch <u@pkh.me>
2016-06-29 20:04:23 +02:00
Clément Bœsch
4890b0851c Merge commit '4cec43a9eeb58eb9e581a2d9d25f78e5bfbb0960'
* commit '4cec43a9eeb58eb9e581a2d9d25f78e5bfbb0960':
  h264: move calculating the POC out of h264_slice_header_parse()

Merged-by: Clément Bœsch <clement@stupeflix.com>
2016-06-29 17:59:57 +02:00
Clément Bœsch
9ab6f01839 Merge commit '6dd996c7c81575a1e4969987ab175a6df7beab3d'
* commit '6dd996c7c81575a1e4969987ab175a6df7beab3d':
  h264: move building the reference list out of h264_slice_header_parse()

Merged-by: Clément Bœsch <clement@stupeflix.com>
2016-06-29 17:42:06 +02:00
Clément Bœsch
3b95452ca8 Merge commit '0bad254300356005af4aef00a706bf2e8eee96bc'
* commit '0bad254300356005af4aef00a706bf2e8eee96bc':
  h264: move initing the implicit pred weight table out of h264_slice_header_parse()

Merged-by: Clément Bœsch <clement@stupeflix.com>
2016-06-29 17:39:33 +02:00
Clément Bœsch
2aff557c6a Merge commit 'ed9a20ebe4a89de119ea97bdccf688ece8c6648c' into merge-libav-new
* commit 'ed9a20ebe4a89de119ea97bdccf688ece8c6648c':
  h264: split reading the ref list modifications and actually building the ref list

ref_modifications.val are read as u32 instead of u8 in FFmpeg.

Merged-by: Clément Bœsch <clement@stupeflix.com>
2016-06-29 17:32:05 +02:00
Clément Bœsch
a2901472fe lavc/h264_slice: properly forward positive "error" code
Fixes ./ffmpeg -skip_frame nokey -i h264/h264_intra_first-small.ts

Regression since c54e2740e1
2016-06-29 16:16:26 +02:00
Clément Bœsch
cdecb39fca Merge commit 'fa57059079190242517701120cfdccad93c866da'
* commit 'fa57059079190242517701120cfdccad93c866da':
  h264: move initialising the implicit pred weight table for MBAFF

Merged-by: Clément Bœsch <clement@stupeflix.com>
2016-06-29 15:29:38 +02:00
Clément Bœsch
527a579327 Merge commit '7b50d60442af8d9527e9da46818011fe15a5265a'
* commit '7b50d60442af8d9527e9da46818011fe15a5265a':
  h264: call ff_h264_fill_mbaff_ref_list() when constructing the normal ref list

Merged-by: Clément Bœsch <clement@stupeflix.com>
2016-06-29 15:17:16 +02:00
Clément Bœsch
d7a2451688 Merge commit 'b16e9b9ac9db449cae2242767dd3c3fc309357c4'
* commit 'b16e9b9ac9db449cae2242767dd3c3fc309357c4':
  h264: move initialising the explicit pred weight table for MBAFF

Merged-by: Clément Bœsch <clement@stupeflix.com>
2016-06-29 15:03:12 +02:00
Clément Bœsch
3c5a3882f9 Merge commit '77a1e2c5f8f8250dfacff24b993eb473260ed13e'
* commit '77a1e2c5f8f8250dfacff24b993eb473260ed13e':
  h264: move direct mode inits out of h264_slice_header_parse()

Merged-by: Clément Bœsch <clement@stupeflix.com>
2016-06-29 14:58:31 +02:00
Clément Bœsch
c54e2740e1 Merge commit 'd06e4d8aab9c679b6aea2591d2a9b382df9e5f74'
* commit 'd06e4d8aab9c679b6aea2591d2a9b382df9e5f74':
  h264: start splitting decode_slice_header()

Merged-by: Clément Bœsch <clement@stupeflix.com>
2016-06-29 14:55:02 +02:00
Michael Niedermayer
0c50f6905f avcodec/h264: Remove au_pps_id
This should not be needed anymore and simplifies the next merge

Requested-by: Clément Bœsch <u@pkh.me>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2016-06-29 14:49:15 +02:00
Michael Niedermayer
e6e8750e94 avcodec/h264: Remove current_sps_id
This should not be needed anymore and simplifies the next merge

Requested-by: Clément Bœsch <u@pkh.me>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2016-06-29 14:49:15 +02:00
Clément Bœsch
6c841e03ce Merge commit '2940e196c5e439d9869f8c02a49a318d0847453c'
* commit '2940e196c5e439d9869f8c02a49a318d0847453c':
  vaapi_h265: cu_qp_delta should not be used in constant-QP mode

Merged-by: Clément Bœsch <clement@stupeflix.com>
2016-06-29 12:03:47 +02:00
Clément Bœsch
4b90413cb2 Merge commit '02fa1ad9266f9b1ea11565ac2f93f45853e351e8'
* commit '02fa1ad9266f9b1ea11565ac2f93f45853e351e8':
  vaapi_h264: Add source version identifier as unregistered SEI

Merged-by: Clément Bœsch <clement@stupeflix.com>
2016-06-29 12:03:40 +02:00
Clément Bœsch
cc3de390b7 Merge commit '48e2967cd50c2e1a2a539fd697d20ead2c5c4cc8'
* commit '48e2967cd50c2e1a2a539fd697d20ead2c5c4cc8':
  vaapi_h264: Add support for SEI messages

Merged-by: Clément Bœsch <clement@stupeflix.com>
2016-06-29 12:03:28 +02:00
Clément Bœsch
19fe328f12 Merge commit '19d7667a81499d4357ec8e0851701e17c238e584'
* commit '19d7667a81499d4357ec8e0851701e17c238e584':
  vaapi_encode: Add support for writing arbitrary additional packed headers

Merged-by: Clément Bœsch <clement@stupeflix.com>
2016-06-29 12:03:20 +02:00
Clément Bœsch
3e71e34333 Merge commit '081961f819c0b16c7a860d7da7d39f1fd91bd2f0'
* commit '081961f819c0b16c7a860d7da7d39f1fd91bd2f0':
  vaapi_h264: Add support for VUI parameters

Merged-by: Clément Bœsch <clement@stupeflix.com>
2016-06-29 12:03:06 +02:00
Clément Bœsch
fc0eafb7f8 Merge commit '2e4a7bd553ec7c805b4a3b90733405a14ba69072'
* commit '2e4a7bd553ec7c805b4a3b90733405a14ba69072':
  h264: drop unused H264Context.gb

Merged-by: Clément Bœsch <clement@stupeflix.com>
2016-06-29 11:56:57 +02:00
Clément Bœsch
bef74ef367 Merge commit '4f81f8dba735c212efae077c4fec8ad4fe53b352'
* commit '4f81f8dba735c212efae077c4fec8ad4fe53b352':
  Drop unnecessary golomb.h #includes

Merged-by: Clément Bœsch <clement@stupeflix.com>
2016-06-29 11:54:54 +02:00
Clément Bœsch
4b9574b275 Merge commit '197ae68e78784524a7ccf97a3c301092715305d3'
* commit '197ae68e78784524a7ccf97a3c301092715305d3':
  Drop unnecessary unary.h #includes

Merged-by: Clément Bœsch <clement@stupeflix.com>
2016-06-29 11:52:34 +02:00
Clément Bœsch
bf7d016219 Merge commit '6ac52f05a6fcadb84972c9557b28c67a416f866b'
* commit '6ac52f05a6fcadb84972c9557b28c67a416f866b':
  dvbsub_parser: Add missing mem.h #include

Merged-by: Clément Bœsch <clement@stupeflix.com>
2016-06-29 11:52:03 +02:00
Clément Bœsch
daedfa7254 Merge commit '81f769fa129edc51c28285649c2df6da717e718f'
* commit '81f769fa129edc51c28285649c2df6da717e718f':
  gsm: Move requant_tab table to the gsm tables file

Merged-by: Clément Bœsch <clement@stupeflix.com>
2016-06-29 11:48:53 +02:00