---
libavcodec/ac3enc.c | 38 +++++++++++++++++++-------------------
1 files changed, 19 insertions(+), 19 deletions(-)
diff --git a/libavcodec/ac3enc.c b/libavcodec/ac3enc.c
index d0dd240..1aa01fd 100644
--- a/libavcodec/ac3enc.c
+++ b/libavcodec/ac3enc.c
@@ -468,6 +468,25 @@ static void apply_mdct(AC3EncodeContext *s)
/**
+ * Initialize stereo rematrixing.
+ * If the strategy does not change for each frame, set the rematrixing flags.
+ */
+static void rematrixing_init(AC3EncodeContext *s)
+{
+ s->rematrixing = AC3_REMATRIXING_SUMS;
+ /* NOTE: AC3_REMATRIXING_ALWAYS and AC3_REMATRIXING_NONE might be used in
+ the future in conjunction with channel coupling. */
+
+ if (s->rematrixing & AC3_REMATRIXING_IS_STATIC) {
+ int flag = (s->rematrixing == AC3_REMATRIXING_ALWAYS);
+ s->blocks[0].new_rematrixing_strategy = 1;
+ memset(s->blocks[0].rematrixing_flags, flag,
+ sizeof(s->blocks[0].rematrixing_flags));
+ }
+}
+
+
+/**
* Determine rematrixing flags for each block and band.
*/
static void compute_rematrixing_strategy(AC3EncodeContext *s)
@@ -2066,25 +2085,6 @@ static av_cold void set_bandwidth(AC3EncodeContext *s)
}
-/**
- * Initialize stereo rematrixing.
- * If the strategy does not change for each frame, set the rematrixing flags.
- */
-static void rematrixing_init(AC3EncodeContext *s)
-{
- s->rematrixing = AC3_REMATRIXING_SUMS;
- /* NOTE: AC3_REMATRIXING_ALWAYS and AC3_REMATRIXING_NONE might be used in
- the future in conjunction with channel coupling. */
-
- if (s->rematrixing & AC3_REMATRIXING_IS_STATIC) {
- int flag = (s->rematrixing == AC3_REMATRIXING_ALWAYS);
- s->blocks[0].new_rematrixing_strategy = 1;
- memset(s->blocks[0].rematrixing_flags, flag,
- sizeof(s->blocks[0].rematrixing_flags));
- }
-}
-
-
static av_cold int allocate_buffers(AVCodecContext *avctx)
{
int blk, ch;
_______________________________________________
FFmpeg-soc mailing list
[email protected]
https://lists.mplayerhq.hu/mailman/listinfo/ffmpeg-soc