Naoya OYAMA | 8 Feb 15:39
Picon
Gravatar

[RFC][PATCH] libmpcodecs/ad_spdif.c check DTS profile

Hi,

Attached patch for ad_spdif.
Improvement enumerated below was added.

1. A suitable value is set up for bitrate and channels and dtshd_rate.
By useing DTS profile.
2. The code for creating lavc is diverted from ad_ffmpeg.c.
3. By creating lavc on ad_spdif.c, detection of bitrate and
sample_rate became highly precise.

Thanks.
Index: libmpcodecs/ad_spdif.c
===================================================================
--- libmpcodecs/ad_spdif.c	(revision 34655)
+++ libmpcodecs/ad_spdif.c	(working copy)
@@ -25,6 +25,9 @@
 #include "libavformat/avformat.h"
 #include "libavcodec/avcodec.h"
 #include "libavutil/opt.h"
+#include "dec_audio.h"
+#include "help_mp.h"
+#include "libavutil/dict.h"

 static const ad_info_t info = {
     "libavformat/spdifenc audio pass-through decoder.",
@@ -39,11 +42,16 @@
 #define FILENAME_SPDIFENC "spdif"
(Continue reading)

Reimar Döffinger | 7 Feb 23:04
Picon
Picon

[PATCH] Do not override H.264 video dimension with aspect info

Hello,
I don't know what the idea behind that was (possibly some
misunderstanding?) but it causes the aspect ratios to be
printed as video dimensions if (and only if) a custom
aspect was encoded.
So I propose below change:
Index: libmpdemux/mpeg_hdr.c
===================================================================
--- libmpdemux/mpeg_hdr.c	(revision 34650)
+++ libmpdemux/mpeg_hdr.c	(working copy)
@@ -325,10 +325,8 @@
     n += 8;
     if(picture->aspect_ratio_information == 255)
     {
-      picture->display_picture_width = (getbits(buf, n, 8) << 8) | getbits(buf, n + 8, 8);
+      // aspect numerator and denominator
       n += 16;
-
-      picture->display_picture_height = (getbits(buf, n, 8) << 8) | getbits(buf, n + 8, 8);
       n += 16;
     }
   }
Reinhard Tartler | 6 Feb 07:32
Picon

loosen requirements on error resilence flags

$subj

With this patch, I can enable the daily builds on
https://launchpad.net/~motumedia/+archive/mplayer-daily/+packages
again.

Next step after this: Test Ivan's patch.
-- 
regards,
    Reinhard
Index: libmpcodecs/vd_ffmpeg.c
===================================================================
--- libmpcodecs/vd_ffmpeg.c	(Revision 34652)
+++ libmpcodecs/vd_ffmpeg.c	(Arbeitskopie)
@@ -47,6 +47,18 @@

 #include "libavcodec/avcodec.h"

+#ifndef AV_EF_COMPLIANT
+#define AV_EF_COMPLIANT 0
+#endif
+
+#ifndef AV_EF_CAREFUL
+#define AV_EF_CAREFUL 0
+#endif
+
+#ifndef AV_EF_AGGRESSIVE
+#define AV_EF_AGGRESSIVE 0
(Continue reading)

Carl Eugen Hoyos | 6 Feb 04:21
Picon

[PATCH]Do not use "64" to describe non 64bit image formats

Hi!

Attached patch would allow simple 64 bit RGB support in a follow-up patch, but 
I did not succeed testing the relevant code path in vo x11 and I don't know if 
other parts in MPlayer relied on "64" for non-native image formats.

Please review, Carl Eugen
Index: libmpcodecs/img_format.h
===================================================================
--- libmpcodecs/img_format.h	(revision 34653)
+++ libmpcodecs/img_format.h	(working copy)
@@ -53,39 +53,39 @@

 #if HAVE_BIGENDIAN
 #define IMGFMT_ABGR    IMGFMT_RGB32
-#define IMGFMT_BGRA    (IMGFMT_RGB32|64)
+#define IMGFMT_BGRA    (IMGFMT_RGB32|128)
 #define IMGFMT_ARGB    IMGFMT_BGR32
-#define IMGFMT_RGBA    (IMGFMT_BGR32|64)
+#define IMGFMT_RGBA    (IMGFMT_BGR32|128)
 #define IMGFMT_RGB48NE IMGFMT_RGB48BE
 #define IMGFMT_RGB12BE IMGFMT_RGB12
-#define IMGFMT_RGB12LE (IMGFMT_RGB12|64)
+#define IMGFMT_RGB12LE (IMGFMT_RGB12|128)
 #define IMGFMT_RGB15BE IMGFMT_RGB15
-#define IMGFMT_RGB15LE (IMGFMT_RGB15|64)
+#define IMGFMT_RGB15LE (IMGFMT_RGB15|128)
 #define IMGFMT_RGB16BE IMGFMT_RGB16
(Continue reading)

Reinhard Tartler | 5 Feb 21:54
Picon

update deprecated avcodec_alloc_context()/avcodec_open() API calls

Hi,

see $subject

-- 
regards,
    Reinhard
Index: libmpcodecs/vf_screenshot.c
===================================================================
--- libmpcodecs/vf_screenshot.c	(Revision 34652)
+++ libmpcodecs/vf_screenshot.c	(Arbeitskopie)
@@ -300,9 +300,9 @@
     vf->priv->buffer=0;
     vf->priv->outbuffer=0;
     vf->priv->ctx=0;
-    vf->priv->avctx = avcodec_alloc_context();
+    vf->priv->avctx = avcodec_alloc_context3(NULL);
     avcodec_register_all();
-    if (avcodec_open(vf->priv->avctx, avcodec_find_encoder(CODEC_ID_PNG))) {
+    if (avcodec_open2(vf->priv->avctx, avcodec_find_encoder(CODEC_ID_PNG), NULL)) {
         mp_msg(MSGT_VFILTER, MSGL_FATAL, "Could not open libavcodec PNG encoder\n");
         return 0;
     }
Index: libmpcodecs/vf_uspp.c
===================================================================
--- libmpcodecs/vf_uspp.c	(Revision 34652)
+++ libmpcodecs/vf_uspp.c	(Arbeitskopie)
@@ -224,7 +224,7 @@
(Continue reading)

Ivan Kalvachev | 5 Feb 21:10
Picon

PulseAudio drain timeout

In commit r34652 I've committed a simple workaround for the 2 second
delay when draining the audio stream in PulseAudio.

While the fix works for the most cases, the person who helped me find
the solution (Rune Heggtveit) found some cases where it doesn't work.

He have written a workaround that works for these cases. As he hasn't
sent his code to the maillist I'm posting it instead. It needs a
little more polishing. e.g. implement broken_drain like the existing
broken_pause. (the big ugly if() is mine, if the patch doesn't
compile, it's probably my fault).

How does it work:
The old workaround sleeps while the already written data is played.
However if the playback have just been initiated and the internal
buffer haven't been filled, the actual audio playback is not yet
started. As it haven't been started, no mater how long does we wait,
the audio won't be played.

So Rune's code fills the remaining internal buffer with zeroes
(silence), so the data is pushed to the sound-server. Then it waits
for the original amount of useful audio data to be played, before
resetting the stream.
(in Rune's original code the drain function was still called after the
reset, I put it in the else{}. You can take a look while the code is
still present in http://codepad.org/a40dMZZ1 .

In short, with this code you can play files smaller than PA internal
buffer without triggering the dreadful 2 second delay.

(Continue reading)

Ivan Kalvachev | 5 Feb 19:50
Picon

[PATCH] yadif green line

A user provided me with a sample file that generated a random garbage
at the bottom line.

It turned out that the secret for repeating this bug is in the parity.
It is always reproducible if the function filter(...)  is rigged so
the parity check calls filter_line() for the last image line.
In the filter_line_c() function the line "int e=cur[+ref];"
unconditionally reads the next line of the image. If we are at the
last line, it would read the line past the last one. ( mode<2 reads
and +2 lines)

It seems that this quirk of the yadif have been known, so the filter
copies the image into buffer that have 3 lines pad at top and bottom.

Unfortunately the store_ref() function that does that, doesn't pad the
additional lines, so they are left uninitialized. The solid green line
is obtained if malloced buffers are zeroed.

The patch that I attach pads 2 additional lines top and bottom.
It also fixed the allocation so the height is not aligned to 32 lines
(useless) but instead there are always 6 pad lines (3+3), even for
chroma planes.
Attachment (yadif_pad.patch): application/octet-stream, 1323 bytes
_______________________________________________
MPlayer-dev-eng mailing list
MPlayer-dev-eng <at> mplayerhq.hu
https://lists.mplayerhq.hu/mailman/listinfo/mplayer-dev-eng
Clément Bœsch | 4 Feb 22:42
Picon

Fix build with --enable-vf-lavfi

Hi,

I saw on mplayer-user a build issue with --enable-vf-lavfi, and since I'm
somehow at fault because of the new libswresample dependency, here is a
patch.

I didn't test it thoroughly though (only the default static in-place build
method is tested).  Also, I'm not sure what happens if we try to link with
libav since they still stick with the old API…

Regards,

--

-- 
Clément B.
Index: Makefile
===================================================================
--- Makefile	(revision 34652)
+++ Makefile	(working copy)
@@ -689,7 +689,7 @@
                 $(SRCS_MENCODER-yes)

 # (linking) order matters for these libraries
-FFMPEGPARTS = libpostproc libswscale libavfilter libavformat libavcodec libavutil
+FFMPEGPARTS = libpostproc libswscale libavfilter libavformat libavcodec libavutil libswresample
 FFMPEGLIBS  = $(foreach part, $(FFMPEGPARTS), ffmpeg/$(part)/$(part).a)
 FFMPEGFILES = $(foreach part, $(FFMPEGPARTS), $(wildcard $(addprefix ffmpeg/$(part)/,*.[chS]
/*/*.[chS] /*/*.asm)))

(Continue reading)

Andrew Wason | 3 Feb 19:40
Gravatar

[PATCH] fix encoding -oac pcm in lavf MOV container

Encoding with -oac pcm in a MOV container incorrectly uses audio tag
'WRLE', see http://bugzilla.mplayerhq.hu/show_bug.cgi?id=2038

Andrew
Attachment (pcm_codec_tag.diff): application/octet-stream, 1542 bytes
_______________________________________________
MPlayer-dev-eng mailing list
MPlayer-dev-eng <at> mplayerhq.hu
https://lists.mplayerhq.hu/mailman/listinfo/mplayer-dev-eng
Rodrigo Campos | 31 Jan 20:55
Picon
Gravatar

[PATCH] Use "-nocache" option in TOOLS/midentify.sh

Hi,

Attached there is a simple patch that adds the "-nocache" option to the script
midentify.sh in TOOLS/.

There are long delays with some hosts and using the cache only makes it take
longer, when we don't really need the cache. For example, from my ISP at
Argentina, using this option reduce *a lot* the time needed to run the script
with certain hosts:

(before the patch)

$ time TOOLS/midentify.sh http://58.69.143.152:8080
ID_AUDIO_ID=0
ID_FILENAME=http://58.69.143.152:8080
ID_DEMUXER=audio
ID_AUDIO_FORMAT=85
ID_AUDIO_BITRATE=40000
ID_AUDIO_RATE=22050
ID_AUDIO_NCH=0
ID_START_TIME=0.00
ID_LENGTH=-0.00
ID_SEEKABLE=0
ID_CHAPTERS=0
ID_AUDIO_BITRATE=40000
ID_AUDIO_RATE=22050
ID_AUDIO_NCH=2
ID_AUDIO_CODEC=mp3
ID_EXIT=EOF

(Continue reading)

Anssi Hannula | 30 Jan 00:30
Picon
Picon
Favicon

[PATCH] lavcac3enc: make the filter buildable with shared FFmpeg

Add some local definitions and a bit rate array to make FFmpeg private
headers and symbols unneeded, allowing lavcac3enc to be built with
shared FFmpeg.

This also fixes the issue that the filter code expects the FFmpeg
private definition AC3_MAX_CHANNELS to be the maximum number of
"logical" channels to be encoded into AC-3, while it actually specifies
the maximum channel count in the bitstream, which may include a coupling
channel which is not an actual full audio channel. The issue is fixed by
making the local AC3_MAX_CHANNELS to have the value of 6, which the
FFmpeg private header also had before the addition of coupling support
in 2011.
---

Dunno if this is something that is wanted or not, but in case of NAK the
different expectation of AC3_MAX_CHANNELS should be fixed in some other
way (e.g. by introducing a new local #define).

 Makefile              |    4 ++--
 libaf/af.c            |    4 +---
 libaf/af_lavcac3enc.c |   17 +++++++++++++----
 3 files changed, 16 insertions(+), 9 deletions(-)

diff --git a/Makefile b/Makefile
index 8e80b9e..b5fedcb 100644
--- a/Makefile
+++ b/Makefile
@@ -70,6 +70,7 @@ SRCS_COMMON-$(FAAD)                  += libmpcodecs/ad_faad.c
 SRCS_COMMON-$(FASTMEMCPY)            += libvo/aclib.c
 SRCS_COMMON-$(FFMPEG)                += av_helpers.c                \
(Continue reading)


Gmane