OSDN Git Service

Amended the code comments about 6-channel and 1-channel audio extraction to reflect...
authormaurj <maurj@b64f7644-9d1e-0410-96f1-a4d463321fa5>
Tue, 27 Mar 2007 21:28:40 +0000 (21:28 +0000)
committermaurj <maurj@b64f7644-9d1e-0410-96f1-a4d463321fa5>
Tue, 27 Mar 2007 21:28:40 +0000 (21:28 +0000)
git-svn-id: svn://localhost/HandBrake/trunk@458 b64f7644-9d1e-0410-96f1-a4d463321fa5

libhb/deca52.c
libhb/work.c

index 511a9a1..a5f3123 100644 (file)
@@ -70,12 +70,12 @@ int deca52Init( hb_work_object_t * w, hb_job_t * job )
        work.c has already done some of this deduction for us in do_job() */
        
        if (w->config->a52.channelsused == 6) {
-               /* we're going to be encoding to AAC,
+               /* we're going to be encoding to a 6ch-supporting format,
                and have turned on the "preserve 5.1" flag */
                pv->flags_out = A52_3F2R | A52_LFE;
        } else if (w->config->a52.channelsused == 1) {
-               /* we're going to be encoding to AAC, */
-               /* and want to keep the mono-ness of the source audio */
+               /* we're going to be encoding to a 1ch-supporting format,
+               so mix down to a mono track */
                pv->flags_out = A52_MONO;
        } else if (w->config->a52.channelsused == 2 && w->config->a52.channels == 5 && w->config->a52.lfechannels == 1) {
                /* we are mixing a 5.1 source down to stereo, so use dolby surround */
index e8fafbd..97c332b 100644 (file)
@@ -274,28 +274,27 @@ static void do_job( hb_job_t * job, int cpu_count )
                /* store this audio's channel counts in the audio struct */
                
                /* we will only end up with a channelsused value other than 2
-               if we are encoding to AAC.  All other audio encodings will get
+               if we are encoding to AAC or OGM.  All other audio encodings will get
                a stereo mix. */
                
                if (audio->channels == 5 && audio->lfechannels == 1) {
                        /* we have a 5.1 AC-3 source soundtrack */
                        if ((job->acodec == HB_ACODEC_FAAC || job->acodec == HB_ACODEC_VORBIS) && job->surround) {
-                               /* we're going to be encoding to AAC,
+                               /* we're going to be encoding to a 6ch-supporting format,
                                and have turned on the "preserve 5.1" flag */
                                audio->channelsused = 6;
                        } else {
-                               /* mix 5.1 down to Dolby Digital (2-channel) for
-                               non-AAC audio, or for AAC without 5.1 preservation */
+                               /* mix 5.1 down to Dolby Digital (2-channel) */
                                audio->channelsused = 2;
                        }
                } else if (audio->channels == 1 && audio->lfechannels == 0) {
                        /* we have a 1.0 mono AC-3 source soundtrack */
                        if (job->acodec == HB_ACODEC_FAAC || job->acodec == HB_ACODEC_VORBIS) {
-                               /* we're going to be encoding to AAC,
-                               so mix down to a mono AAC track */
+                               /* we're going to be encoding to a 1ch-supporting format,
+                               so mix down to a mono track */
                                audio->channelsused = 1;
                        } else {
-                               /* mix up the mono track to stereo for non-AAC formats */
+                               /* mix up the mono track to stereo */
                                audio->channelsused = 2;
                        }
                } else {