Displaying 15 results from an estimated 15 matches for "avcodeccontext".
2007 Jan 06
7
FFmpeg Theora encoding patch
Hi,
Attached is my patch to add theora encoding to ffmpeg's libavcodec (by
using libtheora). I am requesting help to fix the bug I mention below
and am seeking general comments before I submit the patch properly.
Files encoded using this encoder have a problem playing in VLC. The
files will not play unless "Drop late frames" has been unticked in the
advanced video settings.
2007 Apr 05
0
4 commits - libswfdec/swfdec_audio_flv.c libswfdec/swfdec_audio_stream.c libswfdec/swfdec_codec_adpcm.c libswfdec/swfdec_codec.c libswfdec/swfdec_codec_ffmpeg.c libswfdec/swfdec_codec_gst.c libswfdec/swfdec_codec.h libswfdec/swfdec_codec_mad.c
...wfdec/swfdec_codec_ffmpeg.c
+++ b/libswfdec/swfdec_codec_ffmpeg.c
@@ -60,23 +60,24 @@ fail:
/*** AUDIO ***/
static gpointer
-swfdec_codec_ffmpeg_mp3_init (gboolean width, SwfdecAudioOut format)
+swfdec_codec_ffmpeg_audio_init (SwfdecAudioFormat type, gboolean width, SwfdecAudioOut format)
{
AVCodecContext *ctx;
-
- ctx = swfdec_codec_ffmpeg_init (CODEC_ID_MP3);
- ctx->sample_rate = SWFDEC_AUDIO_OUT_RATE (format);
- ctx->channels = SWFDEC_AUDIO_OUT_N_CHANNELS (format);
-
- return ctx;
-}
+ enum CodecID id;
-static gpointer
-swfdec_codec_ffmpeg_adpcm_init (gboolean width, SwfdecAudioOut...
2003 Oct 02
2
GNOME 2 port is broken?
...usr/ports/net/openh323/work/openh323/include/codecs.h:263,
from
/usr/ports/net/openh323/work/openh323/include/h323caps.h:169,
from
/usr/ports/net/openh323/work/openh323/include/h323con.h:255,
from h323.cxx:1089:
/usr/local/include/ffmpeg/rtp.h:26: `AVCodecContext' was not declared in
this
scope
/usr/local/include/ffmpeg/rtp.h:26: `codec' was not declared in this scope
/usr/local/include/ffmpeg/rtp.h:26: syntax error before `)' token
/usr/local/include/ffmpeg/rtp.h:26: initializer list being treated as
compound
expression
/usr/local/include...
2007 Oct 11
1
[PATCH] Fix compiler warnings that prevent compilation
Counteract incorrect use of the "deprecated" attribute in ffmpeg
headers. In particular, struct AVPaletteControl is deprecated, but it's
used in a non-deprecated struct AVCodecContext (as found in Fedora's
ffmpeg-devel-0.4.9-0.8.20070530.fc7.x86_64). Define
attribute_deprecated to an empty string until broken version of ffmpeg
are too obsolete to support.
Use appropriate modifiers for size_t sized arguments in printf-style
format to avoid warnings on 64-bit systems.
Avoid...
2007 Jun 26
0
2 commits - libswfdec/swfdec_codec_ffmpeg.c
...n = avcodec_decode_audio2 (ffmpeg->ctx, (short *) outbuf->data, &out_size, buffer->data + amount, buffer->length - amount);
if (len < 0) {
SWFDEC_ERROR ("Error %d while decoding", len);
@@ -205,6 +206,7 @@ typedef struct {
SwfdecVideoDecoder decoder;
AVCodecContext * ctx; /* out context (d'oh) */
AVFrame * frame; /* the frame we use for decoding */
+ struct SwsContext * sws; /* the format conversion */
} SwfdecVideoDecoderFFMpeg;
SwfdecBuffer *
@@ -221,12 +223,19 @@ swfdec_video_decoder_ffmpeg_decode (Swfd
SWFDEC_WARNING ("error deco...
2007 Apr 06
0
3 commits - libswfdec-gtk/swfdec_gtk_loader.c libswfdec/Makefile.am libswfdec/swfdec_codec.c libswfdec/swfdec_codec_ffmpeg.c libswfdec/swfdec_codec_gst.c libswfdec/swfdec_codec.h libswfdec/swfdec_codec_screen.c libswfdec/swfdec_codec_video.c
...include <avcodec.h>
#include "swfdec_codec.h"
+#include "swfdec_codec_video.h"
#include "swfdec_debug.h"
/*** GENERAL ***/
@@ -201,60 +202,16 @@ const SwfdecAudioCodec swfdec_codec_ffmp
/*** VIDEO ***/
typedef struct {
+ SwfdecVideoDecoder decoder;
AVCodecContext * ctx; /* out context (d'oh) */
AVFrame * frame; /* the frame we use for decoding */
-} SwfdecCodecFFMpegVideo;
-
-static gpointer
-swfdec_codec_ffmpeg_video_init (SwfdecVideoFormat type)
-{
- SwfdecCodecFFMpegVideo *codec;
- AVCodecContext *ctx;
- enum CodecID id;
-
- switch (type) {...
2007 Apr 08
0
6 commits - libswfdec/Makefile.am libswfdec/swfdec_audio_flv.c libswfdec/swfdec_audio_flv.h libswfdec/swfdec_audio_stream.c libswfdec/swfdec_audio_stream.h libswfdec/swfdec_buffer.c libswfdec/swfdec_codec_adpcm.c libswfdec/swfdec_codec_audio.c
...codec_ffmpeg.c
@@ -23,13 +23,13 @@
#include <string.h>
#include <avcodec.h>
-#include "swfdec_codec.h"
+#include "swfdec_codec_audio.h"
#include "swfdec_codec_video.h"
#include "swfdec_debug.h"
/*** GENERAL ***/
-static gpointer
+static AVCodecContext *
swfdec_codec_ffmpeg_init (enum CodecID id)
{
AVCodec *codec;
@@ -60,37 +60,11 @@ fail:
/*** AUDIO ***/
-static gpointer
-swfdec_codec_ffmpeg_audio_init (SwfdecAudioFormat type, gboolean width, SwfdecAudioOut format)
-{
- AVCodecContext *ctx;
- enum CodecID id;
-
- switch (type) {
-...
2004 Dec 16
0
[patch] ffmpeg2theora A/V sync
...in = 0.0;
+ double a_pts_out = 0.0;
+ double v_pts_delta = 0.0;
+ double v_pts_delta_new = 0.0;
+ double a_pts_delta = 0.0;
+ double framesync = 0.0;
+ const double v_pts_smoothness = 8;
+ const double framesync_thresh = 0.6;
+ int j;
+
for (i = 0; i < this->context->nb_streams; i++){
AVCodecContext *enc = &this->context->streams[i]->codec;
switch (enc->codec_type){
@@ -520,14 +532,46 @@
len -= len1;
}
first=0;
+
+ /* 20041216/DK Check and correct A/V sync */
+ v_pts_in = (double)pkt.pts / AV_TIME_BASE;
+ v_pts_delta_new = v_pts_in - v_pts_out...
2004 Nov 20
0
ffmpeg2theora start and end time support
...=0;
this->deinterlace=1;
this->frame_topBand=0;
this->frame_bottomBand=0;
this->frame_leftBand=0;
this->frame_rightBand=0;
this->start_time=0;
this->end_time=0; /* ZERO denotes no end time set */
}
return this;
}
void ff2theora_output(ff2theora this) {
int i;
AVCodecContext *aenc = NULL;
AVCodecContext *venc = NULL;
AVStream *astream = NULL;
AVStream *vstream = NULL;
AVCodec *acodec = NULL;
AVCodec *vcodec = NULL;
AVIndexEntry * index_entry;
float frame_aspect;
int frame_number=0;
double fps = 0.0;
for (i = 0; i < this->context->nb_streams; i++){...
2007 Sep 05
0
5 commits - libswfdec/swfdec_codec_ffmpeg.c libswfdec/swfdec_codec_video.c libswfdec/swfdec_player.c libswfdec/swfdec_video.c
...r own code!)
- reallocate the scaling context when the size changes
diff --git a/libswfdec/swfdec_codec_ffmpeg.c b/libswfdec/swfdec_codec_ffmpeg.c
index 9fae7cf..1ed3054 100644
--- a/libswfdec/swfdec_codec_ffmpeg.c
+++ b/libswfdec/swfdec_codec_ffmpeg.c
@@ -208,26 +208,47 @@ typedef struct {
AVCodecContext * ctx; /* out context (d'oh) */
AVFrame * frame; /* the frame we use for decoding */
struct SwsContext * sws; /* the format conversion */
+ int sws_width; /* width used in resampler */
+ int sws_height; /* height used in resampler */
} SwfdecVideoDecoderFFMpeg;
+#define ALIGN...
2004 Dec 19
0
[patch] more ffmpeg2theora improvements
...+ double a_pts_delta = 0.0;
+ double framesync = 0.0;
+ double was_framesync = 0.0;
+ int frameadjust = 0;
+ const double v_pts_smoothness = 8;
+ double max_good_framesync_change = 0.5;
+ const double framesync_thresh = 0.6;
+ int j;
+
for (i = 0; i < this->context->nb_streams; i++){
AVCodecContext *enc = &this->context->streams[i]->codec;
switch (enc->codec_type){
@@ -414,16 +436,18 @@
info.ti.dropframes_p = 0;
info.ti.quick_p = 1;
info.ti.keyframe_auto_p = 1;
- info.ti.keyframe_frequency = 64;
- info.ti.keyframe_frequency_force = 64;
+ info.ti.keyframe_f...
2007 Nov 08
0
configure.ac libswfdec-gtk/swfdec_gtk_widget.c libswfdec-gtk/swfdec_playback_alsa.c libswfdec/swfdec_as_date.c libswfdec/swfdec_as_interpret.c libswfdec/swfdec_as_types.c libswfdec/swfdec_audio_flv.c libswfdec/swfdec_audio_flv.h
...170,7 +170,7 @@ swfdec_audio_decoder_ffmpeg_free (SwfdecAudioDecoder *dec)
}
SwfdecAudioDecoder *
-swfdec_audio_decoder_ffmpeg_new (SwfdecAudioCodec type, SwfdecAudioFormat format)
+swfdec_audio_decoder_ffmpeg_new (guint type, SwfdecAudioFormat format)
{
SwfdecAudioDecoderFFMpeg *ffmpeg;
AVCodecContext *ctx;
@@ -212,16 +212,16 @@ typedef struct {
} SwfdecVideoDecoderFFMpeg;
static enum PixelFormat
-swfdec_video_decoder_ffmpeg_get_format (SwfdecVideoCodec codec)
+swfdec_video_decoder_ffmpeg_get_format (guint codec)
{
switch (swfdec_video_codec_get_format (codec)) {
case SWFDEC_VIDEO_F...
2007 Mar 29
0
libswfdec-gtk/swfdec_playback_alsa.c libswfdec/swfdec_audio_event.h libswfdec/swfdec_audio_flv.h libswfdec/swfdec_audio_stream.h libswfdec/swfdec_bits.c libswfdec/swfdec_bits.h libswfdec/swfdec_buffer.c libswfdec/swfdec_buffer.h libswfdec/swfdec_cache.c
...ibswfdec/swfdec_codec_ffmpeg.c
@@ -229,7 +229,7 @@ swfdec_codec_ffmpeg_h263_init (void)
static gboolean
swfdec_codec_ffmpeg_video_get_size (gpointer codec_data,
- unsigned int *width, unsigned int *height)
+ guint *width, guint *height)
{
SwfdecCodecFFMpegVideo *codec = codec_data;
AVCodecContext *ctx = codec->ctx;
diff --git a/libswfdec/swfdec_codec_mad.c b/libswfdec/swfdec_codec_mad.c
index fa59e9c..054de4f 100644
--- a/libswfdec/swfdec_codec_mad.c
+++ b/libswfdec/swfdec_codec_mad.c
@@ -144,7 +144,7 @@ swfdec_codec_mad_decode (gpointer datap,
MadData *data = datap;
SwfdecBuffer *...
2007 Jun 27
0
Branch 'as' - 16 commits - configure.ac libswfdec/Makefile.am libswfdec/swfdec_as_context.c libswfdec/swfdec_as_frame.c libswfdec/swfdec_as_frame.h libswfdec/swfdec_as_function.c libswfdec/swfdec_as_interpret.c libswfdec/swfdec_as_script_function.c
...n = avcodec_decode_audio2 (ffmpeg->ctx, (short *) outbuf->data, &out_size, buffer->data + amount, buffer->length - amount);
if (len < 0) {
SWFDEC_ERROR ("Error %d while decoding", len);
@@ -205,6 +206,7 @@ typedef struct {
SwfdecVideoDecoder decoder;
AVCodecContext * ctx; /* out context (d'oh) */
AVFrame * frame; /* the frame we use for decoding */
+ struct SwsContext * sws; /* the format conversion */
} SwfdecVideoDecoderFFMpeg;
SwfdecBuffer *
@@ -221,12 +223,19 @@ swfdec_video_decoder_ffmpeg_decode (Swfd
SWFDEC_WARNING ("error deco...
2007 Mar 29
0
Branch 'as' - 9 commits - libswfdec-gtk/swfdec_playback_alsa.c libswfdec/js libswfdec/Makefile.am libswfdec/swfdec_as_context.c libswfdec/swfdec_as_context.h libswfdec/swfdec_as_frame.c libswfdec/swfdec_as_frame.h libswfdec/swfdec_as_function.c
...ibswfdec/swfdec_codec_ffmpeg.c
@@ -229,7 +229,7 @@ swfdec_codec_ffmpeg_h263_init (void)
static gboolean
swfdec_codec_ffmpeg_video_get_size (gpointer codec_data,
- unsigned int *width, unsigned int *height)
+ guint *width, guint *height)
{
SwfdecCodecFFMpegVideo *codec = codec_data;
AVCodecContext *ctx = codec->ctx;
diff --git a/libswfdec/swfdec_codec_mad.c b/libswfdec/swfdec_codec_mad.c
index fa59e9c..054de4f 100644
--- a/libswfdec/swfdec_codec_mad.c
+++ b/libswfdec/swfdec_codec_mad.c
@@ -144,7 +144,7 @@ swfdec_codec_mad_decode (gpointer datap,
MadData *data = datap;
SwfdecBuffer *...