diff options
author | Michael Niedermayer <michaelni@gmx.at> | 2013-02-06 14:53:49 +0100 |
---|---|---|
committer | Michael Niedermayer <michaelni@gmx.at> | 2013-02-06 14:53:49 +0100 |
commit | 6e9f3f3b6522a8c1440bab66c8a2d85791fd12f7 (patch) | |
tree | 502e9b517e24b857069884bda22575eaf9c2779c | |
parent | fadf845973aeb47d1b0bf3eac552394fd8a71437 (diff) | |
parent | 238614de679a71970c20d7c3fee08a322967ec40 (diff) | |
download | ffmpeg-6e9f3f3b6522a8c1440bab66c8a2d85791fd12f7.tar.gz |
Merge commit '238614de679a71970c20d7c3fee08a322967ec40'
* commit '238614de679a71970c20d7c3fee08a322967ec40':
cdgraphics: do not rely on get_buffer() initializing the frame.
svq1: replace struct svq1_frame_size with an array.
vf_yadif: silence a warning.
Conflicts:
libavcodec/svq1dec.c
Merged-by: Michael Niedermayer <michaelni@gmx.at>
-rw-r--r-- | cmdutils.c | 2 | ||||
-rw-r--r-- | libavcodec/cdgraphics.c | 2 | ||||
-rw-r--r-- | libavcodec/svq1.c | 2 | ||||
-rw-r--r-- | libavcodec/svq1.h | 7 | ||||
-rw-r--r-- | libavcodec/svq1dec.c | 4 | ||||
-rw-r--r-- | libavfilter/vf_yadif.c | 16 | ||||
-rw-r--r-- | libavfilter/x86/vf_yadif_init.c | 12 | ||||
-rw-r--r-- | libavfilter/yadif.h | 4 | ||||
-rw-r--r-- | tests/ref/fate/cdgraphics | 32 |
9 files changed, 43 insertions, 38 deletions
diff --git a/cmdutils.c b/cmdutils.c index 9d916e7416..88f73a985d 100644 --- a/cmdutils.c +++ b/cmdutils.c @@ -1856,7 +1856,7 @@ static int alloc_buffer(FrameBuffer **pool, AVCodecContext *s, FrameBuffer **pbu /* XXX this shouldn't be needed, but some tests break without this line * those decoders are buggy and need to be fixed. * the following tests fail: - * cdgraphics, ansi, aasc, fraps-v1, qtrle-1bit + * ansi, aasc, fraps-v1, qtrle-1bit */ memset(buf->base[0], 128, ret); diff --git a/libavcodec/cdgraphics.c b/libavcodec/cdgraphics.c index 71d9da7ee2..6d957f31d1 100644 --- a/libavcodec/cdgraphics.c +++ b/libavcodec/cdgraphics.c @@ -291,6 +291,8 @@ static int cdg_decode_frame(AVCodecContext *avctx, av_log(avctx, AV_LOG_ERROR, "reget_buffer() failed\n"); return ret; } + if (!avctx->frame_number) + memset(cc->frame.data[0], 0, cc->frame.linesize[0] * avctx->height); command = bytestream_get_byte(&buf); inst = bytestream_get_byte(&buf); diff --git a/libavcodec/svq1.c b/libavcodec/svq1.c index 0c19a6d53b..c219f2221a 100644 --- a/libavcodec/svq1.c +++ b/libavcodec/svq1.c @@ -37,7 +37,7 @@ #include "svq1_vlc.h" /* standard video sizes */ -const struct svq1_frame_size ff_svq1_frame_size_table[7] = { +const uint16_t ff_svq1_frame_size_table[7][2] = { { 160, 120 }, { 128, 96 }, { 176, 144 }, { 352, 288 }, { 704, 576 }, { 240, 180 }, { 320, 240 } }; diff --git a/libavcodec/svq1.h b/libavcodec/svq1.h index 9b132e2320..8380f2256b 100644 --- a/libavcodec/svq1.h +++ b/libavcodec/svq1.h @@ -42,11 +42,6 @@ #define SVQ1_BLOCK_INTER_4V 2 #define SVQ1_BLOCK_INTRA 3 -struct svq1_frame_size { - uint16_t width; - uint16_t height; -}; - uint16_t ff_svq1_packet_checksum(const uint8_t *data, const int length, int value); @@ -59,6 +54,6 @@ extern const uint8_t ff_svq1_inter_multistage_vlc[6][8][2]; extern const uint16_t ff_svq1_intra_mean_vlc[256][2]; extern const uint16_t ff_svq1_inter_mean_vlc[512][2]; -extern const struct svq1_frame_size ff_svq1_frame_size_table[7]; +extern const uint16_t ff_svq1_frame_size_table[7][2]; #endif /* AVCODEC_SVQ1_H */ diff --git a/libavcodec/svq1dec.c b/libavcodec/svq1dec.c index 573568374a..5b9a620591 100644 --- a/libavcodec/svq1dec.c +++ b/libavcodec/svq1dec.c @@ -575,8 +575,8 @@ static int svq1_decode_frame_header(AVCodecContext *avctx, AVFrame *frame) return AVERROR_INVALIDDATA; } else { /* get width, height from table */ - width = ff_svq1_frame_size_table[frame_size_code].width; - height = ff_svq1_frame_size_table[frame_size_code].height; + width = ff_svq1_frame_size_table[frame_size_code][0]; + height = ff_svq1_frame_size_table[frame_size_code][1]; } } diff --git a/libavfilter/vf_yadif.c b/libavfilter/vf_yadif.c index 74eafcbd12..56bd61ad3d 100644 --- a/libavfilter/vf_yadif.c +++ b/libavfilter/vf_yadif.c @@ -81,10 +81,14 @@ next2++; \ } -static void filter_line_c(uint8_t *dst, - uint8_t *prev, uint8_t *cur, uint8_t *next, +static void filter_line_c(void *dst1, + void *prev1, void *cur1, void *next1, int w, int prefs, int mrefs, int parity, int mode) { + uint8_t *dst = dst1; + uint8_t *prev = prev1; + uint8_t *cur = cur1; + uint8_t *next = next1; int x; uint8_t *prev2 = parity ? prev : cur ; uint8_t *next2 = parity ? cur : next; @@ -92,11 +96,15 @@ static void filter_line_c(uint8_t *dst, FILTER } -static void filter_line_c_16bit(uint16_t *dst, - uint16_t *prev, uint16_t *cur, uint16_t *next, +static void filter_line_c_16bit(void *dst1, + void *prev1, void *cur1, void *next1, int w, int prefs, int mrefs, int parity, int mode) { + uint16_t *dst = dst1; + uint16_t *prev = prev1; + uint16_t *cur = cur1; + uint16_t *next = next1; int x; uint16_t *prev2 = parity ? prev : cur ; uint16_t *next2 = parity ? cur : next; diff --git a/libavfilter/x86/vf_yadif_init.c b/libavfilter/x86/vf_yadif_init.c index dc14c67fdd..8d5e76833f 100644 --- a/libavfilter/x86/vf_yadif_init.c +++ b/libavfilter/x86/vf_yadif_init.c @@ -26,14 +26,14 @@ #include "libavcodec/x86/dsputil_mmx.h" #include "libavfilter/yadif.h" -void ff_yadif_filter_line_mmxext(uint8_t *dst, uint8_t *prev, uint8_t *cur, - uint8_t *next, int w, int prefs, +void ff_yadif_filter_line_mmxext(void *dst, void *prev, void *cur, + void *next, int w, int prefs, int mrefs, int parity, int mode); -void ff_yadif_filter_line_sse2(uint8_t *dst, uint8_t *prev, uint8_t *cur, - uint8_t *next, int w, int prefs, +void ff_yadif_filter_line_sse2(void *dst, void *prev, void *cur, + void *next, int w, int prefs, int mrefs, int parity, int mode); -void ff_yadif_filter_line_ssse3(uint8_t *dst, uint8_t *prev, uint8_t *cur, - uint8_t *next, int w, int prefs, +void ff_yadif_filter_line_ssse3(void *dst, void *prev, void *cur, + void *next, int w, int prefs, int mrefs, int parity, int mode); av_cold void ff_yadif_init_x86(YADIFContext *yadif) diff --git a/libavfilter/yadif.h b/libavfilter/yadif.h index d2084fa86e..b7e8852660 100644 --- a/libavfilter/yadif.h +++ b/libavfilter/yadif.h @@ -53,8 +53,8 @@ typedef struct YADIFContext { AVFilterBufferRef *next; AVFilterBufferRef *prev; AVFilterBufferRef *out; - void (*filter_line)(uint8_t *dst, - uint8_t *prev, uint8_t *cur, uint8_t *next, + void (*filter_line)(void *dst, + void *prev, void *cur, void *next, int w, int prefs, int mrefs, int parity, int mode); const AVPixFmtDescriptor *csp; diff --git a/tests/ref/fate/cdgraphics b/tests/ref/fate/cdgraphics index 1e5cc6f1e3..a7820591c9 100644 --- a/tests/ref/fate/cdgraphics +++ b/tests/ref/fate/cdgraphics @@ -1,20 +1,20 @@ #tb 0: 1/300 -0, 0, 0, 1, 194400, 0xd919c635 -0, 1, 1, 1, 194400, 0xd919c635 -0, 2, 2, 1, 194400, 0x516a1007 -0, 3, 3, 1, 194400, 0x516a1007 -0, 4, 4, 1, 194400, 0x516a1007 -0, 5, 5, 1, 194400, 0x516a1007 -0, 6, 6, 1, 194400, 0x516a1007 -0, 7, 7, 1, 194400, 0x516a1007 -0, 8, 8, 1, 194400, 0x516a1007 -0, 9, 9, 1, 194400, 0x516a1007 -0, 10, 10, 1, 194400, 0x516a1007 -0, 11, 11, 1, 194400, 0x516a1007 -0, 12, 12, 1, 194400, 0x516a1007 -0, 13, 13, 1, 194400, 0x516a1007 -0, 14, 14, 1, 194400, 0x516a1007 -0, 15, 15, 1, 194400, 0x516a1007 +0, 0, 0, 1, 194400, 0x46ad80da +0, 1, 1, 1, 194400, 0x46ad80da +0, 2, 2, 1, 194400, 0x9392c3b9 +0, 3, 3, 1, 194400, 0x9392c3b9 +0, 4, 4, 1, 194400, 0x9392c3b9 +0, 5, 5, 1, 194400, 0x9392c3b9 +0, 6, 6, 1, 194400, 0x9392c3b9 +0, 7, 7, 1, 194400, 0x9392c3b9 +0, 8, 8, 1, 194400, 0x9392c3b9 +0, 9, 9, 1, 194400, 0x9392c3b9 +0, 10, 10, 1, 194400, 0x9392c3b9 +0, 11, 11, 1, 194400, 0x9392c3b9 +0, 12, 12, 1, 194400, 0x9392c3b9 +0, 13, 13, 1, 194400, 0x9392c3b9 +0, 14, 14, 1, 194400, 0x9392c3b9 +0, 15, 15, 1, 194400, 0x9392c3b9 0, 16, 16, 1, 194400, 0x46ad80da 0, 17, 17, 1, 194400, 0x46ad80da 0, 18, 18, 1, 194400, 0x46ad80da |