Merge remote-tracking branch 'qatar/master'
* qatar/master: mss1: validate number of changeable palette entries mss1: report palette changed when some additional colours were decoded x86: fft: replace call to memcpy by a loop udp: Support IGMPv3 source specific multicast and source blocking dxva2: include dxva.h if found libm: Provide fallback definitions for isnan() and isinf() tcp: Pass NULL as hostname to getaddrinfo if the string is empty tcp: Set AI_PASSIVE when the socket will be used for listening Conflicts: configure libavcodec/mss1.c libavformat/udp.c Merged-by: Michael Niedermayer <michaelni@gmx.at>
This commit is contained in:
commit
87df986dcf
8 changed files with 184 additions and 30 deletions
|
|
@ -25,7 +25,14 @@
|
|||
|
||||
#define _WIN32_WINNT 0x0600
|
||||
#define COBJMACROS
|
||||
|
||||
#include "config.h"
|
||||
|
||||
#include "dxva2.h"
|
||||
#if HAVE_DXVA_H
|
||||
#include <dxva.h>
|
||||
#endif
|
||||
|
||||
#include "avcodec.h"
|
||||
#include "mpegvideo.h"
|
||||
|
||||
|
|
|
|||
|
|
@ -557,7 +557,7 @@ static int decode_pal(MSS1Context *ctx, ArithCoder *acoder)
|
|||
*pal++ = (0xFF << 24) | (r << 16) | (g << 8) | b;
|
||||
}
|
||||
|
||||
return 1;
|
||||
return !!ncol;
|
||||
}
|
||||
|
||||
static int decode_pivot(MSS1Context *ctx, ArithCoder *acoder, int base)
|
||||
|
|
@ -783,8 +783,10 @@ static av_cold int mss1_decode_init(AVCodecContext *avctx)
|
|||
av_log(avctx, AV_LOG_DEBUG, "Encoder version %d.%d\n",
|
||||
AV_RB32(avctx->extradata + 4), AV_RB32(avctx->extradata + 8));
|
||||
c->free_colours = AV_RB32(avctx->extradata + 48);
|
||||
if (c->free_colours < 0 || c->free_colours > 256) {
|
||||
av_log(avctx, AV_LOG_ERROR, "Invalid free colours %d\n", c->free_colours);
|
||||
if ((unsigned)c->free_colours > 256) {
|
||||
av_log(avctx, AV_LOG_ERROR,
|
||||
"Incorrect number of changeable palette entries: %d\n",
|
||||
c->free_colours);
|
||||
return AVERROR_INVALIDDATA;
|
||||
}
|
||||
av_log(avctx, AV_LOG_DEBUG, "%d free colour(s)\n", c->free_colours);
|
||||
|
|
|
|||
|
|
@ -616,8 +616,6 @@ cglobal fft_calc, 2,5,8
|
|||
.end:
|
||||
REP_RET
|
||||
|
||||
cextern_naked memcpy
|
||||
|
||||
cglobal fft_permute, 2,7,1
|
||||
mov r4, [r0 + FFTContext.revtab]
|
||||
mov r5, [r0 + FFTContext.tmpbuf]
|
||||
|
|
@ -638,29 +636,18 @@ cglobal fft_permute, 2,7,1
|
|||
cmp r0, r2
|
||||
jl .loop
|
||||
shl r2, 3
|
||||
%if ARCH_X86_64
|
||||
mov r0, r1
|
||||
mov r1, r5
|
||||
%endif
|
||||
%if WIN64
|
||||
sub rsp, 8
|
||||
call memcpy
|
||||
add rsp, 8
|
||||
RET
|
||||
%elif ARCH_X86_64
|
||||
%ifdef PIC
|
||||
jmp memcpy wrt ..plt
|
||||
%else
|
||||
jmp memcpy
|
||||
%endif
|
||||
%else
|
||||
push r2
|
||||
push r5
|
||||
push r1
|
||||
call memcpy
|
||||
add esp, 12
|
||||
RET
|
||||
%endif
|
||||
add r1, r2
|
||||
add r5, r2
|
||||
neg r2
|
||||
; nbits >= 2 (FFT4) and sizeof(FFTComplex)=8 => at least 32B
|
||||
.loopcopy:
|
||||
movaps xmm0, [r5 + r2]
|
||||
movaps xmm1, [r5 + r2 + 16]
|
||||
movaps [r1 + r2], xmm0
|
||||
movaps [r1 + r2 + 16], xmm1
|
||||
add r2, 32
|
||||
jl .loopcopy
|
||||
REP_RET
|
||||
|
||||
cglobal imdct_calc, 3,5,3
|
||||
mov r3d, [r0 + FFTContext.mdctsize]
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue