From f9e493c6f5bd722b4d1ff6c31431798e140dae5c Mon Sep 17 00:00:00 2001 From: Mans Rullgard Date: Sun, 9 Dec 2012 20:39:42 +0000 Subject: [PATCH 1/3] sh4: dsputil: remove duplicate of ff_gmc_c() This function is an exact duplicate of the generic one. Signed-off-by: Mans Rullgard --- libavcodec/sh4/dsputil_align.c | 1 - libavcodec/sh4/qpel.c | 57 ---------------------------------- 2 files changed, 58 deletions(-) diff --git a/libavcodec/sh4/dsputil_align.c b/libavcodec/sh4/dsputil_align.c index b9b0121491..58a03c5dc8 100644 --- a/libavcodec/sh4/dsputil_align.c +++ b/libavcodec/sh4/dsputil_align.c @@ -434,7 +434,6 @@ void ff_dsputil_init_align(DSPContext* c, AVCodecContext *avctx) c->put_mspel_pixels_tab[7]= put_mspel8_mc32_sh4; c->gmc1 = gmc1_c; - c->gmc = gmc_c; #endif } diff --git a/libavcodec/sh4/qpel.c b/libavcodec/sh4/qpel.c index cb6cdf0db5..20540f7b93 100644 --- a/libavcodec/sh4/qpel.c +++ b/libavcodec/sh4/qpel.c @@ -359,63 +359,6 @@ static void gmc1_c(uint8_t *dst, uint8_t *src, int stride, int h, int x16, int y }while(--h); } -static void gmc_c(uint8_t *dst, uint8_t *src, int stride, int h, int ox, int oy, - int dxx, int dxy, int dyx, int dyy, int shift, int r, int width, int height) -{ - int y, vx, vy; - const int s= 1<>16; - src_y= vy>>16; - frac_x= src_x&(s-1); - frac_y= src_y&(s-1); - src_x>>=shift; - src_y>>=shift; - - if((unsigned)src_x < width){ - if((unsigned)src_y < height){ - index= src_x + src_y*stride; - dst[y*stride + x]= ( ( src[index ]*(s-frac_x) - + src[index +1]* frac_x )*(s-frac_y) - + ( src[index+stride ]*(s-frac_x) - + src[index+stride+1]* frac_x )* frac_y - + r)>>(shift*2); - }else{ - index= src_x + av_clip(src_y, 0, height)*stride; - dst[y*stride + x]= ( ( src[index ]*(s-frac_x) - + src[index +1]* frac_x )*s - + r)>>(shift*2); - } - }else{ - if((unsigned)src_y < height){ - index= av_clip(src_x, 0, width) + src_y*stride; - dst[y*stride + x]= ( ( src[index ]*(s-frac_y) - + src[index+stride ]* frac_y )*s - + r)>>(shift*2); - }else{ - index= av_clip(src_x, 0, width) + av_clip(src_y, 0, height)*stride; - dst[y*stride + x]= src[index ]; - } - } - - vx+= dxx; - vy+= dyx; - } - ox += dxy; - oy += dyy; - } -} #define H264_CHROMA_MC(OPNAME, OP)\ static void OPNAME ## h264_chroma_mc2_sh4(uint8_t *dst/*align 8*/, uint8_t *src/*align 1*/, int stride, int h, int x, int y){\ const int A=(8-x)*(8-y);\ From 0d85663a474279de33e4ad1c875d010c09070bc9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Martin=20Storsj=C3=B6?= Date: Sun, 9 Dec 2012 20:45:27 +0200 Subject: [PATCH 2/3] rtpdec: Rename a static variable to normal naming conventions MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Martin Storsjö --- libavformat/rtpdec.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/libavformat/rtpdec.c b/libavformat/rtpdec.c index 38ce7f62d4..d20c626a06 100644 --- a/libavformat/rtpdec.c +++ b/libavformat/rtpdec.c @@ -59,12 +59,12 @@ static RTPDynamicProtocolHandler opus_dynamic_handler = { }; /* statistics functions */ -static RTPDynamicProtocolHandler *RTPFirstDynamicPayloadHandler = NULL; +static RTPDynamicProtocolHandler *rtp_first_dynamic_payload_handler = NULL; void ff_register_dynamic_payload_handler(RTPDynamicProtocolHandler *handler) { - handler->next = RTPFirstDynamicPayloadHandler; - RTPFirstDynamicPayloadHandler = handler; + handler->next = rtp_first_dynamic_payload_handler; + rtp_first_dynamic_payload_handler = handler; } void av_register_rtp_dynamic_payload_handlers(void) @@ -108,7 +108,7 @@ RTPDynamicProtocolHandler *ff_rtp_handler_find_by_name(const char *name, enum AVMediaType codec_type) { RTPDynamicProtocolHandler *handler; - for (handler = RTPFirstDynamicPayloadHandler; + for (handler = rtp_first_dynamic_payload_handler; handler; handler = handler->next) if (!av_strcasecmp(name, handler->enc_name) && codec_type == handler->codec_type) @@ -120,7 +120,7 @@ RTPDynamicProtocolHandler *ff_rtp_handler_find_by_id(int id, enum AVMediaType codec_type) { RTPDynamicProtocolHandler *handler; - for (handler = RTPFirstDynamicPayloadHandler; + for (handler = rtp_first_dynamic_payload_handler; handler; handler = handler->next) if (handler->static_payload_id && handler->static_payload_id == id && codec_type == handler->codec_type) From ccb59c106a4361b9655aa094b042863d655860c4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Martin=20Storsj=C3=B6?= Date: Sun, 9 Dec 2012 21:00:12 +0200 Subject: [PATCH 3/3] rtpdec: Remove an outdated todo comment MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This comment was added in e309128f, in 2002, and has been brought along since then more or less unmodified. The first point of the todo was implemented in dbf30963 in 2006, the second one is not relevant to rtpdec.c (brought along from rtp.c in 8eb793c4 in 2008) but would be more relevant to the rtp muxer, although it isn't a good idea anyway. Signed-off-by: Martin Storsjö --- libavformat/rtpdec.c | 10 ---------- 1 file changed, 10 deletions(-) diff --git a/libavformat/rtpdec.c b/libavformat/rtpdec.c index d20c626a06..3b03bdaa14 100644 --- a/libavformat/rtpdec.c +++ b/libavformat/rtpdec.c @@ -30,16 +30,6 @@ #include "rtpdec.h" #include "rtpdec_formats.h" -/* TODO: - * - add RTCP statistics reporting (should be optional). - * - * - add support for H.263/MPEG-4 packetized output: IDEA: send a - * buffer to 'rtp_write_packet' contains all the packets for ONE - * frame. Each packet should have a four byte header containing - * the length in big-endian format (same trick as - * 'ffio_open_dyn_packet_buf'). - */ - static RTPDynamicProtocolHandler realmedia_mp3_dynamic_handler = { .enc_name = "X-MP3-draft-00", .codec_type = AVMEDIA_TYPE_AUDIO,