vanhofen
6 years ago
13 changed files with 143 additions and 18 deletions
@ -1,6 +1,6 @@ |
|||
--- a/libavformat/hls.c
|
|||
+++ b/libavformat/hls.c
|
|||
@@ -2062,8 +2062,10 @@
|
|||
@@ -2074,8 +2074,10 @@
|
|||
HLSContext *c = s->priv_data; |
|||
int ret, i, minplaylist = -1; |
|||
|
@ -1,6 +1,6 @@ |
|||
--- a/libavformat/mov.c
|
|||
+++ b/libavformat/mov.c
|
|||
@@ -3558,8 +3558,10 @@
|
|||
@@ -3561,8 +3561,10 @@
|
|||
|
|||
if (ctts_data_old && ctts_index_old < ctts_count_old) { |
|||
curr_ctts = ctts_data_old[ctts_index_old].duration; |
@ -0,0 +1,24 @@ |
|||
From c8232e50074f6f9f9b0674d0a5433f49d73a4e50 Mon Sep 17 00:00:00 2001 |
|||
From: Carl Eugen Hoyos <ceffmpeg@gmail.com> |
|||
Date: Wed, 19 Jun 2019 13:41:01 +0200 |
|||
Subject: [PATCH] lavc/tableprint_vlc: Remove avpriv_request_sample() from |
|||
included files. |
|||
|
|||
Fixes compilation with --enable-hardcoded-tables. |
|||
Fixes ticket #7962. |
|||
---
|
|||
libavcodec/tableprint_vlc.h | 1 + |
|||
1 file changed, 1 insertion(+) |
|||
|
|||
diff --git a/libavcodec/tableprint_vlc.h b/libavcodec/tableprint_vlc.h
|
|||
index 3004be3f9c..b3ff36562b 100644
|
|||
--- a/libavcodec/tableprint_vlc.h
|
|||
+++ b/libavcodec/tableprint_vlc.h
|
|||
@@ -36,6 +36,7 @@
|
|||
#define AVCODEC_AVCODEC_H |
|||
#define AVCODEC_INTERNAL_H |
|||
#define AV_INPUT_BUFFER_PADDING_SIZE 64 // the value does not matter for this |
|||
+#define avpriv_request_sample(...)
|
|||
#include "tableprint.h" |
|||
#include "get_bits.h" |
|||
#include "mathtables.c" |
@ -0,0 +1,14 @@ |
|||
--- a/libavcodec/h264_slice.c
|
|||
+++ b/libavcodec/h264_slice.c
|
|||
@@ -1463,6 +1463,11 @@
|
|||
h->avctx->has_b_frames = sps->num_reorder_frames; |
|||
} |
|||
|
|||
+ if (sps && sps->bitstream_restriction_flag &&
|
|||
+ h->avctx->has_b_frames < sps->num_reorder_frames) {
|
|||
+ h->avctx->has_b_frames = FFMAX(h->avctx->has_b_frames, sps->num_reorder_frames);
|
|||
+ }
|
|||
+
|
|||
last_pic_droppable = h->droppable; |
|||
last_pic_structure = h->picture_structure; |
|||
h->droppable = (nal->ref_idc == 0); |
@ -0,0 +1,11 @@ |
|||
--- a/libavcodec/mpegvideo.c
|
|||
+++ b/libavcodec/mpegvideo.c
|
|||
@@ -538,6 +538,8 @@
|
|||
s->avctx->width = s1->avctx->width; |
|||
s->avctx->height = s1->avctx->height; |
|||
|
|||
+ s->quarter_sample = s1->quarter_sample;
|
|||
+
|
|||
s->coded_picture_number = s1->coded_picture_number; |
|||
s->picture_number = s1->picture_number; |
|||
|
@ -0,0 +1,55 @@ |
|||
--- a/libavcodec/amfenc.c
|
|||
+++ b/libavcodec/amfenc.c
|
|||
@@ -680,6 +680,52 @@ int ff_amf_send_frame(AVCodecContext *avctx, const AVFrame *frame)
|
|||
break; |
|||
} |
|||
|
|||
+ // Override Picture Type for Frame
|
|||
+ if (avctx->codec->id == AV_CODEC_ID_H264) {
|
|||
+ switch (frame->pict_type) {
|
|||
+ case AV_PICTURE_TYPE_I:
|
|||
+ AMF_ASSIGN_PROPERTY_INT64(res, surface, AMF_VIDEO_ENCODER_FORCE_PICTURE_TYPE, AMF_VIDEO_ENCODER_PICTURE_TYPE_I);
|
|||
+ break;
|
|||
+ case AV_PICTURE_TYPE_P:
|
|||
+ AMF_ASSIGN_PROPERTY_INT64(res, surface, AMF_VIDEO_ENCODER_FORCE_PICTURE_TYPE, AMF_VIDEO_ENCODER_PICTURE_TYPE_P);
|
|||
+ break;
|
|||
+ case AV_PICTURE_TYPE_B:
|
|||
+ AMF_ASSIGN_PROPERTY_INT64(res, surface, AMF_VIDEO_ENCODER_FORCE_PICTURE_TYPE, AMF_VIDEO_ENCODER_PICTURE_TYPE_B);
|
|||
+ break;
|
|||
+ case AV_PICTURE_TYPE_S:
|
|||
+ AMF_ASSIGN_PROPERTY_INT64(res, surface, AMF_VIDEO_ENCODER_FORCE_PICTURE_TYPE, AMF_VIDEO_ENCODER_PICTURE_TYPE_SKIP);
|
|||
+ break;
|
|||
+ default:
|
|||
+ AMF_ASSIGN_PROPERTY_INT64(res, surface, AMF_VIDEO_ENCODER_FORCE_PICTURE_TYPE, AMF_VIDEO_ENCODER_PICTURE_TYPE_NONE);
|
|||
+ break;
|
|||
+ }
|
|||
+ // Keyframe overrides previous assignment.
|
|||
+ if (frame->key_frame) {
|
|||
+ AMF_ASSIGN_PROPERTY_INT64(res, surface, AMF_VIDEO_ENCODER_FORCE_PICTURE_TYPE, AMF_VIDEO_ENCODER_PICTURE_TYPE_IDR);
|
|||
+ }
|
|||
+ } else if (avctx->codec->id == AV_CODEC_ID_HEVC) {
|
|||
+ switch (frame->pict_type) {
|
|||
+ case AV_PICTURE_TYPE_I:
|
|||
+ AMF_ASSIGN_PROPERTY_INT64(res, surface, AMF_VIDEO_ENCODER_HEVC_FORCE_PICTURE_TYPE, AMF_VIDEO_ENCODER_HEVC_PICTURE_TYPE_I);
|
|||
+ break;
|
|||
+ case AV_PICTURE_TYPE_P:
|
|||
+ AMF_ASSIGN_PROPERTY_INT64(res, surface, AMF_VIDEO_ENCODER_HEVC_FORCE_PICTURE_TYPE, AMF_VIDEO_ENCODER_HEVC_PICTURE_TYPE_P);
|
|||
+ break;
|
|||
+ case AV_PICTURE_TYPE_B:
|
|||
+ av_log(ctx, AV_LOG_WARNING, "Ignoring B-Frame, unsupported by AMD AMF H.265 Encoder.");
|
|||
+ break;
|
|||
+ case AV_PICTURE_TYPE_S:
|
|||
+ AMF_ASSIGN_PROPERTY_INT64(res, surface, AMF_VIDEO_ENCODER_HEVC_FORCE_PICTURE_TYPE, AMF_VIDEO_ENCODER_HEVC_PICTURE_TYPE_SKIP);
|
|||
+ break;
|
|||
+ default:
|
|||
+ AMF_ASSIGN_PROPERTY_INT64(res, surface, AMF_VIDEO_ENCODER_HEVC_FORCE_PICTURE_TYPE, AMF_VIDEO_ENCODER_HEVC_PICTURE_TYPE_NONE);
|
|||
+ break;
|
|||
+ }
|
|||
+ // Keyframe overrides previous assignment.
|
|||
+ if (frame->key_frame) {
|
|||
+ AMF_ASSIGN_PROPERTY_INT64(res, surface, AMF_VIDEO_ENCODER_HEVC_FORCE_PICTURE_TYPE, AMF_VIDEO_ENCODER_HEVC_PICTURE_TYPE_IDR);
|
|||
+ }
|
|||
+ }
|
|||
|
|||
// submit surface |
|||
res = ctx->encoder->pVtbl->SubmitInput(ctx->encoder, (AMFData*)surface); |
@ -0,0 +1,15 @@ |
|||
--- a/configure
|
|||
+++ b/configure
|
|||
@@ -5646,12 +5646,9 @@ elif enabled mips; then
|
|||
|
|||
# Enable minimum ISA based on selected options |
|||
if enabled mips64; then |
|||
- enabled mips64r6 && check_inline_asm_flags mips64r6 '"dlsa $0, $0, $0, 1"' '-mips64r6'
|
|||
enabled mips64r2 && check_inline_asm_flags mips64r2 '"dext $0, $0, 0, 1"' '-mips64r2' |
|||
disabled mips64r6 && disabled mips64r2 && check_inline_asm_flags mips64r1 '"daddi $0, $0, 0"' '-mips64' |
|||
else |
|||
- enabled mips32r6 && check_inline_asm_flags mips32r6 '"aui $0, $0, 0"' '-mips32r6'
|
|||
- enabled mips32r5 && check_inline_asm_flags mips32r5 '"eretnc"' '-mips32r5'
|
|||
enabled mips32r2 && check_inline_asm_flags mips32r2 '"ext $0, $0, 0, 1"' '-mips32r2' |
|||
disabled mips32r6 && disabled mips32r5 && disabled mips32r2 && check_inline_asm_flags mips32r1 '"addi $0, $0, 0"' '-mips32' |
|||
fi |
Loading…
Reference in new issue