[FFmpeg-devel] [PATCH] Wideband Single-bit Data (WSD) demuxer

Peter Ross pross at xvid.org
Sat Apr 19 04:27:57 CEST 2014


On Fri, Apr 18, 2014 at 09:01:31AM +0000, Carl Eugen Hoyos wrote:
> Peter Ross <pross <at> xvid.org> writes:

Thanks for spotting these errors.

> > +    switch (bit) {
> > +    case 2: return AV_CH_BACK_RIGHT;
> > +    case 3:
> > +        avpriv_request_sample(s, "Rr-middle");
> > +        break;
> > +    case 4: return AV_CH_BACK_CENTER;
> > +    case 5:
> > +        avpriv_request_sample(s, "Lr-middle");
> > +        break;
> > +    case 6: return AV_CH_BACK_LEFT;
> > +    case 24: return AV_CH_LOW_FREQUENCY;
> > +    case 26: return AV_CH_FRONT_RIGHT;
> > +    case 27: return AV_CH_FRONT_RIGHT_OF_CENTER;
> > +    case 28: return AV_CH_FRONT_CENTER;
> > +    case 29: return AV_CH_FRONT_LEFT_OF_CENTER;
> > +    case 30: return AV_CH_FRONT_LEFT;
> 
> I would have expected AV_CH_SIDE_* in the list.
> Aren't Rr-middle and Lr-middle side channels?

I am unsure and don't have such WSD samples to test that hypothesis.
(only capable of listening to the stereo and quad stuff anyway.)

The 32-bit channel assignment value is describes the listening room as a box.
When the 'flag' bit is clear, the layout is as below. Side channels may occur
in the bits marked with a dot, but the specification doesn't go into any
more detail.

                               "Front"
     bit31 ..................................................... bit24

    [------------------------------------------------------------------]
    [     |  Lf  | Lf-middle |  Cf  | Rf-middle |  Rf  |     |  LFE    ]
    [------------------------------------------------------------------]
    [  .  |      |           |      |           |      |  .  |         ]
    [------------------------------------------------------------------]
    [  .  |      |           |      |           |      |  .  |         ]
    [------------------------------------------------------------------]
    [     |  Lr  | Lr-middle |  Cr  | Rr-middle |  Rr  |     |  flag   ]
    [------------------------------------------------------------------]

     bit7 ...................................................... bit0
                                "Back"


When the 'flag' bit is set, a circular room configuration can be used.
Here is a dump from an 8ch file.

                "Front"
 --------------------------------------
 |    |    | X  |   | X  |   |    |   |
 | X  |    |    |   |    |   | X  |   |
 | X  |    |    |   |    |   | X  |   |
 |    |    | X  |   | X  |   |    | X |
 --------------------------------------
                "Back"

> > +    av_timecode_make_smpte_tc_string(playback_time, avio_rb32(pb), 0);
> > +    av_dict_set(&s->metadata, "playback_time", playback_time, 0);
> 
> AVStream->duration or do I misunderstand?

True. The duration is encoded as a smpte timecode, giving 1-second precision
accuracy, so I am thinking about skipping over this.

-- Peter
(A907 E02F A6E5 0CD2 34CD 20D2 6760 79C5 AC40 DD6B)
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 198 bytes
Desc: Digital signature
URL: <http://ffmpeg.org/pipermail/ffmpeg-devel/attachments/20140419/8492e607/attachment.asc>


More information about the ffmpeg-devel mailing list