vanhofen
6 years ago
4 changed files with 0 additions and 104 deletions
@ -1,24 +0,0 @@ |
|||
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" |
@ -1,14 +0,0 @@ |
|||
--- 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); |
@ -1,11 +0,0 @@ |
|||
--- 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; |
|||
|
@ -1,55 +0,0 @@ |
|||
--- 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); |
Loading…
Reference in new issue