Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code | Sign in
(731)

Issue 6459052: code review 6459052: image/jpeg: send a correct Start Of Scan (SOS) header. (Closed)

Can't Edit
Can't Publish+Mail
Start Review
Created:
11 years, 7 months ago by nigeltao
Modified:
11 years, 7 months ago
Reviewers:
CC:
r, golang-dev
Visibility:
Public.

Description

image/jpeg: send a correct Start Of Scan (SOS) header. Section B.2.3 of http://www.w3.org/Graphics/JPEG/itu-t81.pdf discusses the End of spectral selection (Se) byte. Apparently many JPEG decoders ignore the Se byte (or let it through with a warning), but some configurations reject them. For example, http://download.blender.org/source/chest/blender_2.03_tree/jpeg/jcmaster.c has these lines: if (Ss != 0 || Se != DCTSIZE2-1 || Ah != 0 || Al != 0) ERREXIT1(cinfo, JERR_BAD_PROG_SCRIPT, scanno); Fixes issue 3916.

Patch Set 1 #

Patch Set 2 : diff -r d8c6d2d7f876 https://code.google.com/p/go/ #

Patch Set 3 : diff -r d8c6d2d7f876 https://code.google.com/p/go/ #

Total comments: 1

Patch Set 4 : diff -r d3dd48c73d6d https://code.google.com/p/go/ #

Unified diffs Side-by-side diffs Delta from patch set Stats (+4 lines, -2 lines) Patch
M src/pkg/image/jpeg/writer.go View 1 2 3 1 chunk +4 lines, -2 lines 0 comments Download

Messages

Total messages: 3
nigeltao
Hello r@golang.org (cc: golang-dev@googlegroups.com), I'd like you to review this change to https://code.google.com/p/go/
11 years, 7 months ago (2012-08-07 05:28:53 UTC) #1
r
LGTM http://codereview.appspot.com/6459052/diff/5001/src/pkg/image/jpeg/writer.go File src/pkg/image/jpeg/writer.go (right): http://codereview.appspot.com/6459052/diff/5001/src/pkg/image/jpeg/writer.go#newcode438 src/pkg/image/jpeg/writer.go:438: // should be (0, 63, 0, 0). the ...
11 years, 7 months ago (2012-08-07 15:10:52 UTC) #2
nigeltao
11 years, 7 months ago (2012-08-07 23:57:25 UTC) #3
*** Submitted as http://code.google.com/p/go/source/detail?r=4a67b1f1e771 ***

image/jpeg: send a correct Start Of Scan (SOS) header.

Section B.2.3 of http://www.w3.org/Graphics/JPEG/itu-t81.pdf discusses
the End of spectral selection (Se) byte.

Apparently many JPEG decoders ignore the Se byte (or let it through
with a warning), but some configurations reject them. For example,
http://download.blender.org/source/chest/blender_2.03_tree/jpeg/jcmaster.c
has these lines:

if (Ss != 0 || Se != DCTSIZE2-1 || Ah != 0 || Al != 0)
  ERREXIT1(cinfo, JERR_BAD_PROG_SCRIPT, scanno);

Fixes issue 3916.

R=r
CC=golang-dev
http://codereview.appspot.com/6459052
Sign in to reply to this message.

Powered by Google App Engine
RSS Feeds Recent Issues | This issue
This is Rietveld f62528b