Re: [FFmpeg-devel] [PATCH 1/5] af_hdcd: some types renamed to remove _t

2016-09-07 Thread Burt P.
applied

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


Re: [FFmpeg-devel] [PATCH 1/5] af_hdcd: some types renamed to remove _t

2016-09-06 Thread Michael Niedermayer
On Mon, Sep 05, 2016 at 06:18:41AM -0500, Burt P wrote:
> Following a suggestion by Diego Biurrun.
> _t is reserved for POSIX, apparently.
> 
> Signed-off-by: Burt P 
> ---
>  libavfilter/af_hdcd.c | 58 
> +--
>  1 file changed, 29 insertions(+), 29 deletions(-)

LGTM

thx


[...]

-- 
Michael GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB

I know you won't believe me, but the highest form of Human Excellence is
to question oneself and others. -- Socrates


signature.asc
Description: Digital signature
___
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
http://ffmpeg.org/mailman/listinfo/ffmpeg-devel


[FFmpeg-devel] [PATCH 1/5] af_hdcd: some types renamed to remove _t

2016-09-05 Thread Burt P
Following a suggestion by Diego Biurrun.
_t is reserved for POSIX, apparently.

Signed-off-by: Burt P 
---
 libavfilter/af_hdcd.c | 58 +--
 1 file changed, 29 insertions(+), 29 deletions(-)

diff --git a/libavfilter/af_hdcd.c b/libavfilter/af_hdcd.c
index 0272305..cde2340 100644
--- a/libavfilter/af_hdcd.c
+++ b/libavfilter/af_hdcd.c
@@ -872,13 +872,13 @@ typedef struct {
 int count_sustain_expired;
 
 int _ana_snb;   /**< used in the analyze mode tone generator */
-} hdcd_state_t;
+} hdcd_state;
 
 typedef enum {
 HDCD_PE_NEVER= 0, /**< All valid packets have PE set to off */
 HDCD_PE_INTERMITTENT = 1, /**< Some valid packets have PE set to on */
 HDCD_PE_PERMANENT= 2, /**< All valid packets have PE set to on  */
-} hdcd_pe_t;
+} hdcd_pe;
 
 static const char * const pe_str[] = {
 "never enabled",
@@ -890,31 +890,31 @@ typedef enum {
 HDCD_NONE= 0,  /**< HDCD packets do not (yet) appear  */
 HDCD_NO_EFFECT   = 1,  /**< HDCD packets appear, but all control codes 
are NOP */
 HDCD_EFFECTUAL   = 2,  /**< HDCD packets appear, and change the output 
in some way */
-} hdcd_detection_t;
+} hdcd_dv;
 
 typedef enum {
 HDCD_PVER_NONE   = 0, /**< No packets (yet) discovered */
 HDCD_PVER_A  = 1, /**< Packets of type A (8-bit control) 
discovered */
 HDCD_PVER_B  = 2, /**< Packets of type B (8-bit control, 8-bit 
XOR) discovered */
 HDCD_PVER_MIX= 3, /**< Packets of type A and B discovered, most 
likely an encoding error */
-} hdcd_pf_t;
+} hdcd_pf;
 
 static const char * const pf_str[] = {
 "?", "A", "B", "A+B"
 };
 
 typedef struct {
-hdcd_detection_t hdcd_detected;
-hdcd_pf_t packet_type;
+hdcd_dv hdcd_detected;
+hdcd_pf packet_type;
 int total_packets; /**< valid packets */
 int errors;/**< detectable errors */
-hdcd_pe_t peak_extend;
+hdcd_pe peak_extend;
 int uses_transient_filter;
 float max_gain_adjustment; /**< in dB, expected in the range -7.5 to 0.0 */
 int cdt_expirations;   /**< -1 for never set, 0 for set but never 
expired */
 
 int _active_count; /**< used internally */
-} hdcd_detection_data_t;
+} hdcd_detection_data;
 
 typedef enum {
 HDCD_ANA_OFF= 0,
@@ -923,7 +923,7 @@ typedef enum {
 HDCD_ANA_CDT= 3,
 HDCD_ANA_TGM= 4,
 HDCD_ANA_TOP= 5, /**< used in max value of AVOption */
-} hdcd_ana_mode_t;
+} hdcd_ana_mode;
 
 /** analyze mode descriptions: macro for AVOption definitions, array of const 
char for mapping mode to string */
 #define HDCD_ANA_OFF_DESC "disabled"
@@ -941,7 +941,7 @@ static const char * const ana_mode_str[] = {
 
 typedef struct HDCDContext {
 const AVClass *class;
-hdcd_state_t state[HDCD_MAX_CHANNELS];
+hdcd_state state[HDCD_MAX_CHANNELS];
 
 /* AVOption members */
 /** use hdcd_*_stereo() functions to process both channels together.
@@ -975,7 +975,7 @@ typedef struct HDCDContext {
 int val_target_gain;   /**< last matching target_gain in both channels */
 
 /* User information/stats */
-hdcd_detection_data_t detect;
+hdcd_detection_data detect;
 } HDCDContext;
 
 #define OFFSET(x) offsetof(HDCDContext, x)
@@ -1001,7 +1001,7 @@ static const AVOption hdcd_options[] = {
 
 AVFILTER_DEFINE_CLASS(hdcd);
 
-static void hdcd_reset(hdcd_state_t *state, unsigned rate, unsigned cdt_ms)
+static void hdcd_reset(hdcd_state *state, unsigned rate, unsigned cdt_ms)
 {
 int i;
 
@@ -1031,7 +1031,7 @@ static void hdcd_reset(hdcd_state_t *state, unsigned 
rate, unsigned cdt_ms)
 }
 
 /** update the user info/counters */
-static void hdcd_update_info(hdcd_state_t *state)
+static void hdcd_update_info(hdcd_state *state)
 {
 if (state->control & 16) state->count_peak_extend++;
 if (state->control & 32) state->count_transient_filter++;
@@ -1047,9 +1047,9 @@ typedef enum {
 HDCD_CODE_B_CHECKFAIL,
 HDCD_CODE_EXPECT_A,
 HDCD_CODE_EXPECT_B,
-} hdcd_code_result_t;
+} hdcd_code_result;
 
-static hdcd_code_result_t hdcd_code(const uint32_t bits, unsigned char *code)
+static hdcd_code_result hdcd_code(const uint32_t bits, unsigned char *code)
 {
 if ((bits & 0x0fa00500) == 0x0fa00500) {
 /* A: 8-bit code  0x7e0fa005[..] */
@@ -1078,7 +1078,7 @@ static hdcd_code_result_t hdcd_code(const uint32_t bits, 
unsigned char *code)
 return HDCD_CODE_NONE;
 }
 
-static int hdcd_integrate(HDCDContext *ctx, hdcd_state_t *state, int *flag, 
const int32_t *samples, int count, int stride)
+static int hdcd_integrate(HDCDContext *ctx, hdcd_state *state, int *flag, 
const int32_t *samples, int count, int stride)
 {
 uint32_t bits = 0;
 int result = FFMIN(state->readahead, count);
@@ -1213,7 +1213,7 @@ static int hdcd_integrate_stereo(HDCDContext *ctx, int 
*flag, const int32_t *sam
 return result;
 }
 
-static void hdcd_sustain_reset(hdcd_state_t *state