On 08/07/2016 15:40, Matthieu Bouron wrote:
On Fri, Jul 08, 2016 at 01:21:48PM +0200, Benoit Fouet wrote:
Hi,
On 07/07/2016 17:43, Matthieu Bouron wrote:
[...]
0001-lavc-add-mediacodec-hwaccel-support.patch
From 9bb86990f0f7a26d25878a771f5977ae83d14769 Mon Sep 17 00:00:00 2001
From: Matthieu Bouron<matthieu.bou...@stupeflix.com>
Date: Fri, 11 Mar 2016 17:21:04 +0100
Subject: [PATCH] lavc: add mediacodec hwaccel support
---
configure | 1 +
libavcodec/Makefile | 6 +-
libavcodec/allcodecs.c | 1 +
libavcodec/mediacodec.c | 133 ++++++++++++++++++++
libavcodec/mediacodec.h | 88 +++++++++++++
libavcodec/mediacodec_surface.c | 66 ++++++++++
libavcodec/mediacodec_surface.h | 31 +++++
libavcodec/mediacodec_wrapper.c | 5 +-
libavcodec/mediacodecdec.c | 270
+++++++++++++++++++++++++++++++++-------
libavcodec/mediacodecdec.h | 17 +++
libavcodec/mediacodecdec_h264.c | 44 ++++++-
libavcodec/version.h | 2 +-
libavutil/pixdesc.c | 4 +
libavutil/pixfmt.h | 2 +
14 files changed, 611 insertions(+), 59 deletions(-)
create mode 100644 libavcodec/mediacodec.c
create mode 100644 libavcodec/mediacodec.h
create mode 100644 libavcodec/mediacodec_surface.c
create mode 100644 libavcodec/mediacodec_surface.h
[...]
diff --git a/libavcodec/mediacodecdec.h b/libavcodec/mediacodecdec.h
index 646b628..8613352 100644
--- a/libavcodec/mediacodecdec.h
+++ b/libavcodec/mediacodecdec.h
@@ -34,12 +34,17 @@
typedef struct MediaCodecDecContext {
+ volatile int refcount;
+
I don't think this needs to be marked volatile
The avpriv_atomic_[...] functions take a volatile int *ptr. Also there are
examples in our code base that declare the atomic as volatile int (see
libavutil/buffer_internal.h, libavcodec/mmaldec.c for example). I can
be missing something though.
as the atomic api is working on addresses, it should not make any
difference.
I don't really mind, though, keep it this way if you prefer
I'm not a volatile fan boy, so I try to refrain from using them when
it's not strictly needed :-)
[...]
If you are OK with my comments, I will push the patch.
Yes, sure.
Cheers,
--
Ben
_______________________________________________
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
http://ffmpeg.org/mailman/listinfo/ffmpeg-devel