Hi!

I believe attached patch is necessary to fix ticket #6839 and several
older bug reports.

Missing version bump and APIchanges entry.

Please review, Carl Eugen
From 3c5966f992c4bf5e64cc1a4196eb90f804b65bf6 Mon Sep 17 00:00:00 2001
From: Carl Eugen Hoyos <ceffm...@gmail.com>
Date: Fri, 17 Nov 2017 12:06:24 +0100
Subject: [PATCH] lavfi/buffersrc: Add
 AVBufferSrcParameters->bits_per_raw_sample parameter.

Allows to choose the correct destination pix_fmt for source pix_fmt
with bits_per_raw_sample < AVComponentDescriptor->depth.
---
 libavfilter/buffersrc.h |    7 +++++++
 1 file changed, 7 insertions(+)

diff --git a/libavfilter/buffersrc.h b/libavfilter/buffersrc.h
index 0652113..c9cb1a8 100644
--- a/libavfilter/buffersrc.h
+++ b/libavfilter/buffersrc.h
@@ -114,6 +114,13 @@ typedef struct AVBufferSrcParameters {
      * Audio only, the audio channel layout
      */
     uint64_t channel_layout;
+
+    /**
+     * Video only, the actual number of used bits of the AVPixelFormat,
+     * corresponds to bits_per_raw_sample.
+     * 0 means unknown, assume max number of bits for the AVPixelFormat.
+     */
+    int bits_per_raw_sample;
 } AVBufferSrcParameters;
 
 /**
-- 
1.7.10.4

_______________________________________________
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
http://ffmpeg.org/mailman/listinfo/ffmpeg-devel

Reply via email to