]> granicus.if.org Git - handbrake/commitdiff
libhb: remove unnecessary usage of hb_audio_remap.
authorRodeo <tdskywalker@gmail.com>
Sun, 23 Sep 2012 14:14:38 +0000 (14:14 +0000)
committerRodeo <tdskywalker@gmail.com>
Sun, 23 Sep 2012 14:14:38 +0000 (14:14 +0000)
All decoders now output channels in Libav order.

git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@4977 b64f7644-9d1e-0410-96f1-a4d463321fa5

libhb/decavcodec.c
libhb/declpcm.c
libhb/encavcodecaudio.c

index b9e87b4eb03e1ef4bd6e17e5d6d3b746407c39f9..984b1cf8782c001ce1868c063e9e8161e8d4d746 100644 (file)
@@ -40,7 +40,6 @@
 
 #include "hb.h"
 #include "hbffmpeg.h"
-#include "audio_remap.h"
 #include "audio_resample.h"
 
 static void compute_frame_duration( hb_work_private_t *pv );
index 0cb5726a5264b60d859063364938e9aec19bbd80..c531d4b97a86925e4a799a25023ba45289871ce8 100644 (file)
@@ -9,7 +9,6 @@
 
 #include "hb.h"
 #include "hbffmpeg.h"
-#include "audio_remap.h"
 #include "audio_resample.h"
 
 struct hb_work_private_s
index 67f4d23d57ff8c8ff202289406288475621ed80a..fe398ab4fe0c44ab13312634001ae9f4dd331928 100644 (file)
@@ -9,7 +9,6 @@
 
 #include "hb.h"
 #include "hbffmpeg.h"
-#include "audio_remap.h"
 #include "audio_resample.h"
 
 struct hb_work_private_s
@@ -24,7 +23,6 @@ struct hb_work_private_s
     hb_list_t      * list;
     uint8_t        * buf;
 
-    hb_audio_remap_t    *remap;
     hb_audio_resample_t *resample;
 };
 
@@ -108,14 +106,6 @@ static int encavcodecaInit(hb_work_object_t *w, hb_job_t *job)
     }
     av_dict_free(&av_opts);
 
-    // channel remapping
-    pv->remap = hb_audio_remap_init(context->channel_layout, &hb_libav_chan_map,
-                                    audio->config.in.channel_map);
-    if (pv->remap == NULL)
-    {
-        hb_error("encavcodecaInit: hb_audio_remap_init() failed");
-    }
-
     // sample_fmt conversion
     pv->resample = hb_audio_resample_init(context->sample_fmt,
                                           audio->config.out.mixdown, 0, 0);
@@ -210,9 +200,6 @@ static void encavcodecaClose(hb_work_object_t * w)
             hb_list_empty(&pv->list);
         }
 
-        hb_audio_remap_free(pv->remap);
-        pv->remap = NULL;
-
         hb_audio_resample_free(pv->resample);
         pv->resample = NULL;
 
@@ -236,8 +223,7 @@ static hb_buffer_t* Encode(hb_work_object_t *w)
     hb_list_getbytes(pv->list, pv->buf, pv->input_samples * sizeof(float), &pts,
                      &pos);
 
-    // channel remapping and sample_fmt conversion
-    hb_audio_remap(pv->remap, (hb_sample_t*)pv->buf, pv->samples_per_frame);
+    // sample_fmt conversion
     resampled = hb_audio_resample(pv->resample, (void*)pv->buf,
                                   pv->samples_per_frame);