comparison mpegvideo.c @ 206:994aa8623443 libavcodec

(commit by michael) draw_edges_mmx()
author arpi_esp
date Tue, 15 Jan 2002 04:07:29 +0000
parents 6ab301aaa652
children 6954f2830e4a
comparison
equal deleted inserted replaced
205:ccf36af385f3 206:994aa8623443
37 DCTELEM *block, int n, int qscale); 37 DCTELEM *block, int n, int qscale);
38 static int dct_quantize(MpegEncContext *s, DCTELEM *block, int n, int qscale); 38 static int dct_quantize(MpegEncContext *s, DCTELEM *block, int n, int qscale);
39 static int dct_quantize_mmx(MpegEncContext *s, 39 static int dct_quantize_mmx(MpegEncContext *s,
40 DCTELEM *block, int n, 40 DCTELEM *block, int n,
41 int qscale); 41 int qscale);
42 static void draw_edges_c(UINT8 *buf, int wrap, int width, int height, int w);
43
44 void (*draw_edges)(UINT8 *buf, int wrap, int width, int height, int w)= draw_edges_c;
45
42 #define EDGE_WIDTH 16 46 #define EDGE_WIDTH 16
43 47
44 /* enable all paranoid tests for rounding, overflows, etc... */ 48 /* enable all paranoid tests for rounding, overflows, etc... */
45 //#define PARANOID 49 //#define PARANOID
46 50
359 mjpeg_close(s); 363 mjpeg_close(s);
360 return 0; 364 return 0;
361 } 365 }
362 366
363 /* draw the edges of width 'w' of an image of size width, height */ 367 /* draw the edges of width 'w' of an image of size width, height */
364 static void draw_edges(UINT8 *buf, int wrap, int width, int height, int w) 368 static void draw_edges_c(UINT8 *buf, int wrap, int width, int height, int w)
365 { 369 {
366 UINT8 *ptr, *last_line; 370 UINT8 *ptr, *last_line;
367 int i; 371 int i;
368 372
369 last_line = buf + (height - 1) * wrap; 373 last_line = buf + (height - 1) * wrap;
674 static inline void add_dct(MpegEncContext *s, 678 static inline void add_dct(MpegEncContext *s,
675 DCTELEM *block, int i, UINT8 *dest, int line_size) 679 DCTELEM *block, int i, UINT8 *dest, int line_size)
676 { 680 {
677 if (s->block_last_index[i] >= 0) { 681 if (s->block_last_index[i] >= 0) {
678 if (!s->mpeg2) 682 if (!s->mpeg2)
679 if(s->encoding || s->avctx==NULL || s->avctx->codec->id!=CODEC_ID_MSMPEG4) 683 if(s->encoding || (!s->h263_msmpeg4))
680 s->dct_unquantize(s, block, i, s->qscale); 684 s->dct_unquantize(s, block, i, s->qscale);
681 ff_idct (block); 685 ff_idct (block);
682 add_pixels_clamped(block, dest, line_size); 686 add_pixels_clamped(block, dest, line_size);
683 } 687 }
684 } 688 }