Mercurial > mplayer.hg
comparison postproc/postprocess.c @ 8805:e547ce712577
YUV 411/422/444 support for pp
author | michael |
---|---|
date | Sun, 05 Jan 2003 19:10:42 +0000 |
parents | 11888c95481b |
children | 8b2dde0dccf6 |
comparison
equal
deleted
inserted
replaced
8804:b233200c3fca | 8805:e547ce712577 |
---|---|
751 int i; | 751 int i; |
752 int stride= (width+15)&(~15); //assumed / will realloc if needed | 752 int stride= (width+15)&(~15); //assumed / will realloc if needed |
753 | 753 |
754 memset(c, 0, sizeof(PPContext)); | 754 memset(c, 0, sizeof(PPContext)); |
755 c->cpuCaps= cpuCaps; | 755 c->cpuCaps= cpuCaps; |
756 if(cpuCaps&PP_FORMAT){ | |
757 c->hChromaSubSample= cpuCaps&0x3; | |
758 c->vChromaSubSample= (cpuCaps>>4)&0x3; | |
759 }else{ | |
760 c->hChromaSubSample= 1; | |
761 c->vChromaSubSample= 1; | |
762 } | |
756 | 763 |
757 reallocBuffers(c, width, height, stride); | 764 reallocBuffers(c, width, height, stride); |
758 | 765 |
759 c->frameNum=-1; | 766 c->frameNum=-1; |
760 | 767 |
793 PPContext *c = (PPContext*)vc; | 800 PPContext *c = (PPContext*)vc; |
794 int minStride= MAX(srcStride[0], dstStride[0]); | 801 int minStride= MAX(srcStride[0], dstStride[0]); |
795 | 802 |
796 if(c->stride < minStride) | 803 if(c->stride < minStride) |
797 reallocBuffers(c, width, height, minStride); | 804 reallocBuffers(c, width, height, minStride); |
798 | |
799 | 805 |
800 if(QP_store==NULL || (mode->lumMode & FORCE_QUANT)) | 806 if(QP_store==NULL || (mode->lumMode & FORCE_QUANT)) |
801 { | 807 { |
802 int i; | 808 int i; |
803 QP_store= c->forcedQPTable; | 809 QP_store= c->forcedQPTable; |
838 } | 844 } |
839 | 845 |
840 postProcess(src[0], srcStride[0], dst[0], dstStride[0], | 846 postProcess(src[0], srcStride[0], dst[0], dstStride[0], |
841 width, height, QP_store, QPStride, 0, mode, c); | 847 width, height, QP_store, QPStride, 0, mode, c); |
842 | 848 |
843 width = (width +1)>>1; | 849 width = (width )>>c->hChromaSubSample; |
844 height = (height+1)>>1; | 850 height = (height)>>c->vChromaSubSample; |
845 | 851 |
846 if(mode->chromMode) | 852 if(mode->chromMode) |
847 { | 853 { |
848 postProcess(src[1], srcStride[1], dst[1], dstStride[1], | 854 postProcess(src[1], srcStride[1], dst[1], dstStride[1], |
849 width, height, QP_store, QPStride, 1, mode, c); | 855 width, height, QP_store, QPStride, 1, mode, c); |