summaryrefslogtreecommitdiffstats
path: root/libmpcodecs
diff options
context:
space:
mode:
authorUoti Urpala <uau@glyph.nonexistent.invalid>2010-03-10 00:00:06 +0200
committerUoti Urpala <uau@glyph.nonexistent.invalid>2010-03-10 00:00:06 +0200
commitc37f09693d0edb632c80f8f38ecdb2faf3547f7f (patch)
tree44df07eacb522a97bbecd7a3a0f93e8d6a933003 /libmpcodecs
parent22a06c4ae5672c1dd629918d0a279b8af24e35c3 (diff)
parent2aafb808284d74edab6e5320e1114f5c74d5881e (diff)
downloadmpv-c37f09693d0edb632c80f8f38ecdb2faf3547f7f.tar.bz2
mpv-c37f09693d0edb632c80f8f38ecdb2faf3547f7f.tar.xz
Merge svn changes up to r30643
Diffstat (limited to 'libmpcodecs')
-rw-r--r--libmpcodecs/ad_acm.c4
-rw-r--r--libmpcodecs/ad_faad.c2
-rw-r--r--libmpcodecs/ad_qtaudio.c5
-rw-r--r--libmpcodecs/ad_twin.c2
-rw-r--r--libmpcodecs/dec_teletext.c2
-rw-r--r--libmpcodecs/vd_ffmpeg.c14
-rw-r--r--libmpcodecs/vd_vfw.c8
-rw-r--r--libmpcodecs/ve_vfw.c2
-rw-r--r--libmpcodecs/vf_expand.c2
9 files changed, 16 insertions, 25 deletions
diff --git a/libmpcodecs/ad_acm.c b/libmpcodecs/ad_acm.c
index 026f7c4550..a067da7aef 100644
--- a/libmpcodecs/ad_acm.c
+++ b/libmpcodecs/ad_acm.c
@@ -23,7 +23,7 @@
#include "config.h"
#include "mp_msg.h"
#include "help_mp.h"
-
+#include "libmpdemux/aviprint.h"
#include "loader/wineacm.h"
#include "ad_internal.h"
@@ -56,8 +56,6 @@ static int init(sh_audio_t *sh_audio)
return 1;
}
-void print_wave_header(WAVEFORMATEX *h, int verbose_level);
-
static int preinit(sh_audio_t *sh_audio)
{
HRESULT ret;
diff --git a/libmpcodecs/ad_faad.c b/libmpcodecs/ad_faad.c
index f3795058ff..14fe9a6280 100644
--- a/libmpcodecs/ad_faad.c
+++ b/libmpcodecs/ad_faad.c
@@ -96,7 +96,6 @@ static int init(sh_audio_t *sh)
mp_msg(MSGT_DECAUDIO,MSGL_DBG2,"FAAD: codecdata extracted from WAVEFORMATEX\n");
}
if(!sh->codecdata_len) {
-#if 1
faacDecConfigurationPtr faac_conf;
/* Set the default object type and samplerate */
/* This is useful for RAW AAC files */
@@ -125,7 +124,6 @@ static int init(sh_audio_t *sh)
//faac_conf->defObjectType = LTP; // => MAIN, LC, SSR, LTP available.
faacDecSetConfiguration(faac_hdec, faac_conf);
-#endif
sh->a_in_buffer_len = demux_read_data(sh->ds, sh->a_in_buffer, sh->a_in_buffer_size);
pos = aac_probe(sh->a_in_buffer, sh->a_in_buffer_len);
diff --git a/libmpcodecs/ad_qtaudio.c b/libmpcodecs/ad_qtaudio.c
index 4e785ca5bf..0021d42ec1 100644
--- a/libmpcodecs/ad_qtaudio.c
+++ b/libmpcodecs/ad_qtaudio.c
@@ -118,7 +118,6 @@ static int loader_init(void)
mp_msg(MSGT_DECAUDIO,MSGL_ERR,"failed loading qtmlClient.dll\n" );
return 1;
}
-#if 1
InitializeQTML = (LPFUNC1)GetProcAddress(qtml_dll,"InitializeQTML");
if ( InitializeQTML == NULL )
{
@@ -173,7 +172,6 @@ static int loader_init(void)
mp_msg(MSGT_DECAUDIO,MSGL_ERR,"failed getting proc address SoundConverterBeginConversion\n");
return 1;
}
-#endif
mp_msg(MSGT_DECAUDIO,MSGL_DBG2,"loader_init DONE???\n");
return 0;
}
@@ -207,7 +205,6 @@ static int preinit(sh_audio_t *sh){
}
#endif
-#if 1
OutputFormatInfo.flags = InputFormatInfo.flags = 0;
OutputFormatInfo.sampleCount = InputFormatInfo.sampleCount = 0;
OutputFormatInfo.buffer = InputFormatInfo.buffer = NULL;
@@ -257,8 +254,6 @@ static int preinit(sh_audio_t *sh){
sh->i_bps=sh->wf->nAvgBytesPerSec;
//InputBufferSize*WantedBufferSize/OutputBufferSize;
-#endif
-
if(sh->format==0x3343414D){
// MACE 3:1
sh->ds->ss_div = 2*3; // 1 samples/packet
diff --git a/libmpcodecs/ad_twin.c b/libmpcodecs/ad_twin.c
index f387821a5b..823ace89dd 100644
--- a/libmpcodecs/ad_twin.c
+++ b/libmpcodecs/ad_twin.c
@@ -23,6 +23,7 @@
#include "ad_internal.h"
#include "vqf.h"
+#include "libmpdemux/aviprint.h"
#include "loader/ldt_keeper.h"
#include "loader/wine/windef.h"
#include "libaf/af_format.h"
@@ -106,7 +107,6 @@ static int load_dll( char *libname )
TvqGetNumFixedBitsPerFrame;
}
-void print_wave_header(WAVEFORMATEX *h, int verbose_level);
static int init_vqf_audio_codec(sh_audio_t *sh_audio){
WAVEFORMATEX *in_fmt=sh_audio->wf;
vqf_priv_t*priv=sh_audio->context;
diff --git a/libmpcodecs/dec_teletext.c b/libmpcodecs/dec_teletext.c
index ac12b9aa4a..36c1c76a90 100644
--- a/libmpcodecs/dec_teletext.c
+++ b/libmpcodecs/dec_teletext.c
@@ -952,7 +952,6 @@ static void render2text(tt_page* pt,FILE* f,int colored){
color=-1;bkg=-1;
fprintf(f,"|\n");
}
-#if 1
//for debug
fprintf(f,"+====================raw=================+\n");
for(i=0;i<VBI_ROWS;i++){
@@ -966,7 +965,6 @@ static void render2text(tt_page* pt,FILE* f,int colored){
fprintf(f,"%02x ",dp[i*VBI_COLUMNS+j].lng);
fprintf(f,"\n");
}
-#endif
fprintf(f,"+========================================+\n");
}
diff --git a/libmpcodecs/vd_ffmpeg.c b/libmpcodecs/vd_ffmpeg.c
index 83fe050051..27cb4134cc 100644
--- a/libmpcodecs/vd_ffmpeg.c
+++ b/libmpcodecs/vd_ffmpeg.c
@@ -410,6 +410,7 @@ static void draw_slice(struct AVCodecContext *s,
int y, int type, int height){
sh_video_t *sh = s->opaque;
uint8_t *source[MP_MAX_PLANES]= {src->data[0] + offset[0], src->data[1] + offset[1], src->data[2] + offset[2]};
+ int strides[MP_MAX_PLANES] = {src->linesize[0], src->linesize[1], src->linesize[2]};
#if 0
int start=0, i;
int width= s->width;
@@ -433,8 +434,19 @@ static void draw_slice(struct AVCodecContext *s,
}
}else
#endif
+ if (height < 0)
+ {
+ int i;
+ height = -height;
+ y -= height;
+ for (i = 0; i < MP_MAX_PLANES; i++)
+ {
+ strides[i] = -strides[i];
+ source[i] -= strides[i];
+ }
+ }
if (y < sh->disp_h) {
- mpcodecs_draw_slice (sh, source, src->linesize, sh->disp_w, (y+height)<=sh->disp_h?height:sh->disp_h-y, 0, y);
+ mpcodecs_draw_slice (sh, source, strides, sh->disp_w, (y+height)<=sh->disp_h?height:sh->disp_h-y, 0, y);
}
}
diff --git a/libmpcodecs/vd_vfw.c b/libmpcodecs/vd_vfw.c
index e9c5304dd8..8cf7b69541 100644
--- a/libmpcodecs/vd_vfw.c
+++ b/libmpcodecs/vd_vfw.c
@@ -24,7 +24,7 @@
#include "help_mp.h"
#include "vd_internal.h"
-
+#include "libmpdemux/aviprint.h"
#include "loader/wine/driver.h"
#include "loader/wine/vfw.h"
@@ -127,7 +127,6 @@ static int control(sh_video_t *sh,int cmd,void* arg,...){
case VDCTRL_SET_PP_LEVEL:
vfw_set_postproc(sh,10*(*((int*)arg)));
return CONTROL_OK;
-#if 1
// FIXME: make this optional...
case VDCTRL_QUERY_FORMAT:
{
@@ -147,13 +146,10 @@ static int control(sh_video_t *sh,int cmd,void* arg,...){
}
return CONTROL_TRUE;
}
-#endif
}
return CONTROL_UNKNOWN;
}
-void print_video_header(BITMAPINFOHEADER *h, int verbose_level);
-
// init driver
static int init(sh_video_t *sh){
HRESULT ret;
@@ -230,7 +226,6 @@ static int init(sh_video_t *sh){
priv->o_bih->biCompression = 0;
// sanity check:
-#if 1
#ifdef BUILD_VFWEX
ret = ICDecompressQueryEx(priv->handle, sh->bih, priv->o_bih);
#else
@@ -242,7 +237,6 @@ static int init(sh_video_t *sh){
// return 0;
} else
mp_msg(MSGT_WIN32,MSGL_V,"ICDecompressQuery OK\n");
-#endif
#ifdef BUILD_VFWEX
ret = ICDecompressBeginEx(priv->handle, sh->bih, priv->o_bih);
diff --git a/libmpcodecs/ve_vfw.c b/libmpcodecs/ve_vfw.c
index c04c6936a8..201db72369 100644
--- a/libmpcodecs/ve_vfw.c
+++ b/libmpcodecs/ve_vfw.c
@@ -96,7 +96,6 @@ static BITMAPINFOHEADER* vfw_open_encoder(char *dll_name, char *compdatafile, BI
}
mp_msg(MSGT_WIN32,MSGL_INFO,"HIC: %x\n", encoder_hic);
-#if 1
{
ICINFO icinfo;
@@ -118,7 +117,6 @@ if (icinfo.dwFlags & VIDCF_QUALITYTIME)
mp_msg(MSGT_WIN32,MSGL_INFO," temp-quality");
mp_msg(MSGT_WIN32,MSGL_INFO,"\n");
}
-#endif
if(compdatafile){
if (!strncmp(compdatafile, "dialog", 6)){
diff --git a/libmpcodecs/vf_expand.c b/libmpcodecs/vf_expand.c
index e39bbeda7f..fb41464f7e 100644
--- a/libmpcodecs/vf_expand.c
+++ b/libmpcodecs/vf_expand.c
@@ -287,13 +287,11 @@ static void get_image(struct vf_instance* vf, mp_image_t *mpi){
mpi->type, mpi->flags,
FFMAX(vf->priv->exp_w, mpi->width +vf->priv->exp_x),
FFMAX(vf->priv->exp_h, mpi->height+vf->priv->exp_y));
-#if 1
if((vf->dmpi->flags & MP_IMGFLAG_DRAW_CALLBACK) &&
!(vf->dmpi->flags & MP_IMGFLAG_DIRECT)){
mp_tmsg(MSGT_VFILTER, MSGL_INFO, "Full DR not possible, trying SLICES instead!\n");
return;
}
-#endif
// set up mpi as a cropped-down image of dmpi:
if(mpi->flags&MP_IMGFLAG_PLANAR){
mpi->planes[0]=vf->dmpi->planes[0]+