mirror of
https://github.com/mpv-player/mpv
synced 2024-10-30 04:46:41 +01:00
passing picture_type (might be usefull for postprocessing)
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@7958 b3059339-0415-0410-9bf9-f77b7e298cf2
This commit is contained in:
parent
caa57f98bd
commit
ba80103442
@ -75,6 +75,7 @@ typedef struct mp_image_s {
|
||||
unsigned int stride[MP_MAX_PLANES];
|
||||
int* qscale;
|
||||
int qstride;
|
||||
int pict_type; // 0->unknown, 1->I, 2->P, 3->B
|
||||
int num_planes;
|
||||
/* these are only used by planar formats Y,U(Cb),V(Cr) */
|
||||
int chroma_width;
|
||||
|
@ -630,6 +630,17 @@ static mp_image_t* decode(sh_video_t *sh,void* data,int len,int flags){
|
||||
mpi->qscale=&quant_store[0][0];
|
||||
mpi->qstride=MBC+1;
|
||||
#endif
|
||||
|
||||
{
|
||||
static int last_non_b_type= 0;
|
||||
|
||||
if(avctx->pict_type == B_TYPE)
|
||||
mpi->pict_type= B_TYPE;
|
||||
else{
|
||||
mpi->pict_type= last_non_b_type;
|
||||
last_non_b_type= avctx->pict_type;
|
||||
}
|
||||
}
|
||||
|
||||
return mpi;
|
||||
}
|
||||
|
@ -290,5 +290,16 @@ while(current<end){
|
||||
if(ret) mpi=ret;
|
||||
// }
|
||||
|
||||
if(mpi){
|
||||
static int last_non_b_type= 0;
|
||||
|
||||
if(picture->picture_coding_type == B_TYPE)
|
||||
mpi->pict_type= B_TYPE;
|
||||
else{
|
||||
mpi->pict_type= last_non_b_type;
|
||||
last_non_b_type= picture->picture_coding_type;
|
||||
}
|
||||
}
|
||||
|
||||
return mpi;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user