]> git.ipfire.org Git - thirdparty/tvheadend.git/commitdiff
[libav]: libx265 picture type
authorlekma <lekmalek@gmail.com>
Wed, 31 Aug 2016 14:20:53 +0000 (16:20 +0200)
committerJaroslav Kysela <perex@perex.cz>
Mon, 28 Aug 2017 13:32:48 +0000 (15:32 +0200)
Makefile.ffmpeg
src/transcoding/transcode/hwaccels/vaapi.c
support/patches/ffmpeg.libx265.diff [new file with mode: 0644]

index e131446f3a6ec5d9a557597f4352b90f607793ed..fa168ce3b110e54fda7af52918d64f776d7bd545 100644 (file)
@@ -244,6 +244,7 @@ ifeq (yes,$(CONFIG_LIBX265))
 
 EXTLIBS  += libx265
 ENCODERS += libx265
+FFMPEG_DIFFS += ffmpeg.libx265.diff
 
 endif
 
index 89321eb7d98ec419a33869985c39f25722e31dfc..6978446ee8a7f6d1f5bd34f6ad29dfe3e7eafc83 100644 (file)
@@ -71,7 +71,7 @@ tvhva_init()
         }
         else {
             tvhinfo(LS_VAAPI,
-                    "succesful context creation for device: %s", device);
+                    "successful context creation for device: %s", device);
             return 0;
         }
     }
diff --git a/support/patches/ffmpeg.libx265.diff b/support/patches/ffmpeg.libx265.diff
new file mode 100644 (file)
index 0000000..7589e14
--- /dev/null
@@ -0,0 +1,44 @@
+diff -urN ../ffmpeg-3.1.3.orig/libavcodec/libx265.c ./libavcodec/libx265.c
+--- ../ffmpeg-3.1.3.orig/libavcodec/libx265.c  2016-06-27 01:54:29.000000000 +0200
++++ ./libavcodec/libx265.c     2016-08-31 13:52:05.599612289 +0200
+@@ -252,6 +252,7 @@
+     int nnal;
+     int ret;
+     int i;
++    int pict_type;
+     ctx->api->picture_init(ctx->params, &x265pic);
+@@ -299,22 +300,27 @@
+     pkt->pts = x265pic_out.pts;
+     pkt->dts = x265pic_out.dts;
+-#if FF_API_CODED_FRAME
+-FF_DISABLE_DEPRECATION_WARNINGS
+     switch (x265pic_out.sliceType) {
+     case X265_TYPE_IDR:
+     case X265_TYPE_I:
+-        avctx->coded_frame->pict_type = AV_PICTURE_TYPE_I;
++        pict_type = AV_PICTURE_TYPE_I;
+         break;
+     case X265_TYPE_P:
+-        avctx->coded_frame->pict_type = AV_PICTURE_TYPE_P;
++        pict_type = AV_PICTURE_TYPE_P;
+         break;
+     case X265_TYPE_B:
+-        avctx->coded_frame->pict_type = AV_PICTURE_TYPE_B;
++        pict_type = AV_PICTURE_TYPE_B;
++        break;
++    default:
++        pict_type = AV_PICTURE_TYPE_NONE;
+         break;
+     }
++#if FF_API_CODED_FRAME
++FF_DISABLE_DEPRECATION_WARNINGS
++    avctx->coded_frame->pict_type = pict_type;
+ FF_ENABLE_DEPRECATION_WARNINGS
+ #endif
++    ff_side_data_set_encoder_stats(pkt, -1, NULL, 0, pict_type);
+     *got_packet = 1;
+     return 0;