mirror of
https://github.com/mpv-player/mpv
synced 2025-03-21 18:57:35 +00:00
old changes in my local tree i forgot to commit - minor fixes
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@12549 b3059339-0415-0410-9bf9-f77b7e298cf2
This commit is contained in:
parent
8e68ace3ab
commit
ff86bb362e
libmpcodecs
@ -424,10 +424,13 @@ static void compute_breaks(struct pullup_context *c, struct pullup_field *f0)
|
|||||||
|
|
||||||
/* Special case when fields are 100% identical */
|
/* Special case when fields are 100% identical */
|
||||||
if (f0->buffer == f2->buffer && f1->buffer != f3->buffer) {
|
if (f0->buffer == f2->buffer && f1->buffer != f3->buffer) {
|
||||||
f0->breaks |= BREAK_LEFT;
|
|
||||||
f2->breaks |= BREAK_RIGHT;
|
f2->breaks |= BREAK_RIGHT;
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
if (f0->buffer != f2->buffer && f1->buffer == f3->buffer) {
|
||||||
|
f1->breaks |= BREAK_LEFT;
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
for (i = 0; i < c->metric_len; i++) {
|
for (i = 0; i < c->metric_len; i++) {
|
||||||
l = f2->diffs[i] - f3->diffs[i];
|
l = f2->diffs[i] - f3->diffs[i];
|
||||||
@ -677,7 +680,7 @@ void pullup_init_context(struct pullup_context *c)
|
|||||||
c->comb = licomb_y_mmx;
|
c->comb = licomb_y_mmx;
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
//c->comb = qpcomb_y;
|
/* c->comb = qpcomb_y; */
|
||||||
break;
|
break;
|
||||||
#if 0
|
#if 0
|
||||||
case PULLUP_FMT_YUY2:
|
case PULLUP_FMT_YUY2:
|
||||||
|
@ -14,6 +14,9 @@
|
|||||||
|
|
||||||
#include "pullup.h"
|
#include "pullup.h"
|
||||||
|
|
||||||
|
#undef MAX
|
||||||
|
#define MAX(a,b) ((a)>(b)?(a):(b))
|
||||||
|
|
||||||
struct vf_priv_s {
|
struct vf_priv_s {
|
||||||
struct pullup_context *ctx;
|
struct pullup_context *ctx;
|
||||||
int init;
|
int init;
|
||||||
@ -36,6 +39,25 @@ static inline void *my_memcpy_pic(void * dst, void * src, int bytesPerLine, int
|
|||||||
return retval;
|
return retval;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static inline void *il_memcpy_pic(void *dst, void *src0, void *src1, int w, int h, int ds, int ss)
|
||||||
|
{
|
||||||
|
int i;
|
||||||
|
void *retval=dst;
|
||||||
|
ss += ss;
|
||||||
|
|
||||||
|
for(i=h>>1; i; i--)
|
||||||
|
{
|
||||||
|
memcpy(dst, src0, w);
|
||||||
|
src0 += ss;
|
||||||
|
dst += ds;
|
||||||
|
memcpy(dst, src1, w);
|
||||||
|
src1 += ss;
|
||||||
|
dst += ds;
|
||||||
|
}
|
||||||
|
|
||||||
|
return retval;
|
||||||
|
}
|
||||||
|
|
||||||
static void init_pullup(struct vf_instance_s* vf, mp_image_t *mpi)
|
static void init_pullup(struct vf_instance_s* vf, mp_image_t *mpi)
|
||||||
{
|
{
|
||||||
struct pullup_context *c = vf->priv->ctx;
|
struct pullup_context *c = vf->priv->ctx;
|
||||||
@ -58,6 +80,7 @@ static void init_pullup(struct vf_instance_s* vf, mp_image_t *mpi)
|
|||||||
c->metric_plane = 0;
|
c->metric_plane = 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
c->strict_breaks = 0;
|
||||||
c->junk_left = c->junk_right = 1;
|
c->junk_left = c->junk_right = 1;
|
||||||
c->junk_top = c->junk_bottom = 4;
|
c->junk_top = c->junk_bottom = 4;
|
||||||
c->verbose = verbose;
|
c->verbose = verbose;
|
||||||
@ -165,6 +188,7 @@ static int put_image(struct vf_instance_s* vf, mp_image_t *mpi)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#if 0
|
||||||
/* Average qscale tables from both frames. */
|
/* Average qscale tables from both frames. */
|
||||||
if (mpi->qscale) {
|
if (mpi->qscale) {
|
||||||
for (i=0; i<c->w[3]; i++) {
|
for (i=0; i<c->w[3]; i++) {
|
||||||
@ -172,6 +196,14 @@ static int put_image(struct vf_instance_s* vf, mp_image_t *mpi)
|
|||||||
+ f->ofields[1]->planes[3][i+c->w[3]])>>1;
|
+ f->ofields[1]->planes[3][i+c->w[3]])>>1;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
#else
|
||||||
|
/* Take worst of qscale tables from both frames. */
|
||||||
|
if (mpi->qscale) {
|
||||||
|
for (i=0; i<c->w[3]; i++) {
|
||||||
|
vf->priv->qbuf[i] = MAX(f->ofields[0]->planes[3][i], f->ofields[1]->planes[3][i+c->w[3]]);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
/* If the frame isn't already exportable... */
|
/* If the frame isn't already exportable... */
|
||||||
while (!f->buffer) {
|
while (!f->buffer) {
|
||||||
@ -184,6 +216,24 @@ static int put_image(struct vf_instance_s* vf, mp_image_t *mpi)
|
|||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
/* Direct render fields into output buffer */
|
/* Direct render fields into output buffer */
|
||||||
|
#if 0
|
||||||
|
/* Write-order copy seems to have worse cache performance
|
||||||
|
* than read-order, but both should be checked on
|
||||||
|
* various cpus to see which is actually better...*/
|
||||||
|
il_memcpy_pic(dmpi->planes[0], f->ofields[0]->planes[0],
|
||||||
|
f->ofields[1]->planes[0] + c->stride[0],
|
||||||
|
mpi->w, mpi->h, dmpi->stride[0], c->stride[0]);
|
||||||
|
if (mpi->flags & MP_IMGFLAG_PLANAR) {
|
||||||
|
il_memcpy_pic(dmpi->planes[1], f->ofields[0]->planes[1],
|
||||||
|
f->ofields[1]->planes[1] + c->stride[1],
|
||||||
|
mpi->chroma_width, mpi->chroma_height,
|
||||||
|
dmpi->stride[1], c->stride[1]);
|
||||||
|
il_memcpy_pic(dmpi->planes[2], f->ofields[0]->planes[2],
|
||||||
|
f->ofields[1]->planes[2] + c->stride[2],
|
||||||
|
mpi->chroma_width, mpi->chroma_height,
|
||||||
|
dmpi->stride[2], c->stride[2]);
|
||||||
|
}
|
||||||
|
#else
|
||||||
my_memcpy_pic(dmpi->planes[0], f->ofields[0]->planes[0],
|
my_memcpy_pic(dmpi->planes[0], f->ofields[0]->planes[0],
|
||||||
mpi->w, mpi->h/2, dmpi->stride[0]*2, c->stride[0]*2);
|
mpi->w, mpi->h/2, dmpi->stride[0]*2, c->stride[0]*2);
|
||||||
my_memcpy_pic(dmpi->planes[0] + dmpi->stride[0],
|
my_memcpy_pic(dmpi->planes[0] + dmpi->stride[0],
|
||||||
@ -205,6 +255,7 @@ static int put_image(struct vf_instance_s* vf, mp_image_t *mpi)
|
|||||||
mpi->chroma_width, mpi->chroma_height/2,
|
mpi->chroma_width, mpi->chroma_height/2,
|
||||||
dmpi->stride[2]*2, c->stride[2]*2);
|
dmpi->stride[2]*2, c->stride[2]*2);
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
pullup_release_frame(f);
|
pullup_release_frame(f);
|
||||||
if (mpi->qscale) {
|
if (mpi->qscale) {
|
||||||
dmpi->qscale = vf->priv->qbuf;
|
dmpi->qscale = vf->priv->qbuf;
|
||||||
|
Loading…
Reference in New Issue
Block a user