Compare commits
15 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| d1275f8a77 | |||
| 920cdf960f | |||
| 4c9b34fce8 | |||
| 23023147e2 | |||
| 8696df1449 | |||
| cabe77a6fc | |||
| 30e318e228 | |||
| 7052da6837 | |||
| 0c7dc61052 | |||
| 968836e233 | |||
| f07dc7cc1c | |||
| 90f9f23279 | |||
| f0fc6dd272 | |||
| 217f75f553 | |||
| c10b3db8f6 |
@@ -3085,7 +3085,7 @@ libopus_encoder_deps="libopus"
|
||||
libopus_encoder_select="audio_frame_queue"
|
||||
librsvg_decoder_deps="librsvg"
|
||||
libshine_encoder_deps="libshine"
|
||||
libshine_encoder_select="audio_frame_queue"
|
||||
libshine_encoder_select="audio_frame_queue mpegaudioheader"
|
||||
libspeex_decoder_deps="libspeex"
|
||||
libspeex_encoder_deps="libspeex"
|
||||
libspeex_encoder_select="audio_frame_queue"
|
||||
@@ -6169,7 +6169,7 @@ fi
|
||||
|
||||
if enabled sdl2; then
|
||||
SDL2_CONFIG="${cross_prefix}sdl2-config"
|
||||
test_pkg_config sdl2 "sdl2 >= 2.0.1 sdl2 < 2.1.0" SDL_events.h SDL_PollEvent
|
||||
test_pkg_config sdl2 "sdl2 >= 2.0.1 sdl2 < 3.0.0" SDL_events.h SDL_PollEvent
|
||||
if disabled sdl2 && "${SDL2_CONFIG}" --version > /dev/null 2>&1; then
|
||||
sdl2_cflags=$("${SDL2_CONFIG}" --cflags)
|
||||
sdl2_extralibs=$("${SDL2_CONFIG}" --libs)
|
||||
|
||||
+26
-17
@@ -83,7 +83,7 @@ typedef struct CuvidContext
|
||||
CUVIDDECODECAPS caps8, caps10, caps12;
|
||||
|
||||
CUVIDPARSERPARAMS cuparseinfo;
|
||||
CUVIDEOFORMATEX cuparse_ext;
|
||||
CUVIDEOFORMATEX *cuparse_ext;
|
||||
|
||||
CudaFunctions *cudl;
|
||||
CuvidFunctions *cvdl;
|
||||
@@ -709,6 +709,7 @@ static av_cold int cuvid_decode_end(AVCodecContext *avctx)
|
||||
av_buffer_unref(&ctx->hwdevice);
|
||||
|
||||
av_freep(&ctx->key_frame);
|
||||
av_freep(&ctx->cuparse_ext);
|
||||
|
||||
cuvid_free_functions(&ctx->cvdl);
|
||||
|
||||
@@ -813,6 +814,8 @@ static av_cold int cuvid_decode_init(AVCodecContext *avctx)
|
||||
CUcontext cuda_ctx = NULL;
|
||||
CUcontext dummy;
|
||||
const AVBitStreamFilter *bsf;
|
||||
uint8_t *extradata;
|
||||
int extradata_size;
|
||||
int ret = 0;
|
||||
|
||||
enum AVPixelFormat pix_fmts[3] = { AV_PIX_FMT_CUDA,
|
||||
@@ -909,11 +912,8 @@ static av_cold int cuvid_decode_init(AVCodecContext *avctx)
|
||||
ctx->cudl = device_hwctx->internal->cuda_dl;
|
||||
|
||||
memset(&ctx->cuparseinfo, 0, sizeof(ctx->cuparseinfo));
|
||||
memset(&ctx->cuparse_ext, 0, sizeof(ctx->cuparse_ext));
|
||||
memset(&seq_pkt, 0, sizeof(seq_pkt));
|
||||
|
||||
ctx->cuparseinfo.pExtVideoInfo = &ctx->cuparse_ext;
|
||||
|
||||
switch (avctx->codec->id) {
|
||||
#if CONFIG_H264_CUVID_DECODER
|
||||
case AV_CODEC_ID_H264:
|
||||
@@ -983,17 +983,26 @@ static av_cold int cuvid_decode_init(AVCodecContext *avctx)
|
||||
goto error;
|
||||
}
|
||||
|
||||
ctx->cuparse_ext.format.seqhdr_data_length = ctx->bsf->par_out->extradata_size;
|
||||
memcpy(ctx->cuparse_ext.raw_seqhdr_data,
|
||||
ctx->bsf->par_out->extradata,
|
||||
FFMIN(sizeof(ctx->cuparse_ext.raw_seqhdr_data), ctx->bsf->par_out->extradata_size));
|
||||
} else if (avctx->extradata_size > 0) {
|
||||
ctx->cuparse_ext.format.seqhdr_data_length = avctx->extradata_size;
|
||||
memcpy(ctx->cuparse_ext.raw_seqhdr_data,
|
||||
avctx->extradata,
|
||||
FFMIN(sizeof(ctx->cuparse_ext.raw_seqhdr_data), avctx->extradata_size));
|
||||
extradata = ctx->bsf->par_out->extradata;
|
||||
extradata_size = ctx->bsf->par_out->extradata_size;
|
||||
} else {
|
||||
extradata = avctx->extradata;
|
||||
extradata_size = avctx->extradata_size;
|
||||
}
|
||||
|
||||
ctx->cuparse_ext = av_mallocz(sizeof(*ctx->cuparse_ext)
|
||||
+ FFMAX(extradata_size - (int)sizeof(ctx->cuparse_ext->raw_seqhdr_data), 0));
|
||||
if (!ctx->cuparse_ext) {
|
||||
ret = AVERROR(ENOMEM);
|
||||
goto error;
|
||||
}
|
||||
|
||||
if (extradata_size > 0)
|
||||
memcpy(ctx->cuparse_ext->raw_seqhdr_data, extradata, extradata_size);
|
||||
ctx->cuparse_ext->format.seqhdr_data_length = extradata_size;
|
||||
|
||||
ctx->cuparseinfo.pExtVideoInfo = ctx->cuparse_ext;
|
||||
|
||||
ctx->key_frame = av_mallocz(ctx->nb_surfaces * sizeof(int));
|
||||
if (!ctx->key_frame) {
|
||||
ret = AVERROR(ENOMEM);
|
||||
@@ -1022,8 +1031,8 @@ static av_cold int cuvid_decode_init(AVCodecContext *avctx)
|
||||
if (ret < 0)
|
||||
goto error;
|
||||
|
||||
seq_pkt.payload = ctx->cuparse_ext.raw_seqhdr_data;
|
||||
seq_pkt.payload_size = ctx->cuparse_ext.format.seqhdr_data_length;
|
||||
seq_pkt.payload = ctx->cuparse_ext->raw_seqhdr_data;
|
||||
seq_pkt.payload_size = ctx->cuparse_ext->format.seqhdr_data_length;
|
||||
|
||||
if (seq_pkt.payload && seq_pkt.payload_size) {
|
||||
ret = CHECK_CU(ctx->cvdl->cuvidParseVideoData(ctx->cuparser, &seq_pkt));
|
||||
@@ -1082,8 +1091,8 @@ static void cuvid_flush(AVCodecContext *avctx)
|
||||
if (ret < 0)
|
||||
goto error;
|
||||
|
||||
seq_pkt.payload = ctx->cuparse_ext.raw_seqhdr_data;
|
||||
seq_pkt.payload_size = ctx->cuparse_ext.format.seqhdr_data_length;
|
||||
seq_pkt.payload = ctx->cuparse_ext->raw_seqhdr_data;
|
||||
seq_pkt.payload_size = ctx->cuparse_ext->format.seqhdr_data_length;
|
||||
|
||||
if (seq_pkt.payload && seq_pkt.payload_size) {
|
||||
ret = CHECK_CU(ctx->cvdl->cuvidParseVideoData(ctx->cuparser, &seq_pkt));
|
||||
|
||||
@@ -496,6 +496,8 @@ int ff_nvdec_simple_end_frame(AVCodecContext *avctx)
|
||||
NVDECContext *ctx = avctx->internal->hwaccel_priv_data;
|
||||
int ret = ff_nvdec_end_frame(avctx);
|
||||
ctx->bitstream = NULL;
|
||||
ctx->bitstream_len = 0;
|
||||
ctx->nb_slices = 0;
|
||||
return ret;
|
||||
}
|
||||
|
||||
|
||||
@@ -76,8 +76,9 @@ static int nvdec_mpeg12_start_frame(AVCodecContext *avctx, const uint8_t *buffer
|
||||
};
|
||||
|
||||
for (i = 0; i < 64; ++i) {
|
||||
ppc->QuantMatrixIntra[i] = s->intra_matrix[i];
|
||||
ppc->QuantMatrixInter[i] = s->inter_matrix[i];
|
||||
int n = s->idsp.idct_permutation[i];
|
||||
ppc->QuantMatrixIntra[i] = s->intra_matrix[n];
|
||||
ppc->QuantMatrixInter[i] = s->inter_matrix[n];
|
||||
}
|
||||
|
||||
return 0;
|
||||
|
||||
@@ -86,8 +86,9 @@ static int nvdec_mpeg4_start_frame(AVCodecContext *avctx, const uint8_t *buffer,
|
||||
};
|
||||
|
||||
for (i = 0; i < 64; ++i) {
|
||||
ppc->QuantMatrixIntra[i] = s->intra_matrix[i];
|
||||
ppc->QuantMatrixInter[i] = s->inter_matrix[i];
|
||||
int n = s->idsp.idct_permutation[i];
|
||||
ppc->QuantMatrixIntra[i] = s->intra_matrix[n];
|
||||
ppc->QuantMatrixInter[i] = s->inter_matrix[n];
|
||||
}
|
||||
|
||||
// We need to pass the full frame buffer and not just the slice
|
||||
|
||||
@@ -73,8 +73,9 @@ static int vdpau_mpeg_start_frame(AVCodecContext *avctx,
|
||||
info->f_code[1][0] = s->mpeg_f_code[1][0];
|
||||
info->f_code[1][1] = s->mpeg_f_code[1][1];
|
||||
for (i = 0; i < 64; ++i) {
|
||||
info->intra_quantizer_matrix[i] = s->intra_matrix[i];
|
||||
info->non_intra_quantizer_matrix[i] = s->inter_matrix[i];
|
||||
int n = s->idsp.idct_permutation[i];
|
||||
info->intra_quantizer_matrix[i] = s->intra_matrix[n];
|
||||
info->non_intra_quantizer_matrix[i] = s->inter_matrix[n];
|
||||
}
|
||||
|
||||
return ff_vdpau_common_start_frame(pic_ctx, buffer, size);
|
||||
|
||||
@@ -74,8 +74,9 @@ static int vdpau_mpeg4_start_frame(AVCodecContext *avctx,
|
||||
info->alternate_vertical_scan_flag = s->alternate_scan;
|
||||
info->top_field_first = s->top_field_first;
|
||||
for (i = 0; i < 64; ++i) {
|
||||
info->intra_quantizer_matrix[i] = s->intra_matrix[i];
|
||||
info->non_intra_quantizer_matrix[i] = s->inter_matrix[i];
|
||||
int n = s->idsp.idct_permutation[i];
|
||||
info->intra_quantizer_matrix[i] = s->intra_matrix[n];
|
||||
info->non_intra_quantizer_matrix[i] = s->inter_matrix[n];
|
||||
}
|
||||
|
||||
ff_vdpau_common_start_frame(pic_ctx, buffer, size);
|
||||
|
||||
@@ -182,11 +182,18 @@ static int tls_open(URLContext *h, const char *uri, int flags, AVDictionary **op
|
||||
gnutls_transport_set_push_function(p->session, gnutls_url_push);
|
||||
gnutls_transport_set_ptr(p->session, c->tcp);
|
||||
gnutls_priority_set_direct(p->session, "NORMAL", NULL);
|
||||
ret = gnutls_handshake(p->session);
|
||||
if (ret) {
|
||||
ret = print_tls_error(h, ret);
|
||||
goto fail;
|
||||
}
|
||||
do {
|
||||
if (ff_check_interrupt(&h->interrupt_callback)) {
|
||||
ret = AVERROR_EXIT;
|
||||
goto fail;
|
||||
}
|
||||
|
||||
ret = gnutls_handshake(p->session);
|
||||
if (gnutls_error_is_fatal(ret)) {
|
||||
ret = print_tls_error(h, ret);
|
||||
goto fail;
|
||||
}
|
||||
} while (ret);
|
||||
p->need_shutdown = 1;
|
||||
if (c->verify) {
|
||||
unsigned int status, cert_list_size;
|
||||
|
||||
@@ -148,7 +148,7 @@ static int tls_client_handshake_loop(URLContext *h, int initial)
|
||||
TLSContext *c = h->priv_data;
|
||||
TLSShared *s = &c->tls_shared;
|
||||
SECURITY_STATUS sspi_ret;
|
||||
SecBuffer outbuf[3];
|
||||
SecBuffer outbuf[3] = { 0 };
|
||||
SecBufferDesc outbuf_desc;
|
||||
SecBuffer inbuf[2];
|
||||
SecBufferDesc inbuf_desc;
|
||||
@@ -392,7 +392,12 @@ static int tls_read(URLContext *h, uint8_t *buf, int len)
|
||||
int size, ret;
|
||||
int min_enc_buf_size = len + SCHANNEL_FREE_BUFFER_SIZE;
|
||||
|
||||
if (len <= c->dec_buf_offset)
|
||||
/* If we have some left-over data from previous network activity,
|
||||
* return it first in case it is enough. It may contain
|
||||
* data that is required to know whether this connection
|
||||
* is still required or not, esp. in case of HTTP keep-alive
|
||||
* connections. */
|
||||
if (c->dec_buf_offset > 0)
|
||||
goto cleanup;
|
||||
|
||||
if (c->sspi_close_notify)
|
||||
@@ -424,7 +429,7 @@ static int tls_read(URLContext *h, uint8_t *buf, int len)
|
||||
c->enc_buf_offset += ret;
|
||||
}
|
||||
|
||||
while (c->enc_buf_offset > 0 && sspi_ret == SEC_E_OK && c->dec_buf_offset < len) {
|
||||
while (c->enc_buf_offset > 0 && sspi_ret == SEC_E_OK) {
|
||||
/* input buffer */
|
||||
init_sec_buffer(&inbuf[0], SECBUFFER_DATA, c->enc_buf, c->enc_buf_offset);
|
||||
|
||||
|
||||
@@ -118,8 +118,8 @@
|
||||
.endm
|
||||
|
||||
.macro increment_yuv422p
|
||||
add x6, x6, w7, UXTW // srcU += incU
|
||||
add x13, x13, w14, UXTW // srcV += incV
|
||||
add x6, x6, w7, SXTW // srcU += incU
|
||||
add x13, x13, w14, SXTW // srcV += incV
|
||||
.endm
|
||||
|
||||
.macro compute_rgba r1 g1 b1 a1 r2 g2 b2 a2
|
||||
@@ -188,8 +188,8 @@ function ff_\ifmt\()_to_\ofmt\()_neon, export=1
|
||||
st4 {v16.8B,v17.8B,v18.8B,v19.8B}, [x2], #32
|
||||
subs w8, w8, #16 // width -= 16
|
||||
b.gt 2b
|
||||
add x2, x2, w3, UXTW // dst += padding
|
||||
add x4, x4, w5, UXTW // srcY += paddingY
|
||||
add x2, x2, w3, SXTW // dst += padding
|
||||
add x4, x4, w5, SXTW // srcY += paddingY
|
||||
increment_\ifmt
|
||||
subs w1, w1, #1 // height -= 1
|
||||
b.gt 1b
|
||||
|
||||
Reference in New Issue
Block a user