~ubuntu-branches/ubuntu/edgy/gstreamer0.10-ffmpeg/edgy

« back to all changes in this revision

Viewing changes to gst-libs/ext/ffmpeg/libavcodec/smc.c

  • Committer: Bazaar Package Importer
  • Author(s): Sebastian Dröge
  • Date: 2006-04-01 16:13:43 UTC
  • mto: This revision was merged to the branch mainline in revision 5.
  • Revision ID: james.westby@ubuntu.com-20060401161343-n621cgjlujio0otg
Tags: upstream-0.10.1
Import upstream version 0.10.1

Show diffs side-by-side

added added

removed removed

Lines of Context:
14
14
 *
15
15
 * You should have received a copy of the GNU Lesser General Public
16
16
 * License along with this library; if not, write to the Free Software
17
 
 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
 
17
 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
18
18
 *
19
19
 */
20
20
 
168
168
 
169
169
            /* figure out where the previous block started */
170
170
            if (pixel_ptr == 0)
171
 
                prev_block_ptr1 = 
 
171
                prev_block_ptr1 =
172
172
                    (row_ptr - s->avctx->width * 4) + s->avctx->width - 4;
173
173
            else
174
174
                prev_block_ptr1 = row_ptr + pixel_ptr - 4;
195
195
 
196
196
            /* sanity check */
197
197
            if ((row_ptr == 0) && (pixel_ptr < 2 * 4)) {
198
 
                av_log(s->avctx, AV_LOG_INFO, "encountered repeat block opcode (%02X) but not enough blocks rendered yet\n",
 
198
                av_log(s->avctx, AV_LOG_INFO, "encountered repeat block opcode (%02X) but not enough blocks rendered yet\n",
199
199
                    opcode & 0xF0);
200
200
                break;
201
201
            }
202
202
 
203
203
            /* figure out where the previous 2 blocks started */
204
204
            if (pixel_ptr == 0)
205
 
                prev_block_ptr1 = (row_ptr - s->avctx->width * 4) + 
 
205
                prev_block_ptr1 = (row_ptr - s->avctx->width * 4) +
206
206
                    s->avctx->width - 4 * 2;
207
207
            else if (pixel_ptr == 4)
208
208
                prev_block_ptr1 = (row_ptr - s->avctx->width * 4) + row_inc;
326
326
                block_ptr = row_ptr + pixel_ptr;
327
327
                for (pixel_y = 0; pixel_y < 4; pixel_y++) {
328
328
                    for (pixel_x = 0; pixel_x < 4; pixel_x++) {
329
 
                        pixel = color_table_index + 
 
329
                        pixel = color_table_index +
330
330
                            ((color_flags >> flag_mask) & 0x03);
331
331
                        flag_mask -= 2;
332
332
                        pixels[block_ptr++] = s->color_quads[pixel];
394
394
                        flag_mask = 21;
395
395
                    }
396
396
                    for (pixel_x = 0; pixel_x < 4; pixel_x++) {
397
 
                        pixel = color_table_index + 
 
397
                        pixel = color_table_index +
398
398
                            ((color_flags >> flag_mask) & 0x07);
399
399
                        flag_mask -= 3;
400
400
                        pixels[block_ptr++] = s->color_octets[pixel];
452
452
    s->size = buf_size;
453
453
 
454
454
    s->frame.reference = 1;
455
 
    s->frame.buffer_hints = FF_BUFFER_HINTS_VALID | FF_BUFFER_HINTS_PRESERVE | 
 
455
    s->frame.buffer_hints = FF_BUFFER_HINTS_VALID | FF_BUFFER_HINTS_PRESERVE |
456
456
                            FF_BUFFER_HINTS_REUSABLE | FF_BUFFER_HINTS_READABLE;
457
457
    if (avctx->reget_buffer(avctx, &s->frame)) {
458
458
        av_log(s->avctx, AV_LOG_ERROR, "reget_buffer() failed\n");