summaryrefslogtreecommitdiffstats
path: root/libmpcodecs
diff options
context:
space:
mode:
authordiego <diego@b3059339-0415-0410-9bf9-f77b7e298cf2>2006-11-06 22:57:14 +0000
committerdiego <diego@b3059339-0415-0410-9bf9-f77b7e298cf2>2006-11-06 22:57:14 +0000
commit3829ecb1a2f4f3dfcb2a2c319e404b7eb5b7eb6d (patch)
treed0cf51ba42195aad3a53ff9637e3e631e99d6cde /libmpcodecs
parentff4a1ad4a9d610a85736e2b991e219e510151a02 (diff)
downloadmpv-3829ecb1a2f4f3dfcb2a2c319e404b7eb5b7eb6d.tar.bz2
mpv-3829ecb1a2f4f3dfcb2a2c319e404b7eb5b7eb6d.tar.xz
Remove remnants of long-gone libfame.
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@20739 b3059339-0415-0410-9bf9-f77b7e298cf2
Diffstat (limited to 'libmpcodecs')
-rw-r--r--libmpcodecs/Makefile4
-rw-r--r--libmpcodecs/vf.c4
-rw-r--r--libmpcodecs/vf_fame.c151
3 files changed, 0 insertions, 159 deletions
diff --git a/libmpcodecs/Makefile b/libmpcodecs/Makefile
index 4fd4e5d0e6..2d71861e82 100644
--- a/libmpcodecs/Makefile
+++ b/libmpcodecs/Makefile
@@ -250,10 +250,6 @@ NATIVE_SRCS=native/minilzo.c \
native/RTjpegN.c \
native/xa_gsm.c \
-ifeq ($(FAME),yes)
-VFILTER_SRCS += vf_fame.c
-endif
-
ifeq ($(ZORAN),yes)
VFILTER_SRCS += vf_zrmjpeg.c
endif
diff --git a/libmpcodecs/vf.c b/libmpcodecs/vf.c
index 917ce91223..2286671f67 100644
--- a/libmpcodecs/vf.c
+++ b/libmpcodecs/vf.c
@@ -30,7 +30,6 @@ extern vf_info_t vf_info_crop;
extern vf_info_t vf_info_expand;
extern vf_info_t vf_info_pp;
extern vf_info_t vf_info_scale;
-extern vf_info_t vf_info_fame;
extern vf_info_t vf_info_format;
extern vf_info_t vf_info_noformat;
extern vf_info_t vf_info_yuy2;
@@ -114,9 +113,6 @@ static vf_info_t* filter_list[]={
&vf_info_scale,
// &vf_info_osd,
&vf_info_vo,
-#ifdef USE_LIBFAME
- &vf_info_fame,
-#endif
&vf_info_format,
&vf_info_noformat,
&vf_info_yuy2,
diff --git a/libmpcodecs/vf_fame.c b/libmpcodecs/vf_fame.c
deleted file mode 100644
index 9bc60da28d..0000000000
--- a/libmpcodecs/vf_fame.c
+++ /dev/null
@@ -1,151 +0,0 @@
-#include <stdio.h>
-#include <stdlib.h>
-#include <string.h>
-#include <inttypes.h>
-
-#include "config.h"
-#include "mp_msg.h"
-#include "help_mp.h"
-
-// 100=best >=80 very good >=50 fast
-#define QUALITY 90
-
-#include "img_format.h"
-#include "mp_image.h"
-#include "vf.h"
-
-//#include "libvo/fastmemcpy.h"
-#include <fame.h>
-
-struct vf_priv_s {
- unsigned char* outbuf;
- int outbuf_size;
- fame_parameters_t params;
- fame_context_t *ctx;
- vo_mpegpes_t pes;
-};
-
-//===========================================================================//
-
-static int config(struct vf_instance_s* vf,
- int width, int height, int d_width, int d_height,
- unsigned int flags, unsigned int outfmt){
- if(vf_next_query_format(vf,IMGFMT_MPEGPES)<=0) return 0;
-
- vf->priv->params.width=width;
- vf->priv->params.height=height;
-
- vf->priv->outbuf_size=10000+width*height; // must be enough!
- if(vf->priv->outbuf) free(vf->priv->outbuf);
- vf->priv->outbuf = malloc(vf->priv->outbuf_size);
-
- fame_init(vf->priv->ctx,&vf->priv->params,vf->priv->outbuf,vf->priv->outbuf_size);
-
- return vf_next_config(vf,width,height,d_width,d_height,flags,IMGFMT_MPEGPES);
-}
-
-static int put_image(struct vf_instance_s* vf, mp_image_t *mpi, double pts){
- fame_yuv_t yuv;
- mp_image_t *dmpi;
- int out_size;
-
- yuv.w=mpi->width;
- yuv.h=mpi->height;
- yuv.p=mpi->stride[0];
- yuv.y=mpi->planes[0];
- yuv.u=mpi->planes[1];
- yuv.v=mpi->planes[2];
-
-// out_size = fame_encode_frame(vf->priv->ctx, &yuv, NULL);
- fame_start_frame(vf->priv->ctx, &yuv, NULL);
- out_size = fame_encode_slice(vf->priv->ctx);
- fame_end_frame(vf->priv->ctx, NULL);
-
- if(out_size<=0) return 1;
-
- dmpi=vf_get_image(vf->next,IMGFMT_MPEGPES,
- MP_IMGTYPE_EXPORT, 0,
- mpi->w, mpi->h);
-
- vf->priv->pes.data=vf->priv->outbuf;
- vf->priv->pes.size=out_size;
- vf->priv->pes.id=0x1E0;
- vf->priv->pes.timestamp=-1; // dunno
-
- dmpi->planes[0]=(void*) &vf->priv->pes;
-
- return vf_next_put_image(vf,dmpi, MP_NOPTS_VALUE);
-}
-
-//===========================================================================//
-
-static int query_format(struct vf_instance_s* vf, unsigned int fmt){
- switch(fmt){
- case IMGFMT_YV12:
- case IMGFMT_I420:
- case IMGFMT_IYUV:
-// return (vf_next_query_format(vf,IMGFMT_MPEGPES) & (~(VFCAP_CSP_SUPPORTED_BY_HW|VFCAP_ACCEPT_STRIDE)));
- return (vf_next_query_format(vf,IMGFMT_MPEGPES) & (~(VFCAP_CSP_SUPPORTED_BY_HW)));
- }
- return 0;
-}
-
-static int open(vf_instance_t *vf, char* args){
- int p_quality=0;
- float p_fps=0;
-
- vf->config=config;
- vf->put_image=put_image;
- vf->query_format=query_format;
- vf->priv=malloc(sizeof(struct vf_priv_s));
- memset(vf->priv,0,sizeof(struct vf_priv_s));
-
- vf->priv->ctx=fame_open();
- if(!vf->priv->ctx){
- mp_msg(MSGT_VFILTER, MSGL_ERR, MSGTR_MPCODECS_FatalCantOpenlibFAME);
- return 0;
- }
-
- // TODO: parse args ->
- if(args) sscanf(args, "%d:%f", &p_quality, &p_fps);
-
- if(p_quality<=100){
- // fixed quality
- vf->priv->params.quality=p_quality?p_quality:QUALITY;
- vf->priv->params.bitrate=0;
- } else {
- // fixed bitrate (in kbits)
- vf->priv->params.quality=QUALITY;
- vf->priv->params.bitrate=1000*p_quality;
- }
-
- if(p_fps<1) p_fps=25.0;
- if(p_fps == ((int)p_fps)){
- vf->priv->params.frame_rate_num=p_fps;
- vf->priv->params.frame_rate_den=1;
- } else {
- vf->priv->params.frame_rate_num=p_fps*1001;
- vf->priv->params.frame_rate_den=1001;
- }
-
- vf->priv->params.coding="I";
- vf->priv->params.slices_per_frame=1;
- vf->priv->params.frames_per_sequence=(int)p_fps;
- vf->priv->params.shape_quality=100;
- vf->priv->params.search_range=8; // for "IPPP" only
- vf->priv->params.verbose=0;
- vf->priv->params.profile="mpeg1"; // TODO
-
- return 1;
-}
-
-vf_info_t vf_info_fame = {
- "realtime mpeg1 encoding with libFAME",
- "fame",
- "A'rpi",
- "",
- open,
- NULL
-};
-
-//===========================================================================//