Commit Graph

28582 Commits

Author SHA1 Message Date
Michael Niedermayer
70f671c39e avcodec/hevc: fix () in macros
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2014-05-25 03:45:10 +02:00
Michael Niedermayer
0f45e643cc avcodec/h264_slice: fix macro ()
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2014-05-25 03:45:10 +02:00
Michael Niedermayer
af62b42736 avcodec/h264: fix () in macros
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2014-05-25 03:45:10 +02:00
Michael Niedermayer
97e6b5ee3a avcodec/golomb-test: fix () in EXTEND() macro
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2014-05-25 03:45:10 +02:00
Michael Niedermayer
fa915d4193 avcodec/aac: fix () in IS_CODEBOOK_UNSIGNED macro
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2014-05-25 03:45:10 +02:00
Aman Gupta
4372fb7a57 avcodec/webvttenc: add webvtt encoder
Based off the srt encoder. The following features are unimplemented:

- fonts, colors, sizes
- alignment and positioning

The rest works well. For example, use ffmpeg to convert subtitles into the .vtt format:

  ffmpeg -i input.srt output.vtt

Signed-off-by: Aman Gupta <ffmpeg@tmm1.net>
Signed-off-by: Clément Bœsch <u@pkh.me>
2014-05-25 03:04:14 +02:00
James Almer
d94e255dd1 x86/dsputilenc: make the SUM_ABS_DCTELEM macro more readable
Signed-off-by: James Almer <jamrial@gmail.com>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2014-05-25 02:03:54 +02:00
Michael Niedermayer
46e3883519 avcodec/opusdec: check alignment, misalignment could lead to crashes with avx
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2014-05-25 00:38:20 +02:00
James Almer
61eea421b2 x86/dsputilenc: port sum_abs_dctelem functions to yasm
Signed-off-by: James Almer <jamrial@gmail.com>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2014-05-24 21:46:25 +02:00
Michael Niedermayer
ddeb58b90c avcodec/asvenc: dont use a negative global_quality
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2014-05-24 20:33:49 +02:00
Michael Niedermayer
9a7d332b92 avcodec/aacenc: dont use global quality if its negative
Some applications used a negative value as default for "not set"

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2014-05-24 20:32:37 +02:00
Christophe Gisquet
81aa0f4604 x86: hpeldsp: implement SSSE3 version of _xy2
Loading pb_1 rather than pw_8192 was benchmarked to be more efficient.
Loading of the 2 yields no advantage. Loading of one saves ~11 cycles.

decicycles count:
put8:  3223(mmx)    -> 2387
avg8:  2863(mmxext) -> 2125
put16: 4356(sse2)   -> 3553
avg16: 4481(sse2)   -> 3513

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2014-05-24 15:15:56 +02:00
Christophe Gisquet
9722a6a3f3 x86: hpeldsp: implement SSE2 put_pixels16_xy2
This is obviously equivalent to the avg version, without the avg.

3223(mmx) -> 2006(sse2)

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2014-05-24 03:45:17 +02:00
Christophe Gisquet
f0aca50e0b x86: hpeldsp: implement SSE2 versions
Those are mostly used in codecs older than H.264, eg MPEG-2.

put16 versions:
      mmx  mmx2  sse2
x2:  1888  1185   552
y2:  1778  1092   510

avg16 xy2: 3509(mmx2) -> 2169(sse2)

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2014-05-24 03:29:48 +02:00
James Almer
7538ad2248 x86/hevc_deblock: improve chroma functions register allocation
Signed-off-by: James Almer <jamrial@gmail.com>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2014-05-24 01:16:26 +02:00
James Almer
584327f22f x86/dsputil: fix argument declaration in vector_clipf
Should fix fate failures in msvc x86_64

Signed-off-by: James Almer <jamrial@gmail.com>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2014-05-23 23:10:17 +02:00
James Almer
518cbf9b4a x86/dsputil: fix VECTOR_CLIP_INT32 macro
The inline loop was incrementing and using the value of %%i
the wrong way.

Disassembly of ff_vector_clip_int32_sse2 before and after
this patch:

    movdqa (%rdx),%xmm0      |  movdqa (%rdx),%xmm0
    movdqa 0x10(%rdx),%xmm1  |  movdqa 0x10(%rdx),%xmm1
    movdqa 0x20(%rdx),%xmm2  |  movdqa 0x20(%rdx),%xmm2
    movdqa 0x30(%rdx),%xmm3  |  movdqa 0x30(%rdx),%xmm3
[...]                        |
    movdqa %xmm0,(%rcx)      |  movdqa %xmm0,(%rcx)
    movdqa %xmm1,0x10(%rcx)  |  movdqa %xmm1,0x10(%rcx)
    movdqa %xmm2,0x20(%rcx)  |  movdqa %xmm2,0x20(%rcx)
    movdqa %xmm3,0x30(%rcx)  |  movdqa %xmm3,0x30(%rcx)
    movdqa (%rdx),%xmm0      |  movdqa 0x40(%rdx),%xmm0
    movdqa 0x20(%rdx),%xmm1  |  movdqa 0x50(%rdx),%xmm1
    movdqa 0x40(%rdx),%xmm2  |  movdqa 0x60(%rdx),%xmm2
    movdqa 0x60(%rdx),%xmm3  |  movdqa 0x70(%rdx),%xmm3
[...]                        |
    movdqa %xmm0,(%rcx)      |  movdqa %xmm0,0x40(%rcx)
    movdqa %xmm1,0x20(%rcx)  |  movdqa %xmm1,0x50(%rcx)
    movdqa %xmm2,0x40(%rcx)  |  movdqa %xmm2,0x60(%rcx)
    movdqa %xmm3,0x60(%rcx)  |  movdqa %xmm3,0x70(%rcx)
    add    $0x80,%rdx        |  add    $0x80,%rdx
    add    $0x80,%rcx        |  add    $0x80,%rcx

Other versions were unaffected.

Signed-off-by: James Almer <jamrial@gmail.com>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2014-05-23 22:59:55 +02:00
Michael Niedermayer
6b88f22e89 avcodec/dcadec: dont use hex float, msvc doesnt support it
Found-by: nevcairiel
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2014-05-23 22:39:14 +02:00
Michael Niedermayer
9ccb5455ca avcodec/dcadec: use a constant instead of assuming every compiler can optimize pow(2,-15)
Idea-by: nevcairiel and wm4
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2014-05-23 22:19:11 +02:00
Michael Niedermayer
6da06ef6bb avcodec/dcadec: make dca_dmix_code() 650% faster
This effectively replaces the ldexpf() function call by a multiplication
with a constant.

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2014-05-23 22:08:41 +02:00
Michael Niedermayer
d062db7880 Merge commit '21f68c2489cba2a1a4a41d0c5c828266e6162800'
* commit '21f68c2489cba2a1a4a41d0c5c828266e6162800':
  avcodec: bump version after rotation api

Conflicts:
	libavcodec/version.h

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2014-05-23 20:48:54 +02:00
Michael Niedermayer
4e4dbb9983 dcadec: fix xxch_dmix_coeff and xxch_dmix_sf after merge
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2014-05-23 20:39:21 +02:00
Michael Niedermayer
c867be03f6 Merge commit '6b7b8585d73548f08b98959df39d80b97677662f'
* commit '6b7b8585d73548f08b98959df39d80b97677662f':
  dca: Convert dca_dmixtable to integers

Conflicts:
	libavcodec/dcadec.c

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2014-05-23 19:01:12 +02:00
Vittorio Giovara
21f68c2489 avcodec: bump version after rotation api
Signed-off-by: Kostya Shishkov <kostya.shishkov@gmail.com>
2014-05-23 17:50:38 +02:00
Niels Möller
6b7b8585d7 dca: Convert dca_dmixtable to integers
Also include zero in the table, eliminating a special case in the
decoder.

Signed-off-by: Niels Möller <nisse@southpole.se>
Signed-off-by: Anton Khirnov <anton@khirnov.net>
2014-05-23 15:07:05 +02:00
James Almer
6a4832caae x86/diracdsp: mark all functions as yasm
No inline asm dirac code remains in the tree, so replace every relevant check.
This also moves all the dirac functions from dsputil_mmx.c to diracdsp_mmx.c

Signed-off-by: James Almer <jamrial@gmail.com>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2014-05-23 15:02:42 +02:00
James Almer
1d36defe94 x86/dsputil: port ff_vector_clipf_sse to yasm
Signed-off-by: James Almer <jamrial@gmail.com>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2014-05-23 00:08:21 +02:00
Christophe Gisquet
c081ca851c x86: hpeldsp: avg_pixels_xy2 for mmx2&3dnow
This is a port of the inline assembly of the mmx version to use the
pavg(us|)b instruction.

        8    16
mmx   1498  4355
mmx2  1242  3509

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2014-05-22 20:17:49 +02:00
Christophe Gisquet
17ac998055 x86: hpeldsp: mark _xy2 versions as approximate
Currently, only the mmx version is bitexact, the others (mmxext and
3dnow) are not, in spite of their naming.

Therefore, make their name more obvious. Also restore a comment that
was removed in 71155d7b.

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2014-05-22 20:17:45 +02:00
Christophe Gisquet
f8de35ebc4 x86: hpeldsp: kill hpeldsp_mmx.c
before:
1987 decicycles in 8_x2, 262121 runs, 23 skips

after:
1902 decicycles in 8_x2, 262112 runs, 32 skips

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2014-05-22 20:17:40 +02:00
Michael Niedermayer
aca48725af avcodec/proresdec2: Use av_malloc_array()
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2014-05-22 15:05:27 +02:00
Michael Niedermayer
e8e9186a70 avcodec/pgssubdec: Use av_malloc(z)_array()
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2014-05-22 15:04:34 +02:00
Michael Niedermayer
f932e5f716 avcodec/vdpau_internal: move "struct vdpau_picture_context" up to avoid "#else"
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2014-05-22 01:53:54 +02:00
Dale Curtis
d5d6b8e259 Fix compilation error around struct visibility when VDPAU disabled.
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2014-05-22 01:53:13 +02:00
James Almer
80ee2dfcf6 x86/dsputil: port ff_put_signed_pixels_clamped_mmx to yasm
Also add an SSE2 version

Signed-off-by: James Almer <jamrial@gmail.com>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2014-05-21 23:33:45 +02:00
James Almer
7b05267239 x86/dsputil: port clear_block functions to yasm
Signed-off-by: James Almer <jamrial@gmail.com>
Reviewed-by: Christophe Gisquet <christophe.gisquet@gmail.com>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2014-05-21 23:33:45 +02:00
Michael Niedermayer
91a8262b9d avcodec/utils: add error message for the recode_subtitle() without iconv case
Based on the assert command which was removed in ef0c466a0f

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2014-05-21 17:39:26 +02:00
Dale Curtis
ef0c466a0f Replace assert with AVERROR when recode_subtitle called w/o ICONV.
recode_subtitle() is called implicitly by avformat_find_stream_info().
As such, clients which disable ICONV always crash if a file contains
subtitles; even if they don't care about them.

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2014-05-21 17:33:21 +02:00
Michael Niedermayer
e61055fd8b avcodec/atrac3plusdec: Use av_mallocz_array()
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2014-05-21 16:03:22 +02:00
Michael Niedermayer
606a49d2e6 avcodec/atrac3: Use av_mallocz_array()
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2014-05-21 15:59:56 +02:00
Michael Niedermayer
3d4e365073 avcodec/x86/hpeldsp_init: remove redundant if()
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2014-05-21 13:38:27 +02:00
Hendrik Leppkes
cd9e08e110 hpeldsp: fix build without inline asm
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2014-05-21 13:37:38 +02:00
Christophe Gisquet
d1a32c3f49 x86: kill fpel_mmx.c
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2014-05-21 03:25:08 +02:00
Michael Niedermayer
19e66c7232 avcodec/libvorbisenc: dont add the duration to AV_NOPTS_VALUE
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2014-05-21 03:02:06 +02:00
Dale Curtis
ca2fd25988 Fix compilation errors when deprecated features are disabled.
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2014-05-20 22:55:28 +02:00
Michael Niedermayer
be656c362d avcodec/h264_picture: Fix build without error resilience
Found-by: Dale Curtis <dalecurtis@chromium.org>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2014-05-20 21:31:40 +02:00
Katerina Barone-Adesi
e50ae60d46 avcodec/fate-idct8x8: Defined behavior: eliminate negative left-shifts.
The original code left-shifts negative values, which is undefined
in the C99 specification (the one used during normal FFmpeg compilation).
This change multiplies by (1 << shift), which is functionally equivalent,
but has defined behavior.
With this change, fate-idct8x8 compiled with --fsanitize=undefined works.

Bug-Id: 686

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>

The assembly generated by gcc is unchanged by this commit
2014-05-20 04:21:06 +02:00
Michael Niedermayer
8408720453 avcodec/smvjpegdec: Dont ignore avcodec_close() return code
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2014-05-20 02:21:07 +02:00
Michael Niedermayer
0739614c9c avcodec: remove no longer needed ff_codec_close_recursive()
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2014-05-20 02:20:30 +02:00
Janne Grunau
132a5711a2 check: add libavcodec/vda_internal.h to SKIPHEADERS-$(CONFIG_VDA) 2014-05-20 00:43:51 +02:00