Return to Video

Analog Digital 2 (24 mins)

  • 0:00 - 0:07
    So here's how the deal is going to work
    Official computer science terminology.
  • 0:07 - 0:12
    Alright, so, I've got this signal. And
    for, to make it digital, what I want to do
  • 0:12 - 0:17
    is I want to take the signal in like
    [inaudible], the, the digital equivalent
  • 0:17 - 0:22
    of a microphone. I'm going to take in
    sound signal. And what I want to do is
  • 0:22 - 0:27
    reduce it basically to a series of
    numbers. So then it looks the RGB data
  • 0:27 - 0:32
    that we applied with so that once I've got
    those numbers, I could put them on a file
  • 0:32 - 0:36
    or send them on a network or whatever so
    that process is called digitization.
  • 0:36 - 0:41
    Taking in analog reducing it to numbers so
    I'm going to show you how that works. So
  • 0:41 - 0:46
    the way digitization is done. Is I, I,
    I've got this signal, I've drawn sort of
  • 0:46 - 0:50
    big, and I want to match, so this, the
    signal is analog. Let, let's say this is
  • 0:50 - 0:54
    really in the air and that is really
    perfectly what the signal looks like and
  • 0:54 - 0:58
    so I want to try and capture that signal.
    So, the way that this is done with
  • 0:58 - 1:04
    digitization is called sampling. And what
    am I going to do is I'm going to run a
  • 1:04 - 1:11
    little system which is going to measure
    what the height of the curve is very
  • 1:11 - 1:19
    quickly overtime And so I'm going to use
    as my example the audio CD format. So the
  • 1:19 - 1:27
    audio CD format, digitizers, sounds and is
    samples 4400 per second. So I've drawn the
  • 1:27 - 1:32
    samples for the coarsely on the curve here
    but in reality for sounds you can actually
  • 1:32 - 1:37
    hear the samples will be very tightly
    spaced against the curve so it's going to
  • 1:37 - 1:42
    come up pretty good. Alright so here's
    what sampling does. Let's say this is
  • 1:42 - 1:47
    going to be my first sample here. The way
    it's going to have a notional kind of zero
  • 1:47 - 1:51
    line going Down the middle here All right?
    So that will be, that's going to be sort
  • 1:51 - 1:55
    of the base line and the way these sounds
    work is I, I've always talked about them
  • 1:55 - 1:58
    going above the zero line but actually
    have the time on there below. So, we
  • 1:58 - 2:02
    record it as a series of both positive and
    negative numbers. So, the way that samples
  • 2:02 - 2:06
    go work, let's say I start recording right
    here, this is going to be my first sample.
  • 2:06 - 2:10
    So what I'm going to do is I'm going to
    look at like well, how high is t his above
  • 2:10 - 2:14
    the zero line and I'm going to measure it.
    And I'm just going to have some scale
  • 2:14 - 2:19
    where let's say, way up here for really
    loud noise will be the way audio CDs work
  • 2:19 - 2:25
    will be about 32,000 would be the max and
    so, in that scale. Maybe this is kind of a
  • 2:25 - 2:30
    not very loud sound so I'm just going to
    measure on that scale. We're just, where
  • 2:30 - 2:34
    is that number. So, let's say, that one
    turns out to be a 1003. So I'm going to
  • 2:34 - 2:38
    record that number. Okay, that was a
    three, that's my first sample. So then,
  • 2:38 - 2:43
    144,000 of a second later, the curve, now,
    this is very, this example, the curve is
  • 2:43 - 2:49
    way moving much farther than it would for,
    for real sound here just to show. So let's
  • 2:49 - 2:54
    say for this next sample I gauge the
    height of that like that's about 1720, so
  • 2:54 - 2:59
    I'm going to record that number. That's
    going to be my second sample. Now here's
  • 2:59 - 3:04
    my third sample, oh, 1939 and my next
    sample, you know, 2,102 and so on. So, I
  • 3:04 - 3:09
    just keep sampling this thing overtime.
    Now, here's can be a bunch the positive
  • 3:09 - 3:14
    numbers but actually down here can be a
    bunch of negative numbers, that's fine.
  • 3:14 - 3:20
    The result is I take signal in and I just
    reduce it to this like [inaudible] of
  • 3:20 - 3:25
    numbers. So there are, this is not a
    perfect process but it does work very
  • 3:25 - 3:31
    well. There's two sources of problems.
    Once source is let's that I was getting
  • 3:31 - 3:37
    this very first sample and I've said well
    let's call that a 1003. What if really
  • 3:37 - 3:43
    that signal, it was like a little bit
    higher than a 1003 but it wasn't quite so
  • 3:43 - 3:50
    far as a 1004. But in my system I'm stuck
    picking one of those two numbers. It's
  • 3:50 - 3:56
    either a 1003 or 1004 in my system and so
    there has maybe been a tiny error there as
  • 3:56 - 4:02
    I kind of put it in the nearest bucket and
    Audio CD ... A little bit of detail but I
  • 4:02 - 4:08
    mentioned, so they use numbers between
    roughly between -32,000 and +32,000. And
  • 4:08 - 4:13
    the reason is, that's the, that's the
    range of numbers you can store in two
  • 4:13 - 4:17
    bytes. So, the, the byte and its 8-bits
    comes back here And so it turns out, on an
  • 4:17 - 4:22
    audio CD, example, one sample started two
    bytes And so that, that kind of give us
  • 4:22 - 4:27
    how many different buckets and h ow many,
    you know, how many distinct numbers we can
  • 4:27 - 4:31
    have. Alright So that's a small
    [inaudible] I should just mention. So,
  • 4:31 - 4:35
    audio CDs, I think by most accounts, sound
    fantastic like, you know, whatever, the
  • 4:35 - 4:40
    "error" I was mentioning here is like,
    well, it's pretty small. The other source
  • 4:40 - 4:44
    of error which also for audio CD's is not
    a problem is like when one of the signal
  • 4:44 - 4:49
    had some big excursion like it went way up
    and then when it came down before my next
  • 4:49 - 4:53
    sample came in. I've, I could miss
    something and it turns out for audio CD's
  • 4:53 - 4:58
    just for the range of sound, a sound that
    did on audio CD would be outside of human
  • 4:58 - 5:03
    hearing. So, for the most part of that,
    that's not really a problem. All right, so
  • 5:03 - 5:07
    those are the two sources of Tactically
    imperfection but in reality this works
  • 5:07 - 5:12
    really well for [sound] aright so what AI
    have done is I've taken in the signal and
  • 5:12 - 5:17
    now what I have is just like, there's a
    lot of number and you can put those them
  • 5:17 - 5:22
    in to file or draw them on a CD or
    whatever. So I think that this leads to
  • 5:22 - 5:27
    the natural question of okay well, How
    does playback work? Well, I don't see why
  • 5:27 - 5:31
    to look at those numbers to be like, yeah.
    No of course you wanted -- Alright sop
  • 5:31 - 5:37
    here's going to work. Just give me so the
    reverse process. So, this is called
  • 5:37 - 5:42
    digital to audio conversion and there's a
    piece of hardware that a chip that
  • 5:42 - 5:47
    specialized to just do this. What the
    digital audio conversion is going to do is
  • 5:47 - 5:52
    it's going to take in the numbers and I
    swear, the phrase that comes in mind to
  • 5:52 - 5:57
    this is connect the dots. So, what this
    thing wants to do is to make actually a
  • 5:57 - 6:02
    pattern of electricity that exactly
    follows the original signal and then,
  • 6:02 - 6:06
    that, that electricity then we can feed to
    speaker and the speaker will make it back
  • 6:06 - 6:11
    in the sound. So, what the, what the
    digital audio converter going to do is it
  • 6:11 - 6:15
    going to look at the first number, a 1003.
    And so, it puts a dot, and like dot far
  • 6:15 - 6:19
    above line. Like okay, a 1003, got it. And
    then let's look at the next sample, oh,
  • 6:19 - 6:23
    1720, all right. S, let's kind of put a
    dot that height and then it, it's going to
  • 6:23 - 6:27
    come, basically draw a line so like, okay,
    I'll connect those first two. And then it
  • 6:27 - 6:30
    takes the next sample and the next one and
    the next one and you can see so we get
  • 6:30 - 6:34
    these dots and other, I drew actually
    these straight lines between those
  • 6:34 - 6:38
    samples. As you could see, even though the
    original was in some sense curved. The
  • 6:38 - 6:42
    straight lines put together, it does
    basically capture the shape of the sound.
  • 6:42 - 6:47
    And as I was saying, for audio CDs because
    really the sample are so close together
  • 6:47 - 6:52
    the straight lines were, worked very well.
    So I [inaudible] so the effect of going
  • 6:52 - 6:56
    through these numbers is, is able to
    recreate the original signal so this goes
  • 6:56 - 7:01
    to your direction. Taken a bunch of
    numbers, recreate the signal beautifully
  • 7:01 - 7:05
    and the we could put that in the speaker
    and now you're hearing one of the original
  • 7:05 - 7:12
    prerecorded sound was. So. That's how it
    works. And also I just sort of mention the
  • 7:12 - 7:18
    chip that does that The DTA converter. I
    see that sometimes in marketing materials
  • 7:18 - 7:23
    for like stereos or MP3 players you know,
    extra awesome DTA converter so you may
  • 7:23 - 7:28
    actually, just a proof I'm not making this
    up you actually, you may see that like a
  • 7:28 - 7:33
    box or something that's nearby. Alright,
    those are two directions. The sampling to
  • 7:33 - 7:38
    recorded it and DTA conversion to play
    back so I think the natural question here
  • 7:38 - 7:42
    would be. Why? Why go to all this trouble
    like, it wasn't my little telephone
  • 7:42 - 7:46
    diagram was actually simpler, right? I
    just have the microphone; I hook that to
  • 7:46 - 7:51
    the wire to the speaker. So what is the
    advantage of putting stuff and then we
  • 7:51 - 7:55
    would say technically taking the data and
    putting it in the digital domain. It used
  • 7:55 - 8:00
    to be was in the sound domain and then it
    was on the electricity domain but now I've
  • 8:00 - 8:04
    put in the digital domain of just numbers
    and we're going to see there's actually a
  • 8:04 - 8:08
    lot of advantages to having the data just
    be in the digital domain. So, I'll talk
  • 8:08 - 8:14
    about those. All right, so the first thing
    I want to think about is errors. It's
  • 8:14 - 8:19
    going to be one big advantage for digital
    And so I, when I described that I've
  • 8:19 - 8:25
    recorded this thing as numbers, 1003, 1720
    or whatever. You know, all take is covered
  • 8:25 - 8:30
    earlier. So, really, when I say numbers
    that means in a computer it could be just
  • 8:30 - 8:35
    the [inaudible] one. It's just that, you
    know, the 1720, there is just a pattern of
  • 8:35 - 8:41
    zeros and ones to represent that. It, it
    does take two bytes to do it but it does
  • 8:41 - 8:46
    work. So, an audio CD At the end of the
    day, what's recorded on an audio CD is
  • 8:46 - 8:51
    really the pattern of zeros and ones that
    makes up the series of numbers that then
  • 8:51 - 8:56
    would feed in to the DDA converter makes
    the music. So, if you, you got a
  • 8:56 - 9:01
    microscope and actually on the D, it
    really is really picks and valleys, Like
  • 9:01 - 9:07
    there's a physicality of the ones in the
    zeros u, you can actually see. Well, here
  • 9:07 - 9:12
    in the microscope we can see. Alright, so,
    I want to think about. Let's think about
  • 9:12 - 9:17
    the C, audio CD playback. So, the way it
    works is there's a laser that's in the end
  • 9:17 - 9:22
    of the CD and it's trying to kind of pull
    off the patterns of ones and zeros so they
  • 9:22 - 9:28
    can remake the sample numbers so that you
    can make the music. So, what is that going
  • 9:28 - 9:33
    to look like? And we talked about this a
    little bit before in my networking section
  • 9:33 - 9:38
    and I would say, well, it's going to look
    kind of like this. The pattern, the laser
  • 9:38 - 9:43
    is looking at the CD and let's say, the
    first number it sees is a one, you know,
  • 9:43 - 9:48
    I'll say that it's a one And then the next
    thing it sees is a zero. And then there's
  • 9:48 - 9:53
    a couple one and then a zero. So, it's
    reading the ones and zeros off the CD.
  • 9:54 - 10:00
    That's what it looks like in the abstract.
    Is that really what it's going to look
  • 10:00 - 10:07
    like coming off the CD? It I hook it in a
    oscilloscope off to the laser and look as
  • 10:07 - 10:13
    the electricity coming out, is or going to
    look like that with perfect 90 degree
  • 10:13 - 10:19
    corners, right? Now, there's going to be
    noise. Right? All the little wires and
  • 10:19 - 10:24
    magnets and layers and CD like probably
    jiggling a little bit while it seemly.
  • 10:24 - 10:29
    Here's what it's going to look like. It's
    going to look like that. You've got the
  • 10:29 - 10:35
    ones and the zeros in there just as we
    have for the analog scheme. There is noise
  • 10:35 - 10:42
    crowding up on top of our signal that's
    wha t we actually get. We get back signal
  • 10:42 - 10:48
    with noise. All right now, this is a, this
    is a little bit of a punchline moment
  • 10:48 - 10:53
    here. Suppose you're the CD player and
    you're like, oh, no. My signal up the CD,
  • 10:53 - 11:00
    [laugh]. It's got all this noise, [laugh]
    But look. Do you have any problem picking
  • 11:00 - 11:06
    the ones and zeros out of there? No.
    Right? You can have a lot noise on that
  • 11:06 - 11:13
    signal but the 1s and 0s you start pick
    them out and alright and so the effect on
  • 11:13 - 11:20
    the noise on the digital signal, it's
    nothing. Right, I can see 10111 so that
  • 11:20 - 11:27
    means I can have the CD also [inaudible]
    noise on it and I playback, it doesn't
  • 11:27 - 11:34
    come back like pretty close. The playback,
    it's perfect. Right it's just like the
  • 11:34 - 11:41
    signal came out ideally. So that's why or
    this is what is it. That's why digital
  • 11:41 - 11:45
    sound is better. Right? And I'm going to
    have to kind of string together all these
  • 11:45 - 11:49
    steps but I can take the signal I care
    about, encoded the zeros and ones, so
  • 11:49 - 11:53
    basically it's come to [inaudible] and it
    gives me a lot of noise resistance. It's
  • 11:53 - 11:57
    not perfect, right? If you, if you draw a
    hole in the CD you know, there could be a
  • 11:57 - 12:01
    mess up big enough on the CD to really to
    really mess things up. But it can stand a
  • 12:01 - 12:07
    lot. In particular, it's much better than
    analog but with analog, that hiss was just
  • 12:07 - 12:12
    mixed right in with the sound that I
    wanted to hear. So this is the big jump up
  • 12:12 - 12:18
    in, yeah, lots of things digital. So
    there, now you know. That, that's how it
  • 12:18 - 12:23
    works Alright, So, noise reduction or, you
    know, noise elimination really is one big
  • 12:23 - 12:28
    example. I'll just mention for
    completeness so the way CDs work,
  • 12:28 - 12:34
    obviously for the 0s and 1s is its greatly
    resistant to little of specs or dust
  • 12:34 - 12:40
    whatever that cause noise. It is also the
    case that the CD actually stores multiple
  • 12:40 - 12:45
    in a sense, multiple copies of the music.
    It's a little bit like packets on the
  • 12:45 - 12:50
    network. Remember we talked about packets
    and resend. The CD actually has multiple
  • 12:50 - 12:55
    copies and the copies are marked with
    checksums which I talked about in the
  • 12:55 - 13:00
    networking section And the CD can actually
    notice if there's like a little tiny h ole
  • 13:00 - 13:04
    or something but one part of the music
    didn't come out right, it can go to a, I'm
  • 13:04 - 13:09
    over some final behavior, but basically it
    can go to a fall back copy And so, it can,
  • 13:09 - 13:14
    it can swap that one in and just keep
    playing. And so that is another, a higher
  • 13:14 - 13:18
    level of air resistance. It's called air,
    air detection and correction that CDs have
  • 13:18 - 13:23
    and actually DVDs do as well. So that's
    how it, yeah, I can see you know, when
  • 13:23 - 13:27
    someone else's DVDs you could figure out
    like how big of a hole can you drill,
  • 13:27 - 13:31
    [laugh], in a, in a DVD and still have it
    play. I'll place for a big but You can
  • 13:31 - 13:36
    stand a little bit of just missing data
    and has another copy. That cannot, you
  • 13:36 - 13:40
    know so also that works, that works
    because it's digital that we can have this
  • 13:40 - 13:45
    logic in these if statements to kind of
    check someone copy and having if statement
  • 13:45 - 13:49
    that says oh, I'm going to go get the
    other copy in some places so yeah anyway
  • 13:49 - 13:54
    that would work. Alright Let me show you
    another thing that you can do with
  • 13:54 - 14:02
    digital. Alright so supposed the numbers
    That I had coming off of my audio CD were
  • 14:02 - 14:08
    these. So 12,000, 12002, 12006, 12007 this
    is actually pretty realistic that the, the
  • 14:08 - 14:15
    sampling is so fast on the audio CD that
    the signal appears to just change very
  • 14:15 - 14:21
    slowly for sounds that actually you know
    that you can hear. Alright so that's, so
  • 14:21 - 14:27
    what you notice about those numbers is
    that they are pretty near to each other.
  • 14:27 - 14:34
    Right? Like even though the base number
    12,000 is big, the change from one sample
  • 14:34 - 14:40
    to the next is like, is not very big,
    right it's under ten. In fact, it's just
  • 14:40 - 14:47
    sort of five. So, I'm going to propose a
    scheme, a compression scheme that we could
  • 14:47 - 14:54
    use so that we could record the audio data
    and have it take a, take a plus base. So,
  • 14:54 - 15:00
    here's a scheme I'm going to propose. What
    if. At the start of the audio data I just
  • 15:00 - 15:07
    put whatever the first number is so I
    record that first sample. And then after
  • 15:07 - 15:12
    that, I don't record any more samples.
    What I do, is I just record the difference
  • 15:12 - 15:18
    of each sample to the next. So, in this
    case, I would end up with 12,000 and I
  • 15:18 - 15:23
    would say plus two because the next sample
    is 12,002 and I would say plus four
  • 15:23 - 15:29
    because the difference between the third
    sample and the second was going up by
  • 15:29 - 15:35
    four. And so you know + one + three - five
    + one I just gotta put these all numbers.
  • 15:35 - 15:41
    So now you just have to convince yourself
    playback can still work so as long as
  • 15:41 - 15:46
    playback knows about my scheme. Like it's
    playback after to know the sample numbers,
  • 15:46 - 15:51
    So, playback would say, alright, this is
    next crazy this new called delta scheme
  • 15:51 - 15:55
    because you're just recording the deltas.
    So, playback, you know, alright so 12,000
  • 15:55 - 15:59
    is the first sample and the we'll just
    have to do the arithmetic to recreate the
  • 15:59 - 16:04
    sample. So, you could just work, it could
    just, you know, undo it to work out the
  • 16:04 - 16:08
    samples where 12,002, 12,006, 12,007 and
    then using those samples, feed those into
  • 16:08 - 16:12
    the DGA converter to like really recreate
    the sample. Okay, so, what's the advantage
  • 16:12 - 16:20
    of this? What's better about +two, +four,
    +one, +three than 12,000 to 12,006,
  • 16:20 - 16:27
    12,007. I mean it's sort of gets back to
    bytes. What this comes down to is those
  • 16:27 - 16:33
    numbers are smaller, a lot smaller and the
    reality is I could record them using to
  • 16:33 - 16:38
    your bytes. Right? If you just think about
    the amount of space on the CD, the amount
  • 16:38 - 16:43
    of little bits and values or whatever, if
    I use the scheme and, and then I'm
  • 16:43 - 16:47
    [inaudible] a little bit of complexity.
    But basically, I could take that sound and
  • 16:47 - 16:52
    I can record it may be using just half
    this much space because I'm just being KG
  • 16:52 - 16:56
    about making the number of small in those
    cases so that maybe I could just use one
  • 16:56 - 17:01
    byte whereas previously I had to use two
    bytes for each sample And I know that's in
  • 17:01 - 17:08
    complexity. So, that is compression. Right
    we talked out in all media, sound and
  • 17:08 - 17:13
    images all of these sort of things, they
    are typically stored in some compressed
  • 17:13 - 17:17
    format and this is an example where
    instead of just storing the numbers in the
  • 17:17 - 17:21
    total like straight ahead obvious way,
    we're going to have some scheme that takes
  • 17:21 - 17:26
    advantage of the fact and this is true for
    the images as well that the numbers don't
  • 17:26 - 17:30
    intended as jump around rando mly. But if
    I would get one pixel in an image and it
  • 17:30 - 17:35
    got certain red green blue values And then
    suppose you look at the picture right next
  • 17:35 - 17:40
    to it. Super, super close probably the red
    green blue values to that second pixel
  • 17:40 - 17:44
    they're probably really similar, really
    close to the red green blue values for the
  • 17:44 - 17:49
    first pixel And so maybe you could take
    advantage of that, have that some delta
  • 17:49 - 17:53
    encoding scheme where for each pixel maybe
    you didn't record what the number was.
  • 17:53 - 17:58
    Maybe you recorded what the difference of
    that pixel was versus the pixel to its
  • 17:58 - 18:03
    left and so then suddenly the numbers tend
    to get a lot smaller. So that's just an
  • 18:03 - 18:07
    example or essentially compression is
    comes up light so this is my kind of
  • 18:07 - 18:12
    zoomed in kind of simple example of how
    that might work. Now this example, this
  • 18:12 - 18:20
    compression is called loss less Because
    I've, I've changed the data around to take
  • 18:20 - 18:25
    up less space but I haven't given up any
    fidelity at all. If you run through my
  • 18:25 - 18:31
    delta scheme here, the samples, they come
    back exactly right. Right, I haven't, I
  • 18:31 - 18:36
    haven't given up any. I just add a
    complexity to take a plus space. So just
  • 18:36 - 18:42
    an example so PNG I talked about that as I
    think a little bit as a image format so
  • 18:42 - 18:48
    PNG is also laws less. It takes a bunch of
    pixels. It arranges them to take up last
  • 18:48 - 18:54
    space but the image is not corrupted
    anyway. It comes back professionally. So
  • 18:54 - 18:59
    laws less for mats I think are a little
    bit a little bit more rare. The more
  • 18:59 - 19:06
    common approach to compression is called
    lossy compression and so lossy compression
  • 19:06 - 19:11
    is going to take in the data. And it's
    going to cost it, it's going to rearrange
  • 19:11 - 19:18
    it so it takes up a lot less space. But.
    It's not going to repeat on playback. It's
  • 19:18 - 19:22
    not going to reproduce the data exactly.
    It's just going to be sort of
  • 19:22 - 19:30
    qualitatively very close. So, so, you
    pretty much can't tell. So JPEG, That's
  • 19:30 - 19:33
    the [inaudible] Lord knows we've been
    using. A lot of, JPEG is actually lossy
  • 19:33 - 19:37
    and I, I'll demonstrate this a little bit.
    So, you can give it an image with the
  • 19:37 - 19:41
    pixels just perfect and it takes up
    certain amount of space. You encode it as
  • 19:41 - 19:47
    JPEG and it will take up a lot less space,
    maybe ten actually less space but it will
  • 19:47 - 19:52
    make certain shortcuts how the red and
    greens and blues are recorded. So, when
  • 19:52 - 19:58
    you look at it, it looks very good, but if
    you put it under a microscope, you could
  • 19:58 - 20:04
    see where it had kind of fudged a little
    bit to, to save space. So I can do a, a
  • 20:04 - 20:09
    simple example of a lossy compression,
    sticking with my audio sample example here
  • 20:09 - 20:17
    would be what if. I think I have this oh
    yeah, what if we just threw out every
  • 20:17 - 20:23
    other number? We just said, well whatever
    we've got 44000 of these a second. Let's
  • 20:23 - 20:29
    just only record 22 thousand. And then on
    playback they're going to have to know
  • 20:29 - 20:35
    that so we're going to record this number
    and this number and this number and then
  • 20:35 - 20:40
    on playback, what could play back do?
    Playback is going to have all these
  • 20:40 - 20:46
    missing numbers right so it'll get this
    number and get this number then playback
  • 20:46 - 20:51
    is going to have to sort of fudge this
    middle number. What could playback do
  • 20:51 - 20:57
    there? You could just guess, right? You
    could say well, let's guess that it's
  • 20:57 - 21:03
    halfway in between. We're going to just
    guess 12,003. Well maybe in reality it was
  • 21:03 - 21:08
    12,002. Let's point your sound pretty
    good. All right But so, this is a little
  • 21:08 - 21:12
    bit lossy. We're fudging the data a little
    bit, right? So in the next one would be
  • 21:12 - 21:17
    12,010, 12,006 so again maybe it would
    guess 12,008 even though in reality, the
  • 21:17 - 21:22
    sample was 12,007. Now this is a big
    savings, right? So you, this have the
  • 21:22 - 21:26
    space, my delta scheme also more or less
    have the space maybe in a little bit
  • 21:26 - 21:31
    better. So you compile these techniques on
    where your data was originally quite
  • 21:31 - 21:36
    large. It, it could take up a lot less
    space and when you play it back, so I'll
  • 21:36 - 21:41
    do my JPEG example, it really does look
    very good. But if you got out of the
  • 21:41 - 21:47
    microscope and look, you could see with
    certain little, fudge is the word I want
  • 21:47 - 21:52
    to use but it was probably a better term.
    Little adjustments have been made.
  • 21:52 - 21:58
    [laugh]. So it takes up my space. Okay, so
    the, the two, you know, so any media data
  • 21:58 - 22:04
    that you played with. So, JPEG for images,
    MP3 for sound a nd all the video formats
  • 22:04 - 22:09
    make heavy, heavy use of lossy
    compression, Especially video data. If you
  • 22:09 - 22:14
    just had all the samples and you just
    recorded them in the raw. It's an enormous
  • 22:14 - 22:21
    amount of data. Fortunately the data like
    I said with the pixels and like the pixel
  • 22:21 - 22:26
    right next to it. It is, the pixel is said
    to be have a, have a lot of redundancy in
  • 22:26 - 22:32
    it but actually, there are these patterns
    in the data that you can take advantage of
  • 22:32 - 22:37
    to compress it quite a lot and have it
    still look very good. So, JPEG does this
  • 22:37 - 22:42
    for images. Mp3. Which is like, it sounds
    like the definition of being in college. I
  • 22:42 - 22:47
    guess not anymore. That's just being alive
    anyway so MP3 is very, is aggressively
  • 22:47 - 22:53
    lossy. It's starts with a lot of data and
    it has all these tricks to throw out and
  • 22:53 - 22:58
    cut corners a little bit to get it down to
    be pretty small. As I mention before MP3
  • 22:58 - 23:04
    data works out about one megabyte, about a
    million bytes per minute at your corporate
  • 23:04 - 23:10
    high quality audio. I should mention MP3
    was the result. That format is a result of
  • 23:10 - 23:15
    a lot of research that they had Test
    subjects and they would play sounds with
  • 23:15 - 23:20
    different compression schemes and really
    home in on for the human ear and brain
  • 23:20 - 23:25
    what are kind of [inaudible] and omissions
    that can be heard and what are omissions
  • 23:25 - 23:30
    that cannot be heard and there was, and a
    lot of creativity and research went it to
  • 23:30 - 23:35
    having MP3 worked pretty well. And that
    was like I don't know what to maybe
  • 23:35 - 23:40
    fifteen years ago or something? So in fact
    there have been any advance since then.
  • 23:40 - 23:45
    Where they have gotten, the formats have
    gotten. Even better when they take up less
  • 23:45 - 23:51
    space in MP3 but also make their trade
    offs in more cover release so they even
  • 23:51 - 23:56
    sound better than MP3. Alrighty, So, that
    is, so lossy compression is just like a
  • 23:56 - 23:58
    part, part of life.
Title:
Analog Digital 2 (24 mins)
Video Language:
English
stanford-bot edited English subtitles for Analog Digital 2 (24 mins)
stanford-bot edited English subtitles for Analog Digital 2 (24 mins)
stanford-bot edited English subtitles for Analog Digital 2 (24 mins)
g3 added a translation

English subtitles

Revisions