Skip to content

Instantly share code, notes, and snippets.

@BtbN
BtbN / stdin
Created August 29, 2016 15:41
stdin
diff --git a/libswscale/output.c b/libswscale/output.c
index f340c53..24631ff 100644
--- a/libswscale/output.c
+++ b/libswscale/output.c
@@ -311,6 +311,44 @@ static void yuv2nv12cX_c(SwsContext *c, const int16_t *chrFilter, int chrFilterS
}
}
+static void yuv2p010cX_c(SwsContext *c, const int16_t *chrFilter, int chrFilterSize,
+ const int16_t **chrUSrc, const int16_t **chrVSrc,
@BtbN
BtbN / stdin
Created August 26, 2016 19:38
stdin
diff --git a/libavcodec/mpegvideo_enc.c b/libavcodec/mpegvideo_enc.c
index 87d7954..08f03b2 100644
--- a/libavcodec/mpegvideo_enc.c
+++ b/libavcodec/mpegvideo_enc.c
@@ -1699,6 +1699,10 @@ no_output_pic:
static void frame_end(MpegEncContext *s)
{
+#if FF_API_CODED_FRAME
+ int tmp = 0;
@BtbN
BtbN / stdin
Created August 26, 2016 10:01
stdin
diff --git a/libavcodec/mpegvideo_enc.c b/libavcodec/mpegvideo_enc.c
index 87d7954..2233921 100644
--- a/libavcodec/mpegvideo_enc.c
+++ b/libavcodec/mpegvideo_enc.c
@@ -1736,6 +1736,8 @@ static void frame_end(MpegEncContext *s)
#if FF_API_CODED_FRAME
FF_DISABLE_DEPRECATION_WARNINGS
av_frame_copy_props(s->avctx->coded_frame, s->current_picture.f);
+ av_freep(&s->avctx->coded_frame->side_data);
+ s->avctx->coded_frame->nb_side_data = 0;
@BtbN
BtbN / stdin
Created August 19, 2016 19:18
stdin
diff --git a/libavutil/imgutils.c b/libavutil/imgutils.c
index 37808e5..96e94bf 100644
--- a/libavutil/imgutils.c
+++ b/libavutil/imgutils.c
@@ -31,6 +31,8 @@
#include "pixdesc.h"
#include "rational.h"
+#include <smmintrin.h>
+
@BtbN
BtbN / stdin
Created August 19, 2016 18:26
stdin
#include <assert.h>
#include <stdint.h>
#include <smmintrin.h>
#include <stdlib.h>
#include <stdio.h>
#include <time.h>
#include <string.h>
#define CACHED_BUFFER_SIZE 8192
@BtbN
BtbN / stdin
Created June 29, 2016 09:23
stdin
diff --git a/libavfilter/avfilter.h b/libavfilter/avfilter.h
index 04bf585..79227a7 100644
--- a/libavfilter/avfilter.h
+++ b/libavfilter/avfilter.h
@@ -37,6 +37,7 @@
#include "libavutil/attributes.h"
#include "libavutil/avutil.h"
+#include "libavutil/buffer.h"
#include "libavutil/dict.h"
@BtbN
BtbN / stdin
Created June 29, 2016 09:22
stdin
diff --git a/libavfilter/avfilter.h b/libavfilter/avfilter.h
index 04bf585..757b81a 100644
--- a/libavfilter/avfilter.h
+++ b/libavfilter/avfilter.h
@@ -37,6 +37,7 @@
#include "libavutil/attributes.h"
#include "libavutil/avutil.h"
+#include "libavutil/buffer.h"
#include "libavutil/dict.h"
@BtbN
BtbN / optcudaincludecuviddec.h
Created June 7, 2016 11:36
/opt/cuda/include/cuviddec.h
/*
* Copyright 1993-2008 NVIDIA Corporation. All rights reserved.
*
* NOTICE TO USER:
*
* This source code is subject to NVIDIA ownership rights under U.S. and
* international Copyright laws. Users and possessors of this source code
* are hereby granted a nonexclusive, royalty-free license to use this code
* in individual and commercial software.
*
@BtbN
BtbN / stdin
Created April 11, 2016 17:18
stdin
diff --git a/libavformat/concatdec.c b/libavformat/concatdec.c
index 50d6689..e3418e1 100644
--- a/libavformat/concatdec.c
+++ b/libavformat/concatdec.c
@@ -364,7 +364,7 @@ static int concat_read_close(AVFormatContext *avf)
for (i = 0; i < cat->nb_files; i++) {
av_freep(&cat->files[i].url);
- for (j = 0; j < cat->avf->nb_streams; j++) {
+ for (j = 0; j < cat->files[i].nb_streams; j++) {
@BtbN
BtbN / stdin
Created March 25, 2016 22:59
stdin
diff --git a/configure b/configure
index feb0bc2..2b16198 100755
--- a/configure
+++ b/configure
@@ -5516,7 +5516,8 @@ enabled avfoundation_indev && { check_lib2 CoreGraphics/CoreGraphics.h CGGetActi
enabled avisynth && { { check_lib2 "windows.h" LoadLibrary; } ||
{ check_lib2 "dlfcn.h" dlopen -ldl; } ||
die "ERROR: LoadLibrary/dlopen not found for avisynth"; }
-enabled cuda && check_lib cuda.h cuInit -lcuda
+enabled cuda && { check_lib cuda.h cuInit -lcuda ||